bbe67a378ae4720a6930a6b026f850e5def51c15
[gnulib.git] / ChangeLog
1 2007-03-26  Bruno Haible  <bruno@clisp.org>
2
3         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Don't use
4         unportable shell command "if ! ...".
5         Reported by Ralf Wildenhues.
6
7 2007-03-25  Bruno Haible  <bruno@clisp.org>
8
9         * lib/sysexit_,h: If HAVE_SYSEXITS_H is defined, include the original
10         <sysexits.h> file, and only add EX_CONFIG.
11         * m4/sysexits.m4 (gl_SYSEXITS): If <sysexits.h> exists, check its
12         absolute file name and whether it is sufficient. Substitute also
13         HAVE_SYSEXITS_H and ABSOLUTE_SYSEXITS_H.
14         * modules/sysexits (Makefile.am): Substitute HAVE_SYSEXITS_H and
15         ABSOLUTE_SYSEXITS_H into sysexits.h.
16
17 2007-03-25  Bruno Haible  <bruno@clisp.org>
18
19         * lib/getaddrinfo.c (getaddrinfo): Don't access hints->ai_flags when
20         hints is NULL.
21
22 2007-03-25  Bruno Haible  <bruno@clisp.org>
23
24         * lib/uniconv/u8-conv-from-enc.c (u8_conv_from_encoding): Add a cast.
25         * lib/uniconv/u8-strconv-to-enc.c (u8_strconv_to_encoding): Likewise.
26
27 2007-03-25  Bruno Haible  <bruno@clisp.org>
28
29         * lib/vasnprintf.c: Include langinfo.h.
30         (VASNPRINTF): Prefer nl_langinfo over localeconv, since it's more
31         multithread-safe.
32         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): New macro.
33         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke it.
34         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
35         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
36         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
37         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
38         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
39         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX: Likewise.
40         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
41         Reported by Simon Josefsson.
42
43 2007-03-25  Bruno Haible  <bruno@clisp.org>
44
45         * lib/printf-parse.c [!IN_LIBINTL]: Include <stdint.h>, for intmax_t.
46         (PRINTF_PARSE): Make the support for size specifier 'j' unconditional.
47         * modules/vasnprintf (Depends-on): Add stdint.
48
49 2007-03-25  Bruno Haible  <bruno@clisp.org>
50
51         * modules/fpieee: New file.
52         * m4/fpieee.m4: New file.
53         * modules/isnan-nolibm (Depends-on): Add fpieee.
54         * modules/isnanl-nolibm (Depends-on): Add fpieee.
55         * modules/isnanl (Depends-on): Add fpieee.
56
57 2007-03-25  Bruno Haible  <bruno@clisp.org>
58
59         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Test also finite numbers.
60
61 2007-03-25  Bruno Haible  <bruno@clisp.org>
62
63         Avoid test failures on IRIX 6.5.
64         * tests/test-frexpl.c (MIN_NORMAL_EXP): New macro.
65         (main): Use it.
66         * tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP): New
67         macros.
68         (main): Use them.
69
70 2007-03-25  Bruno Haible  <bruno@clisp.org>
71
72         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): New macro.
73         (gl_FUNC_FREXPL): Invoke it. Set REPLACE_FREXPL to 1 if it frexpl
74         exists but doesn't work.
75         * lib/math_.h (frexpl): Define as a replacement macro if REPLACE_FREXPL
76         is set. Don't provide a prototype if REPLACE_FREXPL is not set.
77         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_FREXPL.
78         * modules/math (Makefile.am) Substibute also REPLACE_FREXPL into math.h.
79
80 2007-03-25  Bruno Haible  <bruno@clisp.org>
81
82         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Add check whether frexp(inf)
83         returns inf. Needed on IRIX 6.5.
84
85 2007-03-25  Bruno Haible  <bruno@clisp.org>
86
87         * tests/test-frexpl.c: Include isnanl-nolibm.h.
88         (main): Use isnanl instead of x != x idiom.
89         * modules/frexpl-tests (Depends-on): Add isnanl-nolibm.
90
91         * tests/test-frexp.c: Include isnan.h.
92         (main): Use isnan instead of x != x idiom.
93         * modules/frexp-tests (Depends-on): Add isnan-nolibm.
94
95 2007-03-25  Bruno Haible  <bruno@clisp.org>
96
97         * tests/test-frexp.c (NaN): New function/macro.
98         (main): Use it instead of 0.0 / 0.0.
99         * tests/test-isnan.c (NaN): New function/macro.
100         (main): Use it instead of 0.0 / 0.0.
101         * tests/test-vasnprintf-posix.c (NaN): New function/macro.
102         (test_function): Use it instead of 0.0 / 0.0.
103         * tests/test-vasprintf-posix.c (NaN): New function/macro.
104         (test_function): Use it instead of 0.0 / 0.0.
105         * tests/test-snprintf-posix.h (NaN): New function/macro.
106         (test_function): Use it instead of 0.0 / 0.0.
107         * tests/test-sprintf-posix.h (NaN): New function/macro.
108         (test_function): Use it instead of 0.0 / 0.0.
109         * tests/test-fprintf-posix.h (NaN): New function/macro.
110         (test_function): Use it instead of 0.0 / 0.0.
111         * tests/test-printf-posix.h (NaN): New function/macro.
112         (test_function): Use it instead of 0.0 / 0.0.
113
114         * lib/isnan.c (FUNC): Work around a DEC C compiler bug.
115
116 2007-03-25  Bruno Haible  <bruno@clisp.org>
117
118         * lib/glob_.h: Include <sys/stat.h>. Avoids warnings on AIX 5.1.
119
120 2007-03-25  Bruno Haible  <bruno@clisp.org>
121
122         * lib/regexec.c (merge_state_with_log): Make static.
123
124 2007-03-25  Bruno Haible  <bruno@clisp.org>
125
126         * lib/trigl.c (kernel_rem_pio2): Make static.
127
128 2007-03-25  Bruno Haible  <bruno@clisp.org>
129
130         * lib/sincosl.c (sincosl_table): Make static.
131
132 2007-03-25  Bruno Haible  <bruno@clisp.org>
133
134         * lib/argp.h (__restrict): Define to empty, rather than to 'restrict',
135         if the compiler does not support C99.
136
137 2007-03-25  Bruno Haible  <bruno@clisp.org>
138
139         * modules/time (Makefile.am): Ensure all rule action lines start with a
140         tab.
141
142 2007-03-24  Bruno Haible  <bruno@clisp.org>
143
144         * modules/tsearch-tests: New file.
145         * tests/test-tsearch.sh: New file.
146         * tests/test-tsearch.c: New file, mostly copied from glibc.
147
148         * modules/search-tests: New file.
149         * tests/test-search.c: New file.
150
151         * modules/search: New file.
152         * lib/search_.h: New file, incorporating lib/tsearch.h.
153         * m4/search_h.m4: New file.
154         * lib/tsearch.h: Remove file.
155         * lib/tsearch.c: Include search.h instead of tsearch.h.
156         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Require gl_SEARCH_H_DEFAULTS. Set
157         HAVE_TSEARCH.
158         * modules/tsearch (Files): Remove lib/tsearch.h.
159         (Depends-on): Add search.
160         (configure.ac): Invoke gl_SEARCH_MODULE_INDICATOR.
161         (Include): Change tsearch.h into search.h.
162
163 2007-03-24  Bruno Haible  <bruno@clisp.org>
164
165         * modules/fpucw: New file.
166         * lib/fpucw.h: New file.
167         * lib/frexp.c: Include fpucw.h.
168         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
169         (FUNC): Use them.
170         * lib/printf-frexp.c: Include fpucw.h.
171         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
172         (FUNC): Use them.
173         * lib/vasnprintf.c: Include fpucw.h.
174         (VASNPRINTF): Invoke BEGIN/END_LONG_DOUBLE_ROUNDING around the
175         'long double' calculations.
176         * tests/test-frexpl.c: Include fpucw.h.
177         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
178         * tests/test-printf-frexpl.c: Include fpucw.h.
179         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
180         * modules/frexpl (Depends-on): Add fpucw.
181         * modules/printf-frexpl (Depends-on): Likewise.
182         * modules/fprintf-posix (Depends-on): Likewise.
183         * modules/snprintf-posix (Depends-on): Likewise.
184         * modules/sprintf-posix (Depends-on): Likewise.
185         * modules/vasnprintf-posix (Depends-on): Likewise.
186         * modules/vasprintf-posix (Depends-on): Likewise.
187         * modules/vfprintf-posix (Depends-on): Likewise.
188         * modules/vsnprintf-posix (Depends-on): Likewise.
189         * modules/vsprintf-posix (Depends-on): Likewise.
190         * modules/frexpl-tests (Depends-on): Likewise.
191         * modules/printf-frexpl-tests (Depends-on): Likewise.
192
193 2007-03-24  Bruno Haible  <bruno@clisp.org>
194
195         * lib/float+.h: New file.
196         * lib/isnan.c: Include float+.h.
197         (SIZE): New macro.
198         (FUNC): Compare only SIZE bytes of the value.
199         * lib/vasnprintf.c: Include float+.h.
200         (VASNPRINTF): When comparing agains +0.0L or +0.0, compare only
201         SIZEOF_LDBL or SIZEOF_DBL bytes.
202         * modules/isnan-nolibm (Files): Add lib/float+.h.
203         * modules/isnanl-nolibm (Files): Add lib/float+.h.
204         * modules/isnanl (Files): Add lib/float+.h.
205         * modules/vasnprintf (Files): Add lib/float+.h.
206         
207 2007-03-24  Bruno Haible  <bruno@clisp.org>
208
209         * lib/vasnprintf.c [!HAVE_LONG_DOUBLE]: Include printf-frexp.h. Don't
210         include isnanl-nolibm.h.
211
212 2007-03-24  Bruno Haible  <bruno@clisp.org>
213
214         * tests/test-read-file.c (main): Don't produce spurious output for
215         expected situations. Make the test fail if it encountered unexpected
216         results.
217
218 2007-03-24  Bruno Haible  <bruno@clisp.org>
219
220         * m4/locale-fr.m4 (gt_LOCALE_FR): Remove the special-casing of NetBSD,
221         since its fr_FR.ISO8859-1 locale wouldn't pass the tests.
222
223 2007-03-24  Bruno Haible  <bruno@clisp.org>
224
225         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Fix last change.
226
227 2007-03-24  Bruno Haible  <bruno@clisp.org>
228
229         * modules/unistr/base (Depends-on): Remove utf8-ucs4-unsafe,
230         utf16-ucs4-unsafe, utf8-ucs4, utf16-ucs4, ucs4-utf8, ucs4-utf16.
231
232         * modules/unistr/u8-mbtouc: Add source files from module utf8-ucs4.
233         * modules/utf8-ucs4: Turn into a symbolic link to module
234         unistr/u8-mbtouc.
235
236         * modules/unistr/u8-mbtouc-unsafe: Add source files from module
237         utf8-ucs4-unsafe.
238         * modules/utf8-ucs4-unsafe: Turn into a symbolic link to module
239         unistr/u8-mbtouc-unsafe.
240
241         * modules/unistr/u16-mbtouc: Add source files from module utf16-ucs4.
242         * modules/utf16-ucs4: Turn into a symbolic link to module
243         unistr/u16-mbtouc.
244
245         * modules/unistr/u16-mbtouc-unsafe: Add source files from module
246         utf16-ucs4-unsafe.
247         * modules/utf16-ucs4-unsafe: Turn into a symbolic link to module
248         unistr/u16-mbtouc-unsafe.
249
250         * modules/unistr/u8-uctomb: Add source files from module utf4-utf8.
251         * modules/ucs4-utf8: Turn into a symbolic link to module
252         unistr/u8-ubtomb.
253
254         * modules/unistr/u16-uctomb: Add source files from module utf4-utf16.
255         * modules/ucs4-utf16: Turn into a symbolic link to module
256         unistr/u16-ubtomb.
257
258 2007-03-24  Bruno Haible  <bruno@clisp.org>
259
260         * lib/unistr/u8-mbtouc-aux.c: Renamed from lib/unistr/utf8-ucs4.c.
261         Enable the function only if HAVE_INLINE.
262         * lib/unistr/u8-mbtouc-unsafe-aux.c: Renamed from
263         lib/unistr/utf8-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
264         * lib/unistr/u16-mbtouc-aux.c: Renamed from lib/unistr/utf16-ucs4.c.
265         Enable the function only if HAVE_INLINE.
266         * lib/unistr/u16-mbtouc-unsafe-aux.c: Renamed from
267         lib/unistr/utf16-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
268         * lib/unistr/u8-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf8.c.
269         Enable the function only if HAVE_INLINE.
270         * lib/unistr/u16-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf16.c.
271         Enable the function only if HAVE_INLINE.
272         * modules/utf8-ucs4: Update.
273         * modules/utf8-ucs4-unsafe: Update.
274         * modules/utf16-ucs4: Update.
275         * modules/utf16-ucs4-unsafe: Update.
276         * modules/ucs4-utf8: Update.
277         * modules/ucs4-utf16: Update.
278
279 2007-03-24  Bruno Haible  <bruno@clisp.org>
280
281         * lib/utf8-ucs4.h: Remove file.
282         * lib/utf8-ucs4-unsafe.h: Remove file.
283         * lib/utf16-ucs4.h: Remove file.
284         * lib/utf16-ucs4-unsafe.h: Remove file.
285         * lib/ucs4-utf8.h: Remove file.
286         * lib/ucs4-utf16.h: Remove file.
287         * lib/unistr.h: Include their previous contents.
288         * m4/utf-ucs4.m4: Remove file.
289         * m4/ucs4-utf.m4: Remove file.
290         * modules/utf8-ucs4 (Files): Remove lib/utf8-ucs4.h.
291         (Depends-on): Add unistr/base.
292         (configure.ac): Remove gl_UTF_UCS4.
293         (Makefile.am): Update.
294         (Include): Change to unistr.h.
295         * modules/utf8-ucs4-unsafe (Files): Remove lib/utf8-ucs4-unsafe.h.
296         (Depends-on): Add unistr/base.
297         (configure.ac): Remove gl_UTF_UCS4.
298         (Makefile.am): Update.
299         (Include): Change to unistr.h.
300         * modules/utf16-ucs4 (Files): Remove lib/utf16-ucs4.h.
301         (Depends-on): Add unistr/base.
302         (configure.ac): Remove gl_UTF_UCS4.
303         (Makefile.am): Update.
304         (Include): Change to unistr.h.
305         * modules/utf16-ucs4-unsafe (Files): Remove lib/utf16-ucs4-unsafe.h.
306         (Depends-on): Add unistr/base.
307         (configure.ac): Remove gl_UTF_UCS4.
308         (Makefile.am): Update.
309         (Include): Change to unistr.h.
310         * modules/ucs4-utf8 (Files): Remove lib/ucs4-utf8.h.
311         (Depends-on): Add unistr/base.
312         (configure.ac): Remove gl_UCS4_UTF.
313         (Makefile.am): Update.
314         (Include): Change to unistr.h.
315         * modules/ucs4-utf16 (Files): Remove lib/ucs4-utf16.h.
316         (Depends-on): Add unistr/base.
317         (configure.ac): Remove gl_UCS4_UTF.
318         (Makefile.am): Update.
319         (Include): Change to unistr.h.
320         * lib/unistr/utf8-ucs4.c: Include unistr.h instead of utf8-ucs4.h.
321         * lib/unistr/utf8-ucs4-unsafe.c: Include unistr.h instead of
322         utf8-ucs4-unsafe.h.
323         * lib/unistr/utf16-ucs4.c: Include unistr.h instead of utf16-ucs4.h.
324         * lib/unistr/utf16-ucs4-unsafe.c: Include unistr.h instead of
325         utf16-ucs4-unsafe.h.
326         * lib/unistr/ucs4-utf8.c: Include unistr.h instead of ucs4-utf8.h.
327         * lib/unistr/ucs4-utf16.c: Include unistr.h instead of ucs4-utf16.h.
328         * lib/unistr/u8-chr.c: Don't include ucs4-utf8.h.
329         * lib/unistr/u8-strchr.c: Likewise.
330         * lib/unistr/u8-strrchr.c: Likewise.
331         * lib/unistr/u16-chr.c: Don't include ucs4-utf16.h.
332         * lib/unistr/u16-strchr.c: Likewise.
333         * lib/unistr/u16-strrchr.c: Likewise.
334         * lib/striconveh.c: Update.
335         * lib/linebreak.c: Update.
336
337 2007-03-24  Bruno Haible  <bruno@clisp.org>
338
339         * lib/argp-help.c (fill_in_uparams, canon_doc_option): Cast the
340         arguments of isspace, isalpha, isalnum, isdigit to 'unsigned char'.
341
342 2007-03-22  Bruno Haible  <bruno@clisp.org>
343
344         * lib/strptime.c (__strptime_internal): Use ANSI C syntax.
345
346 2007-03-23  Paul Eggert  <eggert@cs.ucla.edu>
347
348         * MODULES.html.sh (File system functions): New module write-any-file.
349         * modules/write-any-file, lib/write-any-file.c, lib/write-any-file.h:
350         * m4/write-any-file.m4: New files.
351
352 2007-03-23  Eric Blake  <ebb9@byu.net>
353
354         * gnulib-tool: Rearrange space-tab sequences, since some editors
355         like to eat them.
356
357 2007-03-23  Eric Blake  <ebb9@byu.net>
358
359         * lib/version-etc.c (version_etc_va): Update license wording to
360         be more concise.  Recommended by Richard Stallman.
361
362 2007-03-22  Bruno Haible  <bruno@clisp.org>
363
364         * lib/poll.c (MSG_PEEK): New fallback definition.
365
366 2007-03-22  Bruno Haible  <bruno@clisp.org>
367
368         * modules/sys_socket-tests (configure.ac): Check for shutdown function.
369         * tests/test-sys_socket.c (a): Test only if shutdown() exists.
370         (main): Update.
371         Fixes a compilation error on BeOS.
372
373 2007-03-22  Bruno Haible  <bruno@clisp.org>
374
375         * modules/frexpl-tests: New file.
376         * tests/test-frexpl.c: New file.
377
378         * modules/frexpl: New file.
379         * m4/frexpl.m4: New file.
380         * modules/math (Makefile.am): Also substitute GNULIB_FREXPL into math.h.
381         * lib/math_.h (frexpl): Test GNULIB_FREXPL instead of GNULIB_MATHL.
382         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_FREXPL.
383         * modules/mathl (Files): Remove lib/frexpl.c, lib/frexp.c.
384         (Depends-on): Add frexpl. Remove isnanl-nolibm.
385         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Don't test for frexpl.
386
387 2007-03-22  Bruno Haible  <bruno@clisp.org>
388
389         * lib/frexpl.c: Share code with lib/frexp.c.
390         * modules/mathl (Files): Add lib/frexp.c.
391         (Depends-on): Add isnanl-nolibm.
392
393 2007-03-22  Bruno Haible  <bruno@clisp.org>
394
395         * modules/printf-frexp (Files): Add m4/frexp.m4.
396         * m4/printf-frexp.m4 (gl_FUNC_PRINTF_FREXP): Define HAVE_FREXP_IN_LIBC
397         only if the found frexp function actually works.
398
399 2007-03-22  Bruno Haible  <bruno@clisp.org>
400
401         * lib/frexp.c: Remove older implementation that uses divisions.
402
403 2007-03-21  Bruno Haible  <bruno@clisp.org>
404
405         * modules/frexp-tests: New file.
406         * tests/test-frexp.c: New file.
407
408         * modules/frexp: New file.
409         * lib/frexp.c: New file.
410         * m4/frexp.m4: New file.
411         * lib/math_.h (frexp): New declaration.
412         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Also initialize GNULIB_FREXP and
413         REPLACE_FREXP.
414         * modules/math (math.h): Also substitute GNULIB_FREXP, REPLACE_FREXP.
415
416 2007-03-21  Bruno Haible  <bruno@clisp.org>
417
418         * modules/isnanl-tests: New file.
419         * tests/test-isnanl.c: New file.
420
421         * modules/isnanl: New file.
422         * lib/isnanl.h: New file.
423         * m4/isnanl.m4 (gl_FUNC_ISNANL): New macro.
424         (gl_FUNC_ISNANL_NO_LIBM): Invoke gl_HAVE_ISNANL_NO_LIBM,
425         gl_FUNC_ISNANL_WORKS.
426         (gl_HAVE_ISNANL_NO_LIBM, gl_HAVE_ISNANL_IN_LIBM, gl_FUNC_ISNANL_WORKS):
427         New macros.
428
429 2007-03-21  Bruno Haible  <bruno@clisp.org>
430
431         * modules/isnanl-nolibm (Files): Add lib/isnanl-nolibm.h, remove
432         lib/isnanl.h.
433         (Include): Update.
434         * lib/isnanl-nolibm.h: Renamed from lib/isnanl.h.
435         * lib/vasnprintf.c: Update.
436         * modules/isnanl-nolibm-tests (Files): Add tests/test-isnanl-nolibm.c,
437         tests/test-isnanl.h, remove tests/test-isnanl.c.
438         (Makefile.am): Update.
439         * tests/test-isnanl-nolibm.c: New file.
440         * tests/test-isnanl.h: New file.
441         * tests/test-isnanl.c: Remove file.
442
443 2007-03-21  Jim Meyering  <jim@meyering.net>
444
445         When trying to open ".", treat ESTALE like EACCES.
446         * lib/savewd.c (savewd_save): Resort to forking not just upon
447         failure with EACCES, but also when errno is ESTALE.
448
449 2007-03-20  Bruno Haible  <bruno@clisp.org>
450
451         * lib/string_.h (strndup): Enable declaration also if HAVE_STRNDUP.
452         Needed on AIX 5.1. Reported by Matthew Woehlke.
453
454 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
455
456         Suggestions by Bruno Haible:
457         * lib/acl-internal.h: Include "gettext.h" rather than rolling
458         our own.
459         (ACL_NOT_WELL_SUPPORTED): Parenthesize arg when used.
460         * modules/acl (Depends-on): Add gettext.
461
462 2007-03-19  Bruno Haible  <bruno@clisp.org>
463
464         * modules/iconvme: Remove file.
465         * lib/iconvme.h: Remove file.
466         * lib/iconvme.c: Remove file.
467         * m4/iconvme.m4: Remove file.
468
469 2007-03-19  Bruno Haible  <bruno@clisp.org>
470
471         * doc/relocatable-maint.texi: Break long shell script line.
472         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
473
474 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
475
476         Add limited support for Solaris 10 ZFS-style ACLs: just enough to
477         handle file_has_acl.
478         * lib/acl-internal.h, lib/acl_entries.c, lib/file-has-acl.c: New files.
479         * lib/acl.c: Move header inclusions and related macro defns into
480         lib/acl-internal.h.
481         (S_ISLNK): Remove defn, since that's now done for us.
482         (file_has_acl): Move to lib/file-has-acl.c.
483         Call acl_trivial if available.  This is the crucial part of the fix.
484         (acl_entries): Move to lib/acl_entries.c.  Now extern, since it's
485         shared within the library.  Rewrite a bit, partly to make it compatible
486         with the GNU coding style.
487         * m4/acl.m4 (AC_FUNC_ACL): Add AC_LIBOBJ([file-has-acl]).
488         Remove unnecessary double-quotes.
489         Don't test for acl_to_text; the build will catch that.
490         Replace acl_entries if it doesn't exist and it is needed.
491         Check for -lsec and acl_trivial (as used on Solaris 10).
492         * modules/acl (Files): Add lib/acl-internal.h, lib/acl_entries.c,
493         lib/file-has-acl.c.
494         (Depends-on): Add sys_stat, for S_ISLNK.
495
496 2007-03-19  Ben Pfaff  <blp@gnu.org>
497
498         * doc/gnulib.texi: Fix typos.
499         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
500
501 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
502
503         * lib/getcwd.c (__getcwd): Remove redundant comparison of buf to NULL.
504         If size is zero here, buf must be zero.
505
506 2007-03-19  Simon Josefsson  <simon@josefsson.org>
507
508         * des.c: Remove weak_keys_chksum.  Reported by Bruno Haible
509         <bruno@clisp.org>.
510
511 2007-03-18  Bruno Haible  <bruno@clisp.org>
512
513         * lib/vasnprintf.c (VASNPRINTF): Undo first part of last patch.
514         Suggested by Eric Blake.
515
516 2007-03-18  Ben Pfaff  <blp@gnu.org>
517
518         * doc/relocatable.texi: Recommend using as prefix a directory
519         that does not exist and will never be created.  Based on
520         discussion with Bruno Haible, Ralf Wildenhues, Matthew Woehlke,
521         and others.
522
523 2007-03-17  Bruno Haible  <bruno@clisp.org>
524
525         * lib/fchownat.c: Include lchown.h.
526
527 2007-03-17  Bruno Haible  <bruno@clisp.org>
528
529         Fix endless loop when the given allocated size was > INT_MAX.
530         * lib/vasnprintf.c (EOVERFLOW): New fallback definition.
531         (VASNPRINTF): Fail with EOVERFLOW when the given allocated size is
532         larger than INT_MAX, or when it grow to a value larger than INT_MAX.
533         * lib/vsprintf.c (vsprintf): Don't pass a size > INT_MAX to vasnprintf.
534         * lib/sprintf.c (sprintf): Likewise.
535
536 2007-03-17  Bruno Haible  <bruno@clisp.org>
537
538         * tests/test-argp-2.sh (func_compare): Output a context diff.
539
540 2007-03-17  Bruno Haible  <bruno@clisp.org>
541
542         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Check also the
543         locale's decimal-point character.
544
545 2007-03-17  Bruno Haible  <bruno@clisp.org>
546
547         * lib/vasnprintf.c (VASNPRINTF): Clear out the memory used for arg_mem
548         before comparing it. Needed because on some platforms (e.g. x86) a
549         'long double' occupies less bytes than sizeof (long double).
550
551 2007-03-17  Bruno Haible  <bruno@clisp.org>
552
553         * tests/test-crc.c (main): Make printf statements 64-bit clean.
554         * tests/test-gc-pbkdf2-sha1.c (main): Likewise.
555         * tests/test-getaddrinfo.c (simple): Likewise.
556         * tests/test-read-file.c (main): Likewise.
557
558 2007-03-17  Bruno Haible  <bruno@clisp.org>
559
560         * tests/test-dirname.c (main): Make printf statements 64-bit clean.
561
562 2007-03-17  Bruno Haible  <bruno@clisp.org>
563
564         * tests/test-xvasprintf.c (test_xvasprintf, test_xasprintf): Remove
565         unused variable.
566
567 2007-03-17  Bruno Haible  <bruno@clisp.org>
568
569         * tests/test-c-strcasecmp.c: Include c-strcase.h.
570         * tests/test-c-strncasecmp.c: Likewise.
571
572 2007-03-17  Bruno Haible  <bruno@clisp.org>
573
574         * modules/stdlib (Depends-on): Add unistd.
575         * lib/stdlib_.h: Include <unistd.h> if mkstemp is desired.
576         Needed for MacOS X 10.3.
577
578 2007-03-17  Bruno Haible  <bruno@clisp.org>
579
580         * lib/unistr/u-strdup.h: Include <stdlib.h>.
581
582 2007-03-17  Bruno Haible  <bruno@clisp.org>
583
584         * lib/unistr/u-cpy-alloc.h: Include <stdlib.h>.
585
586 2007-03-17  Bruno Haible  <bruno@clisp.org>
587
588         * gnulib-tool (func_import): Update .cvsignore and .gitignore files
589         to reflect files copied from gnulib (with or without modifications).
590         Suggested by Jim Meyering.
591
592 2007-03-17  Eric Blake  <ebb9@byu.net>
593
594         * NEWS: Document stdlib change from 2007-02-18.
595
596 2007-03-17  Jim Meyering  <jim@meyering.net>
597
598         Detect use of AC_CONFIG_AUX_DIR also when its argument is quoted.
599         * build-aux/bootstrap: Put ""s around use of $build_aux, in case
600         someone uses a name containing shell meta-characters.
601         Reported by Alfred M. Szmidt.
602
603         * build-aux/bootstrap: Don't use \> in grep regexp.  For HP-UX.
604
605 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
606
607         * build-aux/bootstrap (with_gettext): New variable.  Run autopoint
608         and copy gettext configuration files only if configure.ac contains
609         a use of AM_GNU_GETTEXT_VERSION.
610
611 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
612
613         * build-aux/bootstrap (gnulib_name): New variable.
614         (gnulib_tool_options): Use it.
615
616 2007-03-13  Simon Josefsson  <simon@josefsson.org>
617
618         * tests/test-des.c: Use new namespace.
619
620 2007-03-15  Bruno Haible  <bruno@clisp.org>
621
622         * lib/dummy.c (gl_dummy_symbol): Renamed from 'dummy'.
623         Reported by James Youngman <jay@gnu.org>.
624
625 2007-03-15  Bruno Haible  <bruno@clisp.org>
626
627         * lib/glob.c (glob): Add 'restrict' so that prototype matches the
628         declared prototype. Needed with cc on OSF/1 5.1.
629
630 2007-03-15  Bruno Haible  <bruno@clisp.org>
631
632         * lib/gl_list.h (gl_listelement_dispose_fn): New type.
633         (gl_list_create_empty, gl_list_create): Add dispose_fn argument.
634         (struct gl_list_implementation): Add dispose_fn argument to the
635         'create_empty', 'create' methods.
636         (struct gl_list_impl_base): Add field 'dispose_fn'.
637         * lib/gl_list.c (gl_list_create_empty, gl_list_create): Add dispose_fn
638         argument.
639         * lib/gl_array_list.c (gl_array_create_empty, gl_array_create): Add
640         dispose_fn argument.
641         (gl_array_remove_node, gl_array_remove_at, gl_array_list_free): Call
642         dispose_fn on the dropped values.
643         * lib/gl_carray_list.c (gl_carray_create_empty, gl_carray_create): Add
644         dispose_fn argument.
645         (gl_carray_remove_at, gl_carray_list_free): Call dispose_fn on the
646         dropped values.
647         * lib/gl_anyavltree_list2.h (gl_tree_create): Add dispose_fn argument.
648         (gl_tree_remove_node): Call dispose_fn on the dropped value.
649         * lib/gl_anyrbtree_list2.h (gl_tree_create): Add dispose_fn argument.
650         (gl_tree_remove_node): Call dispose_fn on the dropped value.
651         * lib/gl_anytree_list2.h (gl_tree_create_empty): Add dispose_fn
652         argument.
653         (gl_tree_list_free): Call dispose_fn on the dropped values.
654         * lib/gl_anytreehash_list2.h (gl_tree_list_free): Call dispose_fn on
655         the dropped values.
656         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
657         Add dispose_fn argument.
658         (gl_linked_remove_node, gl_linked_remove_at, gl_linked_list_free):
659         Call dispose_fn on the dropped values.
660         * lib/gl_sublist.c (gl_sublist_create_empty, gl_sublist_create_fill):
661         Add dispose_fn argument.
662         (gl_sublist_create): Initialize the 'dispose_fn' field.
663         * lib/clean-temp.c (create_temp_dir, register_fd): Update.
664         * tests/test-array_list.c (main): Update.
665         * tests/test-carray_list.c (main): Update.
666         * tests/test-avltree_list.c (main): Update.
667         * tests/test-rbtree_list.c (main): Update.
668         * tests/test-avltreehash_list.c (main): Update.
669         * tests/test-rbtreehash_list.c (main): Update.
670         * tests/test-linked_list.c (main): Update.
671         * tests/test-linkedhash_list.c (main): Update.
672         * tests/test-array_oset.c (main): Update.
673
674 2007-03-15  Bruno Haible  <bruno@clisp.org>
675
676         * lib/gl_oset.h (gl_setelement_dispose_fn): New type.
677         (gl_oset_create_empty): Add dispose_fn argument.
678         (struct gl_oset_implementation): Add dispose_fn argument to
679         'create_empty' method.
680         (struct gl_oset_impl_base): Add dispose_fn field.
681         * lib/gl_oset.c (gl_oset_create_empty): Add dispose_fn argument.
682         * lib/gl_array_oset.c (gl_array_create_empty): Add dispose_fn argument.
683         (gl_array_remove_at, gl_array_free): Call dispose_fn on the dropped
684         values.
685         * lib/gl_anytree_oset.h (gl_tree_create_empty): Add dispose_fn argument.
686         (gl_tree_oset_free): Call dispose_fn on the dropped values.
687         * lib/gl_avltree_oset.c (gl_tree_remove_node): Call dispose_fn on the
688         dropped value.
689         * lib/gl_rbtree_oset.c (gl_tree_remove_node): Call dispose_fn on the
690         dropped value.
691         * tests/test-array_oset.c (main): Update.
692         * tests/test-avltree_oset.c (main): Update.
693         * tests/test-rbtree_oset.c (main): Update.
694         * lib/gl_anytreehash_list1.h (add_to_bucket): Update.
695
696 2007-03-13  Bruno Haible  <bruno@clisp.org>
697
698         * tests/test-stdbool.c (i): Update after last patch.
699
700 2007-03-12  Bruno Haible  <bruno@clisp.org>
701
702         * lib/quotearg.c: Include <wctype.h> early, before the definition of
703         the iswprint macro. Needed on Solaris 2.5.1.
704
705 2007-03-12  Bruno Haible  <bruno@clisp.org>
706
707         * tests/test-printf-frexp.c (main): Declare x as volatile.
708
709 2007-03-12  Simon Josefsson  <simon@josefsson.org>
710
711         * doc/gnulib.texi (Build robot for gnulib): New section.
712
713 2007-03-12  Jim Meyering  <jim@meyering.net>
714
715         * build-aux/bootstrap: New file.
716         * build-aux/bootstrap.conf: New file, from coreutils.
717
718 2007-03-11  Bruno Haible  <bruno@clisp.org>
719
720         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Require AC_C_INLINE.
721
722 2007-03-12  Simon Josefsson  <simon@josefsson.org>
723
724         * lib/des.h, lib/des.c, lib/gc-gnulib.c: Use gl_ namespace, to
725         avoid collisions with 'des_setkey'.  Reported by Bruno Haible
726         <bruno@clisp.org>.  Also change 'tripledes_' to '3des_'.
727
728 2007-03-11  Bruno Haible  <bruno@clisp.org>
729
730         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): If the test program fails to
731         compile, set LOCALE_TR_UTF8 to 'none' instead of empty.
732
733 2007-03-11  Bruno Haible  <bruno@clisp.org>
734
735         * lib/stdint_.h (INT64_MIN, INTMAX_MIN): Avoid using the ~INT..._MAX
736         formula. Needed for SunPRO C 5.0.
737
738 2007-03-11  Bruno Haible  <bruno@clisp.org>
739
740         * modules/long-options (Depends-on): Add getopt.
741
742 2007-03-11  Bruno Haible  <bruno@clisp.org>
743
744         * modules/modechange (Depends-on): Add stdbool.
745
746 2007-03-11  Bruno Haible  <bruno@clisp.org>
747
748         * modules/i-ring (Depends-on): Add stdbool.
749
750 2007-03-11  Bruno Haible  <bruno@clisp.org>
751
752         * modules/gc-des (Depends-on): Add stdbool.
753
754 2007-03-11  Bruno Haible  <bruno@clisp.org>
755
756         * m4/mktime.m4 (gl_PREREQ_MKTIME): Require AC_C_INLINE.
757
758 2007-03-11  Bruno Haible  <bruno@clisp.org>
759
760         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Require AC_C_RESTRICT.
761
762 2007-03-11  Bruno Haible  <bruno@clisp.org>
763
764         * lib/unistr/u32-mbtouc-unsafe.c (u32_mbtouc_unsafe): Fix syntax error.
765
766 2007-03-11  Bruno Haible  <bruno@clisp.org>
767
768         * lib/vasnprintf.c (sprintf): Undefine.
769
770 2007-03-11  Bruno Haible  <bruno@clisp.org>
771
772         * lib/isnan.c (rpl_isnan, rpl_isnanl): Work around bug regarding
773         initializers in SunPRO C and Compaq C compilers.
774
775 2007-03-11  Bruno Haible  <bruno@clisp.org>
776
777         * lib/gl_array_oset.c (gl_array_iterator_next): Make pointer
778         decrementing code ANSI C compliant.
779
780 2007-03-11  Bruno Haible  <bruno@clisp.org>
781
782         * lib/dummy.c [__sun]: Define a dummy variable, not just a typedef.
783         Needed for Solaris 2.5.1 ranlib and SunPRO C 5.0.
784
785 2007-03-11  Bruno Haible  <bruno@clisp.org>
786
787         * tests/test-stdbool.c (s, d, e, xlcbug): Disable checks that gnulib's
788         <stdbool.h> substitute doesn't pass.
789
790 2007-03-11  Bruno Haible  <bruno@clisp.org>
791
792         * lib/vasnprintf.c (snprintf): Undefine. Avoids an endless recursion.
793
794 2007-03-11  Bruno Haible  <bruno@clisp.org>
795
796         * gnulib-tool (func_create_megatestdir): Create also an autobuild
797         script, for submission to autobuild.josefsson.org.
798
799 2007-03-10  Bruno Haible  <bruno@clisp.org>
800
801         * modules/canonicalize-lgpl-tests: New file.
802         * tests/test-canonicalize-lgpl.sh: New file.
803         * tests/test-canonicalize-lgpl.c: New file.
804
805         * modules/c-strcase-tests: New file.
806         * tests/test-c-strcase.sh: New file.
807         * tests/test-c-strcasecmp.c: New file.
808         * tests/test-c-strncasecmp.c: New file.
809
810         * modules/atexit-tests: New file.
811         * tests/test-atexit.sh: New file.
812         * tests/test-atexit.c: New file.
813
814 2007-03-10  Bruno Haible  <bruno@clisp.org>
815
816         * tests/test-binary-io.sh: Use temporary filenames that are not so
817         likely to clash with those of other tests (in a parallel make).
818         * tests/test-binary-io.c: Likewise.
819
820 2007-03-10  Bruno Haible  <bruno@clisp.org>
821
822         * lib/fseterr.c (fseterr): Port to Solaris/SPARC64. Deactivate the
823         fallback; use #error instead.
824         Suggested by Simon Josefsson.
825
826 2007-03-10  Bruno Haible  <bruno@clisp.org>
827
828         * gnulib-tool (func_create_testdir): Treat MOSTLYCLEANFILES like
829         CLEANFILES. Put spaces in each line of $cleaned_files, not only the
830         first and the last.
831
832 2007-03-10  Bruno Haible  <bruno@clisp.org>
833
834         * lib/stdint_.h (uint_least64_t): Fix typo in last patch.
835
836 2007-03-10  Bruno Haible  <bruno@clisp.org>
837
838         * modules/snprintf-posix-tests (EXTRA_DIST): New variable. Needed for
839         "make distcheck".
840         * modules/sprintf-posix-tests (EXTRA_DIST): Likewise.
841         * modules/vsnprintf-posix-tests (EXTRA_DIST): Likewise.
842         * modules/vsprintf-posix-tests (EXTRA_DIST): Likewise.
843
844 2007-03-10  Bruno Haible  <bruno@clisp.org>
845
846         * modules/allocsa-tests (test_allocsa_SOURCES): Remove redundant
847         variable.
848         * modules/dirname-tests (test_dirname_SOURCES): Remove redundant
849         variable.
850
851 2007-03-09  Eric Blake  <ebb9@byu.net>
852         and Matthew Woehlke  <mw_triad@users.sourceforge.net>  (tiny change)
853
854         * lib/stdint_.h (int64_t, uint64_t): Don't undefine if 64-bit
855         types are not being provided by gnulib.
856         (GL_INT64_T, GL_UINT64_T): New witnesses of whether gnulib 64-bit
857         types are supported.
858
859 2007-03-10  Bruno Haible  <bruno@clisp.org>
860
861         * lib/stdio_.h (__attribute__): New macro.
862         (fprintf, vfprintf, printf, vprintf, snprintf, vsnprintf, sprintf,
863         vsprintf): Specify __attribute__ __format__ for GCC.
864         Suggested by Eric Blake.
865
866 2007-03-09  Bruno Haible  <bruno@clisp.org>
867
868         * modules/printf-posix-tests: New file.
869         * tests/test-printf-posix.sh: New file.
870         * tests/test-printf-posix.c: New file.
871
872         * modules/printf-posix: New file.
873         * lib/printf.c: New file.
874         * m4/printf-posix-rpl.m4: New file.
875         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_PRINTF_POSIX,
876         REPLACE_PRINTF.
877         * lib/stdio_.h (printf): New declaration.
878         (format, __format__, ____printf____, ____scanf____, ____strftime____,
879         ____strfmon____): New macros.
880         * modules/stdio (Makefile.am): Substitute also GNULIB_PRINTF_POSIX,
881         REPLACE_PRINTF.
882
883 2007-03-09  Bruno Haible  <bruno@clisp.org>
884
885         * tests/test-vasnprintf-posix2.sh: New file.
886         * tests/test-vasnprintf-posix2.c: New file.
887         * modules/vasnprintf-posix-tests (Files): Add them and m4/locale-fr.m4.
888         (configure.ac): Invoke gt_LOCALE_FR and gt_LOCALE_FR_UTF8.
889         (Makefile.am): Activate test-vasnprintf-posix2.sh.
890
891         * lib/vasnprintf.c (VASNPRINTF): For the 'a' and 'A' directives, use
892         a locale dependent decimal point, rather than always '.'.
893
894 2007-03-09  Eric Blake  <ebb9@byu.net>
895
896         * lib/stdlib_.h (EXIT_FAILURE): GNU code expects this to be 1, in
897         spite of platforms like Tandem/NSK that define it to -1.
898
899 2007-03-08  Bruno Haible  <bruno@clisp.org>
900
901         * modules/vprintf-posix-tests: New file.
902         * tests/test-vprintf-posix.sh: New file.
903         * tests/test-vprintf-posix.c: New file.
904         * tests/test-printf-posix.h: New file.
905
906         * modules/vprintf-posix: New file.
907         * lib/vprintf.c: New file.
908         * m4/vprintf-posix.m4: New file.
909         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VPRINTF_POSIX,
910         REPLACE_VPRINTF.
911         * lib/stdio_.h (vprintf): New declaration.
912         * modules/stdio (Makefile.am): Substitute also GNULIB_VPRINTF_POSIX,
913         REPLACE_VPRINTF.
914
915 2007-03-08  Bruno Haible  <bruno@clisp.org>
916
917         * modules/fprintf-posix-tests: New file.
918         * tests/test-fprintf-posix.sh: New file.
919         * tests/test-fprintf-posix.c: New file.
920
921         * modules/fprintf-posix: New file.
922         * lib/fprintf.c: New file.
923         * m4/fprintf-posix.m4: New file.
924         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FPRINTF_POSIX,
925         REPLACE_FPRINTF.
926         * lib/stdio_.h (fprintf): New declaration.
927         * modules/stdio (Makefile.am): Substitute also GNULIB_FPRINTF_POSIX,
928         REPLACE_FPRINTF.
929
930 2007-03-08  Bruno Haible  <bruno@clisp.org>
931
932         * modules/vfprintf-posix-tests: New file.
933         * tests/test-vfprintf-posix.sh: New file.
934         * tests/test-vfprintf-posix.c: New file.
935         * tests/test-fprintf-posix.h: New file.
936         * tests/test-fprintf-posix.out: New file.
937
938         * modules/vfprintf-posix: New file.
939         * lib/vfprintf.c: New file.
940         * m4/vfprintf-posix.m4: New file.
941         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VFPRINTF_POSIX,
942         REPLACE_VFPRINTF.
943         * lib/stdio_.h (vfprintf): New declaration.
944         * modules/stdio (Makefile.am): Substitute also GNULIB_VFPRINTF_POSIX,
945         REPLACE_VFPRINTF.
946
947 2007-03-08  Bruno Haible  <bruno@clisp.org>
948
949         * lib/stdio_.h: Treat __need___FILE like __need_FILE.
950
951 2007-03-08  Bruno Haible  <bruno@clisp.org>
952
953         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Use 'case' statements
954         instead of 'expr' invocations.
955         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
956         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
957         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
958         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
959         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
960         Suggested by Paul Eggert.
961
962 2007-03-08  Bruno Haible  <bruno@clisp.org>
963
964         * modules/fseterr-tests: New file.
965         * tests/test-fseterr.c: New file.
966
967         * modules/fseterr: New file.
968         * lib/fseterr.h: New file.
969         * lib/fseterr.c: New file.
970
971 2007-03-08  Bruno Haible  <bruno@clisp.org>
972
973         * lib/fnmatch_.h: Convert tabs in the middle of lines to spaces.
974         * lib/getopt_.h: Likewise.
975         * lib/mbswidth.h: Likewise.
976         * lib/setenv.h: Likewise.
977         * lib/vasnprintf.h: Likewise.
978         * lib/vasprintf.h: Likewise.
979         * lib/verror.h: Likewise.
980         * lib/xsetenv.h: Likewise.
981         * lib/xvasprintf.h: Likewise.
982
983 2007-03-08  Jim Meyering  <jim@meyering.net>
984
985         * users.txt: Add parted.
986
987         * ChangeLog: Restore 1500 lines mistakenly removed from the end.
988
989 2007-03-07  Bruno Haible  <bruno@clisp.org>
990
991         * m4/printf.m4: Make the shell script snippets copy&pastable.
992
993 2007-03-02  Bruno Haible  <bruno@clisp.org>
994
995         * lib/netinet_in_.h: New file.
996         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Test whether netinet/in.h
997         is self-contained. Set ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H.
998         * modules/netinet_in (Files): Add lib/netinet_in_.h.
999         (Depends-on): Add absolute-header.
1000         (Makefile.am): Substitute ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H
1001         into netinet/in.h.
1002
1003 2007-03-03  Bruno Haible  <bruno@clisp.org>
1004
1005         * lib/sys_select_.h: New file.
1006         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SELECT): Test whether sys/select.h
1007         is self-contained. Set ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H.
1008         * modules/sys_select (Files): Add lib/sys_select_.h.
1009         (Depends-on): Add absolute-header.
1010         (Makefile.am): Substitute ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H
1011         into sys/select.h.
1012
1013 2007-03-02  Bruno Haible  <bruno@clisp.org>
1014
1015         * lib/socket_.h: If sys/socket.h exists, include that and <sys/types.h>
1016         before it. Turn HAVE_WINSOCK2_H and HAVE_WS2TCPIP_H into configute-time
1017         values.
1018         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Test also whether
1019         <sys/socket.h> is self-contained. Set ABSOLUTE_SYS_SOCKET_H,
1020         HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H.
1021         * modules/sys_socket (Depends-on): Add absolute-header.
1022         (Makefile.am): Substitute ABSOLUTE_SYS_SOCKET_H, HAVE_SYS_SOCKET_H,
1023         HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H into sys/socket.h.
1024         (Include): Remove requirement of inclusion of <sys/types.h>.
1025
1026 2007-03-02  Bruno Haible  <bruno@clisp.org>
1027
1028         * lib/byteswap_.h (bswap_32): Fix formula.
1029
1030 2007-03-06  Bruno Haible  <bruno@clisp.org>
1031
1032         * modules/sprintf-posix-tests: New file.
1033         * tests/test-sprintf-posix.c: New file.
1034
1035         * modules/sprintf-posix: New file.
1036         * lib/sprintf.c: New file.
1037         * m4/sprintf-posix.m4: New file.
1038         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_SPRINTF_POSIX,
1039         REPLACE_SPRINTF.
1040         * lib/stdio_.h (sprintf): New declaration.
1041         * modules/stdio (Makefile.am): Substitute also GNULIB_SPRINTF_POSIX,
1042         REPLACE_SPRINTF.
1043
1044 2007-03-06  Bruno Haible  <bruno@clisp.org>
1045
1046         * modules/vsprintf-posix-tests: New file.
1047         * tests/test-vsprintf-posix.c: New file.
1048         * tests/test-sprintf-posix.h: New file.
1049
1050         * modules/vsprintf-posix: New file.
1051         * lib/vsprintf.c: New file.
1052         * m4/vsprintf-posix.m4: New file.
1053         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VSPRINTF_POSIX,
1054         REPLACE_VSPRINTF.
1055         * lib/stdio_.h (vsprintf): New declaration.
1056         * modules/stdio (Makefile.am): Substitute also GNULIB_VSPRINTF_POSIX,
1057         REPLACE_VSPRINTF.
1058
1059 2007-03-06  Bruno Haible  <bruno@clisp.org>
1060
1061         * modules/vsnprintf (Depend-on): Remove minmax.
1062
1063 2007-03-06  Bruno Haible  <bruno@clisp.org>
1064
1065         * modules/snprintf-posix-tests: New file.
1066         * tests/test-snprintf-posix.c: New file.
1067
1068         * modules/snprintf-posix: New file.
1069         * m4/snprintf-posix.m4: New file.
1070         * m4/snprintf.m4 (gl_REPLACE_SNPRINTF): New macro, extracted from
1071         gl_FUNC_SNPRINTF.
1072         (gl_FUNC_SNPRINTF): Invoke it.
1073         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_SNPRINTF.
1074         * lib/stdio_.h (snprintf): Define as a replacement if REPLACE_SNPRINTF
1075         is set.
1076         * modules/stdio (Makefile.am): Substitute also REPLACE_SNPRINTF.
1077
1078 2007-03-06  Bruno Haible  <bruno@clisp.org>
1079
1080         * modules/vsnprintf-posix-tests: New file.
1081         * tests/test-vsnprintf-posix.c: New file.
1082         * tests/test-snprintf-posix.h: New file.
1083
1084         * modules/vsnprintf-posix: New file.
1085         * m4/vsnprintf-posix.m4: New file.
1086         * m4/vsnprintf.m4 (gl_REPLACE_VSNPRINTF): New macro, extracted from
1087         gl_FUNC_VSNPRINTF.
1088         (gl_FUNC_VSNPRINTF): Invoke it.
1089         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_VSNPRINTF.
1090         * lib/stdio_.h (vsnprintf): Define as a replacement if
1091         REPLACE_VSNPRINTF is set.
1092         * modules/stdio (Makefile.am): Substitute also REPLACE_VSNPRINTF.
1093
1094 2007-03-06  Bruno Haible  <bruno@clisp.org>
1095
1096         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Test for vasnprintf here.
1097         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): ... not here.
1098
1099 2007-03-06  Bruno Haible  <bruno@clisp.org>
1100
1101         * lib/math_.h (acosl): Declare also if HAVE_DECL_ACOSL is set.
1102         (asinl): Declare also if HAVE_DECL_ASINL is set.
1103         (atanl): Declare also if HAVE_DECL_ATANL is set.
1104         (ceill): Declare also if HAVE_DECL_CEILL is set.
1105         (cosl): Declare also if HAVE_DECL_COSL is set.
1106         (expl): Declare also if HAVE_DECL_EXPL is set.
1107         (floorl): Declare also if HAVE_DECL_FLOORL is set.
1108         (frexpl): Declare also if HAVE_DECL_FREXPL is set.
1109         (ldexpl): Declare also if HAVE_DECL_LDEXPL is set.
1110         (logl): Declare also if HAVE_DECL_LOGL is set.
1111         (sinl): Declare also if HAVE_DECL_SINL is set.
1112         (sqrtl): Declare also if HAVE_DECL_SQRTL is set.
1113         (tanl): Declare also if HAVE_DECL_TANL is set.
1114         * modules/math (Makefile.am): Substitute the values of HAVE_DECL_*.
1115         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Set HAVE_DECL_* to 1.
1116         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Fix tests for the
1117         declaration of frexpl, ldexpl.
1118         * modules/printf-frexpl (Depends-on): Add math.
1119         * lib/printf-frexp.c (frexpl, ldexpl): Undo last change.
1120
1121 2007-03-05  Bruno Haible  <bruno@clisp.org>
1122
1123         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Also test whether
1124         frexpl and ldexpl are declared.
1125         * lib/printf-frexp.c (frexpl, ldexpl): Provide fallback declarations.
1126
1127 2007-03-05  Bruno Haible  <bruno@clisp.org>
1128
1129         * gnulib-tool (func_get_automake_snippet): Don't synthesize an
1130         EXTRA_lib_SOURCES augmentation for the relocatable-prog-wrapper module.
1131
1132 2007-03-05  Bruno Haible  <bruno@clisp.org>
1133
1134         * lib/stdio_.h: Include <stddef.h>.
1135
1136 2007-03-05  Bruno Haible  <bruno@clisp.org>
1137
1138         * m4/printf.m4 (gl_SNPRINTF_DIRECTIVE_N): New macro.
1139
1140 2007-03-05  Bruno Haible  <bruno@clisp.org>
1141
1142         * m4/printf.m4: Update with info about OpenBSD 3.9, HP-UX 10.20,
1143         NetBSD 4, from Ralf Wildenhues.
1144
1145 2007-03-04  Bruno Haible  <bruno@clisp.org>
1146
1147         * lib/vasprintf.h: Update #if logic for the case when the functions
1148         exist but are overridden.
1149
1150 2007-03-04  Bruno Haible  <bruno@clisp.org>
1151
1152         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Exclude two buggy
1153         implementations: glibc-2.4 and MacOS X 10.3.
1154         * tests/test-vasnprintf-posix.c (test_function): Test also the case
1155         that exhibits the bugs in glibc-2.4 and MacOS X 10.3.
1156         * tests/test-vasprintf-posix.c (test_function): Likewise.
1157
1158 2007-03-04  Bruno Haible  <bruno@clisp.org>
1159
1160         * modules/vasprintf-posix-tests: New file.
1161         * tests/test-vasprintf-posix.c: New file.
1162
1163         * modules/vasprintf-posix: New file.
1164         * lib/vasprintf.h (asprintf, vasprintf): Rename if REPLACE_VASPRINTF is
1165         defined.
1166         * m4/vasprintf-posix.m4: New file.
1167         * m4/vasprintf.m4 (gl_REPLACE_VASPRINTF): New macro, extracted from
1168         gl_FUNC_VASPRINTF.
1169         (gl_FUNC_VASPRINTF): Invoke it.
1170         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Define REPLACE_VASNPRINTF
1171         here.
1172         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Not here.
1173
1174 2007-03-04  Bruno Haible  <bruno@clisp.org>
1175
1176         * lib/sys_time_.h: Rename GETTIMEOFDAY_REPLACEMENT to
1177         REPLACE_GETTIMEOFDAY.
1178         * modules/sys_time (Makefile.am): Likewise.
1179         * m4/sys_time_h.m4: Likewise.
1180         * m4/gettimeofday.m4: Likewise.
1181
1182 2007-03-04  Bruno Haible  <bruno@clisp.org>
1183
1184         * modules/vasnprintf-posix-tests: New file.
1185         * tests/test-vasnprintf-posix.c: New file.
1186
1187         * modules/vasnprintf-posix: New file.
1188         * lib/vasnprintf.c: Include isnan.h, isnanl.h, printf-frexp.h,
1189         printf-frexpl.h.
1190         (VASNPRINTF): Handle the 'a' and 'A' directives here, if needed.
1191         * lib/vasnprintf.h (asnprintf, vasnprintf): Rename if
1192         REPLACE_VASNPRINTF is defined.
1193         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): New macro, extracted from
1194         gl_FUNC_VASNPRINTF.
1195         (gl_FUNC_VASNPRINTF): Invoke it.
1196         * m4/vasnprintf-posix.m4: New file.
1197         * m4/printf.m4: New file.
1198
1199 2007-03-04  Bruno Haible  <bruno@clisp.org>
1200
1201         Compile progreloc.c only if --enable-relocatable is specified.
1202         * m4/relocatable.m4 (gl_RELOCATABLE): Arrange to compile progreloc.c
1203         if --enable-relocatable was specified.
1204         * modules/relocatable-prog (Makefile.am): Remove progreloc.c from
1205         lib_SOURCES.
1206
1207 2007-03-04  Jim Meyering  <jim@meyering.net>
1208
1209         * lib/acl.c (ACL_NOT_WELL_SUPPORTED): New macro.
1210         Use it consistently, rather than enumerating errno constants.
1211
1212 2007-03-04  Bruno Haible  <bruno@clisp.org>
1213
1214         * modules/xvasprintf-tests: New file.
1215         * tests/test-xvasprintf.c: New file.
1216
1217         * modules/vasprintf-tests: New file.
1218         * tests/test-vasprintf.c: New file.
1219
1220         * modules/vasnprintf-tests: New file.
1221         * tests/test-vasnprintf.c: New file.
1222
1223         * modules/vsnprintf-tests: New file.
1224         * tests/test-vsnprintf.c: New file.
1225
1226         * modules/snprintf-tests: New file.
1227         * tests/test-snprintf.c: New file.
1228
1229 2007-03-04  Bruno Haible  <bruno@clisp.org>
1230
1231         Compile relocatable.c only if --enable-relocatable is specified.
1232         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY_BODY): Renamed from
1233         gl_RELOCATABLE_LIBRARY.
1234         (gl_RELOCATABLE_LIBRARY, gl_RELOCATABLE_LIBRARY_SEPARATE): New macros.
1235         * m4/relocatable.m4 (gl_RELOCATABLE): Invoke gl_RELOCATABLE_LIBRARY.
1236         (gl_RELOCATABLE_BODY): Require gl_RELOCATABLE_LIBRARY_BODY instead of
1237         gl_RELOCATABLE_LIBRARY.
1238         * modules/relocatable-lib (configure.ac): Invoke gl_RELOCATABLE_LIBRARY.
1239         (Makefile.am): Remove lib_SOURCES.
1240         * modules/relocatable-lib-lgpl (configure.ac): Invoke
1241         gl_RELOCATABLE_LIBRARY.
1242         (Makefile.am): Remove lib_SOURCES.
1243         * modules/relocatable-prog (Makefile.am): Don't compile relocatable.c
1244         always.
1245         * modules/relocatable-prog-wrapper (configure.ac): Invoke
1246         gl_RELOCATABLE_LIBRARY_SEPARATE instead of gl_RELOCATABLE_LIBRARY.
1247
1248 2007-03-04  Bruno Haible  <bruno@clisp.org>
1249
1250         * modules/argmatch-tests: New file.
1251         * tests/test-argmatch.c: New file.
1252
1253         * tests/test-allocsa.c (main): Halve the number of loop runs.
1254
1255         * modules/alloca-opt-tests: New file.
1256         * tests/test-alloca-opt.c: New file.
1257
1258 2007-03-04  Jim Meyering  <jim@meyering.net>
1259
1260         Work around difference between Linux ACLs and Solaris 10 ZFS.
1261         * lib/acl.c (set_acl): Revert to using chmod_or_fchmod also
1262         for EINVAL.
1263
1264 2007-03-03  Bruno Haible  <bruno@clisp.org>
1265
1266         * modules/relocatable-prog (Depends-on): Add back progreloc's
1267         dependencies: canonicalize-lgpl, xalloc, xreadlink, stdbool, unistd.
1268
1269 2007-03-03  Bruno Haible  <bruno@clisp.org>
1270
1271         * modules/relocatable-lib-lgpl: Renamed from modules/relocatable-lib.
1272         * modules/relocatable-lib: New file.
1273
1274 2007-03-03  Bruno Haible  <bruno@clisp.org>
1275
1276         * modules/relocatable-prog: Renamed from modules/relocatable.
1277         * doc/relocatable-maint.texi: Talk about module 'relocatable-prog'.
1278
1279 2007-03-03  Bruno Haible  <bruno@clisp.org>
1280
1281         * modules/relocatable-script (Files): Add doc/relocatable.texi,
1282         m4/relocatable-lib.m4.
1283         (Depends-on): Remove 'relocatable'.
1284         (configure.ac): Add gl_RELOCATABLE_NOP.
1285
1286 2007-03-03  Bruno Haible  <bruno@clisp.org>
1287
1288         * modules/relocatable-prog-wrapper: New file.
1289         * modules/relocatable (Depends-on): Add it. Remove all other
1290         dependencies except progname.
1291         (Files): Remove build-aux/install-reloc, lib/relocwrapper.c.
1292
1293         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): New macro.
1294         (gl_FUNC_STRERROR): Nop.
1295         * lib/strerror.c: Compile the file only if !HAVE_STRERROR.
1296
1297         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): New macro.
1298         * lib/setenv.c: Compile the file only if _LIBC || !HAVE_SETENV.
1299
1300         * m4/readlink.m4 (gl_FUNC_READLINK_SEPARATE): New macro.
1301         (gl_FUNC_READLINK): Update.
1302
1303         * m4/canonicalize-lgpl.m4 (gl_CANONICALIZE_LGPL_SEPARATE): New macro.
1304
1305 2007-03-03  Bruno Haible  <bruno@clisp.org>
1306
1307         * lib/xreadlink.c: Include <unistd.h> unconditionally.
1308         * modules/xreadlink (Depends-on): Add unistd.
1309         * modules/xreadlink-with-size (Depends-on): Likewise.
1310
1311 2007-03-03  Bruno Haible  <bruno@clisp.org>
1312
1313         * m4/setenv.m4 (gl_FUNC_SETENV, gl_FUNC_UNSETENV): New macros,
1314         extracted from gt_FUNC_SETENV.
1315         (gt_FUNC_SETENV): Remove macro.
1316         * modules/setenv (configure.ac): Add gl_FUNC_SETENV, gl_FUNC_UNSETENV,
1317         remove gt_FUNC_SETENV.
1318
1319 2007-03-03  Bruno Haible  <bruno@clisp.org>
1320
1321         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY): Define
1322         ENABLE_RELOCATABLE here.
1323         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Don't define it here.
1324
1325 2007-03-03  Bruno Haible  <bruno@clisp.org>
1326
1327         * modules/rbtreehash-list-tests (Depends-on): Add progname.
1328         * tests/test-rbtreehash_list.c: Include progname.h.
1329         (main): Call set_program_name.
1330
1331         * modules/rbtree-oset-tests (Depends-on): Add progname.
1332         * tests/test-rbtree_oset.c: Include progname.h.
1333         (main): Call set_program_name.
1334
1335         * modules/rbtree-list-tests (Depends-on): Add progname.
1336         * tests/test-rbtree_list.c: Include progname.h.
1337         (main): Call set_program_name.
1338
1339         * modules/linked-list-tests (Depends-on): Add progname.
1340         * tests/test-linked_list.c: Include progname.h.
1341         (main): Call set_program_name.
1342
1343 2007-03-03  Bruno Haible  <bruno@clisp.org>
1344
1345         * lib/glob-libc.h (_Restrict_): New macro, copied from lib/regex.h.
1346         All uses of __restrict changed to _Restrict_.
1347         * lib/glob_.h (__restrict): Remove macro.
1348
1349 2007-03-02  Bruno Haible  <bruno@clisp.org>
1350
1351         * modules/gettext (configure.ac): Require gettext infrastructure
1352         from version 0.16.1.
1353
1354 2007-03-02  Bruno Haible  <bruno@clisp.org>
1355
1356         * modules/linkedhash-list-tests (Depends-on): Add progname.
1357         * tests/test-linkedhash_list.c: Include progname.h.
1358         (main): Call set_program_name.
1359
1360         * modules/carray-list-tests (Depends-on): Add progname.
1361         * tests/test-carray_list.c: Include progname.h.
1362         (main): Call set_program_name.
1363
1364         * modules/avltreehash-list-tests (Depends-on): Add progname.
1365         * tests/test-avltreehash_list.c: Include progname.h.
1366         (main): Call set_program_name.
1367
1368         * modules/avltree-oset-tests (Depends-on): Add progname.
1369         * tests/test-avltree_oset.c: Include progname.h.
1370         (main): Call set_program_name.
1371
1372         * modules/avltree-list-tests (Depends-on): Add progname.
1373         * tests/test-avltree_list.c: Include progname.h.
1374         (main): Call set_program_name.
1375
1376         * modules/array-oset-tests (Depends-on): Add progname.
1377         * tests/test-array_oset.c: Include progname.h.
1378         (main): Call set_program_name.
1379
1380         * modules/array-list-tests (Depends-on): Add progname.
1381         * tests/test-array_list.c: Include progname.h.
1382         (main): Call set_program_name.
1383
1384         * modules/argp-tests (Depends-on): Add progname.
1385         * tests/test-argp.c: Include argp.h first. Include progname.h.
1386         (main): Call set_program_name.
1387
1388 2007-03-02  Paul Eggert  <eggert@cs.ucla.edu>
1389
1390         * doc/gnulib-tool.texi (Initial import): Reword description of
1391         _FILE_OFFSET_BITS and _GNU_SOURCE, since they sometimes have a
1392         limited effect even if defined after the first system include.
1393
1394 2007-03-01  Bruno Haible  <bruno@clisp.org>
1395
1396         * build-aux/config.libpath: Update to libtool-1.5.22.
1397         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
1398
1399 2007-03-01  Bruno Haible  <bruno@clisp.org>
1400
1401         * doc/relocatable-maint.texi: Recommend to set foo_CPPFLAGS, not
1402         foo_CFLAGS.
1403         Reported by Ralf Wildenhues.
1404
1405 2007-03-01  Bruno Haible  <bruno@clisp.org>
1406
1407         * build-aux/install-reloc: Remove object files left over by some
1408         compilers.
1409         Reported by Ralf Wildenhues.
1410
1411 2007-03-01  Bruno Haible  <bruno@clisp.org>
1412
1413         * build-aux/install-reloc: Break long lines.
1414
1415 2007-03-01  Bruno Haible  <bruno@clisp.org>
1416
1417         * doc/relocatable.texi: Document that it may not work on OpenBSD.
1418         Reported by Ralf Wildenhues.
1419
1420 2007-03-01  Bruno Haible  <bruno@clisp.org>
1421
1422         * doc/gnulib-tool.texi (Initial import): Remove paragraph about
1423         include ordering constraints.
1424
1425 2007-03-01  Paul Eggert  <eggert@cs.ucla.edu>
1426
1427         Followup to the 2007-02-12 patch, using suggestions from Bruno Haible in
1428         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00136.html>.
1429         * doc/gnulib-tool.texi (Initial import): Mention _FILE_OFFSET_BITS
1430         as another example.
1431         * lib/time_.h: Fix misspelling.
1432         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
1433         Require gl_HEADER_TIME_H_DEFAULTS.
1434         * m4/strptime.m4 (gl_FUNC_STRPTIME): Likewise.
1435         * m4/time_r.m4 (gl_TIME_R): Likewise.
1436         * m4/timegm.m4 (gl_FUNC_TIMEGM): Likewise.
1437
1438 2007-03-01  Bruno Haible  <bruno@clisp.org>
1439
1440         * m4/utimecmp.m4 (gl_UTIMECMP): Don't require gl_TIMESPEC.
1441         * m4/utimens.m4 (gl_UTIMENS): Likewise.
1442
1443 2007-03-01  Jim Meyering  <jim@meyering.net>
1444
1445         * modules/xreadlink (Maintainer): Add my name.
1446         * modules/xreadlink-with-size (Depends-on): Alphabetize.
1447
1448 2007-02-26  Ben Pfaff  <blp@cs.stanford.edu>
1449             Bruno Haible  <bruno@clisp.org>
1450
1451         * build-aux/install-reloc: Compile also c-ctype.c.
1452         * build-aux/relocatable.sh.in: New file.
1453         * doc/relocatable.texi: New file.
1454         * doc/relocatable-maint.texi: New file.
1455         * doc/gnulib.texi: Include relocatable-maint.texi.
1456         * lib/progreloc.c: Include unistd.h unconditionally.
1457         * lib/relocwrapper.c: Include unistd.h unconditionally.
1458         Include c-ctype.h.
1459         (add_dotbin): Use c_tolower.
1460         * m4/relocatable-lib.m4: New file, extracted from m4/relocatable.m4.
1461         (gl_RELOCATABLE_LIBRARY): Renamed from AC_RELOCATABLE_LIBRARY.
1462         (gl_RELOCATABLE_NOP): Renamed from AC_RELOCATABLE_NOP.
1463         * m4/relocatable.m4 (AC_RELOCATABLE_LIBRARY, AC_RELOCATABLE_NOP): Move
1464         to m4/relocatable-lib.m4.
1465         (gl_RELOCATABLE): Renamed from AC_RELOCATABLE. Set also
1466         RELOCATABLE_CONFIG_H_DIR, RELOCATABLE_SRC_DIR, RELOCATABLE_BUILD_DIR.
1467         (gl_RELOCATABLE_BODY): Renamed from AC_RELOCATABLE_BODY. Don't
1468         require obsolete macro AC_EXEEXT. Don't check for unistd.h. Don't set
1469         SET_RELOCATABLE. Instead set RELOCATABLE_LDFLAGS, INSTALL_PROGRAM_ENV.
1470         * modules/relocatable: New file.
1471         * modules/relocatable-lib: New file.
1472         * modules/relocatable-script: New file.
1473
1474 2007-02-28  Bruno Haible  <bruno@clisp.org>
1475
1476         Import --enable-relocatable infrastructure.
1477         * build-aux/config.libpath: New file, from GNU gettext.
1478         * build-aux/install-reloc: New file, from GNU gettext.
1479         * build-aux/reloc-ldflags: New file, from GNU gettext.
1480         * lib/relocatable.h: New file, from GNU gettext.
1481         * lib/relocatable.c: New file, from GNU gettext.
1482         * lib/relocwrapper.c: New file, from GNU gettext.
1483         * m4/relocatable.m4: New file, from GNU gettext.
1484
1485 2007-02-28  Bruno Haible  <bruno@clisp.org>
1486
1487         * MODULES.html.sh (File system functions): Add xreadlink-with-size.
1488
1489         * modules/xreadlink: New file, from GNU gettext with modifications.
1490         * lib/xreadlink.c: New file, from GNU gettext.
1491         * lib/xreadlink.h: Add comments.
1492         (xreadlink): New declaration.
1493
1494         * modules/xreadlink-with-size: Renamed from modules/xreadlink.
1495         (Files): Remove m4/xreadlink.m4. Replace lib/xreadlink.c with
1496         lib/xreadlink-with-size.c.
1497         (configure.ac): Remove gl_XREADLINK invocation.
1498         (Makefile.am): Augment lib_SOURCES.
1499         * m4/xreadlink.m4: Remove file.
1500         * lib/xreadlink-with-size.c: Renamed from lib/xreadlink.c.
1501         (xreadlink_with_size): Renamed from xreadink.
1502         * lib/xreadlink.h (xreadlink_with_size): Renamed from xreadink.
1503         * modules/canonicalize (Depends-on): Replace xreadlink with
1504         xreadlink-with-size.
1505         * lib/canonicalize.c (canonicalize_filename_mode): Update.
1506
1507 2007-02-25  Jim Meyering  <jim@meyering.net>
1508
1509         * build-aux/announce-gen: When complaining about excess arguments,
1510         list them.
1511
1512 2007-02-25  Paul Eggert  <eggert@cs.ucla.edu>
1513
1514         * README: Document signed integer overflow situation more
1515         accurately.
1516
1517 2007-02-25  Bruno Haible  <bruno@clisp.org>
1518
1519         * lib/vasnprintf.c (VASNPRINTF): Fix estimate of size needed for a
1520         'a' or 'A' conversion.
1521
1522 2007-02-25  Bruno Haible  <bruno@clisp.org>
1523
1524         * modules/filename: Renamed from modules/pathname.
1525         (Files): Replace lib/pathname.h with lib/filename.h. Replace
1526         lib/concatpath.c with lib/concat-filename.c.
1527         (Makefile.am): Update.
1528         (Include): Replace pathname.h with filename.h.
1529         * lib/filename.h: Renamed from lib/pathname.h.
1530         (concatenated_filename): Renamed from concatenated_pathname.
1531         * lib/concat-filename.c: Renamed from lib/concatpath.c.
1532         (concatenated_filename): Renamed from concatenated_pathname.
1533         * lib/findprog.c: Include filename.h instead of pathname.h.
1534         (find_in_path): Update.
1535         * lib/javacomp.c: Include filename.h instead of pathname.h.
1536         (is_envjavac_gcj43_usable, is_envjavac_oldgcj_14_14_usable,
1537         is_envjavac_oldgcj_14_13_usable, is_envjavac_nongcj_usable,
1538         is_gcj_present, is_gcj43_usable, is_oldgcj_14_14_usable,
1539         is_oldgcj_14_13_usable, is_javac_usable): Update.
1540         * lib/javaexec.c: Include filename.h instead of pathname.h.
1541         (execute_java_class): Update.
1542         * modules/findprog: Update.
1543         * modules/javacomp: Update.
1544         * modules/javaexec: Update.
1545         * MODULES.html.sh (File system functions): Add 'filename', remove
1546         'pathname'.
1547
1548 2007-02-25  Bruno Haible  <bruno@clisp.org>
1549
1550         * modules/printf-frexpl-tests: New file.
1551         * tests/test-printf-frexpl.c: New file.
1552
1553         * modules/printf-frexpl: New file.
1554         * lib/printf-frexpl.h: New file.
1555         * lib/printf-frexpl.c: New file.
1556         * m4/printf-frexpl.m4: New file.
1557
1558 2007-02-25  Bruno Haible  <bruno@clisp.org>
1559
1560         * modules/printf-frexp-tests: New file.
1561         * tests/test-printf-frexp.c: New file.
1562
1563         * modules/printf-frexp: New file.
1564         * lib/printf-frexp.h: New file.
1565         * lib/printf-frexp.c: New file.
1566         * m4/printf-frexp.m4: New file.
1567
1568 2007-02-25  Bruno Haible  <bruno@clisp.org>
1569
1570         Assume automake >= 1.10 for the tests.
1571         * modules/arcfour-tests (TESTS): Remove $(EXEEXT) suffix.
1572         * modules/arctwo-tests: Likewise.
1573         * modules/argp-tests: Likewise.
1574         * modules/avltree-list-tests: Likewise.
1575         * modules/avltree-oset-tests: Likewise.
1576         * modules/avltreehash-list-tests: Likewise.
1577         * modules/carray-list-tests: Likewise.
1578         * modules/crc-tests: Likewise.
1579         * modules/des-tests: Likewise.
1580         * modules/gc-arcfour-tests: Likewise.
1581         * modules/gc-arctwo-tests: Likewise.
1582         * modules/gc-des-tests: Likewise.
1583         * modules/gc-hmac-md5-tests: Likewise.
1584         * modules/gc-hmac-sha1-tests: Likewise.
1585         * modules/gc-md2-tests: Likewise.
1586         * modules/gc-md4-tests: Likewise.
1587         * modules/gc-md5-tests: Likewise.
1588         * modules/gc-pbkdf2-sha1-tests: Likewise.
1589         * modules/gc-rijndael-tests: Likewise.
1590         * modules/gc-sha1-tests: Likewise.
1591         * modules/gc-tests: Likewise.
1592         * modules/getaddrinfo-tests: Likewise.
1593         * modules/hmac-md5-tests: Likewise.
1594         * modules/hmac-sha1-tests: Likewise.
1595         * modules/linked-list-tests: Likewise.
1596         * modules/linkedhash-list-tests: Likewise.
1597         * modules/lock-tests: Likewise.
1598         * modules/md2-tests: Likewise.
1599         * modules/md4-tests: Likewise.
1600         * modules/md5-tests: Likewise.
1601         * modules/rbtree-list-tests: Likewise.
1602         * modules/rbtree-oset-tests: Likewise.
1603         * modules/rbtreehash-list-tests: Likewise.
1604         * modules/read-file-tests: Likewise.
1605         * modules/rijndael-tests: Likewise.
1606         * modules/stdint-tests: Likewise.
1607         * modules/tls-tests: Likewise.
1608
1609 2007-02-24  Bruno Haible  <bruno@clisp.org>
1610
1611         * lib/isnanl.h (isnanl): Define through isnan if isnan is a macro.
1612         * m4/isnan.m4 (gl_FUNC_ISNAN_NO_LIBM): Don't check for isnan as a
1613         function; instead check whether isnan with a double argument links.
1614         * m4/isnanl.m4 (gl_FUNC_ISNANL_NO_LIBM): Don't check for isnanl as a
1615         function; instead check whether isnan with a 'long double' argument
1616         links.
1617         Reported by Eric Blake <ebb9@byu.net>.
1618
1619 2007-02-24  Bruno Haible  <bruno@clisp.org>
1620
1621         * lib/isnan.c: Support the 'long double' case if USE_LONG_DOUBLE is
1622         defined.
1623         * lib/isnanl.c: Remove all code. Just include isnan.c.
1624         * modules/isnanl-nolibm (Files): Add lib/isnan.c.
1625
1626 2007-02-25  Jim Meyering  <jim@meyering.net>
1627
1628         Avoid conflicting types for 'unsetenv' on FreeBSD.
1629         * lib/putenv.c (_unsetenv): Rename from "unsetenv", to avoid
1630         conflicting with FreeBSD's (5.0 and 6.1) function declaration
1631         in stdlib.h.
1632
1633 2007-02-24  Bruno Haible  <bruno@clisp.org>
1634
1635         * modules/isnanl-nolibm-tests: New file.
1636         * tests/test-isnanl.c: New file.
1637
1638         * modules/isnanl-nolibm: New file.
1639         * lib/isnanl.h: New file.
1640         * lib/isnanl.c: New file.
1641         * m4/isnanl.m4: New file.
1642
1643 2007-02-24  Bruno Haible  <bruno@clisp.org>
1644
1645         * modules/isnan-nolibm-tests: New file.
1646         * tests/test-isnan.c: New file.
1647
1648         * modules/isnan-nolibm: New file.
1649         * lib/isnan.h: New file.
1650         * lib/isnan.c: New file.
1651         * m4/isnan.m4: New file.
1652
1653 2007-02-24  Bruno Haible  <bruno@clisp.org>
1654
1655         * lib/frexpl.c (frexpl): Correct return values for x = 1.0L. Don't
1656         assume that an exponent fits in 20 bits.
1657
1658 2007-02-24  Jim Meyering  <jim@meyering.net>
1659
1660         * m4/regex.m4: Update the description of the configure-time option,
1661         --without-included-regex, to state accurately what the defaults are,
1662         and perhaps to give people an idea why using this option is risky.
1663
1664 2007-02-24  Paul Eggert  <eggert@cs.ucla.edu>
1665
1666         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check for a nanosleep that
1667         loops on small arguments.  This attempts to avoid the problem
1668         Bruno Haible reported for AIX 4.3.2 in
1669         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00309.html>.
1670
1671 2007-02-23  Bruno Haible  <bruno@clisp.org>
1672
1673         * m4/perl.m4 (gl_PERL): Require version 5.005, not 5.003.
1674         Needed for help2man.
1675
1676 2007-02-23  Karl Berry  <karl@gnu.org>
1677
1678         * doc/gnulib-tool.texi (CVS Issues): mention that when foo_.h
1679         exists, foo.h should be cvs-ignored, not committed.
1680
1681 2007-02-23  Eric Blake  <ebb9@byu.net>
1682
1683         * lib/getdate.h (includes):  Include <time.h>, not "timespec.h".
1684         * lib/stat-time.h (includes): Likewise.
1685         * lib/utimecmp.c (includes): Likewise.
1686         * lib/utimens.h (includes): Likewise.
1687         * lib/getdate.y (includes): Also include "timespec.h" for use
1688         internal to the module.
1689         * modules/utimens (Depends-on): Revert yesterday's patch.
1690         * modules/nanosleep (Depends-on): Add missing dependency.
1691
1692 2007-02-22  Bruno Haible  <bruno@clisp.org>
1693
1694         * lib/glob.c: Don't include getlogin_r.h.
1695
1696 2007-02-22  Jim Meyering  <jim@meyering.net>
1697
1698         * modules/utimens (Depends-on): Add timespec, required for
1699         utimens.h's inclusion of timespec.h.
1700
1701 2007-02-21  Paul Eggert  <eggert@cs.ucla.edu>
1702
1703         * lib/getcwd.c (__getcwd): Undo previous change; it mishandled
1704         long unreadable paths in GNU/Linux.  Problem reported by Andreas
1705         Schwab in
1706         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00261.html>.
1707         I'll try to think of a better way to fix the Solaris problem.
1708
1709         * lib/getcwd.c (__getcwd): Don't assume getcwd (NULL, 0) works
1710         like glibc; on Solaris 10, it fails with errno == EINVAL.
1711         POSIX says the behavior is unspecified if the first argument is NULL,
1712         so play it safe and never pass NULL to the system getcwd.
1713
1714 2007-02-21  Jim Meyering  <jim@meyering.net>
1715
1716         * lib/gettimeofday.c (rpl_gettimeofday): Remove declaration
1717         of gettimeofday.  It would conflict with the one now always
1718         provided via sys_time_.h.  Reported by Matthew Woehlke, as
1719         an IRIX 6.5 build failure.
1720
1721 2007-02-20  Paul Eggert  <eggert@cs.ucla.edu>
1722
1723         Minor fixups to port to Solaris 10 with Sun C 5.8.
1724         * lib/getcwd.c [!_LIBC]: Include dirfd.h, since we use dirfd.
1725         * modules/getcwd (Depends-on): Add dirfd.
1726         * lib/putenv.c (putenv): #undef it.
1727         (rpl_putenv): New decl.
1728         (malloc, free): Include <stdlib.h> rather than prototyping separately.
1729
1730 2007-02-20  Bruno Haible  <bruno@clisp.org>
1731
1732         * modules/stdio-tests: New file.
1733         * tests/test-stdio.c: New file.
1734
1735         * modules/vsnprintf (Files): Remove lib/vsnprintf.h.
1736         (Depends-on): Add stdio.
1737         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
1738         (Include): Use <stdio.h> instead of vsnprintf.h.
1739         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
1740         HAVE_DECL_VSNPRINTF.
1741         * lib/vsnprintf.c: Include <stdio.h> instead of vsnprintf.h.
1742
1743         * modules/snprintf (Files): Remove lib/snprintf.h.
1744         (Depends-on): Add stdio.
1745         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
1746         (Include): Use <stdio.h> instead of snprintf.h.
1747         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
1748         HAVE_DECL_SNPRINTF.
1749         * lib/snprintf.c: Include <stdio.h> instead of snprintf.h.
1750         * lib/getaddrinfo.c: Likewise.
1751
1752         * modules/stdio: New file.
1753         * lib/stdio_.h: New file, incorporating snprintf.h and vsnprintf.h.
1754         * lib/snprintf.h: Remove file.
1755         * lib/vsnprintf.h: Remove file.
1756         * lib/.cppi-disable: Remove snprintf.h.
1757         * m4/stdio_h.m4: New file.
1758         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdio.
1759
1760 2007-02-20  Jim Meyering  <jim@meyering.net>
1761
1762         * lib/ftruncate.c [HAVE_CHSIZE]: Document that this code is
1763         used by e.g., mingw.  From Bruno Haible.
1764
1765 2007-02-19  Bruno Haible  <bruno@clisp.org>
1766
1767         * lib/string_.h: Use "#pragma GCC system_header" to suppress some gcc
1768         warnings.
1769         Reported by Ben Pfaff <blp@cs.stanford.edu>.
1770
1771 2007-02-19  Bruno Haible  <bruno@clisp.org>
1772
1773         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Don't request a complaint mail
1774         from mingw users.
1775
1776 2007-02-19  Bruno Haible  <bruno@clisp.org>
1777
1778         * lib/stdlib_.h: Use "#pragma GCC system_header" to suppress some gcc
1779         warnings.
1780         Reported by Joel E. Denny <jdenny@ces.clemson.edu> via Paul Eggert.
1781
1782 2007-02-19  Jim Meyering  <jim@meyering.net>
1783
1784         Don't use FD after a successful "fdopendir (fd)".
1785         * lib/getcwd.c (__getcwd) [AT_FDCWD]: fdopendir (fd) usually closes fd.
1786         Reset it by calling dirfd on the just-obtained DIR*.
1787
1788         * m4/ftruncate.m4: Adjust comment to give this module a 3-year reprieve.
1789         Prompted by a report from Bruno Haible that mingw lacks ftruncate.
1790
1791 2007-02-18  Bruno Haible  <bruno@clisp.org>
1792
1793         * lib/readlink.c: Include <unistd.h>.
1794         * m4/readlink.m4 (gl_FUNC_READLINK): Require gl_UNISTD_H_DEFAULTS. Set
1795         HAVE_READLINK.
1796         * modules/readlink (Depends-on): Add unistd.
1797         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
1798         (Include): Add <unistd.h>.
1799
1800         * lib/getlogin_r.h: Remove file.
1801         * lib/getlogin_r.c: Include <unistd.h> instead of getlogin_r.h.
1802         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE): Remove macro.
1803         (gl_GETLOGIN_R): Inline it here. Require gl_UNISTD_H_DEFAULTS. Set
1804         HAVE_DECL_GETLOGIN_R.
1805         * modules/getlogin_r (Files): Remove lib/getlogin_r.h.
1806         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
1807         (Include): Use <unistd.h> instead of getlogin_r.h.
1808
1809         * lib/getcwd.h: Remove file.
1810         * lib/getcwd.c: Include <unistd.h> instead of getcwd.h.
1811         * lib/xgetcwd.c: Likewise.
1812         * m4/getcwd.m4 (gl_FUNC_GETCWD): Require gl_UNISTD_H_DEFAULTS. Set
1813         REPLACE_GETCWD. Don't define __GETCWD_PREFIX.
1814         * modules/getcwd (Files): Remove lib/getcwd.h.
1815         (Depends-on): Add unistd.
1816         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
1817         (Include): Use <unistd.h> instad of getcwd.h.
1818
1819         * lib/ftruncate.c: Include <unistd.h> first.
1820         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Require gl_UNISTD_H_DEFAULTS.
1821         Set HAVE_FTRUNCATE.
1822         * modules/ftruncate (Depends-on): Add unistd.
1823         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
1824
1825         * lib/fchdir.c: Include <unistd.h> first.
1826         * lib/dirent_.h: Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT.
1827         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_UNISTD_H_DEFAULTS instead
1828         of gl_HEADER_UNISTD_DEFAULTS. Set REPLACE_FCHDIR. Don't set UNISTD_H.
1829         * modules/fchdir (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
1830         (Makefile.am): Substitute also REPLACE_FCHDIR into dirent.h.
1831
1832         * lib/dup2.c: Include <unistd.h> first.
1833         * m4/dup2.m4 (gl_FUNC_DUP2): Require gl_UNISTD_H_DEFAULTS. Set
1834         HAVE_DUP2.
1835         * modules/dup2 (Depends-on): Add unistd.
1836         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
1837
1838         * lib/chown.c: Include <unistd.h> first. Undefine chown later.
1839         * m4/chown.m4 (gl_FUNC_CHOWN): Require gl_UNISTD_H_DEFAULTS. Set
1840         REPLACE_CHOWN. Don't define chown as a macro here.
1841         * modules/chown (Depends-on): Add unistd.
1842         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
1843
1844         * lib/unistd_.h: Test HAVE_UNISTD_H determined at configure time.
1845         Add definition for GL_LINK_WARNING.
1846         (chown, dup2): New declarations.
1847         (fchdir): Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT. Provide optional
1848         link warning.
1849         (ftruncate): New declaration.
1850         (getcwd): New declaration, taken from old getcwd.h.
1851         (getlogin_r): New declaration, taken from old getlogin_r.h.
1852         (readlink): New declaration.
1853         * m4/unistd_h.m4 (gl_UNISTD_H): Renamed from gl_HEADER_UNISTD. Don't
1854         set UNISTD_H. Inline gl_PREREQ_UNISTD. Set HAVE_UNISTD_H.
1855         (gl_PREREQ_UNISTD): Remove macro.
1856         (gl_UNISTD_MODULE_INDICATOR): New macro.
1857         (gl_UNISTD_H_DEFAULTS): Renamed from gl_HEADER_UNISTD_DEFAULTS. Set
1858         many new variables. Don't set UNISTD_H.
1859         * modules/unistd (Description): Change.
1860         (Depends-on): Add link-warning.
1861         (configure.ac): Update.
1862         (Makefile.am): Create unistd.h always. Substitute many new variables
1863         into it.
1864
1865 2007-02-18  Bruno Haible  <bruno@clisp.org>
1866
1867         * lib/stdlib_.h (getsubopt): New declaration, copied from getsubopt.h.
1868         * modules/stdlib (stdlib.h): Also substitute GNULIB_GETSUBOPT and
1869         HAVE_GETSUBOPT.
1870         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Also initialize
1871         GNULIB_GETSUBOPT and HAVE_GETSUBOPT.
1872         * lib/getsubopt.h: Remove file.
1873         * modules/getsubopt (Files): Remove lib/getsubopt.h.
1874         (Depends-on): Add stdlib.
1875         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
1876         (Includes): Use <stdlib.h> instead of getsubopt.h.
1877         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Require gl_STDLIB_H_DEFAULTS.
1878         Set HAVE_GETSUBOPT.
1879         * lib/getsubopt.c: Don't include getsubopt.h.
1880
1881 2007-02-18  Bruno Haible  <bruno@clisp.org>
1882
1883         * modules/fchdir (Depends-on): Add dup2.
1884
1885 2007-02-18  Bruno Haible  <bruno@clisp.org>
1886
1887         * lib/stdlib_.h: Handle glibc's special invocation convention
1888         specially.
1889
1890 2007-02-18  Bruno Haible  <bruno@clisp.org>
1891
1892         * modules/stdlib-tests: New file.
1893         * tests/test-stdlib.c: New file.
1894
1895         * modules/mkstemp (Files): Remove lib/mkstemp.h.
1896         (Depends-on): Add stdlib.
1897         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
1898         (Includes): Use <stdlib.h> instead of mkstemp.h.
1899         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require gl_STDLIB_H_DEFAULTS. Set
1900         REPLACE_MKSTEMP. Remove definition of __MKSTEMP_PREFIX.
1901         * lib/mkstemp.c: Don't include mkstemp.h.
1902         * lib/mkstemp-safer.c: Include <stdlib.h> instead of mkstemp.h.
1903         * lib/stdlib--.h: Don't include mkstemp.h.
1904
1905         * modules/mkdtemp (Files): Remove lib/mkdtemp.h.
1906         (Depends-on): Add stdlib.
1907         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
1908         (Includes): Use <stdlib.h> instead of mkdtemp.h.
1909         * m4/mkdtemp.m4 (gt_FUNC_MKDTEMP): Require gl_STDLIB_H_DEFAULTS. Set
1910         HAVE_MKDTEMP.
1911         * lib/mkdtemp.c: Don't include mkdtemp.h.
1912         * lib/clean-temp.c: Don't include mkdtemp.h.
1913
1914         * modules/exit (Files): Remove lib/exit.h.
1915         (Depends-on): Add stdlib.
1916         (Makefile.am): Remove lib_SOURCES.
1917         (Include): Use <stdlib.h> instead of exit.h.
1918         * lib/argmatch.c: Don't include exit.h.
1919         * lib/execute.c: Likewise.
1920         * lib/pagealign_alloc.c: Likewise.
1921         * lib/pipe.c: Likewise.
1922         * lib/wait-process.c: Likewise.
1923         * lib/copy-file.c: Include <stdlib.h> instead of exit.h.
1924         * lib/exitfail.c: Likewise.
1925         * lib/savewd.c: Likewise.
1926         * lib/xsetenv.c: Likewise.
1927
1928         * modules/stdlib: New file.
1929         * lib/stdlib_.h: New file, incorporating exit.h, mkdtemp.h, mkstemp.h
1930         and extra comments about mkstemp().
1931         * lib/exit.h: Remove file.
1932         * lib/mkdtemp.h: Remove file.
1933         * lib/mkstemp.h: Remove file.
1934         * m4/stdlib_h.m4: New file.
1935         * MODULES.html.sh (Support for systems lacking ANSI C 89): Add stdlib.
1936
1937 2007-02-18  Bruno Haible  <bruno@clisp.org>
1938
1939         * modules/math-tests: New file.
1940         * tests/test-math.c: New file.
1941
1942         * modules/math: New file.
1943         * modules/mathl (Files): Remove lib/mathl.h.
1944         (Depends-on): Add math.
1945         (Makefile.am): Don't mention mathl.h.
1946         (Include): Use <math.h> instead of mathl.h.
1947         * lib/math_.h: New file.
1948         * lib/mathl.h: Remove file.
1949         * lib/acosl.c: Include <config.h> and <math.h> first. Don't include
1950         mathl.h.
1951         * lib/asinl.c: Likewise.
1952         * lib/atanl.c: Likewise.
1953         * lib/ceill.c: Likewise.
1954         * lib/cosl.c: Likewise.
1955         * lib/expl.c: Likewise.
1956         * lib/floorl.c: Likewise.
1957         * lib/frexpl.c: Likewise.
1958         * lib/ldexpl.c: Likewise.
1959         * lib/logl.c: Likewise.
1960         * lib/sincosl.c: Likewise.
1961         * lib/sinl.c: Likewise.
1962         * lib/sqrtl.c: Likewise.
1963         * lib/tanl.c: Likewise.
1964         * lib/trigl.c: Likewise.
1965         * m4/math_h.m4: New file.
1966         * MODULES.html.sh (Mathematics): Add math.
1967
1968 2007-02-17  Bruno Haible  <bruno@clisp.org>
1969
1970         * modules/wctype-tests: New file.
1971         * tests/test-wctype.c: New file.
1972
1973         * modules/wchar-tests: New file.
1974         * tests/test-wchar.c: New file.
1975
1976         * modules/unistd-tests: New file.
1977         * tests/test-unistd.c: New file.
1978
1979         * modules/time-tests: New file.
1980         * tests/test-time.c: New file.
1981
1982         * modules/sysexits-tests: New file.
1983         * tests/test-sysexits.c: New file.
1984
1985         * modules/sys_time-tests: New file.
1986         * tests/test-sys_time.c: New file.
1987
1988         * modules/sys_stat-tests: New file.
1989         * tests/test-sys_stat.c: New file.
1990
1991         * modules/sys_socket-tests: New file.
1992         * tests/test-sys_socket.c: New file.
1993
1994         * modules/sys_select-tests: New file.
1995         * tests/test-sys_select.c: New file.
1996
1997         * modules/string-tests: New file.
1998         * tests/test-string.c: New file.
1999
2000         * modules/stdbool-tests: New file.
2001         * tests/test-stdbool.c: New file.
2002
2003         * modules/netinet_in-tests: New file.
2004         * tests/test-netinet_in.c: New file.
2005
2006         * modules/inttypes-tests: New file.
2007         * tests/test-inttypes.c: New file.
2008
2009         * modules/fcntl-tests: New file.
2010         * tests/test-fcntl.c: New file.
2011
2012         * modules/byteswap-tests: New file.
2013         * tests/test-byteswap.c: New file.
2014
2015         * modules/arpa_inet-tests: New file.
2016         * tests/test-arpa_inet.c: New file.
2017
2018 2007-02-17  Bruno Haible  <bruno@clisp.org>
2019
2020         * lib/inttypes_.h: Add definition for GL_LINK_WARNING.
2021         (imaxabs, imaxdiv, strtoimax, strtoumax): Don't declare the function
2022         if the corresponding module is not enabled. Emit link warnings if
2023         the function is used nevertheless.
2024         * m4/inttypes.m4 (gl_INTTYPES_H): Never use the existing <inttypes.h>.
2025         Don't AC_SUBST HAVE_DECL_IMAXABS, HAVE_DECL_IMAXDIV,
2026         HAVE_DECL_STRTOIMAX, HAVE_DECL_STRTOUMAX.
2027         (gl_INTTYPES_MODULE_INDICATOR, gl_INTTYPES_H_DEFAULTS): New macros.
2028         * modules/inttypes (Depends-on): Add link-warning.
2029         (Makefile.am): Copy the contents of build-aux/link-warning.h into
2030         inttypes.h. Substitute also GNULIB_IMAXABS, GNULIB_IMAXDIV,
2031         GNULIB_STRTOIMAX, GNULIB_STRTOUMAX.
2032         * modules/imaxabs (configure.ac): Invoke gl_INTTYPES_MODULE_INDICATOR.
2033         * modules/imaxdiv (configure.ac): Likewise.
2034         * modules/strtoimax (configure.ac): Likewise.
2035         * modules/strtoumax (configure.ac): Likewise.
2036
2037 2007-02-17  Bruno Haible  <bruno@clisp.org>
2038
2039         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Include the contents of
2040         gl_STRING_MODULE_INDICATOR_DEFAULTS.
2041         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Remove macro.
2042         (gl_HEADER_STRING_H_BODY, gl_STRING_MODULE_INDICATOR): Update.
2043
2044 2007-02-17  Bruno Haible  <bruno@clisp.org>
2045
2046         * modules/link-warning: New file.
2047         * build-aux/link-warning.h: New file, extracted from lib/string_.h.
2048         * lib/string_.h (GL_LINK_WARNING): Remove definition.
2049         * modules/string (Depends-on): Add link-warning.
2050         (Makefile.am): Copy the contents of build-aux/link-warning.h into
2051         string.h.
2052         * MODULES.html.sh (Support for building libraries and executables): Add
2053         link-warning.
2054
2055 2007-02-17  Bruno Haible  <bruno@clisp.org>
2056
2057         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strcasecmp,
2058         strncasecmp, strchr, strchrnul, strdup, strndup, strnlen, strcspn,
2059         strpbrk, strspn, strrchr, strsep, strstr, strcasestr, strtok_r): Break
2060         long lines.
2061
2062 2007-02-17  Ben Pfaff  <blp@cs.stanford.edu>
2063             Bruno Haible  <bruno@clisp.org>
2064
2065         * modules/tmpfile: New file.
2066         * lib/tmpfile.c: New file.
2067         * m4/tmpfile.m4: New file.
2068         * MODULES.html.sh (func_all_modules): New section "Input/output".
2069
2070 2007-02-15  Bruno Haible  <bruno@clisp.org>
2071
2072         * lib/clean-temp.c [WIN32 && !CYGWIN]: Include <windows.h>.
2073         (supports_delete_on_close): New function.
2074         (open_temp, fopen_temp): Use _O_TEMPORARY when supported.
2075
2076 2007-02-14  Bruno Haible  <bruno@clisp.org>
2077
2078         * modules/mbspcasecmp-tests: New file.
2079         * tests/test-mbspcasecmp.sh: New file.
2080         * tests/test-mbspcasecmp.c: New file.
2081
2082         New module mbspcasecmp.
2083         * modules/mbspcasecmp: New file.
2084         * lib/mbspcasecmp.c: New file.
2085         * lib/string_.h (strncasecmp): Change warning message.
2086         (mbspcasecmp): New declaration.
2087         * m4/mbspcasecmp.m4: New file.
2088         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2089         GNULIB_MBSPCASECMP.
2090         * modules/string (string.h): Also substitute GNULIB_MBSPCASECMP.
2091         * MODULES.html.sh (Internationalization functions): Add mbspcasecmp.
2092
2093 2007-02-14  Bruno Haible  <bruno@clisp.org>
2094
2095         * modules/mbsncasecmp-tests: New file.
2096         * tests/test-mbsncasecmp.sh: New file.
2097         * tests/test-mbsncasecmp.c: New file.
2098
2099         New module mbsncasecmp.
2100         * modules/mbsncasecmp: New file.
2101         * lib/mbsncasecmp.c: New file.
2102         * lib/string_.h (mbsncasecmp): New declaration.
2103         * m4/mbsncasecmp.m4: New file.
2104         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2105         GNULIB_MBSNCASECMP.
2106         * modules/string (string.h): Also substitute GNULIB_MBSNCASECMP.
2107         * MODULES.html.sh (Internationalization functions): Add mbsncasecmp.
2108
2109 2007-02-14  Paul Eggert  <eggert@cs.ucla.edu>
2110
2111         * lib/exclude.c (FNM_EXTMATCH): Define if system does not.
2112         Verify that it doesn't overlap with our flags.
2113         (fnmatch_no_wildcards): Don't use strcasecmp or strncasecmp, which
2114         do not have the desired effect in multibyte locales; instead, use
2115         mbscasecmp.
2116         * modules/exclude (Depends-on): Depend on mbscasecmp, not strcase.
2117         Add dependency on xalloc.  Depend on fnmatch, not fnmatch-gnu, since
2118         we don't require GNU fnmatch ourselves (if our users require it, they
2119         should do so explicitly).
2120
2121         Fix regex code so it doesn't rely on strcasecmp.
2122         * lib/regex_internal.h: Include <langinfo.h> only if _LIBC is defined.
2123         Otherwise, include gnulib's langinfo.h.
2124         * lib/regcomp.c (init_dfa): Don't use strcasecmp, as it can have
2125         undesirable behavior in non-C locales.  Instead, rely on localecharset.
2126         * m4/regex.m4 (gl_PREREQ_REGEX): Don't require AM_LANGINFO_CODESET.
2127         * modules/regex (FILES): Remove m4/codeset.m4.
2128         (Depends-on): Add localcharset.  Remove strcase.
2129
2130 2007-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2131
2132         * m4/unlinkdir.m4 (gl_UNLINKDIR): Fix m4 quoting bug.
2133         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
2134
2135 2007-02-13  Bruno Haible  <bruno@clisp.org>
2136
2137         * m4/intdiv0.m4 (gt_INTDIV0): Assume ANSI C. Fix underquoting bug.
2138         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
2139
2140 2007-02-12  Bruno Haible  <bruno@clisp.org>
2141
2142         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
2143         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): If
2144         GNULIB_POSIXCHECK and the gnulib module not enabled, provoke a link-
2145         time warning rather than a link error.
2146
2147 2007-02-12  Bruno Haible  <bruno@clisp.org>
2148
2149         * m4/locale-fr.m4 (gt_LOCALE_FR): Fix m4 quoting bug.
2150         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
2151         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
2152
2153 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
2154
2155         * lib/string_.h (strncasecmp): Fix typo: this macro takes 3
2156         args, not 2.
2157
2158 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
2159
2160         New module 'time', so that apps can include <time.h> as per
2161         POSIX and GNU instead of separate include files like time_r.h
2162         and timegm.h.  This implementation tries out a simpler approach
2163         for replacing decls in standard include files (as compared to
2164         the string module), somewhat as an experiment.
2165
2166         * config/srclist.txt: Comment out mktime.c for now.
2167         * doc/gnulib-tool.texi (Initial import): Don't use time_r as an example
2168         since it doesn't apply any more.  Use generic wording instead.
2169         * MODULES.html.sh (Support for systems lacking POSIX:2001): New module
2170         'time'.
2171         * lib/time_.h, m4/time_h.m4, modules/time: New files.
2172         * lib/strptime.h, lib/time_r.h, lib/timegm.h: Remove.
2173         * lib/mktime.c: Include config.h depending on _LIBC, not HAVE_CONFIG_H.
2174         Don't include <sys/types.h>; no longer needed since we assume C89.
2175         * lib/mktime.c: Don't include "time_r.h"; no longer needed.
2176         * lib/strftime.c: Likewise.
2177         * lib/time_r.c: Likewise.
2178         * lib/nanosleep.c (nanosleep): #undef after include files, not before.
2179         * lib/nanosleep.c: Include <time.h> first, to check interface.
2180         * lib/strptime.c: Likewise.
2181         * lib/time_r.c: Likewise.
2182         * lib/timegm.c: Likewise.
2183         * lib/strptime.c: Don't include strptime.h or time_r.h; no longer
2184         needed.
2185         * lib/timegm.c: Don't include timegm.h; no longer needed.
2186         * lib/timespec.h: Don't include <sys/time.h> before <time.h>;
2187         time.h now handles any problems in that area.
2188         (struct timespec, nanosleep): Remove; time.h now arranges for these.
2189         * lib/xnanosleep.c: Don't include timespec.h; no longer needed now
2190         that time.h defines struct timespec.
2191         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check that nanosleep is declared.
2192         Set REPLACE_NANOSLEEP.  Don't AC_DEFINE nanosleep; the time module now
2193         handles that.
2194         * m4/strptime.m4 (gl_FUNC_STPRTIME): Set REPLACE_STRPTIME.
2195         * m4/time_r.m4 (gl_TIME_R): Don't define HAVE_TIME_R_POSIX; no longer
2196         needed.  Set REPLACE_LOCALTIME.
2197         * m4/timegm.m4 (gl_FUNC_TIMEGM): Set REPLACE_TIMEGM.
2198         * m4/timespec.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Move to time_h.m4.
2199         (gl_TIMESPEC): Don't check for sys/time.h or struct timespec or
2200         nanosleep; time_h.m4 now does that.  Don't require
2201         gl_USE_SYSTEM_EXTENSIONS; no longer needed directly, and the time
2202         module handles this now.
2203         * modules/getdate (Depends-on): Remove timespec.  Add time.
2204         * modules/nanosleep (Depends-on): Likewise.
2205         * modules/stat-time (Depends-on): Likewise.
2206         * modules/nanosleep (Include): Include time.h, not timespec.h.
2207         * modules/strptime (Files): Remove lib/strptime.h.
2208         (Depends-on): Add extensions, time.
2209         (Include): Include time.h, not strptime.h.
2210         * modules/time_r (Files): Remove lib/time_r.h.
2211         (Depends-on): Add time.
2212         (Include): Include time.h, not time_r.h.
2213         * modules/timegm: Likewise.
2214         * modules/timespec (Description): Now does timespec-related decls
2215         of our own, instead of struct timespec itself.
2216         (Depends-on): Add time; remove extensions.
2217         (Maintainer): Add self.
2218         * modules/utimecmp (Depends-on): Add time; remove timespec.
2219         * modules/utimens (Depends-on): Likewise.
2220         * modules/xnanosleep (Depends-on): Likewise.
2221
2222 2007-02-11  Bruno Haible  <bruno@clisp.org>
2223
2224         * lib/c-strstr.c: Include allocsa.h.
2225         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
2226         * lib/c-strcasestr.c: Include allocsa.h.
2227         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
2228         * lib/strcasestr.c: Include allocsa.h.
2229         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
2230         * lib/mbsstr.c: Include allocsa.h.
2231         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
2232         allocsa/freesa instead of malloc/free.
2233         * lib/mbscasestr.c: Include allocsa.h.
2234         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
2235         allocsa/freesa instead of malloc/free.
2236         * modules/c-strstr (Depends-on): Add allocsa.
2237         * modules/c-strcasestr (Depends-on): Likewise.
2238         * modules/strcasestr (Depends-on): Likewise.
2239         * modules/mbsstr (Depends-on): Likewise.
2240         * modules/mbscasestr (Depends-on): Likewise.
2241
2242 2007-02-11  Bruno Haible  <bruno@clisp.org>
2243
2244         * lib/mbsspn.c (mbsspn): Fix bug. Remove unnecessary strlen call.
2245
2246         * modules/mbsspn-tests: New file.
2247         * tests/test-mbsspn.sh: New file.
2248         * tests/test-mbsspn.c: New file.
2249
2250 2007-02-11  Bruno Haible  <bruno@clisp.org>
2251
2252         * lib/mbspbrk.c (mbspbrk): Remove unneeded cast.
2253
2254         * modules/mbspbrk-tests: New file.
2255         * tests/test-mbspbrk.sh: New file.
2256         * tests/test-mbspbrk.c: New file.
2257
2258 2007-02-11  Bruno Haible  <bruno@clisp.org>
2259
2260         * lib/mbscspn.c (mbscspn): Remove unnecessary strlen call and
2261         unneeded cast.
2262
2263         * modules/mbscspn-tests: New file.
2264         * tests/test-mbscspn.sh: New file.
2265         * tests/test-mbscspn.c: New file.
2266
2267 2007-02-11  Bruno Haible  <bruno@clisp.org>
2268
2269         * modules/mbscasecmp-tests: New file.
2270         * tests/test-mbscasecmp.sh: New file.
2271         * tests/test-mbscasecmp.c: New file.
2272
2273 2007-02-11  Bruno Haible  <bruno@clisp.org>
2274
2275         Ensure O(n) worst-case complexity of mbscasestr.
2276         * lib/mbscasestr.c: Include stdbool.h.
2277         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
2278         functions.
2279         (mbscasestr): Add some bookkeeping. Invoke knuth_morris_pratt_* when
2280         the bookkeeping indicates that it's worth it.
2281         * modules/mbscasestr (Depends-on): Add stdbool, mbslen, strnlen.
2282
2283         * modules/mbscasestr-tests: New file.
2284         * tests/test-mbscasestr1.c: New file.
2285         * tests/test-mbscasestr2.sh: New file.
2286         * tests/test-mbscasestr2.c: New file.
2287         * tests/test-mbscasestr3.sh: New file.
2288         * tests/test-mbscasestr3.c: New file.
2289         * tests/test-mbscasestr4.sh: New file.
2290         * tests/test-mbscasestr4.c: New file.
2291         * m4/locale-tr.m4: New file.
2292
2293 2007-02-11  Bruno Haible  <bruno@clisp.org>
2294
2295         Ensure O(n) worst-case complexity of mbsstr.
2296         * lib/mbsstr.c: Include stdbool.h.
2297         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
2298         functions.
2299         (mbsstr): Add some bookkeeping. Invoke knuth_morris_pratt_* when the
2300         bookkeeping indicates that it's worth it.
2301         * modules/mbsstr (Depends-on): Add stdbool, mbslen, strnlen.
2302
2303         * modules/mbsstr-tests: New file.
2304         * tests/test-mbsstr1.c: New file.
2305         * tests/test-mbsstr2.sh: New file.
2306         * tests/test-mbsstr2.c: New file.
2307         * tests/test-mbsstr3.sh: New file.
2308         * tests/test-mbsstr3.c: New file.
2309         * m4/locale-fr.m4: New file.
2310
2311 2007-02-11  Bruno Haible  <bruno@clisp.org>
2312
2313         * lib/mbsrchr.c (mbsrchr): Fix bug.
2314
2315         * modules/mbsrchr-tests: New file.
2316         * tests/test-mbsrchr.sh: New file.
2317         * tests/test-mbsrchr.c: New file.
2318
2319 2007-02-11  Bruno Haible  <bruno@clisp.org>
2320
2321         * lib/mbschr.c (mbschr): Fix bug.
2322
2323         * modules/mbschr-tests: New file.
2324         * tests/test-mbschr.sh: New file.
2325         * tests/test-mbschr.c: New file.
2326         * m4/locale-zh.m4: New file.
2327
2328 2007-02-11  Bruno Haible  <bruno@clisp.org>
2329
2330         Support for copying multibyte string iterators.
2331         * lib/mbiter.h: Include <string.h>.
2332         (mbiter_multi_copy): New function.
2333         (mbi_copy): New macro.
2334         * lib/mbuiter.h: Include <string.h>.
2335         (mbuiter_multi_copy): New function.
2336         (mbui_copy): New macro.
2337
2338 2007-02-11  Bruno Haible  <bruno@clisp.org>
2339
2340         New module mbslen.
2341         * modules/mbslen: New file.
2342         * lib/mbslen.c: New file.
2343         * lib/string_.h (mbslen): New declaration.
2344         * m4/mbslen.m4: New file.
2345         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2346         GNULIB_MBSLEN.
2347         * modules/string (string.h): Also substitute GNULIB_MBSLEN.
2348         * MODULES.html.sh (Internationalization functions): Add mbslen.
2349
2350 2007-02-11  Bruno Haible  <bruno@clisp.org>
2351
2352         Ensure O(n) worst-case complexity of strcasestr substitute.
2353         * lib/strcasestr.c: Include stdbool.h.
2354         (knuth_morris_pratt): New function.
2355         (strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when the
2356         bookkeeping indicates that it's worth it.
2357         * modules/strcasestr (Depends-on): Add stdbool, strnlen.
2358
2359         * modules/strcasestr-tests: New file.
2360         * tests/test-strcasestr.c: New file.
2361
2362 2007-02-11  Bruno Haible  <bruno@clisp.org>
2363
2364         Ensure O(n) worst-case complexity of c_strcasestr.
2365         * lib/c-strcasestr.c: Include stdbool.h, string.h.
2366         (knuth_morris_pratt): New function.
2367         (c_strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when
2368         the bookkeeping indicates that it's worth it.
2369         * modules/c-strcasestr (Depends-on): Add stdbool, strnlen.
2370
2371         * modules/c-strcasestr-tests: New file.
2372         * tests/test-c-strcasestr.c: New file.
2373
2374 2007-02-11  Bruno Haible  <bruno@clisp.org>
2375
2376         Ensure O(n) worst-case complexity of c_strstr.
2377         * lib/c-strstr.c: Include stdbool.h, string.h.
2378         (knuth_morris_pratt): New function.
2379         (c_strstr): Add some bookkeeping. Invoke knuth_morris_pratt when the
2380         bookkeeping indicates that it's worth it.
2381         * modules/c-strstr (Depends-on): Add stdbool, strnlen.
2382
2383         * lib/c-strstr.c: Complete rewrite for maintainability.
2384
2385         * modules/c-strstr-tests: New file.
2386         * tests/test-c-strstr.c: New file.
2387
2388 2007-02-11  Bruno Haible  <bruno@clisp.org>
2389
2390         * m4/javacomp.m4 (gt_JAVACOMP): Work around a 'tr' bug in coreutils
2391         5.2.1 and earlier, whereby \055 was treated just like the range
2392         delimiter '-'.
2393         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
2394
2395 2007-02-08  Bruno Haible  <bruno@clisp.org>
2396
2397         * modules/regex (Depends-on): Add stdbool.
2398         Reported by Dalibor Topic <robilad@kaffe.org>.
2399
2400 2007-02-05  Paul Eggert  <eggert@cs.ucla.edu>
2401
2402         * m4/regex.m4 (gl_REGEX): Check for glibc bug #3957.
2403         Prefer returning from main to exiting from it.
2404         Remove unnecessary parens after sizeof.
2405
2406 2007-02-05  Bruno Haible  <bruno@clisp.org>
2407
2408         New module mbssep.
2409         * modules/mbssep: New file.
2410         * lib/mbssep.c: New file.
2411         * lib/string_.h (strsep): Add a conditional link warning.
2412         (mbssep): New declaration.
2413         * m4/mbssep.m4: New file.
2414         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2415         GNULIB_MBSSEP.
2416         * modules/string (string.h): Also substitute GNULIB_MBSSEP.
2417         * MODULES.html.sh (Internationalization functions): Add mbssep.
2418
2419 2007-02-05  Bruno Haible  <bruno@clisp.org>
2420
2421         * lib/strsep.c (strsep): Fix actions in case of no delimiters.
2422         Optimize search in case of 1 delimiter.
2423
2424 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
2425
2426         * lib/acl.h: Include sys/types.h before sys/acl.h.
2427
2428 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
2429
2430         Merge upstream fix for glibc bugzilla #3957:
2431
2432         2007-02-05  Jakub Jelinek  <jakub@redhat.com>
2433
2434         * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0'
2435         bit for RE_HAT_LISTS_NOT_NEWLINE.
2436         (build_charclass_op): Remove bogus comment.
2437
2438 2007-02-05  Simon Josefsson  <simon@josefsson.org>
2439
2440         * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
2441
2442 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
2443
2444         * lib/getsubopt.c [!_LIBC]: Include config.h and getsubopt.h.
2445         * lib/memmem.c [!defined _LIBC]: Include config.h.
2446
2447 2007-02-04  Bruno Haible  <bruno@clisp.org>
2448
2449         * lib/string_.h (GL_LINK_WARNING2): Put the word "warning:" into the
2450         warning message.
2451
2452 2007-02-04  Bruno Haible  <bruno@clisp.org>
2453
2454         New module mbstok_r.
2455         * modules/mbstok_r: New file.
2456         * lib/mbstok_r.c: New file.
2457         * lib/string_.h (strtok_r): Change argument names to match the
2458         comments. Add a conditional link warning.
2459         (mbstok_r): New declaration.
2460         * m4/mbstok_r.m4: New file.
2461         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2462         GNULIB_MBSTOK_R.
2463         * modules/string (string.h): Also substitute GNULIB_MBSTOK_R.
2464         * MODULES.html.sh (Internationalization functions): Add mbstok_r.
2465
2466 2007-02-04  Bruno Haible  <bruno@clisp.org>
2467
2468         New module mbsspn.
2469         * modules/mbsspn: New file.
2470         * lib/mbsspn.c: New file.
2471         * lib/string_.h (strspn): Add a conditional link warning.
2472         (mbsspn): New declaration.
2473         * m4/mbsspn.m4: New file.
2474         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2475         GNULIB_MBSSPN.
2476         * modules/string (string.h): Also substitute GNULIB_MBSSPN.
2477         * MODULES.html.sh (Internationalization functions): Add mbsspn.
2478
2479 2007-02-04  Bruno Haible  <bruno@clisp.org>
2480
2481         New module mbspbrk.
2482         * modules/mbspbrk: New file.
2483         * lib/mbspbrk.c: New file.
2484         * lib/string_.h (strpbrk): Add a conditional link warning.
2485         (mbspbrk): New declaration.
2486         * m4/mbspbrk.m4: New file.
2487         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2488         GNULIB_MBSPBRK.
2489         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
2490         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
2491
2492 2007-02-04  Bruno Haible  <bruno@clisp.org>
2493
2494         New module mbscspn.
2495         * modules/mbscspn: New file.
2496         * lib/mbscspn.c: New file.
2497         * lib/string_.h (strcspn): Add a conditional link warning.
2498         (mbscspn): New declaration.
2499         * m4/mbscspn.m4: New file.
2500         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2501         GNULIB_MBSCSPN.
2502         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
2503         * MODULES.html.sh (Internationalization functions): Add mbscspn.
2504
2505 2007-02-04  Bruno Haible  <bruno@clisp.org>
2506
2507         New module mbscasestr, reduced goal of strcasestr.
2508         * modules/mbscasestr: New file.
2509         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
2510         (mbscasestr): Renamed from strcasestr.
2511         * lib/strcasestr.c: Don't include mbuiter.h.
2512         (strcasestr): Remove support for multibyte locales.
2513         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
2514         Change the conditional link warning.
2515         (mbscasestr): New declaration.
2516         * m4/mbscasestr.m4: New file.
2517         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
2518         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
2519         REPLACE_STRCASESTR.
2520         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
2521         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
2522         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
2523         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
2524         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
2525         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
2526         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
2527         (Depends-on): Remove mbuiter.
2528         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
2529
2530 2007-02-04  Bruno Haible  <bruno@clisp.org>
2531
2532         Simplify handling of strncasecmp.
2533         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
2534         the conditional link warning.
2535         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
2536         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
2537         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
2538         * modules/strcase (configure.ac): Don't invoke
2539         gl_STRING_MODULE_INDICATOR.
2540         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
2541
2542 2007-02-04  Bruno Haible  <bruno@clisp.org>
2543
2544         New module mbscasecmp, reduced goal of strcasecmp.
2545         * modules/mbscasecmp: New file.
2546         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
2547         (mbscasecmp): Renamed from strcasecmp.
2548         * lib/strcasecmp.c: Don't include mbuiter.h.
2549         (strcasecmp): Remove support for multibyte locales.
2550         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
2551         Change the conditional link warning.
2552         (mbscasecmp): New declaration.
2553         * m4/mbscasecmp.m4: New file.
2554         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
2555         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
2556         REPLACE_STRCASECMP.
2557         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
2558         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2559         GNULIB_MBSCASECMP.
2560         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
2561         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
2562         * modules/strcase (Files): Remove m4/mbrtowc.m4.
2563         (Depends-on): Remove mbuiter.
2564         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
2565
2566 2007-02-04  Bruno Haible  <bruno@clisp.org>
2567
2568         New module mbsstr. Remove module strstr.
2569         * modules/mbsstr: New file.
2570         * modules/strstr: Remove file.
2571         * lib/mbsstr.c: Renamed from lib/strstr.c.
2572         (mbsstr): Renamed from strstr.
2573         * lib/string_.h (strstr): Remove declaration. Change the conditional
2574         link warning.
2575         (mbsstr): New declaration.
2576         * m4/mbsstr.m4: New file.
2577         * m4/strstr.m4: Remove file.
2578         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
2579         REPLACE_STRSTR.
2580         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
2581         Don't initialize GNULIB_STRSTR.
2582         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
2583         substitute GNULIB_STRSTR and REPLACE_STRSTR.
2584         * MODULES.html.sh (Internationalization functions): Add mbsstr.
2585         (Support for systems lacking ANSI C 89): Remove strstr.
2586
2587 2007-02-04  Bruno Haible  <bruno@clisp.org>
2588
2589         New module mbsrchr.
2590         * modules/mbsrchr: New file.
2591         * lib/mbsrchr.c: New file.
2592         * lib/string_.h (strrchr): Add a conditional link warning.
2593         (mbsrchr): New declaration.
2594         * m4/mbsrchr.m4: New file.
2595         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2596         GNULIB_MBSRCHR.
2597         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
2598         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
2599
2600 2007-02-04  Bruno Haible  <bruno@clisp.org>
2601
2602         New module mbschr.
2603         * modules/mbschr: New file.
2604         * lib/mbschr.c: New file.
2605         * lib/string_.h (strchr): Add a conditional link warning.
2606         (mbschr): New declaration.
2607         * m4/mbschr.m4: New file.
2608         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2609         GNULIB_MBSCHR.
2610         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
2611         * MODULES.html.sh (Internationalization functions): Add mbschr.
2612
2613 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
2614
2615         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
2616
2617         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
2618
2619 2007-02-04  Bruno Haible  <bruno@clisp.org>
2620
2621         New module description section 'configure.ac-early'.
2622         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
2623         (func_get_autoconf_early_snippet): New function.
2624         (func_import, func_create_testdir): Use it. Remove special cases for
2625         modules 'extensions' and 'lock'.
2626         * modules/extensions (configure.ac-early): Require
2627         gl_USE_SYSTEM_EXTENSIONS.
2628         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
2629
2630 2007-02-04  Bruno Haible  <bruno@clisp.org>
2631
2632         Make use of gcj-4.3's -fsource and -ftarget option.
2633         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
2634         and if so try the options -fsource and -ftarget.
2635         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
2636         source_version, ftarget_option, target_version arguments.
2637         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
2638         (is_envjavac_oldgcj_14_14_usable): Renamed from
2639         is_envjavac_gcj_14_14_usable.
2640         (is_envjavac_oldgcj_14_13_usable): Renamed from
2641         is_envjavac_gcj_14_13_usable.
2642         (is_gcj_present): Update.
2643         (is_gcj_43, is_gcj43_usable): New functions.
2644         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
2645         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
2646         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
2647         try the options -fsource and -ftarget.
2648
2649 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
2650
2651         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
2652         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
2653         larger value.
2654
2655 2007-02-03  Jim Meyering  <jim@meyering.net>
2656
2657         Give tools a better chance to allocate space for very large buffers.
2658         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
2659
2660         Make pwd and readlink work also when run with an unreadable parent dir
2661         on systems with openat support.
2662         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
2663         provided getcwd function, even when we have openat support.
2664         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
2665
2666 2007-02-02  Bruno Haible  <bruno@clisp.org>
2667
2668         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
2669         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
2670         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
2671         portability problems if one of these functions is only used on specific
2672         platforms.
2673         Reported by Paul Eggert.
2674
2675 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
2676
2677         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
2678         is causing more trouble than it's curing.
2679         * lib/regex_internal.h (__mempcpy): Remove.
2680         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
2681         (and make the code a tad smaller to boot).
2682         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
2683
2684 2007-02-02  Jim Meyering  <jim@meyering.net>
2685
2686         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
2687         section, not in the Makefile.am: one.
2688
2689 2007-02-02  Eric Blake  <ebb9@byu.net>
2690
2691         * lib/strchrnul.c: Always include config.h first.
2692
2693         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
2694         gnulib strstr is not necessary here.
2695
2696 2007-02-02  Simon Josefsson  <simon@josefsson.org>
2697
2698         * m4/socklen.m4: Fix typo.
2699
2700 2007-02-02  Eric Blake  <ebb9@byu.net>
2701
2702         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
2703         * modules/netinet_in (Makefile.am): Likewise.
2704
2705 2007-02-01  Bruno Haible  <bruno@clisp.org>
2706
2707         * lib/string_.h (GL_LINK_WARNING): New macro.
2708         (strcasecmp, strstr, strcasestr): If provided by the system,
2709         conditionally define as a macro that leads to a warning instead of to
2710         an error.
2711         (strncasecmp): Conditionally define as a macro that leads to a warning.
2712
2713 2007-02-01  Karl Berry  <karl@gnu.org>
2714
2715         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
2716
2717 2007-02-01  Bruno Haible  <bruno@clisp.org>
2718
2719         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
2720         renamings.
2721
2722 2007-02-01  Eric Blake  <ebb9@byu.net>
2723
2724         * modules/regex (Depends-on): Revert dependence on mempcpy.
2725         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
2726         module's definition of mempcpy.
2727         Reported by Paul Eggert.
2728
2729 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
2730
2731         * lib/string_.h: If the gnulib module XYZ is not present, undefine
2732         the symbol XYZ before redefining it.  This fixes a problem with
2733         programs that don't use XYZ, when compiled on systems that define
2734         XYZ to something else.
2735
2736 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
2737
2738         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
2739         occurs when "mkdir -m foo" creates a setgid directory that is (1)
2740         writeable to group or other and (2) is intended to have a special
2741         mode bit that is set or cleared.  In such a case, the directory
2742         should be neither group- nor other-writeable until the special
2743         mode bits are right.
2744
2745 2007-01-31  Eric Blake  <ebb9@byu.net>
2746
2747         * modules/mountlist (Depends-on): Add strstr.
2748
2749         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
2750         bug.
2751         * modules/string (Makefile.am): Remove redundant replacement.
2752         * modules/regex (Depends-on): Add mempcpy.
2753
2754 2007-01-31  Bruno Haible  <bruno@clisp.org>
2755
2756         New module description field 'Link'.
2757         * gnulib-tool (func_usage): Document --extract-link-directive.
2758         (sed_extract_prog): Recognize 'Link' directive.
2759         (func_get_link_directive): New function.
2760         (func_import): Show summary of link directives.
2761         Handle --extract-link-directive option.
2762         * modules/acl (Link): New section.
2763         * modules/clock-time (Link): New section.
2764         * modules/euidaccess (Link): New section.
2765         * modules/gettext (Link): New section.
2766         * modules/iconv (Link): New section.
2767         * modules/lock (Link): New section.
2768         * modules/nanosleep (Link): New section.
2769         * modules/readline (Link): New section.
2770
2771 2007-01-27  Bruno Haible  <bruno@clisp.org>
2772
2773         Enforce the use of gnulib modules for unportable <string.h> functions.
2774         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
2775         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
2776         (gl_HEADER_STRING_H_BODY): Require it.
2777         * lib/string_.h: If the gnulib module XYZ is not present, redefine
2778         the symbol XYZ to one that gives a link error.
2779         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
2780         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
2781         * modules/mempcpy (configure.ac): Likewise.
2782         * modules/memrchr (configure.ac): Likewise.
2783         * modules/stpcpy (configure.ac): Likewise.
2784         * modules/stpncpy (configure.ac): Likewise.
2785         * modules/strcase (configure.ac): Likewise.
2786         * modules/strcasestr (configure.ac): Likewise.
2787         * modules/strchrnul (configure.ac): Likewise.
2788         * modules/strdup (configure.ac): Likewise.
2789         * modules/strndup (configure.ac): Likewise.
2790         * modules/strnlen (configure.ac): Likewise.
2791         * modules/strpbrk (configure.ac): Likewise.
2792         * modules/strsep (configure.ac): Likewise.
2793         * modules/strstr (configure.ac): Likewise.
2794         * modules/strtok_r (configure.ac): Likewise.
2795
2796 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
2797
2798         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
2799
2800 2007-01-30  Jim Meyering  <jim@meyering.net>
2801
2802         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
2803
2804 2007-01-29  Bruno Haible  <bruno@clisp.org>
2805
2806         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
2807         * lib/execute.c: Likewise.
2808         * lib/pipe.c: Likewise.
2809         * lib/printf-args.h: Likewise.
2810         * lib/printf-args.c: Likewise.
2811         * lib/printf-parse.c: Likewise.
2812         * lib/vasnprintf.c: Likewise.
2813
2814 2007-01-29  Eric Blake  <ebb9@byu.net>
2815
2816         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
2817         declaration.
2818
2819 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
2820
2821         * lib/strptime.h (strptime): Use 'restrict' for args where
2822         POSIX requires this.
2823         * lib/strptime.c (strptime): Likewise.
2824         Change license notice from LGPL to GPL, since gnulib-tool will
2825         change this as needed.
2826         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
2827         defined.
2828         Include "strptime.h" first, to check interface.
2829         Do not #undef _LIBC and _NL_CURRENT.
2830         Do not include <stdlib.h>; no longer needed.
2831         Include "time_r.h" and declare ptime_locale_status
2832         only if _LIBC is not defined.
2833         (__P): Remove unused macro.
2834         (match_string): Bring back glibc version, but use it only if _LIBC
2835         is defined.
2836         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
2837         Remove unnecessary assertion and abort() call.
2838         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
2839         * m4/strptime.m4: Fix serial number comment.
2840         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
2841         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
2842         (Depends-on): Add time_r.
2843
2844 2007-01-29  Bruno Haible  <bruno@clisp.org>
2845
2846         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
2847         strptime.
2848         * modules/strptime (Depends-on): Add stdbool.
2849         * lib/strptime.h: Include <time.h> always. Add comments.
2850
2851 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
2852
2853         * modules/strptime: New file.
2854         * lib/strptime.h: New file.
2855         * lib/strptime.c: New file.
2856         * m4/strptime.m4: New file.
2857
2858 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
2859
2860         * MODULES.html.sh: New module mpsort.
2861         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
2862
2863         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
2864         a circularity problem with HP-UX ia64 reported by Bob Proulx in
2865         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
2866         All uses changed.
2867         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
2868         All uses changed.
2869         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
2870         to _Restrict_.
2871         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
2872         the parameter matches the prototype.
2873
2874 2007-01-28  Jim Meyering  <jim@meyering.net>
2875
2876         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
2877         sys/time.h here, reverting that part of the previous patch:
2878         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
2879
2880 2007-01-28  Bruno Haible  <bruno@clisp.org>
2881
2882         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
2883         value of $(SYS_TIME_H).
2884         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
2885         remove it conditionally, too. [added by Jim Meyering]
2886         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
2887         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
2888         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
2889         GETTIMEOFDAY_REPLACEMENT to 1.
2890
2891 2007-01-28  Bruno Haible  <bruno@clisp.org>
2892
2893         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
2894         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
2895         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
2896         Set UNISTD_H instead of UNISTD_H2.
2897         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
2898
2899 2007-01-28  Bruno Haible  <bruno@clisp.org>
2900
2901         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
2902         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
2903
2904 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2905
2906         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
2907         (func_create_testdir): Ensure C locale for `grep' and `tr'
2908         character ranges.
2909         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
2910         ACLOCAL_AMFLAGS parsing state machine.
2911
2912 2007-01-27  Bruno Haible  <bruno@clisp.org>
2913
2914         * modules/unistr/base: Update.
2915
2916 2007-01-27  Bruno Haible  <bruno@clisp.org>
2917
2918         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
2919         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
2920         * modules/unistr/u32-mbtouc-unsafe: Renamed from
2921         modules/unistr/u32-mbtouc.
2922         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
2923         * lib/unistr.h: Update.
2924         * lib/linebreak.c: Update.
2925         * modules/unistr/u32-mbtouc: Renamed from
2926         modules/unistr/u32-mbtouc-safe.
2927         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
2928         * lib/unistr.h: Update.
2929         * lib/unistr/u32-to-u8.c: Update.
2930         * lib/unistr/u32-to-u16.c: Update.
2931
2932 2007-01-27  Bruno Haible  <bruno@clisp.org>
2933
2934         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
2935         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
2936         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
2937         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
2938         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
2939         * modules/unistr/u16-mbtouc-unsafe: Renamed from
2940         modules/unistr/u16-mbtouc.
2941         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
2942         * lib/unistr.h: Update.
2943         * lib/linebreak.c: Update.
2944         * modules/linebreak: Update.
2945         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
2946         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
2947         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
2948         * modules/unistr/u16-mbtouc: Renamed from
2949         modules/unistr/u16-mbtouc-safe.
2950         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
2951         * lib/unistr.h: Update.
2952         * lib/unistr/u16-to-u8.c: Update.
2953         * modules/unistr/u16-to-u8: Update.
2954         * lib/unistr/u16-to-u32.c: Update.
2955         * modules/unistr/u16-to-u32: Update.
2956
2957 2007-01-27  Bruno Haible  <bruno@clisp.org>
2958
2959         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
2960         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
2961         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
2962         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
2963         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
2964         * modules/unistr/u8-mbtouc-unsafe: Renamed from
2965         modules/unistr/u8-mbtouc.
2966         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
2967         * lib/unistr.h: Update.
2968         * lib/striconveh.c: Update.
2969         * modules/striconveh: Update.
2970         * lib/linebreak.c: Update.
2971         * modules/linebreak: Update.
2972         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
2973         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
2974         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
2975         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
2976         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
2977         * lib/unistr.h: Update.
2978         * lib/striconveh.c: Update.
2979         * modules/striconveh: Update.
2980         * lib/unistr/u8-to-u16.c: Update.
2981         * modules/unistr/u8-to-u16: Update.
2982         * lib/unistr/u8-to-u32.c: Update.
2983         * modules/unistr/u8-to-u32: Update.
2984
2985 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2986
2987         Sync from Libtool.
2988         * lib/argz.c: Do not include strings.h nor memory.h, include
2989         string.h unconditionally.  Patch by Simon Josefsson.
2990
2991 2007-01-27  Bruno Haible  <bruno@clisp.org>
2992
2993         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
2994         from gl_HEADER_STRING_H_BODY.
2995         (gl_HEADER_STRING_H_BODY): Require it.
2996         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
2997         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
2998         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
2999         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
3000         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
3001         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
3002         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
3003         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
3004         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
3005         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
3006         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
3007         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
3008         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
3009         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
3010         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
3011
3012 2007-01-27  Bruno Haible  <bruno@clisp.org>
3013
3014         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
3015         check_PROGRAMS into noinst_PROGRAMS.
3016         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
3017         check_PROGRAMS in this case.
3018         (func_import): Set for_test to false.
3019         (func_create_testdir): Set for_test to true.
3020
3021 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
3022             Bruno Haible  <bruno@clisp.org>
3023
3024         * modules/strcasestr (Files): Remove lib/strcasestr.h.
3025         (Depends-on): Add string.
3026         (Includes): Use <string.h> instead of strcasestr.h.
3027         * modules/string (Makefile.am): Also substitute the value of
3028         REPLACE_STRCASESTR.
3029         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
3030         assume strcasestr is declared in <string.h> not <strings.h>. Also
3031         set REPLACE_STRCASESTR.
3032         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
3033         REPLACE_STRCASESTR.
3034         * lib/strcasestr.h: Remove file.
3035         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
3036         * lib/string_.h (strcasestr): New declaration.
3037
3038 2007-01-27  Bruno Haible  <bruno@clisp.org>
3039
3040         * lib/string_.h: Use 'extern'.
3041
3042 2007-01-27  Jim Meyering  <jim@meyering.net>
3043
3044         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
3045         of set-but-not-used local, "q".
3046
3047         * lib/mempcpy.c: Include <config.h> before <string.h>.
3048         This fixes a compilation error on HP-UX, due to the system's
3049         "restrict"-using mempcpy prototype.
3050
3051 2007-01-26  Bruno Haible  <bruno@clisp.org>
3052
3053         Small optimization.
3054         * lib/javacomp.c: Include c-strstr.h.
3055          (is_envjavac_gcj): Use c_strstr instead of strstr.
3056         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
3057
3058 2007-01-26  Bruno Haible  <bruno@clisp.org>
3059
3060         * MODULES.html.sh (Unicode string functions): Add the new modules.
3061
3062         * modules/uniconv/u32-strconv-to-locale: New file.
3063         * lib/uniconv/u32-strconv-to-locale.c: New file.
3064
3065         * modules/uniconv/u16-strconv-to-locale: New file.
3066         * lib/uniconv/u16-strconv-to-locale.c: New file.
3067
3068         * modules/uniconv/u8-strconv-to-locale: New file.
3069         * lib/uniconv/u8-strconv-to-locale.c: New file.
3070
3071         * modules/uniconv/u32-strconv-from-locale: New file.
3072         * lib/uniconv/u32-strconv-from-locale.c: New file.
3073
3074         * modules/uniconv/u16-strconv-from-locale: New file.
3075         * lib/uniconv/u16-strconv-from-locale.c: New file.
3076
3077         * modules/uniconv/u8-strconv-from-locale: New file.
3078         * lib/uniconv/u8-strconv-from-locale.c: New file.
3079
3080         * modules/uniconv/u32-strconv-to-enc: New file.
3081         * lib/uniconv/u32-strconv-to-enc.c: New file.
3082         * modules/uniconv/u32-strconv-to-enc-tests: New file.
3083         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
3084
3085         * modules/uniconv/u16-strconv-to-enc: New file.
3086         * lib/uniconv/u16-strconv-to-enc.c: New file.
3087         * lib/uniconv/u-strconv-to-enc.h: New file.
3088         * modules/uniconv/u16-strconv-to-enc-tests: New file.
3089         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
3090
3091         * modules/uniconv/u8-strconv-to-enc: New file.
3092         * lib/uniconv/u8-strconv-to-enc.c: New file.
3093         * modules/uniconv/u8-strconv-to-enc-tests: New file.
3094         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
3095
3096         * modules/uniconv/u32-strconv-from-enc: New file.
3097         * lib/uniconv/u32-strconv-from-enc.c: New file.
3098         * modules/uniconv/u32-strconv-from-enc-tests: New file.
3099         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
3100
3101         * modules/uniconv/u16-strconv-from-enc: New file.
3102         * lib/uniconv/u16-strconv-from-enc.c: New file.
3103         * modules/uniconv/u16-strconv-from-enc-tests: New file.
3104         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
3105
3106         * modules/uniconv/u8-strconv-from-enc: New file.
3107         * lib/uniconv/u8-strconv-from-enc.c: New file.
3108         * lib/uniconv/u-strconv-from-enc.h: New file.
3109         * modules/uniconv/u8-strconv-from-enc-tests: New file.
3110         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
3111
3112         * modules/uniconv/u32-conv-from-enc: New file.
3113         * lib/uniconv/u32-conv-from-enc.c: New file.
3114         * modules/uniconv/u32-conv-from-enc-tests: New file.
3115         * tests/uniconv/test-u32-conv-from-enc.c: New file.
3116
3117         * modules/uniconv/u16-conv-from-enc: New file.
3118         * lib/uniconv/u16-conv-from-enc.c: New file.
3119         * lib/uniconv/u-conv-from-enc.h: New file.
3120         * modules/uniconv/u16-conv-from-enc-tests: New file.
3121         * tests/uniconv/test-u16-conv-from-enc.c: New file.
3122
3123         * modules/uniconv/u8-conv-from-enc: New file.
3124         * lib/uniconv/u8-conv-from-enc.c: New file.
3125         * modules/uniconv/u8-conv-from-enc-tests: New file.
3126         * tests/uniconv/test-u8-conv-from-enc.c: New file.
3127
3128         * modules/uniconv/base: New file.
3129         * lib/uniconv.h: New file.
3130
3131 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
3132
3133         * doc/gnulib-tool.texi (Initial import): Update to match current
3134         behavior with strdup module.
3135         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
3136         * lib/memmem.h: Remove; all uses removed.  This is now done
3137         by <string.h>.
3138         * lib/mempcpy.h: Likewise.
3139         * lib/memrchr.h: Likewise.
3140         * lib/stpcpy.h: Likewise.
3141         * lib/stpncpy.h: Likewise.
3142         * lib/strcase.h: Likewise.
3143         * lib/strchrnul.h: Likewise.
3144         * lib/strdup.h: Likewise.
3145         * lib/strndup.h: Likewise.
3146         * lib/strnlen.h: Likewise.
3147         * lib/strpbrk.h: Likewise.
3148         * lib/strsep.h: Likewise.
3149         * lib/strstr.h: Likewise.
3150         * lib/strtok_r.h: Likewise.
3151         * lib/string_.h: New file.
3152         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
3153         Rely on <string.h> instead.
3154         * lib/canon-host.c: Likewise.
3155         * lib/chdir-long.c: Likewise.
3156         * lib/concatpath.c: Likewise.
3157         * lib/exclude.c: Likewise.
3158         * lib/fchdir.c: Likewise.
3159         * lib/getaddrinfo.c: Likewise.
3160         * lib/getcwd.c: Likewise.
3161         * lib/getsubopt.c: Likewise.
3162         * lib/glob.c: Likewise.
3163         * lib/hard-locale.c: Likewise.
3164         * lib/iconvme.c: Likewise.
3165         * lib/javacomp.c: Likewise.
3166         * lib/mempcpy.c: Likewise.
3167         * lib/memrchr.c: Likewise.
3168         * lib/regex_internal.h: Likewise.
3169         * lib/stpncpy.c: Likewise.
3170         * lib/strcasecmp.c: Likewise.
3171         * lib/strchrnul.c: Likewise.
3172         * lib/strdup.c: Likewise.
3173         * lib/striconv.c: Likewise.
3174         * lib/striconveh.c: Likewise.
3175         * lib/striconveha.c: Likewise.
3176         * lib/strncasecmp.c: Likewise.
3177         * lib/strndup.c: Likewise.
3178         * lib/strnlen.c: Likewise.
3179         * lib/strsep.c: Likewise.
3180         * lib/strstr.c: Likewise.
3181         * lib/strtok_r.c: Likewise.
3182         * lib/userspec.c: Likewise.
3183         * lib/w32spawn.h: Likewise.
3184         * lib/xstrndup.c: Likewise.
3185         * lib/mountlist.c (strstr): Remove decl.
3186         * m4/string_h.m4: New file.
3187         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
3188         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
3189         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
3190         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
3191         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
3192         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
3193         Set REPLACE_STRCASECMP if necessary.
3194         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
3195         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
3196         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
3197         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
3198         HAVE_DECL_STRDUP if necessary.
3199         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
3200         since gl_FUNC_STRNDUP does that now.
3201         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
3202         Check for decl here...
3203         (gl_PREREQ_STRNLEN): ... not here.
3204         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
3205         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
3206         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
3207         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
3208         necessary.
3209         * modules/string: New file.
3210         * modules/memmem (Files): Remove special-purpose include file.
3211         (Depends-on): Add string.
3212         (Include): Include <string.h>, not the removed file.
3213         * modules/mempcpy: Likewise.
3214         * modules/memrchr: Likewise.
3215         * modules/stpcpy: Likewise.
3216         * modules/stpncpy: Likewise.
3217         * modules/strcase: Likewise.
3218         * modules/strchrnul: Likewise.
3219         * modules/strdup: Likewise.
3220         * modules/strndup: Likewise.
3221         * modules/strnlen: Likewise.
3222         * modules/strpbrk: Likewise.
3223         * modules/strsep: Likewise.
3224         * modules/strstr: Likewise.
3225         * modules/strtok_r: Likewise.
3226         * tests/test-dirname.c: Don't include "strdup.h", since
3227         <string.h> now suffices.
3228         * tests/test-memmem.c: Don't include "memmem.h", since
3229         <string.h> now suffices.
3230
3231 2007-01-25  Bruno Haible  <bruno@clisp.org>
3232
3233         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
3234         *resultp is 0.
3235
3236         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
3237         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
3238         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
3239         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
3240
3241         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
3242         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
3243         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
3244         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
3245         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
3246         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
3247
3248 2007-01-24  Bruno Haible  <bruno@clisp.org>
3249
3250         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
3251         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
3252         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
3253         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
3254         gl_FUNC_FTS_CORE.
3255         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
3256         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
3257         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
3258         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
3259         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
3260         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
3261         gl_FUNC_FCHOWNAT.
3262         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
3263         gl_FUNC_STRFTIME.
3264         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
3265         Reported by Ralf Wildenhues.
3266
3267 2007-01-24  Bruno Haible  <bruno@clisp.org>
3268
3269         Drop AC_REQUIRE calls that are redundant with the module dependencies.
3270         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
3271         gl_GETADDRINFO.
3272         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
3273         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
3274         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
3275
3276 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
3277
3278         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
3279         Don't use 'exit'; just return from 'main'.
3280         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
3281
3282         * lib/fnmatch_.h: Readjust white space and comments to match
3283         glibc, to avoid spurious diffs.
3284
3285 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
3286
3287         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
3288         2004-12-01 change by Jakub Jelinek, since this code won't compile
3289         if !LIBC.  Problem reported by Bob Proulx.
3290
3291 2007-01-23  Bruno Haible  <bruno@clisp.org>
3292
3293         * lib/striconveh.c: Include c-strcaseeq.h.
3294         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
3295         * modules/striconveh (Depends-on): Add c-strcaseeq.
3296
3297 2007-01-23  Bruno Haible  <bruno@clisp.org>
3298
3299         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
3300
3301         * modules/c-strcaseeq: New file.
3302         * lib/c-strcaseeq.h: New file.
3303
3304         * modules/streq: New file.
3305         * lib/streq.h: New file.
3306
3307 2007-01-23  Bruno Haible  <bruno@clisp.org>
3308
3309         * modules/striconveha-tests: New file.
3310         * tests/test-striconveha.c: New file.
3311
3312         * lib/striconveha.h: Include <stdbool.h>.
3313         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
3314         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
3315         (mem_iconveha_notranslit): Renamed from mem_iconveha.
3316         (mem_iconveha): New function.
3317         (str_iconveha_notranslit): Renamed from str_iconveha.
3318         (str_iconveha): New function.
3319         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
3320         c-strcase.
3321
3322 2007-01-23  Bruno Haible  <bruno@clisp.org>
3323
3324         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
3325         encodings without forgiving before trying any encoding with handler.
3326         (str_iconveha): Try all encodings without forgiving before trying any
3327         encoding with handler.
3328
3329 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
3330
3331         Import the following changes from libc.
3332
3333         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
3334
3335         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
3336
3337         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
3338
3339         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
3340         normal_bracket label.
3341
3342         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
3343
3344         [BZ #361]
3345         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
3346         to normal_bracket after fetching the next character.
3347
3348 2007-01-22  Bruno Haible  <bruno@clisp.org>
3349
3350         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
3351         argument.
3352         * lib/striconveh.c (iconv_carefully_1): New function.
3353         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
3354         argument.
3355         (str_cd_iconveh): Update.
3356         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
3357         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
3358         * tests/test-striconveh.c (MAGIC): New macro.
3359         (new_offsets): New function.
3360         (main): Test call with and without offsets.
3361
3362 2007-01-22  Bruno Haible  <bruno@clisp.org>
3363
3364         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
3365         * modules/sys_select (Makefile.am): Likewise.
3366         * modules/sys_socket (Makefile.am): Likewise.
3367         * modules/sys_time (Makefile.am): Likewise.
3368
3369 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
3370
3371         * modules/gettimeofday (License): Change from GPL to LGPL, since
3372         gettimeofday is a library function.
3373
3374 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
3375
3376         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
3377
3378 2007-01-21  Bruno Haible  <bruno@clisp.org>
3379
3380         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
3381
3382 2007-01-21  Bruno Haible  <bruno@clisp.org>
3383
3384         * modules/striconveha: New file.
3385         * lib/striconveha.h: New file.
3386         * lib/striconveha.c: New file.
3387         * MODULES.html.sh (Internationalization functions): Add striconveha.
3388         * lib/striconv.c (str_iconv): Optimize the case of an empty input
3389         string.
3390         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
3391
3392 2007-01-21  Bruno Haible  <bruno@clisp.org>
3393
3394         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
3395         * lib/striconveh.c (str_iconveh): Likewise.
3396
3397 2007-01-21  Bruno Haible  <bruno@clisp.org>
3398
3399         * lib/striconveh.h (mem_iconveh): New declaration.
3400         * lib/striconveh.c (mem_iconveh): New function.
3401         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
3402
3403 2007-01-21  Bruno Haible  <bruno@clisp.org>
3404
3405         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
3406
3407         * lib/striconveh.h (mem_cd_iconveh): Change specification.
3408         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
3409         original result buffer.
3410         (str_cd_iconveh): Update.
3411         * tests/test-striconveh.c (main): Update.
3412
3413         * lib/striconv.h (mem_cd_iconv): Change specification.
3414         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
3415         result buffer.
3416         (str_cd_iconv): Update.
3417         * tests/test-striconv.c (main): Update.
3418
3419 2007-01-21  Bruno Haible  <bruno@clisp.org>
3420
3421         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
3422
3423 2007-01-20  Jim Meyering  <jim@meyering.net>
3424
3425         * lib/userspec.c (parse_with_separator): If a user or group string
3426         starts with "+", skip the corresponding name-to-ID look-up, since
3427         such a look-up must fail: user and group names may not include "+".
3428
3429 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
3430
3431         * lib/poll.c: Include sys/time.h and time.h unconditionally,
3432         since we now assume the sys_time module.
3433         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
3434         check for sys/time.h; no longer needed.
3435         * modules/poll (Depends-on): Depend on sys_time.
3436
3437 2007-01-18  Bruno Haible  <bruno@clisp.org>
3438
3439         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
3440         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
3441
3442         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
3443         gettimeofday.
3444
3445         * tests/test-gettimeofday.c: Include <time.h>.
3446         (dummy): Remove variable.
3447
3448         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
3449         gl_HEADER_SYS_TIME_H.
3450         (gl_HEADER_SYS_TIME_H): New macro.
3451
3452         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
3453         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
3454         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
3455         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
3456         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
3457         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
3458         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
3459         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
3460         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
3461         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
3462         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
3463
3464         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
3465         last change; it caused a compilation error when cross-compiling to
3466         Cygwin.
3467
3468 2007-01-18  Jim Meyering  <jim@meyering.net>
3469
3470         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
3471         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
3472         than the race-prone "test -d sys || mkdir sys".
3473         (configure.ac): Use AC_PROG_MKDIR_P.
3474         * modules/sys_select: Likewise.
3475         * modules/sys_socket: Likewise.
3476         * modules/sys_time: Likewise.
3477
3478 2007-01-18  Eric Blake  <ebb9@byu.net>
3479
3480         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
3481         replace gettimeofday.
3482         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
3483         name, to avoid infinite recursion.
3484
3485 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
3486
3487         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
3488         module sys_time.
3489         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
3490         assume timespec.h defines struct timeval.
3491         * lib/settime.c: Likewise.
3492         * lib/utimens.c: Likewise.
3493         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
3494         since we now assume the gettimeofday module.
3495         * lib/tempname.c (__gen_tempname): Likewise.
3496         * lib/gettimeofday.h: Remove.
3497         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
3498         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
3499         Include <time.h>, for 'time()'.
3500         (localtime_buffer_addr): Also use this workaround if
3501         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
3502         to simplify the uses.  All uses changed.
3503         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
3504         that #undef is inside {}, and 'const' follows type name consistently.
3505         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
3506         (gettimeofday): Do not use the maximum possible value for
3507         tv->tv_usec, since that might break usages other than ls.c.
3508         Instead, we'll leave ls.c alone.  This undoes today's patch
3509         by Bruno.  Add a compile-time warning for 1s-clock resolution;
3510         we've never observed the problem but might as well keep the
3511         canary.
3512         * lib/nanosleep.c: Include timespec.h first, for interface check.
3513         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
3514         now assume the sys_time module.
3515         * lib/tempname.c: Likewise.
3516         * lib/timespec.h: Likewise.
3517         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
3518         needed.
3519         * lib/strftime.c: Likewise.
3520         * lib/timespec.h: Likewise.
3521         * lib/posixtm.c: Include posixtm.h first, for interface check.
3522         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
3523         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
3524         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
3525         * lib/sys_time_.h: New file.
3526         * lib/timespec.h (struct timespec): Use long int, not long.
3527         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
3528         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
3529         Remove obsolescent call to AC_HEADER_TIME.
3530         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
3531         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
3532         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
3533         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
3534         Likewise.
3535         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
3536         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
3537         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
3538         into the sys_time module.  Check for gettimeofday just once.
3539         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
3540         for gettimeofday signature to just check the signature.  Merely
3541         compile it, since linking doesn't test signature.  Improve test for
3542         whether gettimeofday.o is actually needed.
3543         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
3544         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
3545         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
3546         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
3547         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
3548         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
3549         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
3550         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
3551         than worrying about sys/time.h.
3552         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
3553         Don't bother worrying about TIME_WITH_SYS_TIME.
3554         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
3555         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
3556         * m4/sys_time_h.m4: New file.
3557         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
3558         Don't include sys/time.h.  Return from main rather than exiting.
3559         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
3560         all uses changed.
3561         * modules/gethrxtime (Depends-on): Add sys_time.
3562         * modules/gettime (Depends-on): Likewise.
3563         * modules/gettimeofday (Depends-on): Likewise.
3564         * modules/nanosleep (Depends-on): Likewise.
3565         * modules/settime (Depends-on): Likewise.
3566         * modules/tempname (Depends-on): Likewise.
3567         * modules/utimens (Depends-on): Likewise.
3568         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
3569         (Include:) Change back to <sys/time.h>.
3570         (Maintainer:) Add self.
3571         * modules/sys_time: New file.
3572         * modules/tempname (Depends-on): Add gettimeofday.
3573         * tests/test-gettimeofday.c: Include <sys/time.h>
3574         rather than gettimeofday.h.
3575
3576 2007-01-17  Bruno Haible  <bruno@clisp.org>
3577
3578         * gnulib-tool (func_get_license): Revert last patch. Instead, let
3579         the license default to GPL.
3580         (func_create_testdir): Don't complain if a module is LGPL and its
3581         tests module depends on GPLed modules.
3582
3583 2007-01-17  Bruno Haible  <bruno@clisp.org>
3584
3585         * lib/gettimeofday.c (gettimeofday): Add code for the case
3586         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
3587         maximum possible value for tv->tv_usec, rather than the minimum one.
3588
3589 2005-10-08  Martin Lambers  <marlam@marlam.de>
3590 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
3591 2007-01-16  Bruno Haible  <bruno@clisp.org>
3592
3593         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
3594         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
3595         gl_FUNC_GETTIMEOFDAY.
3596         (Include): Add gettimeofday.h.
3597         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
3598         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
3599         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
3600         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
3601         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
3602         * lib/gettimeofday.h: New file.
3603         * lib/gettimeofday.c: Include <sys/timeb.h>.
3604         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
3605         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
3606         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
3607         fall back on time().
3608
3609         * tests/test-gettimeofday.c: New file.
3610         * modules/gettimeofday-tests: New file.
3611
3612 2007-01-16  Eric Blake  <ebb9@byu.net>
3613
3614         * modules/fnmatch (Depends-on): Depend on wchar.
3615         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
3616         * m4/fnmatch.m4: Likewise.
3617         * modules/mbchar (Makefile.am): Assume <wchar.h>.
3618         * m4/mbchar.m4: Likewise.
3619         * modules/mbswidth (Depends-on): Depend on wchar.
3620         * lib/mbswidth.c: Assume <wchar.h>.
3621         * m4/mbswidth.m4: Likewise.
3622         * modules/quotearg (Depends-on): Depend on wchar.
3623         * lib/quotearg.c: Assume <wchar.h>.
3624         * m4/quotearg.m4: Likewise.
3625         * modules/regex (Depends-on): Depend on wchar.
3626         * lib/regex_internal.h: Assume <wchar.h>.
3627         * m4/regex.m4: Likewise.
3628         * modules/stdint (Depends-on): Depend on wchar.
3629         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
3630         * m4/stdint.m4: Likewise.
3631         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
3632         * modules/strftime (Depends-on): Depend on wchar.
3633         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
3634         * modules/strtol (Depends-on): Depend on wchar.
3635         * lib/strtol.c: Assume <wchar.h>.
3636         * modules/wcwidth (Depends-on): Depend on wchar.
3637         * lib/wcwidth.h: Assume <wchar.h>.
3638         * m4/wcwidth.m4: Likewise.
3639
3640 2007-01-16  Bruno Haible  <bruno@clisp.org>
3641
3642         * modules/csharpexec-script: New, created from...
3643         * modules/csharpexec: ... this.
3644
3645 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
3646
3647         * modules/javaexec-script: New, created from...
3648         * modules/javaexec: ... this.
3649
3650 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
3651
3652         * modules/poll (Dependencies): Add sys_select.
3653
3654 2007-01-15  Jim Meyering  <jim@meyering.net>
3655
3656         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
3657         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
3658         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
3659         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
3660
3661 2007-01-15  Bruno Haible  <bruno@clisp.org>
3662
3663         * modules/striconveh: New file.
3664         * lib/striconveh.h: New file.
3665         * lib/striconveh.c: New file.
3666         * MODULES.html.sh (Internationalization functions): Add striconveh.
3667
3668         * modules/striconveh-tests: New file.
3669         * tests/test-striconveh.c: New file.
3670
3671 2007-01-15  Bruno Haible  <bruno@clisp.org>
3672
3673         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
3674         not from GNU libiconv or GNU libc.
3675
3676 2007-01-15  Bruno Haible  <bruno@clisp.org>
3677
3678         * doc/gnulib-intro.texi (Copyright): Explain the different license
3679         terms for module descriptions, autoconf macros, tests, documentation.
3680
3681 2007-01-14  Bruno Haible  <bruno@clisp.org>
3682
3683         * modules/striconv-tests: New file.
3684         * tests/test-striconv.c: New file.
3685
3686 2007-01-14  Bruno Haible  <bruno@clisp.org>
3687
3688         * modules/iconv-tests: New file.
3689         * tests/test-iconv.c: New file.
3690
3691 2007-01-14  Bruno Haible  <bruno@clisp.org>
3692
3693         * gnulib-tool (func_get_license): For test modules, use the license of
3694         the main module.
3695
3696 2007-01-14  Bruno Haible  <bruno@clisp.org>
3697
3698         * modules/iconv (Include): Clarify that <iconv.h> can only be included
3699         if iconv is found to exist.
3700
3701 2007-01-14  Bruno Haible  <bruno@clisp.org>
3702
3703         * modules/c-ctype-tests: New file.
3704         * tests/test-c-ctype.c: New file.
3705
3706 2007-01-14  Bruno Haible  <bruno@clisp.org>
3707
3708         * modules/binary-io-tests: New file.
3709         * tests/test-binary-io.sh: New file.
3710         * tests/test-binary-io.c: New file.
3711
3712 2007-01-14  Bruno Haible  <bruno@clisp.org>
3713
3714         * modules/array-oset-tests: New file.
3715         * tests/test-array_oset.c: New file.
3716
3717 2007-01-14  Bruno Haible  <bruno@clisp.org>
3718
3719         * modules/array-list-tests: New file.
3720         * tests/test-array_list.c: New file.
3721
3722 2007-01-14  Bruno Haible  <bruno@clisp.org>
3723
3724         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
3725         and make.
3726         Reported by Simon Josefsson in
3727         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
3728
3729 2007-01-14  Bruno Haible  <bruno@clisp.org>
3730
3731         * modules/allocsa-tests: New file.
3732         * tests/test-allocsa.c: New file.
3733
3734 2007-01-14  Bruno Haible  <bruno@clisp.org>
3735
3736         * modules/fchdir (Depends-on): Add absolute-header.
3737         * modules/unistd (Depends-on): Likewise.
3738
3739 2006-12-30  Bruno Haible  <bruno@clisp.org>
3740
3741         * modules/fchdir: New file.
3742         * modules/unistd (Files): Add lib/unistd_.h.
3743         (Makefile.am): Generate unistd.h from unistd_.h.
3744         * lib/fchdir.c: New file.
3745         * lib/dirent_.h: New file.
3746         * lib/unistd_.h: New file.
3747         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
3748         * m4/fchdir.m4: New file.
3749         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
3750         (gl_HEADER_UNISTD): Invoke it.
3751         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
3752         function.
3753         * lib/backupfile.c (opendir, closedir): Undefine.
3754         * lib/chown.c (open, close): Undefine.
3755         * lib/clean-temp.c (open, close): Undefine.
3756         * lib/copy-file.c (open, close): Undefine.
3757         * lib/execute.c (open, close): Undefine.
3758         * lib/fsusage.c (open, close): Undefine.
3759         * lib/gc-gnulib.c (open, close): Undefine.
3760         * lib/getcwd.c (opendir, closedir): Undefine.
3761         * lib/glob.c (opendir, closedir): Undefine.
3762         * lib/javacomp.c (open, close): Undefine.
3763         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
3764         * lib/openat-proc.c (open, close): Undefine.
3765         * lib/pagealign_alloc.c (open, close): Undefine.
3766         * lib/pipe.c (open, close): Undefine.
3767         * lib/progreloc.c (open, close): Undefine.
3768         * lib/savedir.c (opendir, closedir): Undefine.
3769         * lib/utime.c (open, close): Undefine.
3770         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
3771
3772 2007-01-10  Bruno Haible  <bruno@clisp.org>
3773
3774         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
3775
3776 2007-01-12  Eric Blake  <ebb9@byu.net>
3777
3778         Provide a robust <wchar.h>.  Further simplifications are now
3779         possible in other modules, but not included here.
3780         * modules/wchar: New module.
3781         * m4/wchar.m4: New file.
3782         * lib/wchar_.h: Likewise.
3783         * modules/mbchar (Depends-on): Depend on wchar, as the first use
3784         of the new module.
3785         * MODULES.html.sh (Extended multibyte and wide character utilities):
3786         New section.
3787
3788 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
3789
3790         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
3791         to a reasonable default for memory allocation.
3792         (xreadlink): Don't allocate a huge buffer, to work around a buggy
3793         file system that reports garbage st_size values for symlinks.
3794         Problem reported by Liyang Hu.
3795
3796 2007-01-11  Simon Josefsson  <simon@josefsson.org>
3797
3798         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
3799         Emacs .#* auto-save files).
3800
3801 2007-01-11  Bruno Haible  <bruno@clisp.org>
3802
3803         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
3804         directory.
3805
3806 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
3807
3808         Use @...@ consistently in lib/wctype_.h.
3809         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
3810         on it being set to 1 or 0.
3811         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
3812         go back to AC_SUBSTing it.
3813         * modules/wctype (Makefile.am): Undo previous change.
3814
3815 2007-01-10  Eric Blake  <ebb9@byu.net>
3816
3817         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
3818         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
3819         * modules/wctype (Makefile.am): Likewise.
3820         Reported by Chris McGuire.
3821
3822 2007-01-10  Jim Meyering  <jim@meyering.net>
3823
3824         fts.c: a small readability/maintainability improvement
3825         * lib/fts.c (fts_read): Make this code slightly more readable and
3826         maintainable by hoisting the "sp->fts_cur = p" assignments to
3827         immediately follow the statements that set P.  Derived from
3828         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
3829
3830 2007-01-10  Eric Blake  <ebb9@byu.net>
3831
3832         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
3833         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
3834         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
3835         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
3836         Reported by Chris McGuire.
3837
3838 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3839
3840         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
3841         in sed script.
3842
3843 2007-01-09  Bruno Haible  <bruno@clisp.org>
3844
3845         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
3846         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
3847         variables.
3848         (func_module): Use them.
3849
3850 2007-01-09  Bruno Haible  <bruno@clisp.org>
3851
3852         * modules/unistr/base: New file.
3853         * lib/unistr.h: New file.
3854
3855         * modules/unistr/u8-to-u16: New file.
3856         * lib/unistr/u8-to-u16.c: New file.
3857
3858         * modules/unistr/u8-to-u32: New file.
3859         * lib/unistr/u8-to-u32.c: New file.
3860
3861         * modules/unistr/u16-to-u8: New file.
3862         * lib/unistr/u16-to-u8.c: New file.
3863
3864         * modules/unistr/u16-to-u32: New file.
3865         * lib/unistr/u16-to-u32.c: New file.
3866
3867         * modules/unistr/u32-to-u8: New file.
3868         * lib/unistr/u32-to-u8.c: New file.
3869
3870         * modules/unistr/u32-to-u16: New file.
3871         * lib/unistr/u32-to-u16.c: New file.
3872
3873         * modules/unistr/u8-check: New file.
3874         * modules/unistr/u16-check: New file.
3875         * modules/unistr/u32-check: New file.
3876         * lib/unistr/u8-check.c: New file.
3877         * lib/unistr/u16-check.c: New file.
3878         * lib/unistr/u32-check.c: New file.
3879
3880         * modules/unistr/u8-chr: New file.
3881         * modules/unistr/u16-chr: New file.
3882         * modules/unistr/u32-chr: New file.
3883         * lib/unistr/u8-chr.c: New file.
3884         * lib/unistr/u16-chr.c: New file.
3885         * lib/unistr/u32-chr.c: New file.
3886
3887         * modules/unistr/u8-cmp: New file.
3888         * modules/unistr/u16-cmp: New file.
3889         * modules/unistr/u32-cmp: New file.
3890         * lib/unistr/u8-cmp.c: New file.
3891         * lib/unistr/u16-cmp.c: New file.
3892         * lib/unistr/u32-cmp.c: New file.
3893
3894         * modules/unistr/u8-cpy: New file.
3895         * modules/unistr/u16-cpy: New file.
3896         * modules/unistr/u32-cpy: New file.
3897         * lib/unistr/u8-cpy.c: New file.
3898         * lib/unistr/u16-cpy.c: New file.
3899         * lib/unistr/u32-cpy.c: New file.
3900         * lib/unistr/u-cpy.h: New file.
3901
3902         * modules/unistr/u8-cpy-alloc: New file.
3903         * modules/unistr/u16-cpy-alloc: New file.
3904         * modules/unistr/u32-cpy-alloc: New file.
3905         * lib/unistr/u8-cpy-alloc.c: New file.
3906         * lib/unistr/u16-cpy-alloc.c: New file.
3907         * lib/unistr/u32-cpy-alloc.c: New file.
3908         * lib/unistr/u-cpy-alloc.h: New file.
3909
3910         * modules/unistr/u8-endswith: New file.
3911         * modules/unistr/u16-endswith: New file.
3912         * modules/unistr/u32-endswith: New file.
3913         * lib/unistr/u8-endswith.c: New file.
3914         * lib/unistr/u16-endswith.c: New file.
3915         * lib/unistr/u32-endswith.c: New file.
3916         * lib/unistr/u-endswith.h: New file.
3917
3918         * modules/unistr/u8-mblen: New file.
3919         * modules/unistr/u16-mblen: New file.
3920         * modules/unistr/u32-mblen: New file.
3921         * lib/unistr/u8-mblen.c: New file.
3922         * lib/unistr/u16-mblen.c: New file.
3923         * lib/unistr/u32-mblen.c: New file.
3924
3925         * modules/unistr/u8-mbtouc: New file.
3926         * modules/unistr/u16-mbtouc: New file.
3927         * modules/unistr/u32-mbtouc: New file.
3928         * lib/unistr/u8-mbtouc.c: New file.
3929         * lib/unistr/u16-mbtouc.c: New file.
3930         * lib/unistr/u32-mbtouc.c: New file.
3931
3932         * modules/unistr/u8-mbtouc-safe: New file.
3933         * modules/unistr/u16-mbtouc-safe: New file.
3934         * modules/unistr/u32-mbtouc-safe: New file.
3935         * lib/unistr/u8-mbtouc-safe.c: New file.
3936         * lib/unistr/u16-mbtouc-safe.c: New file.
3937         * lib/unistr/u32-mbtouc-safe.c: New file.
3938
3939         * modules/unistr/u8-move: New file.
3940         * modules/unistr/u16-move: New file.
3941         * modules/unistr/u32-move: New file.
3942         * lib/unistr/u8-move.c: New file.
3943         * lib/unistr/u16-move.c: New file.
3944         * lib/unistr/u32-move.c: New file.
3945         * lib/unistr/u-move.h: New file.
3946
3947         * modules/unistr/u8-next: New file.
3948         * modules/unistr/u16-next: New file.
3949         * modules/unistr/u32-next: New file.
3950         * lib/unistr/u8-next.c: New file.
3951         * lib/unistr/u16-next.c: New file.
3952         * lib/unistr/u32-next.c: New file.
3953
3954         * modules/unistr/u8-prev: New file.
3955         * modules/unistr/u16-prev: New file.
3956         * modules/unistr/u32-prev: New file.
3957         * lib/unistr/u8-prev.c: New file.
3958         * lib/unistr/u16-prev.c: New file.
3959         * lib/unistr/u32-prev.c: New file.
3960
3961         * modules/unistr/u8-set: New file.
3962         * modules/unistr/u16-set: New file.
3963         * modules/unistr/u32-set: New file.
3964         * lib/unistr/u8-set.c: New file.
3965         * lib/unistr/u16-set.c: New file.
3966         * lib/unistr/u32-set.c: New file.
3967         * lib/unistr/u-set.h: New file.
3968
3969         * modules/unistr/u8-startswith: New file.
3970         * modules/unistr/u16-startswith: New file.
3971         * modules/unistr/u32-startswith: New file.
3972         * lib/unistr/u8-startswith.c: New file.
3973         * lib/unistr/u16-startswith.c: New file.
3974         * lib/unistr/u32-startswith.c: New file.
3975         * lib/unistr/u-startswith.h: New file.
3976
3977         * modules/unistr/u8-stpcpy: New file.
3978         * modules/unistr/u16-stpcpy: New file.
3979         * modules/unistr/u32-stpcpy: New file.
3980         * lib/unistr/u8-stpcpy.c: New file.
3981         * lib/unistr/u16-stpcpy.c: New file.
3982         * lib/unistr/u32-stpcpy.c: New file.
3983         * lib/unistr/u-stpcpy.h: New file.
3984
3985         * modules/unistr/u8-stpncpy: New file.
3986         * modules/unistr/u16-stpncpy: New file.
3987         * modules/unistr/u32-stpncpy: New file.
3988         * lib/unistr/u8-stpncpy.c: New file.
3989         * lib/unistr/u16-stpncpy.c: New file.
3990         * lib/unistr/u32-stpncpy.c: New file.
3991         * lib/unistr/u-stpncpy.h: New file.
3992
3993         * modules/unistr/u8-strcat: New file.
3994         * modules/unistr/u16-strcat: New file.
3995         * modules/unistr/u32-strcat: New file.
3996         * lib/unistr/u8-strcat.c: New file.
3997         * lib/unistr/u16-strcat.c: New file.
3998         * lib/unistr/u32-strcat.c: New file.
3999         * lib/unistr/u-strcat.h: New file.
4000
4001         * modules/unistr/u8-strchr: New file.
4002         * modules/unistr/u16-strchr: New file.
4003         * modules/unistr/u32-strchr: New file.
4004         * lib/unistr/u8-strchr.c: New file.
4005         * lib/unistr/u16-strchr.c: New file.
4006         * lib/unistr/u32-strchr.c: New file.
4007
4008         * modules/unistr/u8-strcmp: New file.
4009         * modules/unistr/u16-strcmp: New file.
4010         * modules/unistr/u32-strcmp: New file.
4011         * lib/unistr/u8-strcmp.c: New file.
4012         * lib/unistr/u16-strcmp.c: New file.
4013         * lib/unistr/u32-strcmp.c: New file.
4014
4015         * modules/unistr/u8-strcpy: New file.
4016         * modules/unistr/u16-strcpy: New file.
4017         * modules/unistr/u32-strcpy: New file.
4018         * lib/unistr/u8-strcpy.c: New file.
4019         * lib/unistr/u16-strcpy.c: New file.
4020         * lib/unistr/u32-strcpy.c: New file.
4021         * lib/unistr/u-strcpy.h: New file.
4022
4023         * modules/unistr/u8-strcspn: New file.
4024         * modules/unistr/u16-strcspn: New file.
4025         * modules/unistr/u32-strcspn: New file.
4026         * lib/unistr/u8-strcspn.c: New file.
4027         * lib/unistr/u16-strcspn.c: New file.
4028         * lib/unistr/u32-strcspn.c: New file.
4029         * lib/unistr/u-strcspn.h: New file.
4030
4031         * modules/unistr/u8-strdup: New file.
4032         * modules/unistr/u16-strdup: New file.
4033         * modules/unistr/u32-strdup: New file.
4034         * lib/unistr/u8-strdup.c: New file.
4035         * lib/unistr/u16-strdup.c: New file.
4036         * lib/unistr/u32-strdup.c: New file.
4037         * lib/unistr/u-strdup.h: New file.
4038
4039         * modules/unistr/u8-strlen: New file.
4040         * modules/unistr/u16-strlen: New file.
4041         * modules/unistr/u32-strlen: New file.
4042         * lib/unistr/u8-strlen.c: New file.
4043         * lib/unistr/u16-strlen.c: New file.
4044         * lib/unistr/u32-strlen.c: New file.
4045         * lib/unistr/u-strlen.h: New file.
4046
4047         * modules/unistr/u8-strmblen: New file.
4048         * modules/unistr/u16-strmblen: New file.
4049         * modules/unistr/u32-strmblen: New file.
4050         * lib/unistr/u8-strmblen.c: New file.
4051         * lib/unistr/u16-strmblen.c: New file.
4052         * lib/unistr/u32-strmblen.c: New file.
4053
4054         * modules/unistr/u8-strmbtouc: New file.
4055         * modules/unistr/u16-strmbtouc: New file.
4056         * modules/unistr/u32-strmbtouc: New file.
4057         * lib/unistr/u8-strmbtouc.c: New file.
4058         * lib/unistr/u16-strmbtouc.c: New file.
4059         * lib/unistr/u32-strmbtouc.c: New file.
4060
4061         * modules/unistr/u8-strncat: New file.
4062         * modules/unistr/u16-strncat: New file.
4063         * modules/unistr/u32-strncat: New file.
4064         * lib/unistr/u8-strncat.c: New file.
4065         * lib/unistr/u16-strncat.c: New file.
4066         * lib/unistr/u32-strncat.c: New file.
4067         * lib/unistr/u-strncat.h: New file.
4068
4069         * modules/unistr/u8-strncmp: New file.
4070         * modules/unistr/u16-strncmp: New file.
4071         * modules/unistr/u32-strncmp: New file.
4072         * lib/unistr/u8-strncmp.c: New file.
4073         * lib/unistr/u16-strncmp.c: New file.
4074         * lib/unistr/u32-strncmp.c: New file.
4075
4076         * modules/unistr/u8-strncpy: New file.
4077         * modules/unistr/u16-strncpy: New file.
4078         * modules/unistr/u32-strncpy: New file.
4079         * lib/unistr/u8-strncpy.c: New file.
4080         * lib/unistr/u16-strncpy.c: New file.
4081         * lib/unistr/u32-strncpy.c: New file.
4082         * lib/unistr/u-strncpy.h: New file.
4083
4084         * modules/unistr/u8-strnlen: New file.
4085         * modules/unistr/u16-strnlen: New file.
4086         * modules/unistr/u32-strnlen: New file.
4087         * lib/unistr/u8-strnlen.c: New file.
4088         * lib/unistr/u16-strnlen.c: New file.
4089         * lib/unistr/u32-strnlen.c: New file.
4090         * lib/unistr/u-strnlen.h: New file.
4091
4092         * modules/unistr/u8-strpbrk: New file.
4093         * modules/unistr/u16-strpbrk: New file.
4094         * modules/unistr/u32-strpbrk: New file.
4095         * lib/unistr/u8-strpbrk.c: New file.
4096         * lib/unistr/u16-strpbrk.c: New file.
4097         * lib/unistr/u32-strpbrk.c: New file.
4098         * lib/unistr/u-strpbrk.h: New file.
4099
4100         * modules/unistr/u8-strrchr: New file.
4101         * modules/unistr/u16-strrchr: New file.
4102         * modules/unistr/u32-strrchr: New file.
4103         * lib/unistr/u8-strrchr.c: New file.
4104         * lib/unistr/u16-strrchr.c: New file.
4105         * lib/unistr/u32-strrchr.c: New file.
4106
4107         * modules/unistr/u8-strspn: New file.
4108         * modules/unistr/u16-strspn: New file.
4109         * modules/unistr/u32-strspn: New file.
4110         * lib/unistr/u8-strspn.c: New file.
4111         * lib/unistr/u16-strspn.c: New file.
4112         * lib/unistr/u32-strspn.c: New file.
4113         * lib/unistr/u-strspn.h: New file.
4114
4115         * modules/unistr/u8-strstr: New file.
4116         * modules/unistr/u16-strstr: New file.
4117         * modules/unistr/u32-strstr: New file.
4118         * lib/unistr/u8-strstr.c: New file.
4119         * lib/unistr/u16-strstr.c: New file.
4120         * lib/unistr/u32-strstr.c: New file.
4121         * lib/unistr/u-strstr.h: New file.
4122
4123         * modules/unistr/u8-strtok: New file.
4124         * modules/unistr/u16-strtok: New file.
4125         * modules/unistr/u32-strtok: New file.
4126         * lib/unistr/u8-strtok.c: New file.
4127         * lib/unistr/u16-strtok.c: New file.
4128         * lib/unistr/u32-strtok.c: New file.
4129         * lib/unistr/u-strtok.h: New file.
4130
4131         * modules/unistr/u8-uctomb: New file.
4132         * modules/unistr/u16-uctomb: New file.
4133         * modules/unistr/u32-uctomb: New file.
4134         * lib/unistr/u8-uctomb.c: New file.
4135         * lib/unistr/u16-uctomb.c: New file.
4136         * lib/unistr/u32-uctomb.c: New file.
4137
4138         * MODULES.html.sh (Unicode string functions): Add the new modules.
4139
4140 2007-01-08  Bruno Haible  <bruno@clisp.org>
4141
4142         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
4143         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
4144         subdirectories.
4145
4146 2007-01-08  Karl Berry  <karl@gnu.org>
4147
4148         * doc/error.texi: mention that main() fns must set program_name
4149         when progname is used.
4150
4151 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
4152
4153         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
4154         WCTYPE_H is empty, for the benefit of builds from non-distclean
4155         directories.  Problem reported by Eric Blake in
4156         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
4157
4158 2007-01-08  Bruno Haible  <bruno@clisp.org>
4159
4160         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
4161         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
4162         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
4163         PROVIDE_CANONICALIZE_FILENAME_MODE.
4164         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
4165
4166 2007-01-08  Bruno Haible  <bruno@clisp.org>
4167
4168         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
4169         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
4170         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
4171         * lib/fts.c: Likewise.
4172         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
4173
4174 2006-12-25  Bruno Haible  <bruno@clisp.org>
4175
4176         * modules/utf8-ucs4-safe: New file.
4177         * lib/utf8-ucs4-safe.h: New file.
4178         * lib/unistr/utf8-ucs4-safe.c: New file.
4179
4180         * modules/utf16-ucs4-safe: New file.
4181         * lib/utf16-ucs4-safe.h: New file.
4182         * lib/unistr/utf16-ucs4-safe.c: New file.
4183
4184         * MODULES.html.sh (Unicode string functions): Add the new modules.
4185
4186 2007-01-08  Bruno Haible  <bruno@clisp.org>
4187
4188         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
4189         (Depends-on): Add unitypes.
4190         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
4191         (u8_mbtouc_aux): Move out to separate file.
4192         (u8_mbtouc): Use ucs4_t, uint8_t types.
4193         * lib/unistr/utf8-ucs4.c: New file.
4194
4195         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
4196         (Depends-on): Add unitypes.
4197         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
4198         (u16_mbtouc_aux): Move out to separate file.
4199         (u16_mbtouc): Use ucs4_t, uint16_t types.
4200         * lib/unistr/utf16-ucs4.c: New file.
4201
4202         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
4203         (Depends-on): Add unitypes.
4204         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
4205         (u8_uctomb_aux): Move out to separate file.
4206         (u8_uctomb): Use ucs4_t, uint8_t types.
4207         * lib/unistr/ucs4-utf8.c: New file.
4208
4209         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
4210         (Depends-on): Add unitypes.
4211         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
4212         (u16_uctomb_aux): Move out to separate file.
4213         (u16_uctomb): Use ucs4_t, uint16_t types.
4214         * lib/unistr/ucs4-utf16.c: New file.
4215
4216 2006-12-25  Bruno Haible  <bruno@clisp.org>
4217
4218         * modules/unitypes: New file.
4219         * lib/unitypes.h: New file.
4220         * MODULES.html.sh (func_all_modules): New section "Unicode string
4221         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
4222         this section. Add unitypes.
4223
4224 2007-01-08  Bruno Haible  <bruno@clisp.org>
4225
4226         Avoid variable names that conflict with those from libtool.
4227         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
4228         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
4229         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
4230         library_names_spec to acl_library_names_spec, hardcode_* to
4231         acl_hardcode_*.
4232         Reported by Ralf Wildenhues.
4233
4234 2007-01-08  Bruno Haible  <bruno@clisp.org>
4235
4236         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
4237         definition.
4238         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
4239         definition.
4240         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
4241         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
4242         definition.
4243         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
4244         definition.
4245         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
4246         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
4247         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
4248         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
4249         definition.
4250         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
4251         definition.
4252         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
4253         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
4254         GC_USE_<algorithm>.
4255         * lib/gc-libgcrypt.c: Likewise.
4256         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
4257         * modules/gc-arctwo (configure.ac): Likewise.
4258         * modules/gc-des (configure.ac): Likewise.
4259         * modules/gc-hmac-md5 (configure.ac): Likewise.
4260         * modules/gc-hmac-sha1 (configure.ac): Likewise.
4261         * modules/gc-md2 (configure.ac): Likewise.
4262         * modules/gc-md4 (configure.ac): Likewise.
4263         * modules/gc-md5 (configure.ac): Likewise.
4264         * modules/gc-random (configure.ac): Likewise.
4265         * modules/gc-rijndael (configure.ac): Likewise.
4266         * modules/gc-sha1 (configure.ac): Likewise.
4267
4268 2007-01-08  Bruno Haible  <bruno@clisp.org>
4269
4270         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
4271         macro definition.
4272         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
4273         definition.
4274         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
4275         definition.
4276         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
4277         * modules/fcntl-safer (configure.ac): Likewise.
4278         * modules/fopen-safer (configure.ac): Likewise.
4279         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
4280         GNULIB_FWRITEERROR macro definition.
4281
4282 2007-01-08  Bruno Haible  <bruno@clisp.org>
4283
4284         * m4/gnulib-common.m4: New file.
4285         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
4286         (func_get_filelist): Add m4/gnulib-common.m4.
4287
4288 2007-01-08  Bruno Haible  <bruno@clisp.org>
4289
4290         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
4291         command.
4292
4293 2007-01-08  Jim Meyering  <jim@meyering.net>
4294
4295         Use a more robust test for a "can't happen" condition.
4296         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
4297         narrowed the st_size value.  Presuming the "can't happen" condition
4298         is true, that narrowing could conceivably convert an invalid st_size
4299         value into a valid one.  Instead, use a change based on Matthew
4300         Woehlke's original patch.
4301
4302         Slight readability improvement: use an assert-like macro
4303         in place of literal "abort ()" uses.
4304         * lib/fts.c (fts_assert): Define.
4305         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
4306         Use this macro instead of a bare 'abort'.
4307
4308 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
4309
4310         Don't worry about using IRIX 5.3's wctype.h broken definitions;
4311         simply work around them.
4312         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
4313         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
4314         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before
4315         declaring.
4316         Don't bother to define as macros, since the standard doesn't require it.
4317         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
4318         longer worry about IRIX 5.3.
4319         (HAVE_WCTYPE_CTMP_BUG): Remove.
4320
4321 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
4322
4323         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
4324         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
4325         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
4326         Problems reported by Georg Schwarz for IRIX 5.3.
4327
4328         * gnulib-tool (autoconf_minversion): Take the maximum version number
4329         found, not the minimum.  Problem reported by James Youngman.
4330
4331 2007-01-03  Karl Berry  <karl@gnu.org>
4332
4333         * doc/error.texi: new file, explaining interaction with progname.
4334         * doc/gnulib.texi: include it.  Update copyright.
4335
4336 2007-01-03  Simon Josefsson  <simon@josefsson.org>
4337
4338         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
4339         AC_CANONICAL_HOST, to improve autobuild outputs.
4340
4341 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
4342             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
4343
4344         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
4345         sockets, server sockets, and other file descriptors.  Count errors
4346         to compute the return value.  Reorder the code a bit to be easier
4347         to follow.  Don't set event bits that were not requested (except
4348         POLLERR and POLLHUP).
4349
4350 2007-01-01  Bruno Haible  <bruno@clisp.org>
4351
4352         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
4353
4354 2007-01-03  Jim Meyering  <jim@meyering.net>
4355
4356         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
4357
4358 2007-01-02  Bruno Haible  <bruno@clisp.org>
4359
4360         * modules/settime (Include): Require timespec.h.
4361         * modules/nanosleep (Include): Likewise.
4362
4363 2007-01-01  Bruno Haible  <bruno@clisp.org>
4364
4365         * gnulib-tool (func_emit_copyright_notice): Bump year.
4366         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
4367
4368 2007-01-01  Bruno Haible  <bruno@clisp.org>
4369
4370         Improve support for OpenBSD.
4371         * build-aux/config.rpath (libname_spec): Export.
4372         (library_names_spec): New variable. Export.
4373         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
4374         library_names_spec from the config.rpath output. Locate shared library
4375         through the name pattern in library_names_spec.
4376
4377 2007-01-01  Eric Blake  <ebb9@byu.net>
4378
4379         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
4380
4381 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
4382
4383         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
4384         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
4385         assume the C locale, and avoid an "eval" that could cause trouble.
4386         Problem with SORT reported by Bob Proulx.
4387
4388         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
4389         Define.  Trivial patch from Henning Nielsen Lund, originally
4390         sent to bug-grep@gnu.org today.
4391
4392 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
4393
4394         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
4395         struct stat.  Problem reported by Henning Nielsen Lund.
4396         * lib/acl.c: Include acl.h first, to check interface.  Don't
4397         bother to include sys/types.h and sys/stat.h again.
4398
4399 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
4400
4401         Import the following change from libc; problem reported by
4402         Sven Verdoolaege.
4403
4404         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
4405
4406         [BZ #1373]
4407         * lib/argp.h: Remove __NTH for __argp_usage inline function.
4408
4409 2006-12-28  Jim Meyering  <jim@meyering.net>
4410
4411         * build-aux/announce-gen: Do not assume that the package
4412         builds any of tar.gz, tar.bz2, and .xdelta files.
4413         Suggestion from Simon Josefsson.
4414
4415 2006-12-28  Simon Josefsson  <simon@josefsson.org>
4416
4417         * modules/announce-gen: New file.
4418
4419 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
4420
4421         * lib/mbchar.h: Just include <wctype.h>; the wctype module
4422         handles its gotchas now.
4423         * lib/mbswidth.c: Likewise.
4424         * lib/wcwidth.h: Likewise.
4425         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
4426         and iswcntrl; the wctype module does this stuff now.
4427         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
4428         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
4429         * modules/mbchar (Depends-on): Add wctype.
4430         * modules/mbswidth (Depends-on): Likewise.
4431         * modules/wcwidth (Depends-on): Likewise.
4432
4433 2006-12-27  Eric Blake  <ebb9@byu.net>
4434
4435         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
4436         module uses more than what <wctype.h> is required to provide.
4437
4438 2006-12-26  Eric Blake  <ebb9@byu.net>
4439
4440         * gnulib-tool (sed_extract_prog): Avoid space-tab.
4441
4442 2006-12-26  Eric Blake  <ebb9@byu.net>
4443
4444         * modules/absolute-header: New module.
4445         * modules/fcntl (Depends-on): Depend on it.
4446         * modules/inttypes (Depends-on): Likewise.
4447         * modules/stdint (Depends-on): Likewise.
4448         * modules/sys_stat (Depends-on): Likewise.
4449         * modules/wctype (Depends-on): Likewise.
4450         * MODULES.html.sh (Support for building libraries and
4451         executables): Document it.
4452
4453 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
4454
4455         * gnulib-tool (SED): Remove, undoing previous change.
4456         The problem was that it broke coreutils on Solaris, because
4457         "sed --posix" leaked into a makefile.
4458         (sed): New alias, if 'alias' and GNU sed.
4459
4460 2006-12-24  Jim Meyering  <jim@meyering.net>
4461
4462         Work around an fchownat bug in glibc-2.4:
4463         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
4464         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
4465         in spite of the -P option.
4466         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
4467         New macros.
4468         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
4469         * modules/openat (Files): Add lib/fchownat.c.
4470         * lib/openat.c (fchownat): Don't define here.  Move to...
4471         * lib/fchownat.c: ...this new file.
4472
4473 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
4474
4475         Fix bug reported by Bruno Haible in
4476         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
4477         where quotearg.c didn't compile on Mac OS X 10.2 because it
4478         lacks <wchar.h> and wint_t.
4479         * lib/wctype_.h (__wctype_wint_t): New type.
4480         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
4481         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
4482         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
4483         Arg is now of type __wctype_wint_t, not wint_t.
4484         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
4485         substitute HAVE_WINT_T.
4486         * modules/wctype (Files): Add m4/wint_t.m4.
4487         (wctype.h): Substitute HAVE_WINT_T.
4488
4489 2006-12-23  Bruno Haible  <bruno@clisp.org>
4490
4491         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
4492
4493 2006-12-23  Bruno Haible  <bruno@clisp.org>
4494
4495         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
4496         S_ISLNK.
4497         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
4498         mingw.
4499
4500 2006-12-22  Bruno Haible  <bruno@clisp.org>
4501
4502         * lib/copy-file.c: Include acl.h.
4503         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
4504         Close the file descriptors only after being done with copy_acl.
4505         * modules/copy-file (Depends-on): Add acl.
4506
4507 2006-12-22  Bruno Haible  <bruno@clisp.org>
4508
4509         * gnulib-tool (SED): New variable.
4510         Use $SED instead of sed everywhere.
4511
4512 2006-12-22  Bruno Haible  <bruno@clisp.org>
4513
4514         * modules/no-c++: New file.
4515         * m4/no-c++.m4: New file.
4516         * MODULES.html.sh (Support for building libraries and executables):
4517         Add no-c++.
4518
4519 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
4520
4521         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
4522         Include <limits.h>, and use its INT_MAX to rewrite the
4523         j loop so that it does not overflow 'int'.  Problem reported by
4524         Ralf Wildenhues in
4525         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
4526         Play it safe by shifting left by 1 rather than multiplying by 2,
4527         as GCC is less likely to optimize this away when the value
4528         is signed (when it assumes overflow leads to undefined behavior).
4529         Also, don't assume time_t uses two's complement.
4530
4531 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
4532
4533         * MODULES.html.sh: New module wctype.
4534         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
4535         * lib/fnmatch.c: Don't bother to include <wchar.h> before
4536         <wctype.h>, since the new wctype module should fix this.
4537         * lib/quotearg.c: Include <wctype.h> unconditionally, since
4538         the wctype module should arrange for it.
4539         * lib/regex_internal.h: Likewise.
4540         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
4541         since the wctype module should handle this now.
4542         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
4543         * modules/fnmatch (Depends-on): Add wctype.
4544         * modules/quotearg (Depends-on): Likewise.
4545         * modules/regex (Depends-on): Likewise.
4546
4547 2006-12-19  Bruno Haible  <bruno@clisp.org>
4548
4549         * lib/strdup.h [C++]: Wrap definitions in extern "C".
4550         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
4551
4552 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4553
4554         * modules/savewd (Depends-on): Fix dependency on fcntl.
4555
4556 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
4557
4558         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
4559         conforms to C99, rather than relying on the user's environment
4560         setting of STDINT_H.
4561
4562 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
4563         and Eric Blake  <ebb9@byu.net>
4564
4565         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
4566         This is more consistent with the other defines here.
4567         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
4568         Port to z/OS.  Problem reported by Paul Gilmartin.
4569         Change local vars to use gl_ prefix rather than ac_.
4570         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
4571         with other defines.
4572         * modules/double-slash-root: New module.
4573         * modules/dirname (Files): Remove m4/double-slash-root.m4.
4574         (Depends-on): Add double-slash-root.
4575         * MODULES.html.sh (File system functions): Mention new module.
4576
4577 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
4578
4579         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
4580         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
4581         This is for the benefit of gzip, which doesn't do i18n.
4582
4583 2006-12-12  Jim Meyering  <jim@meyering.net>
4584
4585         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
4586         Reported by Andreas Schwab <schwab@suse.de>.
4587
4588 2006-12-12  Bruno Haible  <bruno@clisp.org>
4589
4590         Merge these changes.
4591         2006-09-05  Bruno Haible  <bruno@clisp.org>
4592         * lib/iconvme.c (iconv_string): No need to save and restore errno when
4593         iconv_alloc succeeded.
4594         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
4595         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
4596         test for " && dest " at the end - dest is always != NULL there. Call
4597         iconv with 4xNULL arguments initially, to reset the state. Call iconv
4598         with 2xNULL arguments, also to flush the state storage. Handle the
4599         IRIX iconv behaviour. Realloc the final result, to throw away unused
4600         memory.
4601
4602 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
4603
4604         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
4605         and fchmodat unconditionally, since glibc 2.4 has them.
4606         Problem reported by Arkadiusz Miskiewicz.
4607
4608 2006-12-10  Bruno Haible  <bruno@clisp.org>
4609
4610         * gnulib-tool (func_import): Show the include files only for those
4611         modules that are copied and specified.
4612         Reported by Karl Berry.
4613
4614 2006-12-08  Jim Meyering  <jim@meyering.net>
4615
4616         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
4617         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
4618
4619         * build-aux/announce-gen: Add two new options, both optional:
4620         --bootstrap-tools=TOOL_LIST
4621               a comma-separated list of tools, e.g.,
4622               autoconf,automake,bison,gnulib
4623         --gnulib-snapshot-date=DATE
4624               if gnulib is in the bootstrap tool list,
4625               then report this as the snapshot date.
4626               If not specified, use the current date/time.
4627               If you specify a date here, be sure it's UTC.
4628
4629 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4630
4631         * tests/test-argp-2.sh: Fix test to match actual output.
4632         (func_compare): Fix sed script to be portable.
4633
4634 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
4635
4636         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
4637         workaround for this case.  It is not autoconfigured now; offhand
4638         it's hard to see how to autoconfigure it.
4639
4640 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
4641
4642         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
4643         a directory that is about to be chowned.  Such a directory's
4644         initial file permissions should permit the owner only and this
4645         should not be changed until after the chown, since the group and
4646         other bits would be incorrect if they granted permission before
4647         the chown.
4648
4649         Fix porting problem for iswctype reported by Georg Schwarz in:
4650         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
4651         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
4652         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
4653         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
4654         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
4655
4656 2006-12-03  Jim Meyering  <jim@meyering.net>
4657
4658         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
4659         p->fts_statp may not yet be defined.
4660         (fts_read): Instead, set it in the caller, once p->fts_statp is
4661         sure to be defined, and corresponds to a top-level directory.
4662         This bug made du -x fail.  Here's the coreutils test case:
4663         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
4664         Reported by Mike Frysinger.
4665
4666 2006-12-01  Jim Meyering  <jim@meyering.net>
4667
4668         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
4669         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
4670         Reported by Simon Josefsson.
4671
4672 2006-11-30  Jim Meyering  <jim@meyering.net>
4673
4674         * m4/warning.m4: Use the all-permissive copyright notice
4675         recommended by RMS (rather than LGPL).
4676         * m4/vararrays.m4: Likewise.
4677         * m4/flexmember.m4: Likewise.
4678
4679 2006-11-29  Bruno Haible  <bruno@clisp.org>
4680
4681         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
4682         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
4683         using +=.
4684         Reported by Simon Josefsson <simon@josefsson.org>.
4685
4686 2006-11-28  James Youngman <jay@gnu.org>
4687
4688         * README: Advise users that they might find the bug-gnulib@gnu.org
4689         and autotools-announce@gnu.org mailing lists useful.
4690
4691 2006-11-28  Bruno Haible  <bruno@clisp.org>
4692
4693         * m4/ptrdiff_max.m4: Remove file.
4694
4695 2006-11-21  Bruno Haible  <bruno@clisp.org>
4696
4697         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
4698         _AC_COMPUTE_INT.
4699         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
4700         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
4701         _AC_COMPUTE_INT.
4702         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
4703         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
4704         _AC_COMPUTE_INT.
4705         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
4706
4707 2006-11-28  Jim Meyering  <jim@meyering.net>
4708
4709         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
4710         warning from "gcc -Wshadow" about shadowing the builtin.
4711
4712 2006-11-27  Bruno Haible  <bruno@clisp.org>
4713
4714         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
4715         _AC_COMPUTE_INT.
4716         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
4717
4718 2006-11-27  Bruno Haible  <bruno@clisp.org>
4719             Paul Eggert  <eggert@cs.ucla.edu>
4720
4721         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
4722
4723 2006-11-26  Bruno Haible  <bruno@clisp.org>
4724
4725         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
4726         noinst_LTLIBRARIES.
4727
4728 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
4729             Bruno Haible  <bruno@clisp.org>
4730
4731         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
4732         if compiling with "gcc -ansi".
4733
4734 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
4735
4736         Fix some incompatibilities with gcc -ansi -pedantic.
4737         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
4738         if compiling pedantically with GCC, unless it's C99 or later.
4739         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
4740         it mishandles gcc -ansi -pedantic as well.
4741         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
4742         if gcc -pedantic.
4743         * lib/regexec.c (check_node_accept_bytes): Don't use auto
4744         initializers for struct if -pedantic, unless it's C99 or later.
4745
4746 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
4747
4748         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
4749         Don't close an fd more than once. Identical atimes indicate
4750         success, not failure.
4751
4752 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
4753
4754         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
4755
4756 2006-11-23  Jim Meyering  <jim@meyering.net>
4757
4758         * build-aux/announce-gen: New file.  From coreutils.
4759
4760 2006-11-22  Jim Meyering  <jim@meyering.net>
4761
4762         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
4763         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
4764         (fts_read): Use a temporary to narrow the overused st_size member
4765         before using it in a switch statement.  Reported by Matthew Woehlke.
4766
4767         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
4768         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
4769
4770 2006-11-20  Bruno Haible  <bruno@clisp.org>
4771
4772         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
4773         changequote instead of pairs of brackets.
4774         Reported by Andreas Schwab <schwab@suse.de>.
4775
4776 2006-11-21  Jim Meyering  <jim@meyering.net>
4777
4778         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
4779         so as to remain compatible with older compilers.
4780         Patch from Michael Deutschmann.
4781
4782 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
4783
4784         * MODULES.html.sh (File system functions): Add openat.
4785
4786         * lib/openat.h (rpl_fstatat): New macro, if
4787         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
4788         (fstatat): Define to rpl_fstatat under the same conditions,
4789         unless COMPILING_FSTATAT.
4790         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
4791         seems to have the bug.
4792         * lib/fstatat.c: New file.
4793         * modules/openat (Files): Add it.
4794
4795 2006-11-20  Bruno Haible  <bruno@clisp.org>
4796
4797         * Makefile: New file.
4798
4799 2006-11-20  Jim Meyering  <jim@meyering.net>
4800
4801         The beginnings of syntax-related checks for gnulib.
4802         * lib/Makefile: New file.
4803         * lib/t-idcache: New script.  Ensure that the two halves of
4804         idcache.c stay in sync.
4805
4806         * lib/idcache.c: Adjust comments in user- and group- portions to
4807         be more accurate, and to be consistent with one another.
4808
4809 2006-11-20  Jim Meyering  <jim@meyering.net>
4810
4811         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
4812         continue using the flexible array member (thus, this module performs
4813         half as many malloc calls), with the addition that...
4814         (getgroup, getuser): Consistently record a non-match via an empty
4815         "name" string, and map an empty string match to a NULL return value.
4816         * modules/idcache (Depends-on): Re-add flexmember.
4817
4818         * lib/idcache.c (getuser): Remove all uses of the register keyword.
4819         (getuidbyname, getgroup, getgidbyname): Likewise.
4820
4821         Use cleaner syntax: NULL rather than 0.
4822         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
4823
4824 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
4825
4826         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
4827         It mishandled the case where the group was missing.
4828         Problem reported by Greg Schafer.
4829         * modules/idcache: Likewise.
4830
4831 2006-11-18  Jim Meyering  <jim@meyering.net>
4832
4833         * check-module (%exempt_header): Add exception for some
4834         conditionally-included headers.
4835
4836         * modules/i-ring (Depends-on): Add verify.
4837         (License): Change to LGPL.
4838
4839 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
4840
4841         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
4842         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
4843         and inttostr.h.  Use snprintf rather than uinttostr, so that
4844         LGPLed code doesn't depend on GPLed.
4845
4846 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
4847
4848         * modules/inline (License): Change from GPL to LGPL.
4849
4850 2006-11-17  Jim Meyering  <jim@meyering.net>
4851
4852         * modules/d-type (License): Switch to LGPL.
4853
4854 2006-11-15  Bruno Haible  <bruno@clisp.org>
4855
4856         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
4857
4858 2006-11-15  Eric Blake  <ebb9@byu.net>
4859
4860         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
4861         the module dependency.
4862
4863 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
4864             Bruno Haible  <bruno@clisp.org>
4865
4866         * gnulib-tool (func_create_testdir): Add license consistency check.
4867
4868 2006-11-15  Eric Blake  <ebb9@byu.net>
4869
4870         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
4871         random "(cached)" in configure output.
4872
4873 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4874
4875         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
4876         test for conforming inttypes.h is both announced and cached.
4877
4878         * MODULES.html.sh (seen_modules, seen_files): New variables.
4879         (func_module): Rewrite to use a few less gnulib-tool and sed
4880         invocations.  Avoid a couple of quadratic algorithms for ...
4881         (missed_modules, missed_files): ... these, with ...
4882         (func_append, func_tmpdir): ... these new functions, from
4883         gnulib-tool.  Analogously, install traps for cleanup.
4884
4885         * tests/test-gc.c (main): Remove unused variables.
4886         * tests/test-read-file.c: Include stdlib.h, for 'free'.
4887
4888 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
4889
4890         * modules/inttostr (License): Change to LGPL.
4891
4892 2006-11-14  Eric Blake  <ebb9@byu.net>
4893
4894         * modules/tempname (License): Change to LGPL.
4895
4896 2006-11-14  Eric Blake  <ebb9@byu.net>
4897
4898         * doc/functions.texi (Function Portability): *printf functions on
4899         Cygwin now understand all POSIX size specifiers.
4900
4901 2006-11-14  Bruno Haible  <bruno@clisp.org>
4902
4903         * modules/c-ctype (License): Change to LGPL.
4904
4905 2006-11-12  Bruno Haible  <bruno@clisp.org>
4906
4907         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
4908         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
4909         for GNOME libraries, for which the include files are installed in
4910         subdirectories of $prefix/include.
4911
4912 2006-11-12  Bruno Haible  <bruno@clisp.org>
4913
4914         * m4/lib-link.m4: Require at least autoconf-2.54.
4915         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
4916         name to underscores for the --with option.
4917
4918 2006-11-13  Bruno Haible  <bruno@clisp.org>
4919
4920         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
4921         the tests directory.
4922         Reported by Ralf Wildenhues.
4923
4924 2006-11-13  Bruno Haible  <bruno@clisp.org>
4925
4926         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
4927         (func_emit_initmacro_end): Undo the override here.
4928         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
4929         Works around the famous automake error in coreutils.
4930
4931 2006-11-13  Eric Blake  <ebb9@byu.net>
4932
4933         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
4934         element, not its node.
4935
4936 2006-11-12  Bruno Haible  <bruno@clisp.org>
4937
4938         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
4939         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
4940
4941 2006-11-12  Bruno Haible  <bruno@clisp.org>
4942
4943         * gnulib-tool: New option --local-symlink.
4944         (func_usage): Document it.
4945         (lsymbolic): New variable.
4946         (func_import, func_create_testdir): If --symlink was not specified,
4947         test whether --local-symlink was specified and the file comes from
4948         the local_gnulib_dir.
4949
4950 2006-11-12  Bruno Haible  <bruno@clisp.org>
4951
4952         * gnulib-tool (func_ln): New function.
4953         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
4954
4955 2006-11-12  Bruno Haible  <bruno@clisp.org>
4956
4957         Finish support for source files in subdirectories.
4958         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
4959         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
4960         AUTOMAKE_OPTIONS.
4961         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
4962
4963 2006-11-12  Bruno Haible  <bruno@clisp.org>
4964
4965         * gnulib-tool (func_get_automake_snippet): Synthesize also an
4966         EXTRA_lib_SOURCES augmentation.
4967         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
4968
4969 2006-11-12  Jim Meyering  <jim@meyering.net>
4970
4971         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
4972         file descriptors.  This also averts a failure on systems with
4973         native openat support when a traversed directory lacks "x" access.
4974         * lib/fts_.h: Include "i-ring.h"
4975         (struct FTS) [fts_fd_ring]: New member.
4976         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
4977         (FCHDIR): Add parentheses.
4978         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
4979         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
4980         When descending, rather than simply closing the previous
4981         fts_cwd_fd value, push that file descriptor onto the ring.
4982         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
4983         (fts_open): Initialize the new fd_ring member.
4984         (fts_close): Clear the ring.
4985         (fts_safe_changedir): When possible, use our new fd_ring to skip
4986         the diropen and fstat and dev/ino comparison that would normally
4987         accompany a virtual `chdir ("..")'.
4988
4989         * modules/fts (Depends-on): Add i-ring.
4990         * modules/i-ring: New module.
4991         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
4992         * m4/i-ring.m4: New file.
4993
4994 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4995
4996         * gnulib-tool (func_create_testdir): Fix replacement of
4997         `build-aux' in configure.ac.  Run autotools in gltests
4998         subdirectory.
4999         (func_create_testdir, func_create_megatestdir, test): There is
5000         no need for '--force' in most autotool invocations in a new
5001         tree.  Actually fail the whole test if any of the tools, or the
5002         configure or make stages fail.
5003
5004         Sync from Automake.
5005         * build-aux/gnupload: Revert last change.  Add pointer to upload
5006         instructions of the GNU Maintenance Instructions.
5007         Suggestion by Karl Berry.
5008
5009 2006-11-10  Jim Meyering  <jim@meyering.net>
5010
5011         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
5012
5013 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
5014
5015         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
5016         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
5017         (bind_textdomain_codeset) [! ENABLE_NLS]:
5018         Evaluate all the arguments.  That way, callers get compatible behavior
5019         if the arguments have side effects.  Also, it avoids some GCC
5020         diagnostics in some cases; Joel E. Denny reported problems when Bison
5021         was configured with --enable-gcc-warnigs.
5022
5023 2006-11-10  Jim Meyering  <jim@meyering.net>
5024
5025         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
5026         relevant options in CFLAGS (like -O, -fno-inline) are taken into
5027         account.
5028
5029 2006-11-10  Jim Meyering  <jim@meyering.net>
5030
5031         * modules/inline: New file/module.
5032         * modules/xalloc (Files): Remove m4/inline.m4.
5033         (Depends-on): Add inline, instead.
5034         * modules/oset: Likewise.
5035         * modules/list: Likewise.
5036
5037 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
5038
5039         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
5040         Problem reported by Matthew Woehlke.
5041
5042 2006-11-09  Bruno Haible  <bruno@clisp.org>
5043
5044         * lib/tempname.c (gen_tempname): Remove variant that invokes
5045         __gen_tempname.
5046         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
5047         __gen_tempname.
5048
5049 2006-11-08  Bruno Haible  <bruno@clisp.org>
5050
5051         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
5052         to 'yes' instead of 'cross-compiling'.
5053
5054 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
5055
5056         * lib/quotearg.h (quotearg_free): New decl.
5057         * lib/quotearg.c (quotearg_free): New function.
5058         (slot0, nslots, slotvec0, slotvec):
5059         Now file-scope so that quotearg_free can get at them.
5060
5061 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5062
5063         Sync from Automake.
5064         * build-aux/gnupload: Add missing 'gnu' to example URL.
5065         Report by Karl Berry.
5066
5067 2006-11-08  Bruno Haible  <bruno@clisp.org>
5068
5069         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
5070         Suggested by Paul Eggert.
5071
5072 2006-11-08  Jim Meyering  <jim@meyering.net>
5073
5074         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
5075         It's already included if !_LIBC.
5076         (fts_safe_changedir): Add a comment.
5077
5078 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
5079
5080         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
5081         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
5082         Matthew Woehlke.
5083
5084         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
5085         definitions up, to avoid colliding with change below.
5086         (static_inline) [HAVE_INLINE]: New macro.
5087         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
5088         Provide extern decls when !HAVE_INLINE.  Do not define unless
5089         static_inline is defined, either by us or by xmalloc.c.  Use
5090         static_inline rather than static inline.
5091         (XCALLOC): Optimize sizeof(T) = 1 case.
5092         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
5093
5094 2006-11-07  Bruno Haible  <bruno@clisp.org>
5095
5096         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
5097         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
5098         AC_C_INLINE.
5099         * modules/xalloc (Files): Add m4/inline.m4.
5100
5101 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5102
5103         * README: Fix typo.
5104         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
5105         (Miscellanous Notes): ...from this.
5106
5107 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
5108
5109         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
5110         Mention that offsetof should be used instead of sizeof.
5111         From Bruno Haible.
5112
5113 2006-11-07  Bruno Haible  <bruno@clisp.org>
5114
5115         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
5116
5117 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
5118
5119         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
5120         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
5121         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
5122         (gl_tree_add_before, gl_tree_add_after):
5123         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
5124         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
5125         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
5126         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
5127         (gl_linked_add_after, gl_linked_add_at): Likewise.
5128         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
5129         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
5130         (gl_tree_add_before, gl_tree_add_after): Likewise.
5131         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
5132         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
5133         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
5134
5135 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5136
5137         * lib/gl_oset.h: Use C comment style, not C++ comment style.
5138
5139 2006-11-06  Bruno Haible  <bruno@clisp.org>
5140
5141         * m4/inline.m4: New file.
5142         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
5143         * modules/list (Files): Add m4/inline.m4.
5144         * modules/oset (Files): Likewise.
5145
5146 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
5147
5148         * lib/idcache.c: Include <stddef.h>, for offsetof.
5149         (struct userid.name): Change from char * to a flexible array member.
5150         All uses changed.
5151         * modules/idcache (Depends-on): Add flexmember.
5152
5153         * MODULES.html.sh (Core language properties): New module flexmember.
5154         * modules/flexmember, m4/flexmember.m4: New files.
5155
5156         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
5157         inline functions that are identical with the old xnmalloc_inline,
5158         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
5159         that we can avoid some unnecessary integer multiplications and
5160         divisions in the common case where the element size is known at
5161         compile time.
5162         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
5163         needed.
5164         (xnboundedmalloc): Remove.
5165         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
5166         arguments, for consistency with rest of this header.
5167         (xcharalloc): Rewrite using XNMALLOC.
5168         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
5169         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
5170         versions have been moved to lib/xalloc.h and renamed to be the
5171         non-*_inline versions.
5172         (xmalloc, xrealloc): Implement without reference to the xnmalloc
5173         and xnrealloc functions, since those functions are now inline and
5174         now call us.
5175         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
5176         renaming described above.
5177         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
5178         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
5179         captures the dependency in AC_C_INLINE.
5180
5181         New module canonicalize-lgpl, proposed by Charles Wilson in
5182         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
5183         with a few small changes afterwards.
5184         * MODULES.html.sh (File system functions): New module
5185         canonicalize-lgpl.
5186         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
5187         and canonicalize_file_name.
5188         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
5189         * modules/canonicalize-lgpl: New files.
5190
5191 2006-11-05  Bruno Haible  <bruno@clisp.org>
5192
5193         * gnulib-tool (func_import, func_create_testdir): Create directories
5194         also for files in subdirectories of lib/.
5195
5196 2006-11-05  Bruno Haible  <bruno@clisp.org>
5197
5198         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
5199         ANSI C compliant.
5200
5201 2006-11-03  Bruno Haible  <bruno@clisp.org>
5202
5203         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
5204         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
5205         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
5206         (xnboundedmalloc): New inline function.
5207         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
5208         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
5209         xmalloc.
5210         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
5211         xmalloc.
5212         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
5213         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
5214         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
5215         xmalloc.
5216         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
5217         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
5218         xmalloc.
5219         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
5220         gl_tree_add_after): Use XMALLOC instead of xmalloc.
5221         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
5222         xmalloc.
5223         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
5224         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
5225         gl_tree_add_after): Use XMALLOC instead of xmalloc.
5226         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
5227         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
5228         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
5229         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
5230
5231 2006-11-03  Bruno Haible  <bruno@clisp.org>
5232
5233         * lib/c-ctype.h [C++]: Define functions without name mangling.
5234         * lib/fwriteerror.h [C++]: Likewise.
5235         * lib/gcd.h [C++]: Likewise.
5236         * lib/linebreak.h [C++]: Likewise.
5237
5238 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
5239
5240         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
5241         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
5242         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
5243         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
5244         Check for functions and headers just once.
5245         Check for declaration of canonicalize_file_name.
5246         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
5247
5248 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
5249
5250         * gnulib-tool (func_import): Fix typo in actioncmd.
5251
5252 2006-11-02  Bruno Haible  <bruno@clisp.org>
5253
5254         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
5255         newline sequence in the Makefile.am snippet as a space, like "make"
5256         does.
5257         Reported by Roger Persson <perrog@gmail.com>.
5258
5259 2006-11-01  Bruno Haible  <bruno@clisp.org>
5260
5261         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
5262         already declared in <string.h>.
5263         * lib/strcase.h (strncasecmp): Don't declare it if yes.
5264
5265 2006-11-01  Bruno Haible  <bruno@clisp.org>
5266
5267         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
5268         * lib/strcase.h: Include <string.h>.
5269         (strcasecmp): Define to rpl_strcasecmp here.
5270
5271 2006-11-01  Bruno Haible  <bruno@clisp.org>
5272
5273         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
5274
5275 2006-11-01  Eric Blake  <ebb9@byu.net>
5276
5277         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
5278
5279         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
5280
5281 2006-10-29  Bruno Haible  <bruno@clisp.org>
5282
5283         Make it compile in C++ mode.
5284         * lib/full-write.c (full_rw): Add a cast.
5285
5286 2006-11-01  Bruno Haible  <bruno@clisp.org>
5287
5288         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
5289         be POSIX compliant.
5290         Reported by Roger Persson <perrog@gmail.com>.
5291
5292 2006-11-01  Eric Blake  <ebb9@byu.net>
5293
5294         * lib/getopt_.h: Fix comments.
5295
5296 2006-10-31  Eric Blake  <ebb9@byu.net>
5297
5298         * modules/tmpdir (Depends-on): Add sys_stat.
5299         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
5300         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
5301         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
5302         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
5303         tempname.
5304
5305 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
5306
5307         Avoid some C++ diagnostics reported by Bruno Haible.
5308         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
5309         xmalloc.
5310         (quotearg_alloc): Use xcharalloc rather than xmalloc.
5311         (struct slotvec): Move to top level.
5312         (quotearg_n_options): Rewrite to avoid xmalloc.
5313         * lib/xalloc.h (xcharalloc): New function.
5314         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
5315         [defined __cplusplus]: Add function template that provides result
5316         type propagation.  This part of the change is from Bruno Haible.
5317
5318 2006-10-29  Bruno Haible  <bruno@clisp.org>
5319
5320         Make it compile in C++ mode.
5321         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
5322         * lib/strnlen1.c (strnlen1): Cast memchr result.
5323         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
5324         * lib/clean-temp.c (string_equals, string_hash): Add casts.
5325         (create_temp_dir): Rename local variable 'template'.
5326         (compile_csharp_using_sscli): Add cast.
5327         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
5328         * lib/findprog.c (find_in_path): Likewise.
5329         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
5330         * lib/wait-process.c (register_slave_subprocess): Likewise.
5331
5332 2006-10-22  Bruno Haible  <bruno@clisp.org>
5333
5334         * modules/tsearch: New file.
5335         * lib/tsearch.h: New file.
5336         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
5337         * m4/tsearch.m4: New file.
5338         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
5339
5340 2006-10-29  Eric Blake  <ebb9@byu.net>
5341
5342         * lib/arcfour.c: Assume config.h.
5343         * lib/arctwo.c: Likewise.
5344         * lib/base64.c: Likewise.
5345         * lib/check-version.c: Likewise.
5346         * lib/crc.c: Likewise.
5347         * lib/des.c: Likewise.
5348         * lib/gc-gnulib.c: Likewise.
5349         * lib/gc-libgcrypt.c: Likewise.
5350         * lib/gc-pbkdf2-sha1.c: Likewise.
5351         * lib/getaddrinfo.c: Likewise.
5352         * lib/getdelim.c: Likewise.
5353         * lib/getline.c: Likewise.
5354         * lib/hmac-md5.c: Likewise.
5355         * lib/hmac-sha1.c: Likewise.
5356         * lib/iconvme.c: Likewise.
5357         * lib/md2.c: Likewise.
5358         * lib/md4.c: Likewise.
5359         * lib/memxor.c: Likewise.
5360         * lib/read-file.c: Likewise.
5361         * lib/readline.c: Likewise.
5362         * lib/rijndael-alg-fst.c: Likewise.
5363         * lib/rijndael-api-fst.c: Likewise.
5364         * lib/xgetdomainname.c: Likewise.
5365
5366 2006-10-28  Eric Blake  <ebb9@byu.net>
5367
5368         * lib/xstrndup.c: Assume config.h.
5369
5370 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
5371
5372         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
5373         stat-macros.h is now for our own macros, whereas stat_h is for
5374         macros in the <sys/stat.h> name space.
5375         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
5376         (STAT_MACROS_H): Remove.
5377         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
5378         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
5379         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
5380         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
5381         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
5382         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
5383         Move these macros to ...
5384         * lib/stat_.h: here.  Don't include stat-macros.h.
5385         * lib/canonicalize.c: Don't include stat-macros.h.
5386         * lib/chown.c: Likewise.
5387         * lib/euidaccess.c: Likewise.
5388         * lib/file-type.c: Likewise.
5389         * lib/filemode.c: Likewise.
5390         * lib/glob.c: Likewise.
5391         * lib/isapipe.c: Likewise.
5392         * lib/lchown.c: Likewise.
5393         * lib/lstat.c: Likewise.
5394         * lib/mkdir-p.c: Likewise.
5395         * lib/rmdir.c: Likewise.
5396         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
5397         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
5398         unless mkdir isn't declared, to speed up 'configure'.
5399         Always create sys/stat.h, since it's unlikely any real sys/stat.h
5400         would define all the S_* symbols.
5401         * modules/canonicalize (Depends-on):
5402         Depend on sys_stat, not stat-macros.
5403         * modules/chown: Likewise.
5404         * modules/euidaccess: Likewise.
5405         * modules/filemode: Likewise.
5406         * modules/file-type: Likewise.
5407         * modules/glob: Likewise.
5408         * modules/isapipe: Likewise.
5409         * modules/lchown: Likewise.
5410         * modules/lstat: Likewise.
5411         * modules/mkancesdirs: Likewise.
5412         * modules/rmdir: Likewise.
5413         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
5414         * modules/modechange: Likewise.
5415         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
5416         (configure.ac): Remove gl_STAT_MACROS.
5417         * modules/sys_stat (Depends-on): Remove stat-macros.
5418
5419 2006-10-27  Bruno Haible  <bruno@clisp.org>
5420
5421         * m4/signed.m4: Remove file.
5422         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
5423         invocation.
5424         * modules/vasnprintf (Files): Remove m4/signed.m4.
5425
5426 2006-10-27  Bruno Haible  <bruno@clisp.org>
5427
5428         Update to GNU gettext 0.16.
5429         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
5430         m4/inttypes-h.m4, m4/signed.m4.
5431         * m4/gettext.m4: Update to GNU gettext 0.16.
5432         * m4/intl.m4: New file, from GNU gettext.
5433         * m4/intldir.m4: New file, from GNU gettext.
5434         * config/srclist.txt: Update
5435
5436 2006-10-27  Eric Blake  <ebb9@byu.net>
5437
5438         * MODULES.html.sh: Document tempname.
5439         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
5440         dependencies.
5441         (Files): Move lib/tempname.c...
5442         * modules/tempname: ...to this new module.
5443         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
5444         (gl_PREREQ_TEMPNAME): Move...
5445         * m4/tempname.m4: ...to this new file.
5446         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
5447         * modules/sys_stat (Depends-on): Add stat-macros.
5448         * lib/stat_.h (includes): Pick up stat macros.
5449         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
5450         if stat macros are broken.
5451         * lib/tempname.c (includes): No need to include "stat-macros.h".
5452         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
5453         (direxists, __path_search) [!_LIBC]: Don't compile these in
5454         gnulib; the tmpdir module covers that.
5455         * lib/tempname.h: New file.
5456
5457 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
5458
5459         * COPYING: Explain how gnulib-tool converts licence headers.
5460         Almost all wording by Eric Blake.
5461
5462 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
5463
5464         * lib/mbchar.h (is_basic_table): Make read-only.
5465         * lib/mbchar.c (is_basic_table): Likewise.
5466         Reported by John Darrington.
5467
5468 2006-10-25  Bruno Haible  <bruno@clisp.org>
5469
5470         * lib/progname.h (set_program_name): Undefine before defining.
5471
5472 2006-10-25  Bruno Haible  <bruno@clisp.org>
5473
5474         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
5475         false for non-gcc C++ compilers.
5476         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
5477
5478 2006-10-24  Bruno Haible  <bruno@clisp.org>
5479
5480         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
5481         iconv implementations like Irix iconv.
5482
5483 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
5484
5485         * modules/vararrays: New file.
5486         * m4/vararrays.m4: New file, taken from diffutils.
5487         * MODULES.html.sh: New module vararrays.
5488
5489 2006-10-24  Karl Berry  <karl@gnu.org>
5490
5491         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
5492         Don't call GNU Unix.
5493
5494 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5495
5496         * users.txt: Add Libtool.
5497
5498         Sync from Libtool:
5499
5500         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
5501
5502         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
5503         to gnulib's policy of including config.h unconditionally.
5504
5505 2006-10-24  Bruno Haible  <bruno@clisp.org>
5506
5507         * modules/wcwidth (Files): Add m4/wint_t.m4.
5508         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
5509         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
5510
5511 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
5512
5513         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
5514         to pacify GCC with some -W flags enabled.  Problem reported by
5515         Bruno Haible.
5516
5517 2006-10-24  Jim Meyering  <jim@meyering.net>
5518
5519         * MODULES.html.sh: Remove uinttostr.  It's not a module.
5520         Reported by Karl Berry.
5521
5522 2006-10-23  Bruno Haible  <bruno@clisp.org>
5523
5524         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
5525
5526 2006-10-24  Bruno Haible  <bruno@clisp.org>
5527
5528         * lib/gl_list.h: Use C comment style, not C++ comment style.
5529
5530 2006-10-23  Eric Blake  <ebb9@byu.net>
5531
5532         * lib/getaddrinfo.c (includes): Add missing include.
5533
5534 2006-10-23  Bruno Haible  <bruno@clisp.org>
5535             Paul Eggert  <eggert@cs.ucla.edu>
5536
5537         Ability to rename obstack_free.
5538         * lib/obstack.h (__obstack_free): New macro. Declare instead of
5539         obstack_free.
5540         (obstack_free): Invoke the __obstack_free macro.
5541         * lib/obstack.c (obstack_free): Use __obstack_free macro.
5542
5543 2006-10-23  Bruno Haible  <bruno@clisp.org>
5544             Paul Eggert  <eggert@cs.ucla.edu>
5545
5546         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
5547         __argc, __argv from the declaration. (They are defined as macros on
5548         mingw.)
5549
5550 2006-10-22  Bruno Haible  <bruno@clisp.org>
5551
5552         * doc/gnulib-intro.texi: New file.
5553         * doc/gnulib.texi: Include it.
5554
5555 2006-10-21  Bruno Haible  <bruno@clisp.org>
5556
5557         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
5558         "Introduction", "Miscellanous Notes", "Particular Modules".
5559
5560 2006-10-21  Bruno Haible  <bruno@clisp.org>
5561
5562         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5563         Change mostlyclean-local rule to avoid sh syntax error from bash
5564         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
5565
5566 2006-10-23  Jim Meyering  <jim@meyering.net>
5567
5568         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
5569         in place of snprintf.
5570
5571         * modules/inttostr (Files): Add lib/uinttostr.c.
5572         * lib/uinttostr.c (inttostr): New file/function.
5573         * lib/inttostr.h (uinttostr): Declare.
5574         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
5575         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
5576         Add uinttostr.
5577         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
5578
5579 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
5580
5581         * lib/canonicalize.c (ELOOP): Define if not already defined.
5582         Problem reported by Bruno Haible in
5583         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
5584
5585 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
5586
5587         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
5588         Problem reported by Perry Smith and Ville Laurikari.
5589
5590         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
5591         uses.
5592
5593 2006-10-19  Bruno Haible  <bruno@clisp.org>
5594
5595         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
5596         for mingw.
5597
5598 2006-10-19  Bruno Haible  <bruno@clisp.org>
5599
5600         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
5601         Needed for mingw.
5602
5603 2006-10-19  Bruno Haible  <bruno@clisp.org>
5604
5605         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
5606
5607 2006-10-19  Bruno Haible  <bruno@clisp.org>
5608
5609         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
5610         it.
5611
5612 2006-10-19  Bruno Haible  <bruno@clisp.org>
5613
5614         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
5615         invocation.
5616
5617 2006-10-19  Bruno Haible  <bruno@clisp.org>
5618
5619         * gnulib-tool (func_create_testdir): Don't include ftruncate and
5620         mountlist by default.
5621
5622 2006-10-16  Bruno Haible  <bruno@clisp.org>
5623
5624         * lib/c-strstr.c: Include c-strstr.h.
5625
5626 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
5627
5628         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
5629         in a slash.
5630
5631 2006-10-18  Bruno Haible  <bruno@clisp.org>
5632
5633         * lib/lock.h [C++]: Wrap definitions in extern "C".
5634
5635 2006-10-18  Bruno Haible  <bruno@clisp.org>
5636
5637         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
5638         gl_LIBOBJS list.
5639
5640 2006-10-18  Bruno Haible  <bruno@clisp.org>
5641
5642         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
5643
5644 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
5645
5646         * lib/xstrtol.h: Include gettext.h.
5647         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
5648         Problem reported by Eric Blake.
5649         * modules/xstrtol (Depends-on): Add gettext-h.
5650
5651 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
5652
5653         * lib/strftime.c (advance): New macro.
5654         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
5655         incomplete type, so you can't add 0 to it.  Problem and patch
5656         reported by Eelco Dolstra for dietlibc.
5657
5658 2006-10-18  Jim Meyering  <jim@meyering.net>
5659
5660         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
5661         type for a local, and rename it: s/up/user_proc/.
5662
5663 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
5664
5665         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
5666         READ_UTMP_USER_PROCESS.
5667         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
5668
5669 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
5670
5671         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
5672         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
5673
5674 2006-10-17  Eric Blake  <ebb9@byu.net>
5675
5676         * lib/sigprocmask.c (sigprocmask): Fix typo.
5677
5678         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
5679
5680         * modules/clean-temp (Makefile.am): Don't add to make output...
5681         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
5682         config.h.
5683
5684 2006-10-17  Bruno Haible  <bruno@clisp.org>
5685
5686         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
5687         differently if DEFAULT_TEXT_DOMAIN is set.
5688
5689 2006-10-16  Bruno Haible  <bruno@clisp.org>
5690
5691         * lib/clean-temp.c: Include fwriteerror.h.
5692
5693 2006-10-16  Bruno Haible  <bruno@clisp.org>
5694
5695         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
5696
5697 2006-10-16  Bruno Haible  <bruno@clisp.org>
5698
5699         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
5700         * lib/sigprocmask.h: Include <sys/types.h>.
5701         (sigset_t): Use the system's definition if present.
5702
5703 2006-10-17  Eric Blake  <ebb9@byu.net>
5704
5705         * lib/xvasprintf.c (includes): Assume config.h.
5706         * lib/xasprintf.c (includes): Likewise.
5707
5708 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
5709
5710         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
5711         at least as wide as intmax_t.
5712
5713 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
5714
5715         (Imported from Automake.)
5716         * build-aux/gnupload: Update to version 1.1 of directive file.
5717
5718 2006-10-16  Eric Blake  <ebb9@byu.net>
5719
5720         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
5721         match Automake 1.10a.
5722
5723 2006-10-14  Bruno Haible  <bruno@clisp.org>
5724
5725         * modules/sigprocmask: New file.
5726         * lib/sigprocmask.h: New file.
5727         * lib/sigprocmask.c: New file.
5728         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
5729         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
5730         request sigprocmask.o.
5731         (gl_PREREQ_SIGPROCMASK): New macro.
5732         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
5733         (Depends-on): Add sigprocmask.
5734         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
5735         gt_SIGNALBLOCKING. Test for 'raise' only once.
5736         * lib/fatal-signal.c: Include sigprocmask.h.
5737         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
5738         unblock_fatal_signals): Define always.
5739         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
5740         sigprocmask.
5741
5742 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
5743
5744         Sync from Automake.
5745         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
5746         which incorrectly sets the mode of an existing destination
5747         directory.  In some cases the unpatched install-sh could do the
5748         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
5749         system.  We hope this is rare in practice, but it's clearly worth
5750         fixing.  Problem reported by Alex Unleashed in
5751         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
5752         Also, don't bother to check for -m bugs unless we're using -m;
5753         suggested by Stepan Kasal.
5754
5755 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5756
5757         Sync from Automake.
5758         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
5759         `-c' flag, so they appear at the same position as in %FASTDEP%
5760         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
5761         which ignores unknown options only after the first non-option.
5762         Bug report against M4 by Nelson H. F. Beebe.
5763
5764 2006-10-13  Jim Meyering  <jim@meyering.net>
5765
5766         Fix a bug in yesterday's change.
5767         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
5768         p->fts_statp->st_dev would be used uninitialized.
5769         Ensures that we always call fts_stat on the very first entry.
5770         Miklos Szeredi reported that find -xdev stopped working.
5771
5772 2006-10-12  Bruno Haible  <bruno@clisp.org>
5773
5774         * gnulib-tool (func_get_automake_snippet): Append an automatically
5775         computed EXTRA_DIST augmentation.
5776         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
5777         * modules/alloca-opt (Makefile.am): Likewise.
5778         * modules/allocsa (Makefile.am): Likewise.
5779         * modules/arcfour (Makefile.am): Likewise.
5780         * modules/arctwo (Makefile.am): Likewise.
5781         * modules/argmatch (Makefile.am): Likewise.
5782         * modules/argz (Makefile.am): Likewise.
5783         * modules/atexit (Makefile.am): Likewise.
5784         * modules/backupfile (Makefile.am): Likewise.
5785         * modules/byteswap (Makefile.am): Likewise.
5786         * modules/c-strtod (Makefile.am): Likewise.
5787         * modules/c-strtold (Makefile.am): Likewise.
5788         * modules/calloc (Makefile.am): Likewise.
5789         * modules/canon-host (Makefile.am): Likewise.
5790         * modules/canonicalize (Makefile.am): Likewise.
5791         * modules/chdir-long (Makefile.am): Likewise.
5792         * modules/chdir-safer (Makefile.am): Likewise.
5793         * modules/check-version (Makefile.am): Likewise.
5794         * modules/chown (Makefile.am): Likewise.
5795         * modules/cloexec (Makefile.am): Likewise.
5796         * modules/close-stream (Makefile.am): Likewise.
5797         * modules/closeout (Makefile.am): Likewise.
5798         * modules/crc (Makefile.am): Likewise.
5799         * modules/csharpexec (Makefile.am): Likewise.
5800         * modules/cycle-check (Makefile.am): Likewise.
5801         * modules/des (Makefile.am): Likewise.
5802         * modules/dev-ino (Makefile.am): Likewise.
5803         * modules/dirfd (Makefile.am): Likewise.
5804         * modules/dirname (Makefile.am): Likewise.
5805         * modules/dup2 (Makefile.am): Likewise.
5806         * modules/eealloc (Makefile.am): Likewise.
5807         * modules/error (Makefile.am): Likewise.
5808         * modules/euidaccess (Makefile.am): Likewise.
5809         * modules/exclude (Makefile.am): Likewise.
5810         * modules/exitfail (Makefile.am): Likewise.
5811         * modules/fcntl-safer (Makefile.am): Likewise.
5812         * modules/fcntl (Makefile.am): Likewise.
5813         * modules/file-type (Makefile.am): Likewise.
5814         * modules/fileblocks (Makefile.am): Likewise.
5815         * modules/filemode (Makefile.am): Likewise.
5816         * modules/filenamecat (Makefile.am): Likewise.
5817         * modules/fnmatch (Makefile.am): Likewise.
5818         * modules/fopen-safer (Makefile.am): Likewise.
5819         * modules/fpending (Makefile.am): Likewise.
5820         * modules/fprintftime (Makefile.am): Likewise.
5821         * modules/free (Makefile.am): Likewise.
5822         * modules/fsusage (Makefile.am): Likewise.
5823         * modules/ftruncate (Makefile.am): Likewise.
5824         * modules/fts (Makefile.am): Likewise.
5825         * modules/gc-arcfour (Makefile.am): Likewise.
5826         * modules/gc-des (Makefile.am): Likewise.
5827         * modules/gc-hmac-md5 (Makefile.am): Likewise.
5828         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
5829         * modules/gc-md4 (Makefile.am): Likewise.
5830         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
5831         * modules/gc-sha1 (Makefile.am): Likewise.
5832         * modules/gc (Makefile.am): Likewise.
5833         * modules/getaddrinfo (Makefile.am): Likewise.
5834         * modules/getcwd (Makefile.am): Likewise.
5835         * modules/getdelim (Makefile.am): Likewise.
5836         * modules/getdomainname (Makefile.am): Likewise.
5837         * modules/getgroups (Makefile.am): Likewise.
5838         * modules/gethostname (Makefile.am): Likewise.
5839         * modules/gethrxtime (Makefile.am): Likewise.
5840         * modules/getline (Makefile.am): Likewise.
5841         * modules/getloadavg (Makefile.am): Likewise.
5842         * modules/getlogin_r (Makefile.am): Likewise.
5843         * modules/getndelim2 (Makefile.am): Likewise.
5844         * modules/getopt (Makefile.am): Likewise.
5845         * modules/getpagesize (Makefile.am): Likewise.
5846         * modules/getpass-gnu (Makefile.am): Likewise.
5847         * modules/getpass (Makefile.am): Likewise.
5848         * modules/getsubopt (Makefile.am): Likewise.
5849         * modules/gettime (Makefile.am): Likewise.
5850         * modules/gettimeofday (Makefile.am): Likewise.
5851         * modules/getugroups (Makefile.am): Likewise.
5852         * modules/getusershell (Makefile.am): Likewise.
5853         * modules/glob (Makefile.am): Likewise.
5854         * modules/group-member (Makefile.am): Likewise.
5855         * modules/hard-locale (Makefile.am): Likewise.
5856         * modules/hash (Makefile.am): Likewise.
5857         * modules/hmac-md5 (Makefile.am): Likewise.
5858         * modules/hmac-sha1 (Makefile.am): Likewise.
5859         * modules/human (Makefile.am): Likewise.
5860         * modules/idcache (Makefile.am): Likewise.
5861         * modules/imaxabs (Makefile.am): Likewise.
5862         * modules/imaxdiv (Makefile.am): Likewise.
5863         * modules/inet_ntop (Makefile.am): Likewise.
5864         * modules/inet_pton (Makefile.am): Likewise.
5865         * modules/intprops (Makefile.am): Likewise.
5866         * modules/inttostr (Makefile.am): Likewise.
5867         * modules/inttypes (Makefile.am): Likewise.
5868         * modules/isapipe (Makefile.am): Likewise.
5869         * modules/javaversion (Makefile.am): Likewise.
5870         * modules/lchmod (Makefile.am): Likewise.
5871         * modules/lchown (Makefile.am): Likewise.
5872         * modules/localcharset (Makefile.am): Likewise.
5873         * modules/long-options (Makefile.am): Likewise.
5874         * modules/lstat (Makefile.am): Likewise.
5875         * modules/malloc (Makefile.am): Likewise.
5876         * modules/mathl (Makefile.am): Likewise.
5877         * modules/mbchar (Makefile.am): Likewise.
5878         * modules/md2 (Makefile.am): Likewise.
5879         * modules/md4 (Makefile.am): Likewise.
5880         * modules/md5 (Makefile.am): Likewise.
5881         * modules/memcasecmp (Makefile.am): Likewise.
5882         * modules/memchr (Makefile.am): Likewise.
5883         * modules/memcmp (Makefile.am): Likewise.
5884         * modules/memcoll (Makefile.am): Likewise.
5885         * modules/memcpy (Makefile.am): Likewise.
5886         * modules/memmem (Makefile.am): Likewise.
5887         * modules/memmove (Makefile.am): Likewise.
5888         * modules/mempcpy (Makefile.am): Likewise.
5889         * modules/memrchr (Makefile.am): Likewise.
5890         * modules/memset (Makefile.am): Likewise.
5891         * modules/memxor (Makefile.am): Likewise.
5892         * modules/mkancesdirs (Makefile.am): Likewise.
5893         * modules/mkdir-p (Makefile.am): Likewise.
5894         * modules/mkdir (Makefile.am): Likewise.
5895         * modules/mkdtemp (Makefile.am): Likewise.
5896         * modules/mkstemp (Makefile.am): Likewise.
5897         * modules/mktime (Makefile.am): Likewise.
5898         * modules/modechange (Makefile.am): Likewise.
5899         * modules/mountlist (Makefile.am): Likewise.
5900         * modules/nanosleep (Makefile.am): Likewise.
5901         * modules/obstack (Makefile.am): Likewise.
5902         * modules/openat (Makefile.am): Likewise.
5903         * modules/pagealign_alloc (Makefile.am): Likewise.
5904         * modules/pathmax (Makefile.am): Likewise.
5905         * modules/physmem (Makefile.am): Likewise.
5906         * modules/poll (Makefile.am): Likewise.
5907         * modules/posixtm (Makefile.am): Likewise.
5908         * modules/posixver (Makefile.am): Likewise.
5909         * modules/putenv (Makefile.am): Likewise.
5910         * modules/quote (Makefile.am): Likewise.
5911         * modules/quotearg (Makefile.am): Likewise.
5912         * modules/raise (Makefile.am): Likewise.
5913         * modules/read-file (Makefile.am): Likewise.
5914         * modules/readline (Makefile.am): Likewise.
5915         * modules/readlink (Makefile.am): Likewise.
5916         * modules/readtokens (Makefile.am): Likewise.
5917         * modules/readutmp (Makefile.am): Likewise.
5918         * modules/realloc (Makefile.am): Likewise.
5919         * modules/regex (Makefile.am): Likewise.
5920         * modules/rename-dest-slash (Makefile.am): Likewise.
5921         * modules/rename (Makefile.am): Likewise.
5922         * modules/rijndael (Makefile.am): Likewise.
5923         * modules/rmdir (Makefile.am): Likewise.
5924         * modules/rpmatch (Makefile.am): Likewise.
5925         * modules/safe-read (Makefile.am): Likewise.
5926         * modules/safe-write (Makefile.am): Likewise.
5927         * modules/same-inode (Makefile.am): Likewise.
5928         * modules/same (Makefile.am): Likewise.
5929         * modules/save-cwd (Makefile.am): Likewise.
5930         * modules/savedir (Makefile.am): Likewise.
5931         * modules/setenv (Makefile.am): Likewise.
5932         * modules/settime (Makefile.am): Likewise.
5933         * modules/sha1 (Makefile.am): Likewise.
5934         * modules/sig2str (Makefile.am): Likewise.
5935         * modules/snprintf (Makefile.am): Likewise.
5936         * modules/stat-macros (Makefile.am): Likewise.
5937         * modules/stat-time (Makefile.am): Likewise.
5938         * modules/stdbool (Makefile.am): Likewise.
5939         * modules/stdint (Makefile.am): Likewise.
5940         * modules/stdlib-safer (Makefile.am): Likewise.
5941         * modules/stpcpy (Makefile.am): Likewise.
5942         * modules/stpncpy (Makefile.am): Likewise.
5943         * modules/strcase (Makefile.am): Likewise.
5944         * modules/strcasestr (Makefile.am): Likewise.
5945         * modules/strchrnul (Makefile.am): Likewise.
5946         * modules/strcspn (Makefile.am): Likewise.
5947         * modules/strdup (Makefile.am): Likewise.
5948         * modules/strerror (Makefile.am): Likewise.
5949         * modules/strftime (Makefile.am): Likewise.
5950         * modules/strndup (Makefile.am): Likewise.
5951         * modules/strnlen (Makefile.am): Likewise.
5952         * modules/strpbrk (Makefile.am): Likewise.
5953         * modules/strsep (Makefile.am): Likewise.
5954         * modules/strstr (Makefile.am): Likewise.
5955         * modules/strtod (Makefile.am): Likewise.
5956         * modules/strtoimax (Makefile.am): Likewise.
5957         * modules/strtok_r (Makefile.am): Likewise.
5958         * modules/strtol (Makefile.am): Likewise.
5959         * modules/strtoll (Makefile.am): Likewise.
5960         * modules/strtoul (Makefile.am): Likewise.
5961         * modules/strtoull (Makefile.am): Likewise.
5962         * modules/strtoumax (Makefile.am): Likewise.
5963         * modules/strverscmp (Makefile.am): Likewise.
5964         * modules/sys_socket (Makefile.am): Likewise.
5965         * modules/sys_stat (Makefile.am): Likewise.
5966         * modules/sysexits (Makefile.am): Likewise.
5967         * modules/time_r (Makefile.am): Likewise.
5968         * modules/timegm (Makefile.am): Likewise.
5969         * modules/timespec (Makefile.am): Likewise.
5970         * modules/tmpfile-safer (Makefile.am): Likewise.
5971         * modules/trim (Makefile.am): Likewise.
5972         * modules/unistd-safer (Makefile.am): Likewise.
5973         * modules/unlinkdir (Makefile.am): Likewise.
5974         * modules/unlocked-io (Makefile.am): Likewise.
5975         * modules/userspec (Makefile.am): Likewise.
5976         * modules/utime (Makefile.am): Likewise.
5977         * modules/utimecmp (Makefile.am): Likewise.
5978         * modules/utimens (Makefile.am): Likewise.
5979         * modules/vasnprintf (Makefile.am): Likewise.
5980         * modules/vasprintf (Makefile.am): Likewise.
5981         * modules/vsnprintf (Makefile.am): Likewise.
5982         * modules/xalloc (Makefile.am): Likewise.
5983         * modules/xgetcwd (Makefile.am): Likewise.
5984         * modules/xnanosleep (Makefile.am): Likewise.
5985         * modules/xreadlink (Makefile.am): Likewise.
5986         * modules/xstrtod (Makefile.am): Likewise.
5987         * modules/xstrtol (Makefile.am): Likewise.
5988         * modules/xstrtold (Makefile.am): Likewise.
5989         * modules/yesno (Makefile.am): Likewise.
5990         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
5991
5992 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
5993
5994         * modules/error (Makefile.am): Distribute files through
5995         EXTRA_DIST, not lib_SOURCES.
5996
5997 2006-10-12  Eric Blake  <ebb9@byu.net>
5998
5999         * modules/error (Makefile.am): Distribute files in /lib.
6000         * modules/obstack (Makefile.am): Likewise.
6001
6002 2006-10-12  Bruno Haible  <bruno@clisp.org>
6003
6004         * modules/acl (Makefile.am): Distribute all files in lib/ through
6005         EXTRA_DIST.
6006         * modules/arcfour (Makefile.am): Likewise.
6007         * modules/arctwo (Makefile.am): Likewise.
6008         * modules/argmatch (Makefile.am): Likewise.
6009         * modules/argz (Makefile.am): Likewise.
6010         * modules/atexit (Makefile.am): Likewise.
6011         * modules/backupfile (Makefile.am): Likewise.
6012         * modules/c-strtod (Makefile.am): Likewise.
6013         * modules/c-strtold (Makefile.am): Likewise.
6014         * modules/calloc (Makefile.am): Likewise.
6015         * modules/canon-host (Makefile.am): Likewise.
6016         * modules/canonicalize (Makefile.am): Likewise.
6017         * modules/chdir-long (Makefile.am): Likewise.
6018         * modules/chdir-safer (Makefile.am): Likewise.
6019         * modules/check-version (Makefile.am): Likewise.
6020         * modules/chown (Makefile.am): Likewise.
6021         * modules/cloexec (Makefile.am): Likewise.
6022         * modules/close-stream (Makefile.am): Likewise.
6023         * modules/closeout (Makefile.am): Likewise.
6024         * modules/crc (Makefile.am): Likewise.
6025         * modules/cycle-check (Makefile.am): Likewise.
6026         * modules/des (Makefile.am): Likewise.
6027         * modules/dirfd (Makefile.am): Likewise.
6028         * modules/dirname (Makefile.am): Likewise.
6029         * modules/dup2 (Makefile.am): Likewise.
6030         * modules/euidaccess (Makefile.am): Likewise.
6031         * modules/exclude (Makefile.am): Likewise.
6032         * modules/exitfail (Makefile.am): Likewise.
6033         * modules/fcntl-safer (Makefile.am): Likewise.
6034         * modules/file-type (Makefile.am): Likewise.
6035         * modules/fileblocks (Makefile.am): Likewise.
6036         * modules/filemode (Makefile.am): Likewise.
6037         * modules/filenamecat (Makefile.am): Likewise.
6038         * modules/fnmatch (Makefile.am): Likewise.
6039         * modules/fopen-safer (Makefile.am): Likewise.
6040         * modules/fpending (Makefile.am): Likewise.
6041         * modules/fprintftime (Makefile.am): Likewise.
6042         * modules/free (Makefile.am): Likewise.
6043         * modules/fsusage (Makefile.am): Likewise.
6044         * modules/ftruncate (Makefile.am): Likewise.
6045         * modules/fts (Makefile.am): Likewise.
6046         * modules/gc (Makefile.am): Likewise.
6047         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
6048         * modules/getaddrinfo (Makefile.am): Likewise.
6049         * modules/getcwd (Makefile.am): Likewise.
6050         * modules/getdelim (Makefile.am): Likewise.
6051         * modules/getdomainname (Makefile.am): Likewise.
6052         * modules/getgroups (Makefile.am): Likewise.
6053         * modules/gethostname (Makefile.am): Likewise.
6054         * modules/gethrxtime (Makefile.am): Likewise.
6055         * modules/getline (Makefile.am): Likewise.
6056         * modules/getloadavg (Makefile.am): Likewise.
6057         * modules/getlogin_r (Makefile.am): Likewise.
6058         * modules/getopt (Makefile.am): Likewise.
6059         * modules/getpass (Makefile.am): Likewise.
6060         * modules/getpass-gnu (Makefile.am): Likewise.
6061         * modules/getsubopt (Makefile.am): Likewise.
6062         * modules/gettime (Makefile.am): Likewise.
6063         * modules/gettimeofday (Makefile.am): Likewise.
6064         * modules/getugroups (Makefile.am): Likewise.
6065         * modules/getusershell (Makefile.am): Likewise.
6066         * modules/glob (Makefile.am): Likewise.
6067         * modules/group-member (Makefile.am): Likewise.
6068         * modules/hard-locale (Makefile.am): Likewise.
6069         * modules/hash (Makefile.am): Likewise.
6070         * modules/hmac-md5 (Makefile.am): Likewise.
6071         * modules/hmac-sha1 (Makefile.am): Likewise.
6072         * modules/human (Makefile.am): Likewise.
6073         * modules/idcache (Makefile.am): Likewise.
6074         * modules/imaxabs (Makefile.am): Likewise.
6075         * modules/imaxdiv (Makefile.am): Likewise.
6076         * modules/inet_ntop (Makefile.am): Likewise.
6077         * modules/inet_pton (Makefile.am): Likewise.
6078         * modules/inttostr (Makefile.am): Likewise.
6079         * modules/isapipe (Makefile.am): Likewise.
6080         * modules/lchown (Makefile.am): Likewise.
6081         * modules/long-options (Makefile.am): Likewise.
6082         * modules/lstat (Makefile.am): Likewise.
6083         * modules/malloc (Makefile.am): Likewise.
6084         * modules/mathl (Makefile.am): Likewise.
6085         * modules/mbchar (Makefile.am): Likewise.
6086         * modules/md2 (Makefile.am): Likewise.
6087         * modules/md4 (Makefile.am): Likewise.
6088         * modules/md5 (Makefile.am): Likewise.
6089         * modules/memcasecmp (Makefile.am): Likewise.
6090         * modules/memchr (Makefile.am): Likewise.
6091         * modules/memcmp (Makefile.am): Likewise.
6092         * modules/memcoll (Makefile.am): Likewise.
6093         * modules/memcpy (Makefile.am): Likewise.
6094         * modules/memmem (Makefile.am): Likewise.
6095         * modules/memmove (Makefile.am): Likewise.
6096         * modules/mempcpy (Makefile.am): Likewise.
6097         * modules/memrchr (Makefile.am): Likewise.
6098         * modules/memset (Makefile.am): Likewise.
6099         * modules/memxor (Makefile.am): Likewise.
6100         * modules/mkancesdirs (Makefile.am): Likewise.
6101         * modules/mkdir (Makefile.am): Likewise.
6102         * modules/mkdir-p (Makefile.am): Likewise.
6103         * modules/mkdtemp (Makefile.am): Likewise.
6104         * modules/mkstemp (Makefile.am): Likewise.
6105         * modules/mktime (Makefile.am): Likewise.
6106         * modules/modechange (Makefile.am): Likewise.
6107         * modules/mountlist (Makefile.am): Likewise.
6108         * modules/nanosleep (Makefile.am): Likewise.
6109         * modules/openat (Makefile.am): Likewise.
6110         * modules/pagealign_alloc (Makefile.am): Likewise.
6111         * modules/physmem (Makefile.am): Likewise.
6112         * modules/poll (Makefile.am): Likewise.
6113         * modules/posixtm (Makefile.am): Likewise.
6114         * modules/posixver (Makefile.am): Likewise.
6115         * modules/putenv (Makefile.am): Likewise.
6116         * modules/quote (Makefile.am): Likewise.
6117         * modules/quotearg (Makefile.am): Likewise.
6118         * modules/raise (Makefile.am): Likewise.
6119         * modules/read-file (Makefile.am): Likewise.
6120         * modules/readline (Makefile.am): Likewise.
6121         * modules/readlink (Makefile.am): Likewise.
6122         * modules/readtokens (Makefile.am): Likewise.
6123         * modules/readutmp (Makefile.am): Likewise.
6124         * modules/realloc (Makefile.am): Likewise.
6125         * modules/regex (Makefile.am): Likewise.
6126         * modules/rename (Makefile.am): Likewise.
6127         * modules/rename-dest-slash (Makefile.am): Likewise.
6128         * modules/rijndael (Makefile.am): Likewise.
6129         * modules/rmdir (Makefile.am): Likewise.
6130         * modules/rpmatch (Makefile.am): Likewise.
6131         * modules/safe-read (Makefile.am): Likewise.
6132         * modules/safe-write (Makefile.am): Likewise.
6133         * modules/same (Makefile.am): Likewise.
6134         * modules/save-cwd (Makefile.am): Likewise.
6135         * modules/savedir (Makefile.am): Likewise.
6136         * modules/setenv (Makefile.am): Likewise.
6137         * modules/settime (Makefile.am): Likewise.
6138         * modules/sha1 (Makefile.am): Likewise.
6139         * modules/sig2str (Makefile.am): Likewise.
6140         * modules/snprintf (Makefile.am): Likewise.
6141         * modules/stdlib-safer (Makefile.am): Likewise.
6142         * modules/stpcpy (Makefile.am): Likewise.
6143         * modules/stpncpy (Makefile.am): Likewise.
6144         * modules/strcase (Makefile.am): Likewise.
6145         * modules/strcasestr (Makefile.am): Likewise.
6146         * modules/strchrnul (Makefile.am): Likewise.
6147         * modules/strcspn (Makefile.am): Likewise.
6148         * modules/strdup (Makefile.am): Likewise.
6149         * modules/strerror (Makefile.am): Likewise.
6150         * modules/strftime (Makefile.am): Likewise.
6151         * modules/strndup (Makefile.am): Likewise.
6152         * modules/strnlen (Makefile.am): Likewise.
6153         * modules/strpbrk (Makefile.am): Likewise.
6154         * modules/strsep (Makefile.am): Likewise.
6155         * modules/strstr (Makefile.am): Likewise.
6156         * modules/strtod (Makefile.am): Likewise.
6157         * modules/strtoimax (Makefile.am): Likewise.
6158         * modules/strtok_r (Makefile.am): Likewise.
6159         * modules/strtol (Makefile.am): Likewise.
6160         * modules/strtoll (Makefile.am): Likewise.
6161         * modules/strtoul (Makefile.am): Likewise.
6162         * modules/strtoull (Makefile.am): Likewise.
6163         * modules/strtoumax (Makefile.am): Likewise.
6164         * modules/strverscmp (Makefile.am): Likewise.
6165         * modules/time_r (Makefile.am): Likewise.
6166         * modules/timegm (Makefile.am): Likewise.
6167         * modules/tmpfile-safer (Makefile.am): Likewise.
6168         * modules/unistd-safer (Makefile.am): Likewise.
6169         * modules/unlinkdir (Makefile.am): Likewise.
6170         * modules/userspec (Makefile.am): Likewise.
6171         * modules/utime (Makefile.am): Likewise.
6172         * modules/utimecmp (Makefile.am): Likewise.
6173         * modules/utimens (Makefile.am): Likewise.
6174         * modules/vasnprintf (Makefile.am): Likewise.
6175         * modules/vasprintf (Makefile.am): Likewise.
6176         * modules/vsnprintf (Makefile.am): Likewise.
6177         * modules/xalloc (Makefile.am): Likewise.
6178         * modules/xgetcwd (Makefile.am): Likewise.
6179         * modules/xnanosleep (Makefile.am): Likewise.
6180         * modules/xreadlink (Makefile.am): Likewise.
6181         * modules/xstrtod (Makefile.am): Likewise.
6182         * modules/xstrtol (Makefile.am): Likewise.
6183         * modules/xstrtold (Makefile.am): Likewise.
6184         * modules/yesno (Makefile.am): Likewise.
6185
6186 2006-10-12  Jim Meyering  <jim@meyering.net>
6187
6188         * m4/getloadavg.m4: Revert the change below.
6189
6190         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
6191         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
6192         fail with a symlink, which is what coreutils' ./bootstrap now
6193         creates by default.
6194
6195 2006-10-12  Bruno Haible  <bruno@clisp.org>
6196
6197         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
6198         mingw.
6199         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
6200         MSVC and mingw explicitly.
6201
6202 2006-10-11  Simon Josefsson  <jas@extundo.com>
6203             Bruno Haible  <bruno@clisp.org>
6204
6205         Add support for multiple gnulib-tool invocations in the scope of a
6206         single configure.ac file.
6207         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
6208         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
6209         with the same contents as the _LIBADD variable.
6210         (func_emit_initmacro_start, func_emit_initmacro_end,
6211         func_emit_initmacro_done): New functions.
6212         (func_import, func_create_testdir): Invoke them. Allow the identifiers
6213         gl_LIBOBJS and gl_LTLIBOBJS.
6214
6215 2006-10-11  Bruno Haible  <bruno@clisp.org>
6216
6217         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
6218         (func_create_testdir): Don't create po/Makefile.am, don't invoke
6219         autoreconf. Instead, invoke autopoint explicitly but move back the
6220         *.m4 files from gnulib.
6221
6222 2006-10-11  Bruno Haible  <bruno@clisp.org>
6223
6224         * gnulib-tool (func_usage): Make module names after --create-testdir
6225         optional.
6226         (func_create_testdir): If no module was specified, use nearly all
6227         modules.
6228
6229 2006-10-12  Jim Meyering  <jim@meyering.net>
6230
6231         Big performance improvement for fts-based tools that use FTS_NOSTAT.
6232         Avoid spurious inode-mismatch problems on non-POSIX file systems.
6233         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
6234         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
6235         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
6236         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
6237         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
6238         (fts_set_stat_required): New function.
6239         (fts_open): Defer the calls to fts_stat, if possible or requested.
6240         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
6241         into fts_stat itself.
6242         (fts_read): Perform any required (deferred) fts_stat call.
6243         (fts_build): Likewise, for the directory we're about to open and read.
6244         In the readdir loop, carefully decide whether each entry will require
6245         an eventual call to fts_stat, using dirent.d_type info if available.
6246         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
6247         a command line argument into this function.  Update all callers.
6248         Map a return value of FTS_DOT to FTS_D for a command line argument.
6249         * modules/fts (Depends-on): Add d-type.  Alphabetize.
6250         Thanks to Miklos Szeredi for his tenacity and for the initial
6251         bug report about "find" failing on a FUSE-based file system.
6252
6253         * lib/fts.c (fts_open): Use consistent indentation.
6254
6255 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
6256
6257         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
6258         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
6259         reported by Jim Meyering.  All uses of cache variables renamed
6260         to match Autoconf's.
6261         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
6262         the other one.
6263
6264         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
6265         Fix misspelling in diagnostic.
6266
6267 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
6268
6269         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
6270         defined.  Problem reported by Matthew Woehlke.
6271
6272         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
6273         Add support for Tandem NonStop R series.
6274         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
6275         Use new macro.
6276
6277         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
6278         (has_trailing_slash): Omit size arg; all callers changed.
6279         Omit 'inline', since it doesn't help performance and we'd
6280         need to configure it.
6281         Don't count //, ///, etc. as having a trailing slash.
6282         As a side effect, this removes a C99ism reported by Matthew Woehlke.
6283         (rpl_rename_dest_slash): On failure, use rename's errno rather
6284         than (in some cases) an incorrect or junk errno.
6285         Simplify code by removing need to compute length; this does
6286         cause it to make two passes instead of one over the file name,
6287         but it's worth it.
6288
6289         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
6290         change, since Autoconf's version may no longer be appropriate now
6291         that we are using CVS Autoconf's version.  Add support for Tandem.
6292
6293 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
6294             Bruno Haible  <bruno@clisp.org>
6295
6296         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
6297         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
6298         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
6299         gl_AC_TYPE_LONG_LONG.
6300
6301         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
6302         instead of HAVE_LONG_LONG.
6303         * lib/printf-args.c (printf_fetchargs): Likewise.
6304         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
6305         * lib/vasnprintf.c (VASNPRINTF): Likewise.
6306         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
6307         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
6308         gl_AC_TYPE_LONG_LONG.
6309
6310 2006-10-11  Bruno Haible  <bruno@clisp.org>
6311
6312         * m4/longlong.m4: Add comments.
6313         * m4/ulonglong.m4: Likewise.
6314
6315 2006-10-10  Bruno Haible  <bruno@clisp.org>
6316
6317         Make it possible to #define stpcpy, strdup to aliases.
6318         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
6319         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
6320
6321 2006-10-10  Bruno Haible  <bruno@clisp.org>
6322
6323         Make it possible to #define gcd to an alias.
6324         * lib/gcd.c: Include config.h.
6325
6326 2006-10-10  Bruno Haible  <bruno@clisp.org>
6327
6328         Make it possible to #define c_isascii to an alias.
6329         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
6330         defined. Undefine the macros before defining them, to avoid gcc
6331         warnings.
6332         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
6333         define NO_C_CTYPE_MACROS early.
6334
6335 2006-10-10  Bruno Haible  <bruno@clisp.org>
6336
6337         Make it possible to #define set_program_name to an alias.
6338         * lib/progname.c: Don't undefine set_program_name; instead, undefine
6339         ENABLE_RELOCATABLE early.
6340
6341 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
6342
6343         Port to Tandem NSK OSS, which has 64-bit signed int but at most
6344         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
6345         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
6346         More generally, don't assume that 64-bit signed int is available
6347         if unsigned int is, and vice versa.
6348         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
6349         unsigned symbols, not on their signed counterparts.
6350         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
6351         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
6352         (UINT64_C, UINTMAX_C):
6353         Likewise.
6354         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
6355         unsigned counterparts.
6356         (Have_long_long, Unsigned): New macros.
6357         (Int): Renamed from INT.
6358         (strtoimax): Use the new macros.
6359         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
6360         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
6361         * modules/inttypes (inttypes.h): Substitute
6362         HAVE_UNSIGNED_LONG_LONG_INT.
6363         * modules/stdint (stdint.h): Likewise.
6364         (Files): Add m4/ulonglong.m4.
6365
6366 2006-10-10  Bruno Haible  <bruno@clisp.org>
6367
6368         Fix a gcc -Wshadow warning.
6369         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
6370         to 'bucket'.
6371         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
6372         gl_linked_indexof_from_to): Likewise.
6373         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
6374         Likewise.
6375         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
6376         Likewise.
6377         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
6378         Reported by Eric Blake.
6379
6380 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
6381
6382         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
6383         for NetBSD.  Problem reported by Bruno Haible.
6384
6385 2006-10-09  Jim Meyering  <jim@meyering.net>
6386
6387         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
6388         Patch from Bruno Haible.
6389
6390 2006-10-09  Jim Meyering  <jim@meyering.net>
6391
6392         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
6393         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
6394         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
6395
6396 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
6397
6398         Don't include <config.h> twice; this doesn't work in some cases,
6399         e.g., when config.h has "#define intmax_t long long int" and
6400         we include <config.h>, <inttypes.h>, <config.h> in that order.
6401         Problem reported by Matthew Woehlke in:
6402         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
6403         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
6404         * lib/fts-cycle.c: Don't include config.h.
6405         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
6406         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
6407         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
6408         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
6409         inttypes.h.
6410         * lib/xstrtoumax.c: Likewise.
6411         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
6412         __strtol and the like, so that this module is more like its siblings.
6413         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
6414         Remove; no longer needed now that we assume gnulib inttypes.h.
6415
6416 2006-10-08  Bruno Haible  <bruno@clisp.org>
6417
6418         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
6419         option.
6420
6421 2006-10-07  Jim Meyering  <jim@meyering.net>
6422
6423         * modules/inttypes (inttypes.h): Revert what seems to have been
6424         an inadvertent part of today's change: use "|", not "/" in the
6425         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
6426
6427 2006-10-07  Bruno Haible  <bruno@clisp.org>
6428
6429         * modules/sublist: New file.
6430
6431 2006-10-07  Bruno Haible  <bruno@clisp.org>
6432
6433         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
6434         * modules/argz (argz.h): Likewise.
6435         * modules/arpa_inet (arpa/inet.h): Likewise.
6436         * modules/byteswap (byteswap.h): Likewise.
6437         * modules/configmake (configmake.h): Likewise.
6438         * modules/fcntl (fcntl.h): Likewise.
6439         * modules/fnmatch (fnmatch.h): Likewise.
6440         * modules/getopt (getopt.h): Likewise.
6441         * modules/glob (glob.h): Likewise.
6442         * modules/inttypes (inttypes.h): Likewise.
6443         * modules/netinet_in (netinet/in.h): Likewise.
6444         * modules/poll (poll.h): Likewise.
6445         * modules/stdbool (stdbool.h): Likewise.
6446         * modules/stdint (stdint.h): Likewise.
6447         * modules/sys_select (sys/select.h): Likewise.
6448         * modules/sys_socket (sys/socket.h): Likewise.
6449         * modules/sys_stat (sys/stat.h): Likewise.
6450         * modules/sysexits (sysexits.h): Likewise.
6451         * modules/unistd (unistd.h): Likewise.
6452         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6453         Add a "DO NOT EDIT" comment to the generated file.
6454         (func_import): Likewise for gnulib-comp.m4.
6455
6456 2006-10-07  Bruno Haible  <bruno@clisp.org>
6457
6458         * lib/gl_sublist.h: New file.
6459         * lib/gl_sublist.c: New file.
6460
6461 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
6462
6463         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
6464         name (relative to the original working directory) and the file
6465         name component (relative to the temporary working directory).  All
6466         callers changed.
6467         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
6468         * lib/mkdir-p.c (make_dir_parents): Likewise.
6469         * lib/mkdir-p.h (make_dir_parents): Likewise.
6470
6471 2006-10-06  Eric Blake  <ebb9@byu.net>
6472
6473         Define several macros for use by the clean-temp module.
6474         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
6475         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
6476         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
6477
6478         * lib/clean-temp.h (close_stream_temp): New declaration.
6479         * lib/clean-temp.c (includes): Pull in headers according to what
6480         other modules are in use.
6481         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
6482
6483 2006-10-06  Bruno Haible  <bruno@clisp.org>
6484
6485         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
6486         instead of fopen, fwriteerror.
6487
6488 2006-10-06  Bruno Haible  <bruno@clisp.org>
6489
6490         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
6491         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
6492         int.
6493         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
6494         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
6495         Return an error indicator.
6496         Suggested by Eric Blake.
6497
6498 2006-10-06  Bruno Haible  <bruno@clisp.org>
6499
6500         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
6501         Reported by Eric Blake.
6502
6503 2006-10-06  Bruno Haible  <bruno@clisp.org>
6504
6505         * modules/closeout (Description): Mention stderr too.
6506
6507 2006-10-06  Bruno Haible  <bruno@clisp.org>
6508         and Paul Eggert  <eggert@cs.ucla.edu>
6509
6510         * lib/closeout.c (close_stdout): Also close stderr.
6511         * lib/closeout.h: Update comment.
6512
6513 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
6514
6515         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
6516         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
6517         * lib/dirchownmod.c: Include lchown.h.
6518         * lib/lchown.c: Don't include files that lchown.h now includes.
6519         Don't declare chown, since lchown.h now does that.
6520         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
6521         (lchown): Define to rpl_chown if lchown is declared but
6522         does not exist.  Declare using a prototype if lchown is not
6523         declared.  Add a copyright notice.
6524         * lib/mkstemp.h: Include <unistd.h>.
6525         * lib/openat.c: Include lchown.h.
6526
6527         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
6528         we now test for that separately.
6529         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
6530         rather than O_NOFOLLOW, when testing whether it's possible to
6531         avoid a race condition reliably.
6532         * lib/savewd.c (savewd_chdir): Likewise.
6533
6534         Remove macros that are no longer needed now that stdint.h is
6535         reliable.
6536         * lib/fsusage.c (UINTMAX_MAX): Remove.
6537         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
6538         * lib/utimecmp.c (SIZE_MAX): Remove.
6539
6540         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
6541
6542         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
6543         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
6544         O_NOATIME works.
6545
6546 2006-10-05  Bruno Haible  <bruno@clisp.org>
6547
6548         * lib/gl_list.h (gl_sortedlist_search_from_to,
6549         gl_sortedlist_indexof_from_to): New declarations.
6550         (gl_list_implementation): New fields sortedlist_search_from_to,
6551         sortedlist_indexof_from_to.
6552         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
6553         inline functions.
6554         * lib/gl_list.c (gl_sortedlist_search_from_to,
6555         gl_sortedlist_indexof_from_to): New functions.
6556         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
6557         function.
6558         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
6559         (gl_array_sortedlist_search_from_to): New function.
6560         (gl_array_list_implementation): Update.
6561         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
6562         function.
6563         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
6564         (gl_carray_sortedlist_search_from_to): New function.
6565         (gl_carray_list_implementation): Update.
6566         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
6567         gl_linked_sortedlist_indexof_from_to): New functions.
6568         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
6569         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
6570         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
6571         gl_tree_sortedlist_indexof_from_to): New functions.
6572         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
6573         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
6574         Update.
6575         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
6576         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
6577         Update.
6578
6579 2006-10-05  Bruno Haible  <bruno@clisp.org>
6580
6581         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
6582         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
6583         (struct gl_list_implementation): Add fields search_from_to,
6584         indexof_from_to. Remove fields search, indexof.
6585         (gl_list_search): Use the search_from_to method.
6586         (gl_list_search_from, gl_list_search_from_to): New functions.
6587         (gl_list_indexof): Use the indexof_from_to method.
6588         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
6589         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
6590         (gl_list_search_from, gl_list_search_from_to): New functions.
6591         (gl_list_indexof): Use the indexof_from_to method.
6592         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
6593         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
6594         gl_array_indexof. Add start_index, end_index arguments.
6595         (gl_array_search_from_to): Renamed from gl_array_search. Add
6596         start_index, end_index arguments.
6597         (gl_array_remove, gl_array_list_implementation): Update.
6598         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
6599         gl_carray_indexof. Add start_index, end_index arguments.
6600         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
6601         start_index, end_index arguments.
6602         (gl_carray_remove, gl_carray_list_implementation): Update.
6603         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
6604         gl_linked_search. Add start_index, end_index arguments.
6605         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
6606         start_index, end_index arguments.
6607         (gl_linked_remove): Update.
6608         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
6609         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
6610         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
6611         field to 'size_t'.
6612         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
6613         gl_tree_search. Add start_index, end_index arguments.
6614         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
6615         start_index, end_index arguments.
6616         (gl_tree_remove): Update.
6617         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
6618         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
6619         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
6620         function.
6621         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
6622         gl_tree_search. Add start_index, end_index arguments.
6623         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
6624         start_index, end_index arguments.
6625         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
6626         Update.
6627         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
6628
6629 2006-10-05  Bruno Haible  <bruno@clisp.org>
6630
6631         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
6632
6633         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
6634         fwriteerror_temp): New declarations.
6635         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
6636         (descriptors): New variable.
6637         (cleanup): First, close the descriptors.
6638         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
6639         fclose_temp, fwriteerror_temp): New functions.
6640
6641 2006-10-04  Jim Meyering  <jim@meyering.net>
6642
6643         * lib/fts.c (fts_open): Tiny comment change.
6644
6645 2006-10-04  Bruno Haible  <bruno@clisp.org>
6646
6647         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
6648         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
6649         gl_LOCK_BODY.
6650         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
6651         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
6652         gl_LOCK_EARLY_BODY.
6653         (gl_LOCK): Require gl_LOCK_BODY.
6654
6655 2006-10-04  Bruno Haible  <bruno@clisp.org>
6656
6657         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
6658         (gl_oset_search_atleast): New declaration.
6659         (struct gl_oset_implementation): Add field 'search_atleast'.
6660         (gl_oset_search_atleast): New inline function.
6661         * lib/gl_oset.c (gl_oset_search_atleast): New function.
6662         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
6663         (gl_array_oset_implementation): Update.
6664         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
6665         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
6666         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
6667
6668 2006-10-04  Bruno Haible  <bruno@clisp.org>
6669
6670         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
6671
6672 2006-10-03  Bruno Haible  <bruno@clisp.org>
6673
6674         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
6675         from gl_avltreehash_list_implementation.
6676
6677 2006-10-03  Bruno Haible  <bruno@clisp.org>
6678
6679         * lib/gl_oset.c (gl_oset_add): Fix return type.
6680
6681 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
6682
6683         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
6684
6685 2006-10-02  Eric Blake  <ebb9@byu.net>
6686
6687         * modules/strnlen (Depends-on): Add extensions.
6688
6689 2006-10-02  Eric Blake  <ebb9@byu.net>
6690
6691         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
6692         definition in 2.60+.
6693
6694 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
6695
6696         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
6697         checks.
6698
6699 2006-10-02  Bruno Haible  <bruno@clisp.org>
6700
6701         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
6702         to the AUTOMAKE_OPTIONS.
6703         Reported by Jim Meyering.
6704
6705 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
6706
6707         Work around bug in Solaris 10 /proc file system:
6708         /proc/self/fd/NNN/.. isn't the parent directory of
6709         the directory whose file descriptor is NNN.  This needs to
6710         be worked around at run time, not compile time, since a
6711         program might be built on Solaris 8, where things work, and
6712         run on Solaris 10.
6713         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
6714         to use the following interface instead:
6715         (OPENAT_BUFFER_SIZE): New macro.
6716         (openat_proc_name): New function.
6717         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
6718         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
6719         Likewise.
6720         * lib/openat-proc.c: New file.
6721         * modules/openat (Files): Add lib/openat-proc.c.
6722         (Depends-on): Add same-inode, stdbool.
6723         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
6724
6725 2006-09-29  Bruno Haible  <bruno@clisp.org>
6726
6727         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
6728         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
6729         argument. Set stdout_closed before testing for ferror, not after.
6730         (fwriteerror, fwriteerror_no_ebadf): New functions.
6731
6732 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6733
6734         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
6735
6736 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
6737
6738         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
6739         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
6740
6741 2006-09-28  Jim Meyering  <jim@meyering.net>
6742
6743         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
6744         Include <unistd.h>.
6745
6746 2006-09-28  Bruno Haible  <bruno@clisp.org>
6747
6748         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
6749         * modules/linkedhash-list (Depends-on): Likewise.
6750         * modules/rbtreehash-list (Depends-on): Likewise.
6751
6752 2006-09-28  Bruno Haible  <bruno@clisp.org>
6753
6754         * lib/strndup.h: Simplify the redefinition of strndup.
6755         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
6756         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
6757
6758 2006-09-28  Bruno Haible  <bruno@clisp.org>
6759
6760         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
6761         * lib/gl_linkedhash_list.c: Likewise.
6762         * lib/gl_rbtreehash_list.c: Likewise.
6763
6764 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
6765
6766         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
6767         getaddrinfo.
6768
6769         * lib/__fpending.h: Don't include <stdio_ext.h> unless
6770         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
6771         it causes <stdio_ext.h> to cause a compile-time error.
6772         Problem reported by Nelson H. F. Beebe.
6773         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
6774         of HAVE_DECL___PENDING.
6775
6776         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
6777         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
6778         declaration.
6779
6780 2006-09-27  Jim Meyering  <jim@meyering.net>
6781
6782         This file could end up with a definition for a function
6783         named __strndup, rather than rpl_strndup on a system with
6784         incomplete weak_alias support.
6785         * lib/strndup.c (strndup): Rename from __strndup.
6786         Remove #defines that used to map __strndup to strndup.
6787         Don't use K&R prototypes.
6788         Remove LIBC-related code, since this file is not sync'd with glibc.
6789         * lib/strndup.h: Revamp, accordingly.
6790         * m4/strndup.m4: Modernize.
6791
6792 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
6793
6794         * modules/savewd (Depends-on): Add 'raise'.
6795         * lib/savewd.c: Include <signal.h>, for 'raise'.
6796
6797 2006-09-26  Jim Meyering  <jim@meyering.net>
6798
6799         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
6800         when we detect Darwin 8.7.0's acl_get_file bug.
6801         Rearrange to perform the new (below) run-test while $LIBS
6802         contains any acl-related library.  Set USE_ACL at the end.
6803         (gl_ACL_GET_FILE): New function.
6804
6805 2006-09-26  Eric Blake  <ebb9@byu.net>
6806
6807         * lib/verror.c: Include <config.h> unconditionally.
6808
6809 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
6810
6811         * modules/clock-time (Maintainer): Add self.
6812         * modules/getlogin_r (Depends-on): Add extensions.
6813
6814 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6815
6816         * modules/clock-time: New module.
6817         * modules/nanosleep (Depends-on): Add clock-time.
6818         * modules/gethrxtime (Depends-on): Likewise.
6819         * modules/gettime (Depends-on): Likewise.
6820         * modules/settime (Depends-on): Likewise.
6821
6822         * modules/fts-lgpl: Depend on openat.
6823         * modules/mkancesdirs: Depend on savewd.
6824         * modules/mkdir-p: Likewise.
6825
6826 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6827
6828         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
6829
6830         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
6831         `gl_have_arbitrary_file_name_length_limit' to
6832         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
6833         actually works between configure runs.
6834
6835 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6836             Bruno Haible  <bruno@clisp.org>
6837
6838         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
6839
6840 2006-09-25  Jim Meyering  <jim@meyering.net>
6841
6842         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
6843         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
6844
6845 2006-09-25  Eric Blake  <ebb9@byu.net>
6846
6847         * gnulib-tool (func_import, func_create_testdir): Fix typos in
6848         exec's in 2006-09-18 patch when shuffling fds.
6849
6850 2006-09-25  Bruno Haible  <bruno@clisp.org>
6851
6852         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
6853         Reported by Jim Meyering.
6854
6855 2006-09-24  Jim Meyering  <jim@meyering.net>
6856
6857         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
6858         compare a pointer against a literal "0".  That caused failures with
6859         at least HP-UX's hpcc.
6860
6861 2006-09-22  Simon Josefsson  <jas@extundo.com>
6862
6863         * modules/gc-sha1:
6864         * modules/gc-md4:
6865         * modules/gc-hmac-sha1:
6866         * modules/gc-hmac-md5:
6867         * modules/gc-des:
6868         * modules/gc-arcfour: Distribute more files.
6869
6870 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6871
6872         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
6873         (gl_linked_iterator_from_to): Initialize struct completely.
6874         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
6875         (gl_tree_iterator_from_to): Likewise
6876         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
6877         * lib/gl_array_list.c [lint] (gl_array_iterator)
6878         (gl_array_iterator_from_to): Likewise.
6879         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
6880         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
6881         (gl_carray_iterator_from_to): Likewise.
6882
6883         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
6884         * lib/md4.c (md4_process_block): Remove unused variable.
6885         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
6886         parentheses for clarity.
6887
6888 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6889
6890         * modules/bison-i18n (Depends-on): Add gettext.
6891
6892 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6893
6894         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
6895         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
6896         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
6897         also add missing comma that caused broken test.
6898         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
6899         stdlib.h, for `abort'.
6900         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
6901         variables.
6902         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
6903         include unistd.h if present, for `rmdir'.
6904         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
6905         variables.
6906         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
6907         in the process include standard headers for prototypes.
6908         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
6909         gets declared on GNU/Linux.
6910         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
6911         unistd.h, for `rmdir'.
6912         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
6913
6914         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
6915         always true.
6916         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
6917
6918         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
6919
6920 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6921
6922         * gnulib-tool (func_version): Create output all at once.  This
6923         may help avoid triggering unnecessary SIGPIPEs, and at any
6924         rate it doesn't hurt.
6925
6926 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6927             Bruno Haible  <bruno@clisp.org>
6928
6929         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
6930         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
6931         * m4/signed.m4 (bh_C_SIGNED): Likewise.
6932
6933         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
6934         (gl_FUNC_VASPRINTF): Invoke it.
6935
6936 2006-09-22  Bruno Haible  <bruno@clisp.org>
6937
6938         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
6939         getloadavg.c as first argument.
6940
6941 2006-09-22  Bruno Haible  <bruno@clisp.org>
6942
6943         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
6944         at the beginning of the gl_INIT macro.
6945         * modules/getloadavg (configure.ac): Pass $gl_source_base to
6946         gl_GETLOADAVG.
6947
6948 2006-09-22  Bruno Haible  <bruno@clisp.org>
6949
6950         * gnulib-tool (func_create_megatestdir): Don't include the config-h
6951         module.
6952         Suggested by Ralf Wildenhues.
6953
6954 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
6955
6956         Import this patch from libc:
6957
6958         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
6959
6960         * lib/regex_internal.c (re_string_reconstruct): Handle
6961         offset < pstr->valid_raw_len && pstr->offsets_needed case.
6962         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
6963         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
6964         re_string_context_at.
6965
6966         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
6967         now requires it.
6968         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
6969         gl_REGEX now does it for us.
6970         (gl_REGEX): Add test taken from
6971         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
6972
6973         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
6974         Check that large offsets work.  Modernize Autoconf usages.
6975         Prefer "yes" to mean a good thing rather than a bad.
6976         Don't put "#define mkstemp" in config.h, as this might interfere
6977         with standard system headers that "#define mkstemp mkstemp64".
6978
6979         * modules/mkstemp (Depends-on): Add extensions, so that
6980         mkstemp is visible on some platforms.
6981         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
6982         (Include): Change to "mkstemp.h" from <stdlib.h>.
6983         (Files): Add mkstemp.h.
6984
6985         * lib/mkstemp.h: New file, since some standard headers
6986         #define mkstemp.
6987         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
6988         Include "mkstemp.h".
6989         Make the _LIBC code resemble glibc original more,
6990         e.g., use K&R style.
6991         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
6992         (mkstemp): Remove, since mkstemp.h does this for us.
6993         * lib/stdlib--.h: Include mkstemp.h.
6994
6995         Import this patch from libc:
6996
6997         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
6998
6999         * lib/tempname.c (__gen_tempname): Change attempts_min
7000         into a macro.  Use preprocessor to decide how to initialize
7001         attempts [Coverity CID 67].
7002
7003 2006-09-20  Bruno Haible  <bruno@clisp.org>
7004
7005         * lib/mkdtemp.c: Import from libc.
7006         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
7007                 * sysdeps/posix/tempname.c (__gen_tempname): Change
7008                 attempts_min into a macro.  Use preprocessor to decide how to
7009                 initialize attempts [Coverity CID 67].
7010         2001-11-27  Paul Eggert  <eggert@twinsun.com>
7011                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
7012                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
7013
7014 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7015
7016         * gnulib-tool (func_exit): New function, to allow to pass the
7017         exit status portably through the trap.  Use everywhere.
7018         (--help, --version): Signal a write error.
7019         (trap): catch SIGPIPE, for write errors.
7020         Exit at the end of the trap, with the correct exit status.
7021
7022 2006-09-19  Karl Berry  <karl@gnu.org>
7023
7024         * doc/gnulib.texi: note about the license texinfo files.
7025
7026 2006-09-19  Eric Blake  <ebb9@byu.net>
7027
7028         * gnulib-tool: Avoid space-tab.
7029
7030 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
7031
7032         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
7033         that prevented coreutils 6.1 from building.  Problem reported
7034         by Petter Reinholdtsen.
7035
7036 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
7037
7038         * gnulib-tool (avoidlist): Fix typo that broke options like
7039         --avoid=lock that are used by coreutils bootstrap.
7040
7041 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
7042
7043         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
7044         more systematically.
7045
7046 2006-09-18  Jim Meyering  <jim@meyering.net>
7047
7048         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
7049
7050 2006-09-18  Bruno Haible  <bruno@clisp.org>
7051
7052         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
7053
7054 2006-09-18  Bruno Haible  <bruno@clisp.org>
7055
7056         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
7057         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
7058         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
7059         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
7060         * m4/gettext.m4: Require autoconf >= 2.52.
7061         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
7062         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
7063         of gl_cv_header_inttypes_h.
7064
7065 2006-09-18  Bruno Haible  <bruno@clisp.org>
7066
7067         * lib/javaversion.c: Include configmake.h.
7068
7069 2006-09-18  Bruno Haible  <bruno@clisp.org>
7070
7071         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
7072         avoid that the while loops be executed in a subshell.
7073
7074 2006-09-18  Bruno Haible  <bruno@clisp.org>
7075
7076         * MODULES.html.sh (func_module): Break long lines.
7077         Suggested by Bruce Korb <bkorb@gnu.org>.
7078
7079 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7080
7081         Speed up by a factor of 1.12.
7082         * gnulib-tool (nl): New variable.
7083         (func_import): Rewrite include directive extraction to only read each
7084         directive once.
7085
7086 2006-09-17  Bruno Haible  <bruno@clisp.org>
7087
7088         * modules/javaversion (Makefile.am): Remove DEFS setting.
7089         (Depends-on): Add configmake, for PKGDATADIR definition.
7090
7091 2006-09-17  Bruno Haible  <bruno@clisp.org>
7092
7093         * gnulib-tool (func_create_testdir): Rewrite all files at once.
7094
7095 2006-09-17  Bruno Haible  <bruno@clisp.org>
7096
7097         * gnulib-tool (func_append): New function, stolen from libtool.m4.
7098         (func_modules_transitive_closure, func_modules_add_dummy,
7099         func_modules_to_filelist, func_import, func_create_testdir,
7100         func_create_megatestdir, ...): Use it wherever possible.
7101         Suggested by Ralf Wildenhues.
7102
7103 2006-09-16  Karl Berry  <karl@gnu.org>
7104
7105         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
7106         to avoid sectioning errors.
7107         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
7108         [ifinfo]: blank line after @center-ed titles.
7109         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
7110         Spell FSF address consistently with others.
7111         (These changes approved by rms.)
7112
7113 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7114
7115         Speed up by a factor of 1.61.
7116         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
7117         already checked module names again.
7118
7119 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7120
7121         Speed up by a factor of 1.13.
7122         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
7123         for new_files, and the input to func_add_or_update.
7124
7125 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7126
7127         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
7128         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
7129
7130 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
7131
7132         * modules/mkancesdirs (Depends-on): Add fcntl.
7133         * modules/savewd: New file.
7134         * MODULES.html.sh (File system functions): Add savewd.
7135
7136         * modules/configmake (Makefile.am): Add support for the
7137         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
7138
7139 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
7140
7141         * m4/savewd.m4: New file.
7142
7143 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
7144
7145         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
7146         (dirchownmod): New arg FD.  All callers changed.
7147         Use FD rather than opening the directory ourself, as opening is
7148         now the caller's responsibility.
7149         * lib/dirchownmod.h: Likewise.
7150         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
7151         hosts that require <sys/types.h> before <sys/stat.h>.  Include
7152         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
7153         (test_dir): Remove.
7154         (mkancesdirs): Return length of prefix of FILE that has already
7155         been made, or -2 if there is a child doing the work.  Redo
7156         algorithm so that it is O(N) rather than O(N**2).  Optimize away
7157         ".", and treat ".." specially since it might stray back into
7158         already-created areas.  Use a subprocess if necessary.  New arg
7159         WD; all users changed.  MAKE_DIR function should now return 1
7160         if it creates a directory that is not readable.  Return -2 if
7161         a child process is spun off.
7162         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
7163         Adjust signature to match code.
7164         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
7165         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
7166         all users changed.
7167         * lib/savewd.c, lib/savewd.h: New files.
7168
7169 2006-09-15  Jim Meyering  <jim@meyering.net>
7170
7171         * modules/rename-dest-slash: New module.
7172         * MODULES.html.sh (posix_compat): Add it here.
7173
7174         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
7175
7176 2006-09-15  Jim Meyering  <jim@meyering.net>
7177
7178         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
7179         file.
7180
7181         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
7182
7183 2006-09-15  Jim Meyering  <jim@meyering.net>
7184
7185         * lib/rename-dest-slash.c (has_trailing_slash): Use
7186         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
7187         (rpl_rename_dest_slash): Perform the cheaper trailing slash
7188         test before testing whether SRC is a directory.
7189         Suggestions from Bruno Haible.
7190
7191         Avoid a warning about an unused variable.
7192         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
7193         into the #ifdef block where it's used.
7194
7195         * lib/rename-dest-slash.c: New file.
7196
7197 2006-09-14  Bruno Haible  <bruno@clisp.org>
7198
7199         * lib/allocsa.c: Include <config.h> unconditionally.
7200         * lib/asnprintf.c: Likewise.
7201         * lib/asprintf.c: Likewise.
7202         * lib/c-strcasecmp.c: Likewise.
7203         * lib/c-strcasestr.c: Likewise.
7204         * lib/c-strncasecmp.c: Likewise.
7205         * lib/c-strstr.c: Likewise.
7206         * lib/classpath.c: Likewise.
7207         * lib/clean-temp.c: Likewise.
7208         * lib/concatpath.c: Likewise.
7209         * lib/copy-file.c: Likewise.
7210         * lib/csharpcomp.c: Likewise.
7211         * lib/csharpexec.c: Likewise.
7212         * lib/execute.c: Likewise.
7213         * lib/fatal-signal.c: Likewise.
7214         * lib/findprog.c: Likewise.
7215         * lib/fwriteerror.c: Likewise.
7216         * lib/gl_array_list.c: Likewise.
7217         * lib/gl_array_oset.c: Likewise.
7218         * lib/gl_avltree_list.c: Likewise.
7219         * lib/gl_avltree_oset.c: Likewise.
7220         * lib/gl_avltreehash_list.c: Likewise.
7221         * lib/gl_carray_list.c: Likewise.
7222         * lib/gl_linked_list.c: Likewise.
7223         * lib/gl_linkedhash_list.c: Likewise.
7224         * lib/gl_list.c: Likewise.
7225         * lib/gl_oset.c: Likewise.
7226         * lib/gl_rbtree_list.c: Likewise.
7227         * lib/gl_rbtree_oset.c: Likewise.
7228         * lib/gl_rbtreehash_list.c: Likewise.
7229         * lib/imaxabs.c: Likewise.
7230         * lib/imaxdiv.c: Likewise.
7231         * lib/javacomp.c: Likewise.
7232         * lib/javaexec.c: Likewise.
7233         * lib/javaversion.c: Likewise.
7234         * lib/linebreak.c: Likewise.
7235         * lib/localcharset.c: Likewise.
7236         * lib/lock.c: Likewise.
7237         * lib/mbchar.c: Likewise.
7238         * lib/mbswidth.c: Likewise.
7239         * lib/mkdtemp.c: Likewise.
7240         * lib/pipe.c: Likewise.
7241         * lib/printf-args.c: Likewise.
7242         * lib/printf-parse.c: Likewise.
7243         * lib/progname.c: Likewise.
7244         * lib/progreloc.c: Likewise.
7245         * lib/readlink.c: Likewise.
7246         * lib/sh-quote.c: Likewise.
7247         * lib/stpcpy.c: Likewise.
7248         * lib/stpncpy.c: Likewise.
7249         * lib/strcasecmp.c: Likewise.
7250         * lib/strcasestr.c: Likewise.
7251         * lib/strcspn.c: Likewise.
7252         * lib/striconv.c: Likewise.
7253         * lib/strncasecmp.c: Likewise.
7254         * lib/strnlen1.c: Likewise.
7255         * lib/strstr.c: Likewise.
7256         * lib/strtok_r.c: Likewise.
7257         * lib/tls.c: Likewise.
7258         * lib/tmpdir.c: Likewise.
7259         * lib/unicodeio.c: Likewise.
7260         * lib/unsetenv.c: Likewise.
7261         * lib/vasnprintf.c: Likewise.
7262         * lib/vasprintf.c: Likewise.
7263         * lib/wait-process.c: Likewise.
7264         * lib/xallocsa.c: Likewise.
7265         * lib/xsetenv.c: Likewise.
7266         * lib/xstriconv.c: Likewise.
7267
7268 2006-09-13  Simon Josefsson  <jas@extundo.com>
7269
7270         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
7271         that internally, suggested by Ralf Wildenhues
7272         <Ralf.Wildenhues@gmx.de>.
7273
7274 2006-09-13  Simon Josefsson  <jas@extundo.com>
7275
7276         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
7277         @LIBOBJS@.
7278         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
7279
7280 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
7281
7282         * lib/_fpending.c: Include <config.h> unconditionally, since we no
7283         longer worry about uses that don't define HAVE_CONFIG_H.
7284         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
7285         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
7286         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
7287         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
7288         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
7289         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
7290         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
7291         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
7292         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
7293         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
7294         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
7295         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
7296         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
7297         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
7298         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
7299         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
7300         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
7301         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
7302         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
7303         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
7304         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
7305         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
7306         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
7307         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
7308         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
7309         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
7310         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
7311         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
7312         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
7313         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
7314         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
7315         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
7316         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
7317         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
7318         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
7319         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
7320         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
7321         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
7322         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
7323         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
7324         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
7325         Likewise.
7326
7327 2006-09-13  Eric Blake  <ebb9@byu.net>
7328
7329         * lib/getopt.c: Fix typo in last commit.
7330
7331 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
7332
7333         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
7334         dgettext.
7335
7336 2006-09-12  Jim Meyering  <jim@meyering.net>
7337
7338         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
7339         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
7340         Reported by Nelson H. F. Beebe.
7341
7342 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
7343
7344         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
7345         program_invocation_name and program_invocation_short_name are
7346         initialized.
7347         * lib/argp-namefrob.h: Move declarations of program_invocation_name
7348         and program_invocation_short_name to argp.h, so they are visible
7349         to user programs.
7350         * lib/argp.h: Likewise
7351
7352 2006-09-10  Bruno Haible  <bruno@clisp.org>
7353
7354         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
7355         m4/inttypes_h.m4, m4/uintmax_t.m4.
7356
7357 2006-09-10  Bruno Haible  <bruno@clisp.org>
7358
7359         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
7360         gl_AC_TYPE_UINTMAX_T.
7361
7362 2006-09-10  Bruno Haible  <bruno@clisp.org>
7363
7364         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
7365
7366 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
7367
7368         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
7369         convention.  Text proposed by Bruno Haible.
7370         (struct argp_option): Document the use of N_() wrappers.
7371
7372         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
7373         '\v', and translate the two parts separately, instead of feeding
7374         the whole string to gettext.  This allows to exclude
7375         '\v' from the strings visible to the translator by writing doc
7376         strings as N_("..") "\v" N_("..").
7377
7378 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
7379
7380         * config/srclist.txt: Undo latest change; the bug was fixed.
7381
7382 2006-09-09  Bruno Haible  <bruno@clisp.org>
7383
7384         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
7385         assignments if building a library without libtool.
7386         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
7387         in func_emit_lib_Makefile_am.
7388         (func_import): When building a static library libfoo.a, arrange to
7389         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
7390         (func_create_testdir): Likewise.
7391         * modules/gc (configure.ac, Makefile.am): If building statically,
7392         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
7393         * modules/iconvme (configure.ac, Makefile.am): Likewise.
7394         * modules/striconv (configure.ac, Makefile.am): Likewise.
7395         Based on a suggestion by Ralf Wildenhues.
7396
7397 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
7398
7399         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
7400         Check for unistd.h too, since Autoconf doesn't assume POSIX.
7401         Also:
7402
7403         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
7404         Add year_2050_test to catch glibc bug 2821
7405         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
7406
7407         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
7408         Prefer #ifdef to #if.
7409
7410         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
7411         Return from 'main' instead of calling 'exit'.
7412
7413 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
7414
7415         * lib/mktime.c (guess_time_tm): Fix bug where mktime
7416         returned the maximum time_t value rather than (time_t) -1.
7417         Problem originally reported by William Bardwell
7418         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
7419
7420         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
7421         Moved to here ...
7422         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
7423         ... from here.
7424
7425 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
7426
7427         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
7428         2821 is fixed.
7429
7430 2006-09-08  Jim Meyering  <jim@meyering.net>
7431
7432         Don't make generated files read-only.  That would bother too many
7433         people.  However, do retain the ability to work when targets are
7434         read-only: remove the destination and temporary files before writing
7435         them (when generated via sed or echo), or by using the -f option for
7436         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
7437         * modules/alloca-opt, modules/argz, modules/arpa_inet:
7438         * modules/byteswap, modules/configmake, modules/fcntl:
7439         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
7440         * modules/localcharset, modules/netinet_in, modules/poll:
7441         * modules/stdbool, modules/stdint, modules/sys_select:
7442         * modules/sys_socket, modules/sys_stat, modules/sysexits:
7443
7444 2006-09-08  Jim Meyering  <jim@meyering.net>
7445
7446         Avoid new build failure on FreeBSD 6.0.
7447         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
7448         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
7449         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
7450
7451 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7452
7453         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
7454
7455 2006-09-07  Jim Meyering  <jim@meyering.net>
7456
7457         Fix global typo in last change: use chmod u-w, not chmod u-x.
7458         Spotted by Paul Eggert and Bruce Korb.
7459         * modules/alloca-opt, modules/argz, modules/arpa_inet:
7460         * modules/byteswap, modules/configmake, modules/fcntl:
7461         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
7462         * modules/localcharset, modules/netinet_in, modules/poll:
7463         * modules/stdbool, modules/stdint, modules/sys_select:
7464         * modules/sys_socket, modules/sys_stat, modules/sysexits:
7465
7466 2006-09-06  Jim Meyering  <jim@meyering.net>
7467
7468         Make generated files be read-only.
7469         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
7470         Ensure that each generated file is now read-only.
7471         * modules/argz: Likewise.
7472         * modules/arpa_inet: Likewise.
7473         * modules/byteswap: Likewise.
7474         * modules/configmake: Likewise.
7475         * modules/fcntl: Likewise.
7476         * modules/fnmatch: Likewise.
7477         * modules/getopt: Likewise.
7478         * modules/glob: Likewise.
7479         * modules/inttypes: Likewise.
7480         * modules/netinet_in: Likewise.
7481         * modules/poll: Likewise.
7482         * modules/stdbool: Likewise.
7483         * modules/stdint: Likewise.
7484         * modules/sys_select: Likewise.
7485         * modules/sys_socket: Likewise.
7486         * modules/sys_stat: Likewise.
7487         * modules/sysexits: Likewise.
7488         * modules/localcharset: Same as above, but continue using temporary
7489         file named "t-$@" (why different?) rather than the "$@-t" used
7490         everywhere else.
7491
7492         * modules/sysexits (Makefile.am): Replace literal occurrences
7493         of "sysexit.h" more readable, and more consistent, "$@".
7494
7495 2006-09-06  Bruno Haible  <bruno@clisp.org>
7496
7497         * modules/striconv: New file.
7498         * modules/xstriconv: New file.
7499         * MODULES.html.sh (Internationalization functions): Add striconv,
7500         xstriconv.
7501
7502 2006-09-06  Bruno Haible  <bruno@clisp.org>
7503
7504         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
7505         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
7506         not using libtool correctly.
7507
7508 2006-09-06  Bruno Haible  <bruno@clisp.org>
7509
7510         * lib/striconv.h: New file.
7511         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
7512         iconvstring.c.
7513         * lib/xstriconv.h: New file.
7514         * lib/xstriconv.c: New file.
7515
7516 2006-09-06  Bruno Haible  <bruno@clisp.org>
7517
7518         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
7519         lib_..._LDFLAGS.
7520
7521 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7522
7523         * lib/argz_.h: Sync from Libtool.
7524
7525         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
7526                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7527
7528         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
7529
7530 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
7531
7532         * modules/trim: New file.
7533
7534 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
7535
7536         * lib/trim.h: New file.
7537         * lib/trim.c: New file.
7538
7539 2006-09-05  Bruno Haible  <bruno@clisp.org>
7540
7541         * MODULES.html.sh (String handling): Add trim.
7542
7543 2006-09-04  Karl Berry  <karl@gnu.org>
7544
7545         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
7546         until next release.
7547
7548 2006-09-03  Bruno Haible  <bruno@clisp.org>
7549
7550         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
7551         correctly.
7552
7553 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
7554
7555         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
7556         not gl_GETLOADAVG.  Omit unneeded semicolons.
7557         Problems reported by Ralf Wildenhues in
7558         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
7559         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
7560         at the end, which is the usual gnulib style.
7561
7562         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
7563         of doing all the work ourselves.
7564         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
7565         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
7566
7567 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
7568
7569         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
7570         Problem reported by Ralf Wildenhues in
7571         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
7572
7573         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
7574         HAVE_STRUCT_STATFS_F_FSTYPENAME.
7575
7576 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
7577
7578         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
7579         yesterday's patch by changing test -n to test -z.
7580
7581 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
7582
7583         * modules/getloadavg (Files): Add m4/getloadavg.m4.
7584         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
7585         the former is now obsolescent.
7586
7587         * modules/chdir-long (Depends-on): Add fcntl.
7588
7589 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
7590
7591         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
7592         obsolescent, and programs should use gnulib instead.
7593         * m4/getloadavg.m4: New file, with contents taken from Autoconf
7594         but with prefixes changed.
7595
7596 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
7597
7598         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
7599         or stdbool.h, because they might not exist while configuring.
7600
7601         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
7602         Don't include unistd.h or limits.h; not needed, since chdir-long.h
7603         does that for us.
7604         (O_DIRECTORY): Remove.
7605
7606 2006-08-31  Eric Blake  <ebb9@byu.net>
7607
7608         * gnulib-tool: Don't let emacs change spaces to TAB.
7609
7610 2006-08-31  Bruno Haible  <bruno@clisp.org>
7611
7612         * gnulib-tool: When calling func_import more than once, do it in a
7613         subshell.
7614         Reported by Eric Blake <ebb9@byu.net>.
7615
7616 2006-08-31  Bruno Haible  <bruno@clisp.org>
7617
7618         * gnulib-tool (nl): Remove variable.
7619         (sed_transform_lib_file): Use more robust test for config-h module.
7620         (func_import): Fix typo in 2006-08-25 patch.
7621
7622 2006-08-31  Bruno Haible  <bruno@clisp.org>
7623
7624         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
7625         specified, augment Makefile.am variables instead of assigning them.
7626
7627 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
7628
7629         Work around a bug in both the Linux and SunOS 64-bit kernels:
7630         nanosleep mishandles sleeps for longer than 2**31 seconds.
7631         Problem reported by Frank v Waveren in
7632         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
7633         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
7634         Check for nanosleep bug.
7635         (LIB_NANOSLEEP): Append clock_gettime library if needed.
7636
7637 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
7638
7639         Work around a bug in both the Linux and SunOS 64-bit kernels:
7640         nanosleep mishandles sleeps for longer than 2**31 seconds.
7641         Problem reported by Frank v Waveren in
7642         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
7643         * lib/nanosleep.c (BILLION): New constant.
7644         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
7645         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
7646         implementation.
7647
7648 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
7649
7650         * modules/nanosleep (Depends-on): Add gettime.
7651
7652 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
7653         and Simon Josefsson  <jas@extundo.com>
7654         and Oskar Liljeblad  <oskar@osk.mine.nu>
7655
7656         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
7657         * gnulib-tool (func_import): New license type 'unmodifiable license
7658         text'.
7659         * modules/fdl: Use it.  Longer description.
7660         * module/gpl, module/lgpl: New files.
7661
7662 2006-08-30  Jim Meyering  <jim@meyering.net>
7663
7664         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
7665         shadowing the parameter.
7666
7667 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7668
7669         Sync from Libtool:
7670
7671         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7672
7673         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
7674         sharing with gnulib.  Report by Eric Blake.
7675
7676 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
7677
7678         * modules/isapipe: New file.
7679         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
7680
7681 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
7682
7683         * modules/configmake (Makefile.am): Add a comment, and omit
7684         the CONFIGMAKE_ prefix from generated macro names.  Suggested
7685         by Bruno Haible.
7686
7687 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
7688
7689         * m4/isapipe.m4: New file.
7690
7691 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
7692
7693         * lib/isapipe.c, lib/isapipe.h: New files.
7694
7695 2006-08-29  Jim Meyering  <jim@meyering.net>
7696
7697         * modules/configmake (Makefile.am): Make configmake.h depend on
7698         Makefile.  Otherwise, a stale configmake.h could hang around.
7699
7700 2006-08-29  Eric Blake  <ebb9@byu.net>
7701
7702         * lib/error.c (error_at_line, print_errno_message): Match libc, after
7703         resolution of upstream bug 3044.
7704
7705 2006-08-29  Bruno Haible  <bruno@clisp.org>
7706
7707         * modules/localcharset (Depends-on): Add configmake.
7708         (Makefile.am): Remove setting of LIBDIR through DEFS.
7709
7710 2006-08-29  Bruno Haible  <bruno@clisp.org>
7711
7712         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
7713         defined.
7714
7715 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
7716
7717         * modules/fcntl: New file.
7718         * modules/chdir-safer (Depends-on): Add fcntl.
7719         * modules/fts: Likewise.
7720         * modules/mkdir-p: Likewise.
7721
7722         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
7723         This undoes the most recent change, since we're now addressing the
7724         problem in a different way.
7725
7726         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
7727         into output, since the output might be called Makefile.am even
7728         if $makefile_name is something different.
7729         (func_import): Use $makefile_am rather than
7730         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
7731         empty.
7732
7733         * modules/inttypes (Files): Add m4/inttypes-h.m4.
7734
7735 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
7736
7737         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
7738         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
7739         recent change to stdint.m4, since we're now addressing the problem in a
7740         different way.
7741
7742 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
7743
7744         * m4/fcntl_h.m4: New file.
7745
7746 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
7747
7748         * lib/fcntl_.h: New file.
7749         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
7750         the fcntl module.
7751         * lib/dirchownmod.c: Likewise.
7752         * lib/fts.c: Likewise.
7753
7754         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
7755         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
7756         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
7757         just before including <inttypes.h>, to avoid circular inclusion.
7758
7759 2006-08-28  Jim Meyering  <jim@meyering.net>
7760
7761         * doc/visibility.texi: Actually read and correct the grammar of the
7762         sentence affected by yesterday's change.
7763
7764 2006-08-28  Eric Blake  <ebb9@byu.net>
7765
7766         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
7767         needs wrapper.
7768
7769 2006-08-28  Eric Blake  <ebb9@byu.net>
7770
7771         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
7772
7773 2006-08-28  Eric Blake  <ebb9@byu.net>
7774
7775         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
7776
7777 2006-08-28  Bruno Haible  <bruno@clisp.org>
7778
7779         * modules/c-strstr: New file, from GNU gettext.
7780         * MODULES.html.sh (String handling): Add c-strstr.
7781
7782 2006-08-28  Bruno Haible  <bruno@clisp.org>
7783
7784         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
7785         macros.
7786         Reported by Eric Blake.
7787
7788 2006-08-28  Bruno Haible  <bruno@clisp.org>
7789
7790         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
7791         (VASNPRINTF): Return a string of length > INT_MAX without failing.
7792         * lib/vasprintf.c: Include errno.h, limits.h.
7793         (EOVERFLOW): New fallback definition.
7794         (vasprintf): Test here whether the string length is > INT_MAX.
7795         * lib/vsnprintf.c: Include errno.h, limits.h.
7796         (EOVERFLOW): New fallback definition.
7797         (vsnprintf): Fix bug when generated string was too long for the buffer.
7798         Test here whether the string length is > INT_MAX.
7799
7800 2006-08-28  Bruno Haible  <bruno@clisp.org>
7801
7802         * lib/inttypes_.h (SCNX*): Remove definitions.
7803         Reported by Eric Blake.
7804
7805 2006-08-28  Bruno Haible  <bruno@clisp.org>
7806
7807         * lib/c-strstr.h: New file, from GNU gettext.
7808         * lib/c-strstr.c: New file, from GNU gettext.
7809
7810 2006-08-28  Bruno Haible  <bruno@clisp.org>
7811
7812         * gnulib-tool: Reorder some statements.
7813
7814 2006-08-28  Bruno Haible  <bruno@clisp.org>
7815
7816         * gnulib-tool: New option --makefile-name.
7817         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
7818         $makefile_name.
7819         (func_import): Write $makefile_name to the cache file, and read it from
7820         there unless explicitly specified. Use $makefile_name as file name
7821         instead of Makefile.am. Adjust the recommendations accordingly.
7822
7823 2006-08-28  Bruno Haible  <bruno@clisp.org>
7824
7825         * gnulib-tool (func_verify_module): Check against misapplying patch.
7826
7827 2006-08-28  Bruno Haible  <bruno@clisp.org>
7828
7829         * gnulib-tool (func_relativize, func_relconcat): New functions.
7830         Give an error if --local-dir is given with --update.
7831         Remove trailing slashes from $local_gnulib_dir.
7832         (func_import): Store the relativized $local_gnulib_dir in
7833         gnulib-cache.m4, and read it from there if not specified explicitly.
7834
7835 2006-08-28  Bruno Haible  <bruno@clisp.org>
7836
7837         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
7838         is the current directory. Respect also $local_gnulib_dir.
7839
7840 2006-08-28  Bruno Haible  <bruno@clisp.org>
7841             Simon Josefsson  <jas@extundo.com>
7842
7843         BeOS portability.
7844         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
7845
7846 2006-08-27  Jim Meyering  <jim@meyering.net>
7847
7848         * doc/visibility.texi: Remove duplicate word: "pointer".
7849
7850 2006-08-26  Bruno Haible  <bruno@clisp.org>
7851
7852         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
7853         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
7854         (Makefile.am): Create inttypes.h from inttypes_.h.
7855         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
7856
7857         * modules/imaxabs: New file.
7858
7859         * modules/imaxdiv: New file.
7860
7861 2006-08-26  Bruno Haible  <bruno@clisp.org>
7862
7863         * m4/inttypes.m4: New file.
7864         * m4/_inttypes_h.m4: Remove file.
7865         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
7866         PRI_MACROS_BROKEN.
7867         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
7868
7869         * m4/imaxabs.m4: New file.
7870
7871         * m4/imaxdiv.m4: New file.
7872
7873 2006-08-26  Bruno Haible  <bruno@clisp.org>
7874
7875         * lib/inttypes_.h: New file.
7876         * lib/inttypes.h: Remove file.
7877         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
7878
7879         * lib/imaxabs.c: New file.
7880
7881         * lib/imaxdiv.c: New file.
7882
7883 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
7884
7885         New config-h module, so that "make" output needn't be cluttered
7886         by -DHAVE_CONFIG_H.
7887         * MODULES.html.sh (Support for building libraries and executables):
7888         Add config-h.
7889         * modules/config-h: New file.
7890         * gnulib-tool (nl, sed_transform_lib_file): New vars.
7891         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
7892         the config-h module is used.
7893
7894         New configmake module, so that "make" output needn't be cluttered
7895         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
7896         * MODULES.html.sh (Support for building libraries and executables):
7897         Add configmake.
7898         * modules/configmake: New file.
7899
7900 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
7901
7902         * m4/config-h.m4: New file.
7903
7904 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
7905
7906         * config/srclist.txt: Add elisp-comp.
7907
7908 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
7909
7910         * MODULES.html.sh (Support for building libraries and executables):
7911         Add elisp-comp.
7912         * build-aux/elisp-comp: New file.
7913         * modules/elisp-comp: New file.
7914
7915 2006-08-24  Bruno Haible  <bruno@clisp.org>
7916
7917         * gnulib-tool (func_create_testdir): Use non-default values of
7918         sourcebase and m4base.
7919
7920 2006-08-24  Bruno Haible  <bruno@clisp.org>
7921
7922         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
7923         HTML structure.
7924
7925 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
7926
7927         * modules/openat (Depends-on): Add lchown.
7928
7929 2006-08-23  Bruno Haible  <bruno@clisp.org>
7930
7931         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
7932         of gl_LOCK_EARLY instead of gl_LOCK.
7933
7934 2006-08-23  Bruno Haible  <bruno@clisp.org>
7935
7936         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
7937         on OSF/1 to no.
7938         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
7939
7940 2006-08-23  Bruno Haible  <bruno@clisp.org>
7941
7942         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
7943         as unusable.
7944
7945         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
7946         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
7947         (gl_LOCK): New macro.
7948
7949 2006-08-22  Simon Josefsson  <jas@extundo.com>
7950
7951         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
7952         to md5 module.
7953
7954 2006-08-22  Simon Josefsson  <jas@extundo.com>
7955
7956         * MODULES.html.sh: Add "Support for maintaining and release
7957         projects".
7958
7959         * build-aux/gnupload: New file, from coreutils.
7960
7961 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
7962
7963         Avoid the need for AC_LIBSOURCES in m4 macros.
7964         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
7965         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
7966         * modules/check-version (EXTRA_DIST): Add check-version.h.
7967         * modules/crc (EXTRA_DIST): Add crc.h.
7968         * modules/des (EXTRA_DIST): Add des.h.
7969         * modules/gc (EXTRA_DIST): Add gc.h.
7970         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
7971         * modules/getline (EXTRA_DIST): Add getline.h.
7972         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
7973         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
7974         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
7975         * modules/md2 (EXTRA_DIST): Add md2.h.
7976         * modules/md4 (EXTRA_DIST): Add md4.h.
7977         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
7978         * modules/read-file (EXTRA_DIST): Add read-file.h.
7979         * modules/readline (EXTRA_DIST): Add readline.h.
7980         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
7981         rijndael-api-fst.h.
7982
7983 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
7984
7985         * m4/rijndael.m4 (gl_ARCFOUR):
7986         * m4/arctwo.m4 (gl_ARCTWO):
7987         * m4/check-version.m4 (gl_CHECK_VERSION):
7988         * m4/crc.m4 (gl_CRC):
7989         * m4/des.m4 (gl_DES):
7990         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
7991         * m4/gc.m4 (gl_GC):
7992         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
7993         * m4/getline.m4 (gl_FUNC_GETLINE):
7994         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
7995         * m4/hmac-md5.m4 (gl_HMAC_MD5):
7996         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
7997         * m4/md2.m4 (gl_MD2):
7998         * m4/md4.m4 (gl_MD4):
7999         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
8000         * m4/read-file.m4 (gl_FUNC_READ_FILE):
8001         * m4/readline.m4 (gl_FUNC_READLINE):
8002         * m4/rijndael.m4 (gl_RIJNDAEL):
8003         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
8004         to get the necessary .h files and whatnot.
8005
8006 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
8007
8008         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
8009         gnulib rather than the other way around.
8010         * config/srclistvars.sh (COREUTILS): Remove.
8011
8012 2006-08-22  Jim Meyering  <jim@meyering.net>
8013
8014         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
8015
8016         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
8017
8018 2006-08-22  Eric Blake  <ebb9@byu.net>
8019
8020         * modules/regexprops-generic: New file.
8021         * MODULES.html.sh (Support for building documentation): List it.
8022
8023 2006-08-22  Eric Blake  <ebb9@byu.net>
8024
8025         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
8026         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
8027         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
8028         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
8029
8030 2006-08-22  Bruno Haible  <bruno@clisp.org>
8031
8032         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
8033         and lib_LTLIBRARIES like the other lib_* variables.
8034
8035 2006-08-22  Bruno Haible  <bruno@clisp.org>
8036
8037         * build-aux/x-to-1.in: New file, from GNU gettext.
8038
8039 2006-08-22  Bruno Haible  <bruno@clisp.org>
8040
8041         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
8042         <utmpx.h> exists.
8043
8044 2006-08-22  Bruno Haible  <bruno@clisp.org>
8045
8046         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
8047         <utmpx.h> exists.
8048
8049 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
8050
8051         BeOS portability.
8052         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
8053         exist.
8054         Problem reported by Bruno Haible.
8055
8056 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
8057
8058         Avoid the need for AC_LIBSOURCES in m4 macros.
8059         * modules/acl (EXTRA_DIST): Add acl.h.
8060         * modules/argmatch (Files): Add m4/argmatch.m4.
8061         (configure.ac): Add gl_ARGMATCH.
8062         (EXTRA_DIST): Renamed from lib_SOURCES, for
8063         consistency with the other modules.  Remove argmatch.c.
8064         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
8065         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
8066         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
8067         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
8068         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
8069         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
8070         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
8071         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
8072         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
8073         * modules/closeout (EXTRA_DIST): Add closeout.h.
8074         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
8075         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
8076         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
8077         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
8078         dirname.h; remove basename.c and stripslash.c.
8079         * modules/exclude (EXTRA_DIST): Add exclude.h.
8080         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
8081         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
8082         * modules/file-type (EXTRA_DIST): Add file-type.h.
8083         * modules/filemode (EXTRA_DIST): Add filemode.h.
8084         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
8085         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
8086         * modules/fpending (EXTRA_DIST): Add __fpending.h.
8087         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
8088         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
8089         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
8090         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
8091         * modules/getdate (EXTRA_DIST): Add getdate.c.
8092         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
8093         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
8094         * modules/getpass (EXTRA_DIST): Add getpass.h.
8095         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
8096         * modules/group-member (EXTRA_DIST): Add group-member.h.
8097         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
8098         * modules/hash (EXTRA_DIST): Add hash.h.
8099         * modules/human (EXTRA_DIST): Add human.h.
8100         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
8101         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
8102         * modules/lchown (EXTRA_DIST): Add lchown.h.
8103         * modules/long-options (EXTRA_DIST): Add long-options.h.
8104         * modules/lstat (EXTRA_DIST): Add lstat.h.
8105         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
8106         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
8107         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
8108         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
8109         * modules/memxor (EXTRA_DIST): Add memxor.h.
8110         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
8111         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
8112         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
8113         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
8114         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
8115         * modules/physmem (EXTRA_DIST): Add physmem.h.
8116         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
8117         * modules/posixver (EXTRA_DIST): Add posixver.h.
8118         * modules/quote (EXTRA_DIST): Add quote.h.
8119         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
8120         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
8121         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
8122         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
8123         regex_internal.h regexec.c.
8124         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
8125         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
8126         * modules/same (EXTRA_DIST): Add same.h.
8127         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
8128         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
8129         * modules/savedir (EXTRA_DIST): Add savedir.h.
8130         * modules/sha1 (EXTRA_DIST): Add sha1.h.
8131         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
8132         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
8133         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
8134         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
8135         * modules/strdup (EXTRA_DIST): Add strdup.h.
8136         * modules/strftime (EXTRA_DIST): Add strftime.h.
8137         * modules/strndup (EXTRA_DIST): Add strndup.h.
8138         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
8139         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
8140         * modules/time_r (EXTRA_DIST): Add time_r.h.
8141         * modules/timespec (EXTRA_DIST): Add timespec.h.
8142         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
8143         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
8144         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
8145         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
8146         * modules/userspec (EXTRA_DIST): Add userspec.h.
8147         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
8148         * modules/utimens (EXTRA_DIST): Add utimens.h.
8149         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
8150         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
8151         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
8152         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
8153         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
8154         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
8155         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
8156         * modules/yesno (EXTRA_DIST): Add yesno.h.
8157
8158 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
8159
8160         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
8161
8162         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
8163         * m4/dev-ino.m4, same-inode.m4: Remove.
8164
8165         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
8166         * m4/acl.m4 (AC_FUNC_ACL):
8167         * m4/backupfile.m4 (gl_BACKUPFILE):
8168         * m4/c-strtod.m4 (gl_C99_STRTOLD):
8169         * m4/canon-host.m4 (gl_CANON_HOST):
8170         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
8171         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
8172         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
8173         * m4/cloexec.m4 (gl_CLOEXEC):
8174         * m4/close-stream.m4 (gl_CLOSE_STREAM):
8175         * m4/closeout.m4 (gl_CLOSEOUT):
8176         * m4/dirfd.m4 (gl_FUNC_DIRFD):
8177         * m4/dirname.m4 (gl_DIRNAME):
8178         * m4/exclude.m4 (gl_EXCLUDE):
8179         * m4/exitfail.m4 (gl_EXITFAIL):
8180         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
8181         * m4/file-type.m4 (gl_FILE_TYPE):
8182         * m4/filemode.m4 (gl_FILEMODE):
8183         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
8184         * m4/fpending.m4 (gl_FUNC_FPENDING):
8185         * m4/fprintftime.m4 (gl_FPRINTFTIME):
8186         * m4/fts.m4 (gl_FUNC_FTS):
8187         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
8188         * m4/getdate.m4 (gl_GETDATE):
8189         * m4/gethrxtime.m4 (gl_GETHRXTIME):
8190         * m4/getpagesize.m4 (gl_GETPAGESIZE):
8191         * m4/getpass.m4 (gl_FUNC_GETPASS):
8192         * m4/gettime.m4 (gl_GETTIME):
8193         * m4/getugroups.m4 (gl_GETUGROUPS):
8194         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
8195         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
8196         * m4/hard-locale.m4 (gl_HARD_LOCALE):
8197         * m4/hash.m4 (gl_HASH):
8198         * m4/idcache.m4 (gl_IDCACHE):
8199         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
8200         * m4/lchown.m4 (gl_FUNC_LCHOWN):
8201         * m4/long-options.m4 (gl_LONG_OPTIONS):
8202         * m4/lstat.m4 (gl_FUNC_LSTAT):
8203         * m4/md5.m4 (gl_MD5):
8204         * m4/memcasecmp.m4 (gl_MEMCASECMP):
8205         * m4/memcoll.m4 (gl_MEMCOLL):
8206         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
8207         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
8208         * m4/memxor.m4 (gl_MEMXOR):
8209         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
8210         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
8211         * m4/modechange.m4 (gl_MODECHANGE):
8212         * m4/mountlist.m4 (gl_MOUNTLIST):
8213         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
8214         * m4/openat.m4 (gl_FUNC_OPENAT):
8215         * m4/pathmax.m4 (gl_PATHMAX):
8216         * m4/physmem.m4 (gl_PHYSMEM):
8217         * m4/posixtm.m4 (gl_POSIXTM):
8218         * m4/posixver.m4 (gl_POSIXVER):
8219         * m4/quote.m4 (gl_QUOTE):
8220         * m4/quotearg.m4 (gl_QUOTEARG):
8221         * m4/readtokens.m4 (gl_READTOKENS):
8222         * m4/readutmp.m4 (gl_READUTMP):
8223         * m4/regex.m4 (gl_REGEX):
8224         * m4/safe-read.m4 (gl_SAFE_READ):
8225         * m4/safe-write.m4 (gl_SAFE_WRITE):
8226         * m4/same.m4 (gl_SAME):
8227         * m4/save-cwd.m4 (gl_SAVE_CWD):
8228         * m4/savedir.m4 (gl_SAVEDIR):
8229         * m4/settime.m4 (gl_SETTIME):
8230         * m4/sha1.m4 (gl_SHA1):
8231         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
8232         * m4/stat-macros.m4 (gl_STAT_MACROS):
8233         * m4/stat-time.m4 (gl_STAT_TIME):
8234         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
8235         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
8236         * m4/strdup.m4 (gl_FUNC_STRDUP):
8237         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
8238         * m4/strndup.m4 (gl_FUNC_STRNDUP):
8239         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
8240         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
8241         * m4/time_r.m4 (gl_TIME_R):
8242         * m4/timespec.m4 (gl_TIMESPEC):
8243         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
8244         * m4/unlinkdir.m4 (gl_UNLINKDIR):
8245         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
8246         * m4/userspec.m4 (gl_USERSPEC):
8247         * m4/utimecmp.m4 (gl_UTIMECMP):
8248         * m4/utimens.m4 (gl_UTIMENS):
8249         * m4/xalloc.m4 (gl_XALLOC):
8250         * m4/xgetcwd.m4 (gl_XGETCWD):
8251         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
8252         * m4/xreadlink.m4 (gl_XREADLINK):
8253         * m4/xstrtod.m4 (gl_XSTRTOD):
8254         * m4/yesno.m4 (gl_YESNO):
8255         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
8256         to get the necessary .h files and whatnot.
8257
8258 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
8259             Bruno Haible  <bruno@clisp.org>
8260
8261         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
8262         /bin/sh understanding of '!' conditional negation.
8263
8264 2006-08-21  Jim Meyering  <jim@meyering.net>
8265
8266         * modules/openat (Depends-on): Really alphabetize.
8267
8268         * modules/acl (Depends-on): Add error and quote.
8269
8270         * check-module (find_included_lib_files): Add at-func.c to the
8271         ok-to-include-more-than-once white list.
8272
8273         * modules/openat (Depends-on): Add lstat.  Alphabetize.
8274
8275 2006-08-21  Bruno Haible  <bruno@clisp.org>
8276
8277         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
8278         Emit a pkgdata_DATA variable only if some snippets add contents to it.
8279         Reported by Martin Lambers <marlam@marlam.de>.
8280
8281 2006-08-21  Bruno Haible  <bruno@clisp.org>
8282
8283         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
8284         specify an installation location, don't emit a noinst_LIBRARIES or
8285         noinst_LTLIBRARIES assignment.
8286
8287 2006-08-21  Bruno Haible  <bruno@clisp.org>
8288
8289         BeOS portability.
8290         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
8291         BeOS has mbrtowc() but no <wctype.h>.
8292
8293 2006-08-21  Bruno Haible  <bruno@clisp.org>
8294
8295         BeOS portability.
8296         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
8297         exist.
8298
8299 2006-08-21  Bruno Haible  <bruno@clisp.org>
8300
8301         BeOS portability.
8302         * lib/mbchar.h: Include <wctype.h> only if it exists.
8303
8304 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
8305
8306         Remove files that are no longer needed by their respective modules.
8307         * m4/obstack.m4: Remove.
8308         * m4/strerror_r.m4: Remove.
8309         * m4/uint32_t.m4: Remove.
8310         * m4/uintptr_t.m4: Remove.
8311         * m4/ullong_max.m4: Remove.
8312         * m4/xstrtoimax.m4: Remove.
8313         * m4/xstrtoumax.m4: Remove.
8314
8315         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
8316         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
8317         dependencies now capture this.
8318
8319         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
8320         Do not use AC_LIBSOURCES, since gnulib modules now do this.
8321         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
8322         * m4/human.m4 (gl_HUMAN): Likewise.
8323         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
8324         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
8325
8326         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
8327
8328         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
8329         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
8330         stdint.
8331         * m4/human.m4 (gl_HUMAN): Likewise.
8332         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
8333         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
8334         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
8335         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
8336         * m4/xstrtol (gl_XSTRTOL): Likewise.
8337
8338         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
8339         AC_TYPE_LONG_LONG_INT.
8340         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
8341         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
8342         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
8343         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
8344
8345         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
8346         on stdbool.
8347
8348         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
8349         (gl_PREREQ_XSTRTOUL): Remove.
8350
8351         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
8352
8353         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
8354         mode.
8355
8356 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
8357
8358         Add and change modules to make it easier for coreutils to use
8359         gnulib-tool.
8360         * modules/backupfile (Files): Remove m4/d-ino.m4.
8361         (Depends-on): Add d-ino.
8362         * modules/cycle-check (Depends-on): Add stdint.
8363         (lib_SOURCES): Add cycle-check.h.
8364         * modules/d-ino: New module.
8365         * modules/d-type: New module.
8366         * modules/error (Files): Remove m4/strerror_r.m4.
8367         * modules/filemode (Files): Add m4/st_dm_mode.m4.
8368         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
8369         m4/inttypes_h.m4, m4/uintmax_t.m4.
8370         (Depends-on): Add stdint.
8371         (lib_SOURCES): Add fsusage.h.
8372         * modules/getcwd (Files): Remove d-ino.m4.
8373         (Depends-on): Add d-ino.
8374         * modules/getndelim2 (Depends-on): Add stdint.
8375         * modules/glob (Files): Remove m4/d-type.m4.
8376         (Depends-on): Add d-type.
8377         * modules/host-os: New module.
8378         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
8379         m4/inttypes_h.m4, m4/uintmax_t.m4.
8380         * Depends-on: Add stdint.
8381         (lib_SOURCES): Add human.h.
8382         * modules/inttostr (Files): Remove m4/intmax_t.m4,
8383         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
8384         m4/uintmax_t.m4, m4/ulonglong.m4.
8385         (Depends-on): Add stdint.
8386         (EXTRA_DIST): Add inttostr.h.
8387         * modules/lchmod: New module.
8388         * modules/link-follow: New module.
8389         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
8390         (Depends-on): Add lchmod.
8391         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
8392         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
8393         (Depends-on): Add stdint.
8394         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
8395         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
8396         (Depends-on): Add stdint.
8397         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
8398         * modules/perl: New module.
8399         * modules/regex (Depends-on): Add stdint.
8400         * modules/rmdir-errno: New module.
8401         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
8402         m4/intmax_t.m4.
8403         (Depends-on): Add stdint.
8404         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
8405         m4/uintmax_t.m4.
8406         (Depends-on): Add stdint.
8407         * modules/unlink-busy: New module.
8408         * modules/utimecmp (Depends-on): Add stdint.
8409         * modules/uptime: New module.
8410         * modules/winsz-ioctl: New module.
8411         * modules/winsz-termios: New module.
8412         * modules/xnanosleep (Depends-on): Add nanosleep.
8413         * modules/ullong_max: Remove.
8414         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
8415         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
8416         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
8417         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
8418         (Depends-on): Add inttypes.
8419         (lib_SOURCES): Add xstrtol.h.
8420         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
8421         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
8422         * MODULES.html.sh: Move 'assert' into the assert section.
8423         Move 'dummy' into the linking section.
8424         Remove ullong_max.
8425         Add section for compatibility checks for POSIX:2001 functions,
8426         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
8427         winsz-ioctl, and winsz-termios into it.
8428         Add lchmod.
8429         Add top-level Misc section and put host-os, perl, and uptime
8430         into it.
8431
8432 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
8433
8434         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
8435         now assume the stdint module.  Do not include inttypes.h.
8436         * lib/fsusage.h: Likewise.
8437         * lib/getndelim2.c: Likewise.
8438         * lib/human.h: Likewise.
8439         * lib/inttostr.h: Likewise.
8440         * lib/obstack.c: Likewise.
8441         * lib/regex_internal.h: Likewise.
8442         * lib/tempname.c: Likewise.
8443         * lib/utimecmp.c: Likewise.
8444         * lib/xstrtol.h: Likewise.
8445
8446         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
8447
8448         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
8449         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
8450         * lib/xtime.h: Likewise.
8451
8452 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
8453
8454         * modules/openat (Files): Add lib/fchmodat.c.
8455         Fixes problem reported by Jay Youngman.
8456
8457 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
8458
8459         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
8460         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
8461
8462 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
8463             Bruno Haible  <bruno@clisp.org>
8464
8465         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
8466         and is a script that invokes bison. Tighten the code. Add comments.
8467
8468 2006-08-18  Jim Meyering  <jim@meyering.net>
8469
8470         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
8471         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
8472         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
8473         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
8474
8475 2006-08-18  Bruno Haible  <bruno@clisp.org>
8476
8477         * modules/bison-i18n: New file.
8478         * MODULES.html.sh (Internationalization functions): Add it.
8479
8480 2006-08-18  Bruno Haible  <bruno@clisp.org>
8481
8482         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
8483         sys/statvfs.h. When getmntinfo was found, check its declaration and
8484         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
8485
8486 2006-08-18  Bruno Haible  <bruno@clisp.org>
8487
8488         * m4/bison-i18n.m4: New file, from bison.
8489
8490 2006-08-18  Bruno Haible  <bruno@clisp.org>
8491
8492         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
8493         (ME_DUMMY): Treat "kernfs" as a dummy.
8494         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
8495
8496 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
8497
8498         Update from coreutils.
8499
8500         2006-08-15  Jim Meyering  <jim@meyering.net>
8501
8502         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
8503
8504         2006-01-17  Jim Meyering  <jim@meyering.net>
8505
8506         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
8507
8508         2006-01-11  Jim Meyering  <jim@meyering.net>
8509
8510         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
8511         Check for the lchmod function.
8512
8513 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
8514
8515         Update from coreutils.
8516
8517         * lib/__fpending.h: Add copyright notice.
8518         * lib/fprintftime.h: Likewise.
8519         * lib/savedir.c: Use (C) in copyright notice.
8520         * lib/savedir.h: Likewise.
8521
8522         2006-08-15  Jim Meyering  <jim@meyering.net>
8523
8524         * lib/at-func.c: New file, with the logic of all emulated at-functions.
8525         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
8526         in support of the EXPECTED_ERRNO macro.
8527         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
8528         definitions.  Instead, define the appropriate symbols and include
8529         "at-func.c".
8530         * lib/mkdirat.c (mkdirat): Likewise.
8531         * lib/fchmodat.c (fchmodat): Likewise.
8532         (ENOSYS): Remove definition.
8533         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
8534         it.  Don't include "unistd--.h" -- it wasn't ever used.
8535
8536         2006-01-17  Jim Meyering  <jim@meyering.net>
8537
8538         Rewrite fts.c not to change the current working directory,
8539         by using openat, fstatat, fdopendir, etc..
8540
8541         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
8542         (HAVE_OPENAT_SUPPORT): Define.
8543         [_LIBC] (fchdir): Don't undef or define; no longer used.
8544         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
8545         Now, this `function' always succeeds, and consumes its file descriptor
8546         parameter -- so callers must not close such FDs.  Update callers.
8547         (diropen_fd, opendirat, cwd_advance_fd): New functions.
8548         (diropen): Add parameter, SP.  Adjust all callers.
8549         Implement using diropen_fd, rather than open.
8550         (fts_open): Initialize new member, fts_cwd_fd.
8551         Remove fts_rft-setting code.
8552         (fts_close): Close fts_cwd_fd, if necessary.
8553         (__opendir2): Define in terms of opendir or opendirat,
8554         depending on whether the FST_NOCHDIR flag is set.
8555         (fts_build): Since fts_safe_changedir consumes its FD, and since
8556         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
8557         and close the dup'd file descriptor upon failure.
8558         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
8559         (fts_safe_changedir): Tweak semantics to reflect that this function
8560         now calls cwd_advance_fd and hence consumes its FD argument.
8561         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
8562         [struct FTS] (fts_rft): Remove now-unused member.
8563         [struct FTS] (fts_cycle.state): Improve comment.
8564
8565         * lib/openat.c (openat_needs_fchdir): New function.
8566         * lib/openat.h (openat_needs_fchdir): Declare it.
8567
8568 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
8569
8570         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
8571         Problem and fix reported by Pádraig Brady in
8572         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
8573
8574 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
8575
8576         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
8577
8578 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
8579
8580         * lib/memcoll.c (memcoll): Optimize for the common case where the
8581         arguments are bytewise equal.
8582
8583 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
8584
8585         * doc/regexprops-generic.texi: Add a copyright notice.
8586
8587 2006-08-15  Bruno Haible  <bruno@clisp.org>
8588
8589         * modules/tmpdir (License): Change to LGPL.
8590
8591 2006-08-15  Bruno Haible  <bruno@clisp.org>
8592
8593         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
8594         module.
8595
8596 2006-08-14  Simon Josefsson  <jas@extundo.com>
8597
8598         * config/srclist.txt: Add gnupload.
8599
8600 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
8601
8602         Change copyright notice from LGPL 2 to GPL 2, since that's the
8603         standard form used in the gnulib repository.
8604         * tests/test-lock.c: Likewise.
8605         * tests/test-stdint.c: Likewise.
8606         * tests/test-tls.c: Likewise.
8607
8608         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
8609         prelude-manager.  User shorter URLs for GNU projects, without '?'.
8610         Add copyright notice.
8611
8612         * check-module: Add copyright notice.  Output a copyright
8613         notice if "--version" is specified.
8614         * modules/COPYING: New file.
8615         * tests/test-getaddrinfo.c: Add copyright notice.
8616         * tests/test-verify.c: Likewise.
8617
8618 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
8619
8620         Change copyright notice from LGPL 2 to GPL 2, since that's the
8621         standard form used in the gnulib repository.
8622         * lib/lock.c: LGPL -> GPL.
8623         * lib/lock.h: Likewise.
8624         * lib/strnlen1.c: Likewise.
8625         * lib/strnlen1.h: Likewise.
8626         * lib/tls.c: Likewise.
8627         * lib/tls.h: Likewise.
8628         * lib/tmpdir.c: Likewise.
8629
8630         * lib/TODO: Remove; this belongs only in coreutils.
8631
8632 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
8633
8634         Add copyright notices to long-enough files that lack them, since
8635         otherwise the files aren't clearly free.  Use the same notice that
8636         getdate.texi already uses.
8637         * doc/alloca-opt.texi: Add copyright notice.
8638         * doc/alloca.texi: Likewise.
8639         * doc/ctime.texi: Likewise.
8640         * doc/functions.texi: Likewise.
8641         * doc/gcd.texi: Likewise.
8642         * doc/gnulib-tool.texi: Likewise.
8643         * doc/inet_ntoa.texi: Likewise.
8644         * doc/visibility.texi: Likewise.
8645
8646         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
8647         * doc/quote.texi: Add copyright notice.
8648
8649         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
8650         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
8651         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
8652         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
8653         is now obsolete, and give a pointer to the Sun list.
8654         Add copyright notice.
8655
8656 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
8657
8658         * config/srclistvars.sh: Add copyright notice.
8659
8660 2006-08-14  Eric Blake  <ebb9@byu.net>
8661
8662         Import the following change from libc:
8663
8664         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
8665
8666         Upstream bug 2997.
8667         * lib/misc/error.c: Add space between program name and message if file
8668         name is missing.
8669
8670 2006-08-12  Karl Berry  <karl@gnu.org>
8671
8672         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
8673         remove, these originate in gnulib now.
8674
8675 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8676
8677         * doc/Makefile (standards.info standards.html standards.dvi):
8678         Also depend on make-stds.texi.
8679
8680 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
8681
8682         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
8683         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
8684
8685         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
8686         in wchar_t.  Problem reported by Eric Blake.
8687
8688         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
8689         LEN is smaller than SIZE.  Suggested by Bruno Haible.
8690         Also, help the compiler to keep LEN in a register.
8691
8692 2006-08-11  Eric Blake  <ebb9@byu.net>
8693
8694         * users.txt: Sort.  Add tar.
8695
8696 2006-08-11  Bruno Haible  <bruno@clisp.org>
8697
8698         * users.txt: New file.
8699
8700 2006-08-11  Bruno Haible  <bruno@clisp.org>
8701
8702         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
8703         before <wchar.h>. Needed for OSF/1 and BSD/OS.
8704
8705 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
8706
8707         * modules/snprintf (Depends-on): Remove minmax.
8708         (Maintainer): Add self and Bruno.
8709
8710 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
8711
8712         * lib/.cppi-disable: Add snprintf.h, socket_.h.
8713         * lib/snprintf.c: Include <errno.h> and <limits.h>.
8714         (EOVERFLOW): Define if the system does not.
8715         Do not include "minmax.h"; it wasn't used.
8716         (snprintf): Don't assume size_t promotes to an unsigned type.
8717         Fix bug when generated string was too long for the buffer: the
8718         buffer's contents are supposed to be the initial prefix of the
8719         output.  Don't assume vasnprintf returns EOVERFLOW if the size
8720         exceeds INT_MAX; do the check ourselves.
8721
8722         Import the following changes from libc:
8723
8724         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
8725
8726         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
8727         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
8728         set wc to the byte which couldn't be converted.
8729         (re_string_reconstruct): Don't clear valid_raw_len before calling
8730         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
8731         tip_context using re_string_context_at.
8732
8733         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
8734
8735         * lib/posix/regex.h: g++ still cannot handled [restrict].
8736
8737         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
8738
8739         * lib/posix/regex.h: Remove special handling for VMS.
8740
8741 2006-08-10  Jim Meyering  <jim@meyering.net>
8742
8743         * modules/same-inode: New module.
8744         * modules/dev-ino: New module.
8745         * modules/cycle-check: Depend on these modules, rather than simply
8746         including their .h files.
8747         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
8748         required via m4/cycle-check.m4.
8749         * modules/same: Depend on new same-inode module, rather than
8750         including same-inode.h.
8751         * modules/chdir-safer: New file.
8752
8753         * modules/chown (Depends-on): Add stat-macros.
8754
8755 2006-08-10  Jim Meyering  <jim@meyering.net>
8756
8757         * m4/cycle-check.m4: New file.
8758         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
8759         * m4/dev-ino.m4, m4/same-inode.m4: New files.
8760
8761 2006-08-10  Eric Blake  <ebb9@byu.net>
8762
8763         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
8764         in from original proposal.
8765
8766 2006-08-10  Eric Blake  <ebb9@byu.net>
8767         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8768
8769         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
8770         namespace.
8771
8772 2006-08-10  Bruno Haible  <bruno@clisp.org>
8773
8774         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
8775         as well.
8776
8777 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
8778
8779         Sync from coreutils.
8780
8781         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
8782
8783         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
8784         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
8785
8786 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
8787
8788         * modules/restrict: Remove; no longer needed now that we assume
8789         Autoconf 2.59 or later.
8790         * MODULES.html.sh: Remove 'restrict'.
8791         * modules/argp (Depends-on): Remove 'restrict'.
8792         * modules/base64 (Depends-on): Likewise.
8793         * modules/gc (Depends-on): Likewise.
8794         * modules/getaddrinfo (Depends-on): Likewise.
8795         * modules/glob (Depends-on): Likewise.
8796         * modules/inet_ntop (Depends-on): Likewise.
8797         * modules/inet_pton (Depends-on): Likewise.
8798         * modules/memxor (Depends-on): Likewise.
8799         * modules/regex (Depends-on): Likewise.
8800         * modules/strtok_r (Depends-on): Likewise.
8801         * modules/time_r (Depends-on): Likewise.
8802
8803 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
8804
8805         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
8806         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
8807         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
8808         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
8809         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
8810         * m4/memxor.m4 (gl_MEMXOR): Likewise.
8811         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
8812         gl_C_RESTRICT replaced by AC_C_RESTRICT.
8813
8814         Merge from coreutils.
8815         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
8816         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
8817         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
8818         * m4/time_r.m4 (gl_TIME_R): Likewise.
8819
8820 2006-08-09  Karl Berry  <karl@gnu.org>
8821
8822         * config/srclist.txt: no more gettext-tools, per Bruno.
8823
8824 2006-08-08  Eric Blake  <ebb9@byu.net>
8825
8826         * modules/verror: New module.
8827         * MODULES.html.sh: Document it.
8828
8829 2006-08-08  Eric Blake  <ebb9@byu.net>
8830
8831         * lib/verror.h, lib/verror.c: New files.
8832
8833 2006-08-08  Eric Blake  <ebb9@byu.net>
8834
8835         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
8836         verror_at_line output complies with GNU Coding Standards even when
8837         file is NULL.
8838
8839 2006-08-07  Bruno Haible  <bruno@clisp.org>
8840
8841         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
8842         versions of AIX.
8843         Reported by Ralf Wildenhues.
8844
8845 2006-08-07  Bruno Haible  <bruno@clisp.org>
8846
8847         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
8848         in an AC_DEFUN. Needed so that the autoconf snippets can use
8849         AC_REQUIRE.
8850
8851 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8852
8853         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
8854         Initialize pkgdata_DATA.
8855         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
8856         overriding it.
8857
8858 2006-08-06  Eric Blake  <ebb9@byu.net>
8859
8860         * lib/error.h: Fold in some upstream changes from glibc.
8861         * lib/error.c: Likewise.
8862
8863 2006-08-04  Bruno Haible  <bruno@clisp.org>
8864
8865         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
8866         Make the mostlyclean-local rule depend on mostlyclean-generic.
8867         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
8868
8869 2006-07-31  Bruno Haible  <bruno@clisp.org>
8870
8871         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
8872         <stdlib.h>, <string.h>.
8873
8874 2006-07-30  Bruno Haible  <bruno@clisp.org>
8875
8876         * modules/readlink (License): Change to LGPL.
8877
8878 2006-07-30  Bruno Haible  <bruno@clisp.org>
8879
8880         * modules/javaversion (Makefile.am): Distribute javaversion.java and
8881         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
8882         set PKGDATADIR to point to it.
8883
8884 2006-07-30  Bruno Haible  <bruno@clisp.org>
8885
8886         * modules/csharpexec (configure.ac): Comment out macro invocation.
8887         * modules/javaexec (configure.ac): Likewise.
8888         * modules/javacomp-script (configure.ac): Likewise.
8889
8890         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
8891
8892 2006-07-30  Bruno Haible  <bruno@clisp.org>
8893
8894         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
8895         linked-list.
8896
8897 2006-07-30  Bruno Haible  <bruno@clisp.org>
8898
8899         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
8900
8901 2006-07-30  Bruno Haible  <bruno@clisp.org>
8902
8903         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
8904         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
8905         get removed.
8906
8907 2006-07-29  Bruno Haible  <bruno@clisp.org>
8908
8909         Make it possible for gnulib-tool to work with locally modified or
8910         augmented gnulib repositories.
8911         * gnulib-tool (func_usage): Document --local-dir option.
8912         (local_gnulib_dir): New variable.
8913         Handle --local-dir option.
8914         (func_lookup_file): New function.
8915         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
8916         (func_get_description, func_get_filelist, func_get_description,
8917         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
8918         func_get_automake_snippet, func_get_include_directive,
8919         func_get_license, func_get_maintainer): Use func_lookup_file.
8920         (func_import, func_create_testdir): Use func_lookup_file.
8921
8922 2006-07-29  Bruno Haible  <bruno@clisp.org>
8923
8924         * modules/setenv (Depends-on): Add unistd.
8925
8926 2006-07-29  Bruno Haible  <bruno@clisp.org>
8927
8928         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
8929
8930 2006-07-29  Bruno Haible  <bruno@clisp.org>
8931
8932         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
8933
8934 2006-07-29  Bruno Haible  <bruno@clisp.org>
8935
8936         * gnulib-tool (import, update): If there is no Makefile.am, look at
8937         aclocal.m4, instead of bailing out.
8938
8939 2006-07-29  Bruno Haible  <bruno@clisp.org>
8940
8941         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
8942         Categorize the options by when they are useful.
8943
8944 2006-07-29  Bruno Haible  <bruno@clisp.org>
8945
8946         * gnulib-tool (func_usage): Document option --no-libtool.
8947         Handle option --no-libtool.
8948         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
8949         for changed semantics of $libtool variable.
8950         (func_import): Likewise. If libtool is not used, show this through
8951         an option --no-libtool.
8952         (func_create_testdir): Update.
8953
8954 2006-07-29  Bruno Haible  <bruno@clisp.org>
8955
8956         * gnulib-tool (func_import): Extend error message about missing
8957         --doc-base.
8958
8959 2006-07-29  Bruno Haible  <bruno@clisp.org>
8960
8961         * gnulib-tool (func_import): Don't create the $docbase directory if
8962         there is no file to store there.
8963
8964 2006-07-29  Bruno Haible  <bruno@clisp.org>
8965
8966         * gnulib-tool (autoconf_minversion): If a --dir option is given and
8967         relevant, look for configure.ac there, not in the current directory.
8968         Also use a simple search for AC_PREREQ, not "autoconf --trace".
8969
8970 2006-07-29  Bruno Haible  <bruno@clisp.org>
8971
8972         * gnulib-tool (SORT): New variable.
8973         (func_usage): Undocument --assume-autoconf option.
8974         Remove --assume-autoconf option handling.
8975         (autoconf_minversion): Determine from the contents of configure.ac.
8976         (func_import): Remove autoconf_minversion handling.
8977         Suggested by Eric Blake.
8978
8979 2006-07-29  Bruno Haible  <bruno@clisp.org>
8980
8981         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
8982
8983 2006-07-29  Bruno Haible  <bruno@clisp.org>
8984
8985         * config/srclist.txt (*setenv.[ch]): Remove rules.
8986
8987 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
8988
8989         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
8990
8991 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
8992
8993         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
8994         arpa/inet.h.
8995
8996 2006-07-28  Simon Josefsson  <jas@extundo.com>
8997
8998         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
8999         * modules/inet_pton (Depends-on): Likewise.
9000
9001 2006-07-28  Simon Josefsson  <jas@extundo.com>
9002
9003         * m4/netinet_in_h.m4: New file.
9004
9005 2006-07-28  Simon Josefsson  <jas@extundo.com>
9006
9007         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
9008         #include's.
9009
9010 2006-07-28  Simon Josefsson  <jas@extundo.com>
9011
9012         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
9013         #include's.
9014
9015 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
9016
9017         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
9018         setgid on directories only if they set these bits.
9019         * lib/modechange.h: Remove obsolete comment about masks.
9020
9021 2006-07-28  Eric Blake  <ebb9@byu.net>
9022
9023         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
9024         macro expansion.
9025
9026 2006-07-28  Bruno Haible  <bruno@clisp.org>
9027
9028         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
9029
9030 2006-07-28  Bruno Haible  <bruno@clisp.org>
9031
9032         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
9033
9034 2006-07-28  Bruno Haible  <bruno@clisp.org>
9035
9036         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
9037         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
9038         Define fallbacks.
9039         Avoids link error on FreeBSD 4.x.
9040         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
9041
9042         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
9043         encoding.
9044         * lib/mbswidth.c (iswcntrl): Likewise.
9045
9046 2006-07-27  Bruno Haible  <bruno@clisp.org>
9047
9048         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
9049         test.
9050
9051 2006-07-27  Bruno Haible  <bruno@clisp.org>
9052
9053         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
9054         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
9055         defined.
9056
9057 2006-07-26  Eric Blake  <ebb9@byu.net>
9058
9059         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
9060
9061 2006-07-26  Eric Blake  <ebb9@byu.net>
9062
9063         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
9064         like mingw that lack mkstemp.
9065         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
9066         avoid compilation warning on mingw.
9067
9068 2006-07-26  Bruno Haible  <bruno@clisp.org>
9069
9070         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
9071         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
9072         INT_FAST*_MIN, INTPTR_MIN.
9073
9074 2006-07-25  Bruno Haible  <bruno@clisp.org>
9075
9076         * modules/version-etc (Depends-on): Add stdarg.
9077
9078 2006-07-25  Bruno Haible  <bruno@clisp.org>
9079
9080         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
9081         complex commands.
9082
9083 2006-07-25  Bruno Haible  <bruno@clisp.org>
9084
9085         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
9086         defined in <stdarg.h> or config.h.
9087
9088 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
9089
9090         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
9091         (gl_STDIO_SAFER): Remove.
9092
9093 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
9094
9095         * MODULES.html.sh (File stream based Input/Output):
9096         Add fopen-safer, tmpfile-safer; remove stdio-safer.
9097         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
9098         * modules/fopen-safer, modules/tmpfile-safer: New files.
9099         * modules/stdio-safer: Remove.
9100
9101 2006-07-24  Bruno Haible  <bruno@clisp.org>
9102
9103         * modules/tmpdir: New file.
9104         * MODULES.html.sh (File system functions): Add it.
9105
9106 2006-07-24  Bruno Haible  <bruno@clisp.org>
9107
9108         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
9109         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
9110
9111 2006-07-24  Bruno Haible  <bruno@clisp.org>
9112
9113         * modules/clean-temp: New file.
9114
9115 2006-07-24  Bruno Haible  <bruno@clisp.org>
9116
9117         * m4/tmpdir.m4: New file, from GNU gettext.
9118
9119 2006-07-24  Bruno Haible  <bruno@clisp.org>
9120
9121         * lib/tmpdir.h: New file, from GNU gettext.
9122         * lib/tmpdir.c: New file, from GNU gettext.
9123
9124 2006-07-24  Bruno Haible  <bruno@clisp.org>
9125
9126         * lib/clean-temp.h: New file, from GNU gettext.
9127         * lib/clean-temp.c: New file, from GNU gettext.
9128
9129 2006-07-23  Eric Blake  <ebb9@byu.net>
9130
9131         * modules/stdio-safer (Files): Add tmpfile-safer.c.
9132         (Depends-on): Add binary-io.
9133
9134 2006-07-23  Eric Blake  <ebb9@byu.net>
9135
9136         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
9137
9138 2006-07-23  Eric Blake  <ebb9@byu.net>
9139
9140         * lib/tmpfile-safer.c: New file.
9141         * lib/stdio-safer.h (fopen_safer): Add prototype.
9142         * lib/stdio--.h (tmpfile): Make safer.
9143
9144 2006-07-23  Bruno Haible  <bruno@clisp.org>
9145
9146         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
9147         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
9148         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
9149         gl_linked_remove_at): Use it.
9150
9151 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
9152         and Simon Josefsson <jas@extundo.com>
9153
9154         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
9155
9156         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
9157
9158 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
9159
9160         * modules/close-stream: New file.
9161         * modules/closeout (Description): Make it clear that it exits
9162         with a diagnostic on error.
9163         (Depends-on): Add close-stream.  Remove fpending, stdbool.
9164         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
9165
9166 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
9167
9168         * m4/close-stream.m4: New file.
9169
9170 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
9171
9172         * lib/close-stream.c, lib/close-stream.h: New files.
9173
9174 2006-07-22  Bruno Haible  <bruno@clisp.org>
9175
9176         Merge from GNU gettext 0.15.
9177
9178         2006-05-01  Bruno Haible  <bruno@clisp.org>
9179
9180                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
9181
9182         2006-07-22  Bruno Haible  <bruno@clisp.org>
9183
9184                 * modules/javaversion: New file.
9185                 * MODULES.html.sh (Java): Add javaversion.
9186
9187         2006-03-12  Bruno Haible  <bruno@clisp.org>
9188
9189                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
9190
9191         2005-12-04  Bruno Haible  <bruno@clisp.org>
9192
9193                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
9194                 (untested).
9195
9196         2006-06-21  Bruno Haible  <bruno@clisp.org>
9197
9198                 Avoid warnings from recent versions of mcs.
9199                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
9200                 -o, -L, -r any more. Use options documented since mcs-1.0
9201                 instead. Similarly for -g.
9202
9203         2005-12-04  Bruno Haible  <bruno@clisp.org>
9204
9205                 * build-aux/csharpcomp.sh.in: Suffix for resources is
9206                 .resources, not .resource.
9207
9208         2005-07-09  Bruno Haible  <bruno@clisp.org>
9209
9210                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
9211                 add a .dll suffix.
9212                 Reported by Mark Junker <mjscod@gmx.de>.
9213
9214         2006-07-22  Bruno Haible  <bruno@clisp.org>
9215
9216                 * modules/gettext: Upgrade to gettext-0.15.
9217                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
9218                 m4/visibility.m4.
9219                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
9220
9221 2006-07-22  Bruno Haible  <bruno@clisp.org>
9222
9223         Merge from GNU gettext 0.15.
9224
9225         2006-03-25  Bruno Haible  <bruno@clisp.org>
9226
9227                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
9228
9229         2006-07-21  Bruno Haible  <bruno@clisp.org>
9230
9231                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
9232                 "1.1".
9233
9234         2006-05-09  Bruno Haible  <bruno@clisp.org>
9235
9236                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
9237                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
9238                 for the conftestver execution.
9239
9240         2006-05-01  Bruno Haible  <bruno@clisp.org>
9241
9242                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
9243                 optional target-version argument. Verify that the compiler
9244                 groks source of the specified source-version, or add -source
9245                 option as necessary. Verify that the compiler produces
9246                 bytecode in the specified target-version, or add -target and
9247                 -source options as necessary. Make the result of the test
9248                 available as variable CONF_JAVAC. Also log error output in
9249                 config.log.
9250
9251         2006-03-11  Bruno Haible  <bruno@clisp.org>
9252
9253                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
9254
9255         2006-05-09  Bruno Haible  <bruno@clisp.org>
9256
9257                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
9258                 CLASSPATH_SEPARATOR to a semicolon.
9259
9260         2006-03-12  Bruno Haible  <bruno@clisp.org>
9261
9262                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
9263                 available as variable CONF_JAVA, for subsequent autoconf
9264                 tests. Also log error output in config.log.
9265
9266         2006-07-19  Bruno Haible  <bruno@clisp.org>
9267
9268                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
9269                 that getline works on glibc2 systems. Needed to avoid trouble
9270                 in relocatable.c.
9271                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
9272
9273         2005-12-04  Bruno Haible  <bruno@clisp.org>
9274
9275                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
9276                 launcher (untested).
9277
9278         2005-12-04  Bruno Haible  <bruno@clisp.org>
9279
9280                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
9281
9282         2006-07-22  Bruno Haible  <bruno@clisp.org>
9283
9284                 * gettext.m4: Update from GNU gettext-0.15.
9285                 * nls.m4: Likewise.
9286                 * po.m4: Likewise.
9287                 * inttypes-pri.m4: Likewise.
9288                 * inttypes-h.m4: Renamed from inttypes.m4.
9289                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
9290
9291 2006-07-22  Bruno Haible  <bruno@clisp.org>
9292
9293         Merge from GNU gettext 0.15.
9294
9295         2005-07-05  Bruno Haible  <bruno@clisp.org>
9296
9297                 * printf-args.c (printf_fetchargs): Work around broken
9298                 definition of wint_t on mingw.
9299
9300         2005-02-12  Bruno Haible  <bruno@clisp.org>
9301
9302                 * xallocsa.h: Add extern "C" for C++.
9303
9304         2006-05-17  Bruno Haible  <bruno@clisp.org>
9305
9306                 Cygwin portability.
9307                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
9308
9309         2006-04-30  Bruno Haible  <bruno@clisp.org>
9310
9311                 * progreloc.c: Include <mach-o/dyld.h> if available.
9312                 (find_executable): Use _NSGetExecutablePath when possible.
9313
9314         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
9315
9316                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
9317                 function.
9318
9319         2005-12-29  Bruno Haible  <bruno@clisp.org>
9320
9321                 * progreloc.c (set_program_name_and_installdir): Fix
9322                 compilation error.
9323
9324         2005-12-04  Bruno Haible  <bruno@clisp.org>
9325
9326                 Cygwin portability.
9327                 * progreloc.c: Include <windows.h> also on Cygwin.
9328                 (find_executable): Add support for Cygwin.
9329                 (set_program_name_and_installdir): Handle also platforms with
9330                 nonempty EXEEXT.
9331
9332         2006-07-11  Bruno Haible  <bruno@clisp.org>
9333
9334                 * javacomp.c: Fix a comment.
9335                 Reported by Jim Meyering.
9336
9337         2006-04-30  Bruno Haible  <bruno@clisp.org>
9338
9339                 * javacomp.h (compile_java_class): Add source_version,
9340                 target_version arguments.
9341                 * javacomp.c: Rewritten to choose only a compiler that
9342                 respects the specified source_version and target_version.
9343
9344         2006-06-27  Bruno Haible  <bruno@clisp.org>
9345
9346                 Assume correct S_ISDIR macro.
9347                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
9348
9349         2006-07-22  Bruno Haible  <bruno@clisp.org>
9350
9351                 * javaversion.h: New file, from GNU gettext.
9352                 * javaversion.c: New file, from GNU gettext.
9353                 * javaversion.java: New file, from GNU gettext.
9354                 * javaversion.class: New file, from GNU gettext.
9355
9356         2006-05-17  Bruno Haible  <bruno@clisp.org>
9357
9358                 Cygwin portability.
9359                 * javaexec.c (execute_java_class): Test for jview program
9360                 also on Cygwin.
9361
9362         2006-04-09  Bruno Haible  <bruno@clisp.org>
9363
9364                 * fatal-signal.c: Don't include string.h.
9365                 (at_fatal_signal): Use a copying loop instead of memcpy.
9366
9367         2005-12-04  Bruno Haible  <bruno@clisp.org>
9368
9369                 * csharpexec.c: Add support for 'clix' launcher (untested).
9370                 (execute_csharp_using_sscli): New function.
9371                 (execute_csharp_program): Call it.
9372
9373         2006-06-21  Bruno Haible  <bruno@clisp.org>
9374
9375                 Avoid warnings from recent versions of mcs.
9376                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
9377                 -o, -L, -r any more. Use options documented since mcs-1.0
9378                 instead. Similarly for -g.
9379
9380         2005-07-09  Bruno Haible  <bruno@clisp.org>
9381
9382                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
9383                 add a .dll suffix.
9384                 Reported by Mark Junker <mjscod@gmx.de>.
9385
9386         2006-06-17  Bruno Haible  <bruno@clisp.org>
9387
9388                 * config.charset: Update for NetBSD 3.0.
9389
9390         2006-05-17  Bruno Haible  <bruno@clisp.org>
9391
9392                 Cygwin portability.
9393                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
9394
9395         2006-05-16  Bruno Haible  <bruno@clisp.org>
9396
9397                 * localcharset.c [CYGWIN]: Include <windows.h>.
9398                 (get_charset_aliases): For Cygwin, return the same CPxxx
9399                 aliases list as under WIN32.
9400                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
9401                 the environment variables. Fall back to GetACP().
9402
9403         2006-04-05  Bruno Haible  <bruno@clisp.org>
9404
9405                 * config.charset: Update Juan Manuel Guerrero's address.
9406
9407         2005-02-12  Bruno Haible  <bruno@clisp.org>
9408
9409                 * allocsa.h: Add extern "C" for C++.
9410
9411         2005-02-10  Bruno Haible  <bruno@clisp.org>
9412
9413                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
9414                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
9415
9416         2006-07-22  Bruno Haible  <bruno@clisp.org>
9417
9418                 * gettext.h: Update to GNU gettext-0.15.
9419
9420 2006-07-22  Bruno Haible  <bruno@clisp.org>
9421
9422         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
9423         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
9424         lib-prefix.m4, longdouble.m4, ssize_t.m4.
9425
9426 2006-07-21  Eric Blake  <ebb9@byu.net>
9427
9428         * modules/stdlib-safer: New file.
9429         * MODULES.html.sh (File stream based Input/Output): Add
9430         stdlib-safer.
9431
9432 2006-07-21  Eric Blake  <ebb9@byu.net>
9433
9434         * lib/stdlib-safer.h: New file from coreutils, required by
9435         stdlib--.h.
9436
9437 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
9438
9439         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
9440
9441 2006-07-20  Bruno Haible  <bruno@clisp.org>
9442
9443         * gnulib-tool: Recognize new option --assume-autoconf.
9444         (autoconf_minversion): New variable.
9445         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
9446
9447 2006-07-20  Bruno Haible  <bruno@clisp.org>
9448
9449         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
9450
9451 2006-07-19  Derek R. Price  <derek@ximbiot.com>
9452
9453         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
9454         Reindent and repaginate.
9455
9456 2006-07-19  Derek Price  <derek@ximbiot.com>
9457
9458         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
9459         Correct grammar.
9460
9461 2006-07-17  Bruno Haible  <bruno@clisp.org>
9462
9463         * modules/list: New file.
9464         * modules/array-list: New file.
9465         * modules/carray-list, modules/carray-list-tests: New files.
9466         * modules/linked-list, modules/linked-list-tests: New files.
9467         * modules/avltree-list, modules/avltree-list-tests: New files.
9468         * modules/rbtree-list, modules/rbtree-list-tests: New files.
9469         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
9470         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
9471         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
9472         * modules/oset: New file.
9473         * modules/array-oset: New file.
9474         * modules/avltree-oset, modules/avltree-oset-tests: New files.
9475         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
9476         * tests/test-carray_list.c: New file.
9477         * tests/test-linked_list.c: New file.
9478         * tests/test-avltree_list.c: New file.
9479         * tests/test-rbtree_list.c: New file.
9480         * tests/test-linkedhash_list.c: New file.
9481         * tests/test-avltreehash_list.c: New file.
9482         * tests/test-rbtreehash_list.c: New file.
9483         * tests/test-avltree_oset.c: New file.
9484         * tests/test-rbtree_oset.c: New file.
9485         * MODULES.html.sh (Container data structures): New section.
9486
9487 2006-07-17  Bruno Haible  <bruno@clisp.org>
9488
9489         * m4/gl_list.m4: New file.
9490
9491 2006-07-17  Bruno Haible  <bruno@clisp.org>
9492
9493         * lib/gl_list.h: New file.
9494         * lib/gl_list.c: New file.
9495         * lib/gl_array_list.h: New file.
9496         * lib/gl_array_list.c: New file.
9497         * lib/gl_carray_list.h: New file.
9498         * lib/gl_carray_list.c: New file.
9499         * lib/gl_linked_list.h: New file.
9500         * lib/gl_linked_list.c: New file.
9501         * lib/gl_anylinked_list1.h: New file.
9502         * lib/gl_anylinked_list2.h: New file.
9503         * lib/gl_avltree_list.h: New file.
9504         * lib/gl_avltree_list.c: New file.
9505         * lib/gl_anyavltree_list1.h: New file.
9506         * lib/gl_anyavltree_list2.h: New file.
9507         * lib/gl_rbtree_list.h: New file.
9508         * lib/gl_rbtree_list.c: New file.
9509         * lib/gl_anyrbtree_list1.h: New file.
9510         * lib/gl_anyrbtree_list2.h: New file.
9511         * lib/gl_anytree_list1.h: New file.
9512         * lib/gl_anytree_list2.h: New file.
9513         * lib/gl_linkedhash_list.h: New file.
9514         * lib/gl_linkedhash_list.c: New file.
9515         * lib/gl_anyhash_list1.h: New file.
9516         * lib/gl_anyhash_list2.h: New file.
9517         * lib/gl_avltreehash_list.h: New file.
9518         * lib/gl_avltreehash_list.c: New file.
9519         * lib/gl_rbtreehash_list.h: New file.
9520         * lib/gl_rbtreehash_list.c: New file.
9521         * lib/gl_anytreehash_list1.h: New file.
9522         * lib/gl_anytreehash_list2.h: New file.
9523
9524         * lib/gl_oset.h: New file.
9525         * lib/gl_oset.c: New file.
9526         * lib/gl_array_oset.h: New file.
9527         * lib/gl_array_oset.c: New file.
9528         * lib/gl_avltree_oset.h: New file.
9529         * lib/gl_avltree_oset.c: New file.
9530         * lib/gl_rbtree_oset.h: New file.
9531         * lib/gl_rbtree_oset.c: New file.
9532         * lib/gl_anytree_oset.h: New file.
9533
9534 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
9535
9536         * m4/mkancesdirs.m4: New file.
9537         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
9538         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
9539         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
9540         it.
9541
9542 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
9543
9544         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
9545         * lib/mkancesdirs.h: New files.
9546         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
9547         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
9548         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
9549         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
9550         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
9551         callers changed.  Revamp internals significantly, by not
9552         attempting to create directories that are temporarily more
9553         permissive than the final results.  Do not attempt to use
9554         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
9555         This removes some race conditions, fixes some bugs, and simplifies
9556         things.  Use new dirchownmod function to do owner and mode changes.
9557         * lib/mkdir-p.h: Likewise.
9558         * lib/modechange.c (octal_to_mode): New function.
9559         (struct mode_change): New member mentioned.
9560         (make_node_op_equals): New arg mentioned.  All callers changed.
9561         (mode_compile): Keep track of which mode bits the user has explicitly
9562         mentioned.
9563         (mode_adjust): New arg DIR, so that we implement the X op correctly.
9564         New arg PMODE_BITS, to keep track of which mode bits the user
9565         mentioned; it treats S_ISUID and S_ISGID speciall.
9566         All callers changed.
9567         * lib/modechange.h: Likewise.
9568
9569 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
9570
9571         * MODULES.html.sh: Add mkancestors.
9572         * modules/mkancesdirs: New module.
9573         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
9574         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
9575         The chdir-safer and afs files are now orphans; I'll remove them
9576         unless someone speaks up.
9577         Add lib/dirchownmod.c, lib/dirchownmod.h.
9578         (Depends-on): Remove alloca, chown, save-cwd, dirname.
9579         Add lchown, mkancesdirs.
9580         (Maintainer): Add self.
9581
9582 2006-07-15  Karl Berry  <karl@gnu.org>
9583
9584         * gnulib-tool: help message wording/arrangement.
9585
9586 2006-07-14  Simon Josefsson  <jas@extundo.com>
9587
9588         * doc/gnulib.texi (Libtool and Windows): New section.
9589
9590 2006-07-12  Simon Josefsson  <jas@extundo.com>
9591
9592         * modules/gendocs (License): Fix license, approved by Karl.
9593
9594 2006-07-12  Eric Blake  <ebb9@byu.net>
9595
9596         * MODULES.html.sh: Add gendocs.
9597
9598 2006-07-11  Eric Blake  <ebb9@byu.net>
9599
9600         * modules/fdl: New module, to install doc/fdl.texi.
9601         * MODULES.html.sh: Add new section for documentation modules.
9602         * gnulib-tool: Avoid space-tab.
9603         (--doc-base): New option, to manage files from doc.
9604
9605 2006-07-11  Eric Blake  <ebb9@byu.net>
9606
9607         * m4/absolute-header.m4: Fix comments to match recent change.
9608
9609 2006-07-11  Eric Blake  <ebb9@byu.net>
9610
9611         * gnulib-tool: List --doc-base before --tests-base.
9612
9613 2006-07-11  Derek R. Price  <derek@ximbiot.com>
9614
9615         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
9616
9617 2006-07-11  Bruno Haible  <bruno@clisp.org>
9618
9619         * README: Mention where to put documentation.
9620
9621 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9622
9623         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
9624
9625 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
9626
9627         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
9628         to stdint.m4.
9629
9630 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
9631
9632         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
9633         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
9634         "no/such/file/stdint.h" when there is no such file, so that
9635         the resulting C code can be parsed by dodgy compilers.
9636         Problems reported by Bob Proulx.
9637
9638 2006-07-10  Derek R. Price  <derek@ximbiot.com>
9639
9640         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
9641         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
9642         macros into the GNU _D_EXACT_NAMLEN.
9643         * lib/savedir.c:  Likewise.
9644         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
9645
9646 2006-07-10  Derek R. Price  <derek@ximbiot.com>
9647         and Paul Eggert  <eggert@cs.ucla.edu>
9648
9649         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
9650         * m4/savedir.m4:
9651         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
9652         macros into the GNU _D_EXACT_NAMLEN.
9653
9654 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
9655
9656         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
9657         around the absolute name, to work around a problem with the HP-UX
9658         11.23 native C compiler, reported by Bob Proulx.
9659
9660 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
9661
9662         * doc/maintain.texi, make-stds.texi: Sync from
9663         <http://savannah.gnu.org/projects/gnustandards>.
9664
9665 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
9666
9667         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
9668
9669 2006-07-09  Jim Meyering  <jim@meyering.net>
9670
9671         * m4/glob.m4: Remove a doubled word in a comment.
9672
9673 2006-07-09  Jim Meyering  <jim@meyering.net>
9674
9675         * lib/argp-pv.c: Remove a doubled word in a comment.
9676         * lib/check-version.c (check_version): Likewise.
9677         * lib/javacomp.c (compile_java_class): Likewise.
9678
9679 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
9680
9681         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
9682         for the benefit of people using Autoconf 2.60.  If you want to
9683         support older Autoconf versions you can copy m4/onceonly_2_57.m4
9684         (or m4/onceonly.m4, if pre-2.57) manually.
9685
9686 2006-07-08  Jim Meyering  <jim@meyering.net>
9687
9688         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
9689         comment.
9690         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
9691         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
9692         comment.
9693
9694 2006-07-08  Jim Meyering  <jim@meyering.net>
9695
9696         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
9697
9698 2006-07-07  Simon Josefsson  <jas@extundo.com>
9699
9700         * tests/test-crc.c: Change expected crc value, the test vector
9701         were probably computed using the old broken crc.c?
9702
9703 2006-07-06  Simon Josefsson  <jas@extundo.com>
9704
9705         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
9706         now the canonical place for the M4 file).
9707
9708         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
9709         from the sys_socket dependency now.
9710
9711         * modules/inet_pton (Files): Ditto.
9712
9713         * modules/inet_ntop (Files): Ditto.
9714
9715 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
9716
9717         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
9718         not gl_PREREQ_GETUSERSHELL.
9719
9720 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9721
9722         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
9723         with only one argument, for Autoconf 2.60.
9724         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
9725         expand to nothing, so add a shell command to avoid syntax error.
9726         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
9727
9728 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9729
9730         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
9731
9732 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
9733
9734         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
9735         no longer needed.  Check for isblank decl.
9736         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
9737         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
9738         of existence.
9739
9740 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
9741
9742         * lib/getloadavg.c: Use __VMS, not VMS.
9743         * lib/getopt.c: Likewise.
9744         * lib/getpagesize.h: Likewise.
9745         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
9746         and probably does not work.
9747
9748 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
9749
9750         * lib/.cppi-disable: Add wcwidth.
9751         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
9752         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
9753         (ISGRAPH): Remove.  All uses changed to isgraph.
9754         (FOLD) [!defined _LIBC]: Remove special case.
9755         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
9756         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
9757         HAVE_ISBLANK.
9758         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
9759         case.
9760
9761 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
9762
9763         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
9764         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
9765         brackets.  Other minor changes to suppress some compiler
9766         warnings.
9767
9768 2006-07-06  Derek R. Price  <derek@ximbiot.com>
9769         and Paul Eggert  <eggert@cs.ucla.edu>
9770
9771         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
9772         of invoking obsolescent AC_HEADER_DIRENT macro.
9773         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
9774         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
9775         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
9776         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
9777         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
9778         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
9779         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
9780         * m4/readdir.m4: Remove; no longer needed.
9781
9782 2006-07-06  Derek R. Price  <derek@ximbiot.com>
9783         and Paul Eggert  <eggert@cs.ucla.edu>
9784
9785         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
9786         Don't worry about this obsolete case any more.
9787         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
9788         directories.
9789         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
9790         worry about this obsolete case any more.
9791         * lib/fts.c: Likewise.
9792         * lib/getcwd.c: Likewise.
9793         * lib/glob.h: Likewise.
9794         * lib/savedir.c: Likewise.
9795
9796 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
9797
9798         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
9799         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
9800         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
9801         needed.
9802         All uses removed.
9803         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
9804         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
9805         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
9806         needed.
9807         * m4/getdate.m4 (gl_GETDATE): Likewise.
9808         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
9809         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
9810         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
9811         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
9812         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
9813         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
9814         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
9815         needed.
9816
9817 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
9818
9819         * lib/memcasecmp.c: Include <limits.h>.
9820         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
9821         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
9822         Don't assume isdigit succeeds only on '0' through '9'.
9823
9824 2006-07-05  Eric Blake  <ebb9@byu.net>
9825
9826         * modules/getaddrinfo (Depends-on): Add snprintf.
9827
9828 2006-07-05  Eric Blake  <ebb9@byu.net>
9829
9830         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
9831         to avoid 'header present but could not be compiled' on cygwin.
9832
9833 2006-07-05  Eric Blake  <ebb9@byu.net>
9834
9835         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
9836         missing from netdb.h.
9837         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
9838
9839 2006-07-05  Derek R. Price  <derek@ximbiot.com>
9840
9841         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
9842         no longer needed.
9843         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
9844         * m4/getdate.m4 (gl_GETDATE): Likewise.
9845         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
9846         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
9847         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
9848         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
9849         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
9850
9851 2006-07-05  Derek R. Price  <derek@ximbiot.com>
9852
9853         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
9854         All uses of is_space replaced by isspace.
9855         * lib/exit.h: Don't talk about STDC_HEADERS.
9856         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
9857         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
9858         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
9859         replaced by isprint etc.
9860         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
9861         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
9862         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
9863         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
9864         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
9865         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
9866
9867 2006-07-05  Bruno Haible  <bruno@clisp.org>
9868
9869         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
9870         the function exists, before testing against AIX.
9871         Reported by Martin Lambers <marlam@marlam.de>.
9872
9873 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
9874
9875         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
9876         From Mark D. Baushke.
9877
9878 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
9879
9880         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
9881         to the absolute name, not just one, to bypass Sun C 5.8's
9882         "warning: #include of /usr/include/... may be non-portable".
9883
9884 2006-07-04  Eric Blake  <ebb9@byu.net>
9885
9886         * modules/dirname-tests: New test module.
9887         * tests/test-dirname.c: New file, replacing dirname.c
9888         TEST_DIRNAME section that was recently deleted.
9889
9890 2006-07-04  Bruno Haible  <bruno@clisp.org>
9891
9892         Assume ANSI C header files and <ctype.h> functions.
9893         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
9894         (mbsnwidth): Use isprint, iscntrl instead.
9895
9896 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
9897
9898         Merge from coreutils.
9899         * MODULES.html.sh: Add xstrtold.
9900         * modules/xstrtold: New file.
9901         * modules/cycle-check (Files): Add lib/same-inode.h.
9902         * modules/dirname (Files): Add m4/double-slash-root.m4.
9903         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
9904         * modules/mkdir-p (Files): Add lib/same-inode.h.
9905         * modules/same (Files): Add lib/same-inode.h.
9906
9907 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
9908
9909         * m4/absolute-header.m4: Renamed from full-header-path.m4.
9910         This is to keep the terminology clean; POSIX talks about
9911         "absolute pathnames", not "full pathnames", but the GNU
9912         Coding Standards say to use "path" for something else;
9913         so use "absolute" to keep both sides happy.
9914         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
9915         Set gl_absolute_header, not gl_full_header_path.
9916         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
9917         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
9918         All uses changed.
9919
9920         Merge from coreutils.
9921
9922         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
9923
9924         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
9925         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
9926         want to require the building of c-strtod.o.
9927         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
9928         needs -lm directly.
9929         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
9930
9931         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
9932
9933         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
9934         --as-needed option if available.  Problem reported by Albert Chin in
9935         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
9936         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
9937         cc merely issues a bunch of annoying warnings for --as-needed
9938         (this problem was reported by Bob Proulx).  Also, try linking with
9939         -lm to detect a bug in binutils 2.16 (this problem was reported
9940         by Ralf Wildenhues).
9941
9942         2006-06-18  Jim Meyering  <jim@meyering.net>
9943
9944         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
9945         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
9946         macro.
9947         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
9948         also check for glibc-2.4's abort-inducing bug.
9949
9950         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
9951         Low-probability clean-up should be to use rmdir to get rid of
9952         the just-created directory, not unlink.
9953
9954         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
9955         configure fail, and request a bug report to inform us about it.
9956         Add a comment that, barring reports to the contrary, in 2007 we'll
9957         assume ftruncate is universally available.
9958
9959         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
9960
9961         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
9962
9963         2006-03-12  Jim Meyering  <jim@meyering.net>
9964
9965         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
9966         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
9967         * m4/same.m4 (gl_SAME): Likewise.
9968         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
9969
9970         2006-03-11  Eric Blake  <ebb9@byu.net>
9971
9972         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
9973         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
9974         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
9975         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
9976
9977 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
9978
9979         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
9980         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
9981         reported by Mark D. Baushke, one in
9982         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
9983
9984         Merge from coreutils.
9985
9986         * lib/.cppi-disable: Add stdint_.h.
9987         * lib/.cvsignore: Add stdint.h.
9988
9989         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
9990
9991         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
9992         both double and long double versions.
9993         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
9994         * lib/xstrtold.c: New file.
9995         * lib/xstrtod.h (xstrtold): New decl.
9996
9997         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
9998
9999         * lib/filemode.c (setst): Remove.
10000         (strmode): Rewrite to avoid setst.  This makes the code shorter,
10001         (arguably) clearer, and the generated code is a bit smaller on my
10002         Debian GNU/Linux stable x86 host.
10003
10004         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
10005
10006         * lib/filemode.c: Include "filemode.h" first, to test the interface.
10007         Assume that filemode.h includes sys/types.h and sys/stat.h.
10008         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
10009         (ftypelet): Reorder to put common cases first, for efficiency.
10010         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
10011         to do 'M'.
10012         (strmode): Renamed from mode_string, and now stores 12 bytes instead
10013         of 10, for compatibility with FreeBSD.  All callers changed.
10014         (filemodestring): Now stores 12 bytes instead of 10, and sets file
10015         types that can't be deduced solely from st_mode.  First arg is now a
10016         const pointer.
10017         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
10018         (strmode): Renamed from mode_string.
10019         (filemodestring): New decl.
10020         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
10021         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
10022         needed.
10023         (S_ISPORT, S_ISWHT): New macros, if not already defined.
10024
10025         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
10026
10027         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
10028         fsusage.h now does that.  Include fsusage.h first, to test interface.
10029         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
10030         at most one method (the old code could have generated decls that
10031         didn't conform to C89, not that this was ever exercised).
10032         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
10033
10034         2006-03-19  Jim Meyering  <jim@meyering.net>
10035
10036         Work even in a chroot where d_ino values for entries in "/"
10037         don't match the stat.st_ino values for the same names.
10038         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
10039         number, iterate through all entries again, using lstat instead.
10040         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
10041         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
10042
10043         * lib/getcwd.c (__getcwd): Clarify a comment.
10044         Use memcpy in place of a call to strcpy.
10045
10046         2006-03-12  Jim Meyering  <jim@meyering.net>
10047
10048         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
10049         matches that of the current directory (which we're about to chdir ".."
10050         out of), then save the dev-ino of the parent, instead.
10051
10052         * lib/same-inode.h (SAME_INODE): New file/macro.
10053         * lib/chdir-safer.c (SAME_INODE): Remove definition.
10054         Include "same-inode.h", instead.
10055         * lib/same.c: Likewise.
10056         * lib/cycle-check.h: Include "same-inode.h".
10057         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
10058         * lib/cycle-check.c (SAME_INODE): Remove definition.
10059         * lib/root-dev-ino.h: Include "same-inode.h".
10060
10061         2006-03-11  Eric Blake  <ebb9@byu.net>
10062
10063         * lib/same.c (same_name): s/base_name/last_component/
10064         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
10065         * lib/filenamecat.c (file_name_concat): Likewise.
10066
10067         2006-03-11  Eric Blake  <ebb9@byu.net>,
10068                     Paul Eggert  <eggert@cs.ucla.edu>
10069
10070         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
10071         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
10072         drive prefix.
10073         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
10074         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
10075         (last_component): New method.
10076         * lib/dirname.c (dir_len): Determine when drive letters need a
10077         subsequent slash.  Preserve // when it is special.
10078         (dir_name): Don't append dot when drive letter is absolute.
10079         [TEST_DIRNAME]: Move into a full-blown gnulib test.
10080         * lib/basename.c (base_name): New semantics - malloc the result.
10081         Preserve // when it is special.  Preserve relative files that look
10082         like drive letters.
10083         (base_len): Preserve // when it is special.
10084         (last_component): New method, similar to old base_name semantics.
10085         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
10086         base_name.  Strip redundant slashes from ///.
10087
10088 2006-07-03  Jim Meyering  <jim@meyering.net>
10089
10090         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
10091         macro is used before the first cycle_check call.
10092
10093 2006-07-03  Eric Blake  <ebb9@byu.net>
10094
10095         * modules/dirname (Depends-on): Add xstrndup.
10096
10097 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
10098
10099         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
10100         test cases, so that config.log is a bit easier to follow.
10101
10102 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
10103
10104         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
10105         both are 64 bits, since this seems to be the tradition, and this
10106         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
10107         we ever run into a host that prefers long long to long in this
10108         case, we'll need another configure-time test.  Problem reported by
10109         Jim Meyering.
10110
10111 2006-07-02  Eric Blake  <ebb9@byu.net>
10112
10113         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
10114
10115 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
10116
10117         * modules/inttypes (Depends-on): No longer depends on stdint.
10118         * modules/stdint (Description): Say more about assumptions.
10119         Say that the fast types might differ.  Say macros are used.
10120         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
10121         (Makefile.am): Revise list of substituted symbols to match
10122         new stdint.m4.
10123         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
10124         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
10125         * tests/test-stdint.c (verify_same_types)
10126         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
10127         the code conforms to C99/C89.
10128         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
10129         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
10130
10131 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
10132
10133         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
10134         but fix a bug, by requiring at least 64 bits.
10135         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
10136         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
10137         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
10138         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
10139
10140         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
10141         changes.  Make 2.59 a prerequisite.  Check and substitute for
10142         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
10143         inttypes.h.  Do not use special include files; just use the
10144         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
10145         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
10146         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
10147         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
10148         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
10149         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
10150         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
10151         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
10152         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
10153         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
10154         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
10155         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
10156         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
10157         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
10158         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
10159         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
10160         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
10161         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
10162         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
10163         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
10164         WINT_MAX.  Check for C99 conformance more strictly, by detecting
10165         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
10166         not check for things that C99 does not require, e.g., int8_t.  If
10167         a test isn't needed unless <stdint.h> isn't working, and is
10168         unlikely to be needed for any other reason, then don't do it
10169         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
10170         size_t, since we assume C89 freestanding at least.  Do not check
10171         for sig_atomic_t, wchar_t, or wint_t, since the code now does
10172         the right thing even if the types are not defined.  Instead use:
10173         (gl_STDINT_TYPE_PROPERTIES): New macro.
10174         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
10175         testing whether <sys/types.h> clashes, as Autoconf does this for
10176         us now.  All uses removed.
10177         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
10178         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
10179         (gl_CHECK_TYPE_SAME):
10180         Remove; no longer needed.
10181         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
10182         exists, since we'll return 0 anyway in that case.
10183         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
10184
10185 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
10186
10187         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
10188         possible collision with system files.
10189         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
10190         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
10191         WCHAR_MIN and WCHAR_MAX in this case.
10192         (<stddef.h>): Do not include; no longer needed.
10193         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
10194         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
10195         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
10196         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
10197         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
10198         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
10199         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
10200         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
10201         !defined(__c99))]: Include in this case too, since it's harmless
10202         now.
10203         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
10204         dangerous to do so.
10205         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
10206         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
10207         (_STDINT_MIN, _STDINT_MAX): New macros.
10208         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
10209         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
10210         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
10211         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
10212         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
10213         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
10214         macros, not typedefs; this simplifies things quite a bit.
10215         Use long int for all types narrower than int64_t.
10216         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
10217         Define in terms of long long int or int64_t or long int,
10218         not int64_t or int32_t.  This saves some compile-time testing.
10219         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
10220         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
10221         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
10222         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
10223         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
10224         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
10225         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
10226         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
10227         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
10228         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
10229         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
10230         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
10231         undef any previous version and define our own version, for
10232         simplicity and consistency with the new macros for types.
10233         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
10234         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
10235         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
10236         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
10237         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
10238         @WINT_T_SUFFIX@ to keep things simple here.
10239         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
10240         Simplify by assuming typical 8/16/32/64 host, since we're
10241         already doing that elsewhere anyway.
10242         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
10243         and assume long long int is 64 bits if available.  This
10244         speeds up 'configure'.
10245
10246 2006-07-01  Eric Blake  <ebb9@byu.net>
10247
10248         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
10249         Reported by Andreas Buening.
10250
10251 2006-07-01  Eric Blake  <ebb9@byu.net>
10252
10253         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
10254
10255 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
10256
10257         * lib/getaddrinfo.c: fixed typo
10258
10259 2006-06-29  Jim Meyering  <jim@meyering.net>
10260
10261         * modules/strftime (Maintainer): Add my name, since with the
10262         FPRINTFTIME changes strftime.c has forked from glibc.
10263
10264 2006-06-29  Eric Blake  <ebb9@byu.net>
10265
10266         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
10267
10268 2006-06-29  Eric Blake  <ebb9@byu.net>
10269
10270         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
10271
10272 2006-06-29  Eric Blake  <ebb9@byu.net>
10273
10274         * lib/stat_.h: New file.
10275
10276 2006-06-29  Eric Blake  <ebb9@byu.net>
10277
10278         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
10279         unused static function.
10280
10281 2006-06-29  Eric Blake  <ebb9@byu.net>
10282
10283         * doc/functions.texi (Function Portability): Document missing lstat
10284         on mingw.
10285
10286 2006-06-29  Eric Blake  <ebb9@byu.net>
10287
10288         * MODULES.html.sh: Add sys_stat.
10289         * modules/sys_stat: New module.
10290         * modules/mkstemp (Depends-on): Add sys_stat.
10291
10292 2006-06-29  Derek R. Price  <derek@ximbiot.com>
10293
10294         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
10295
10296 2006-06-29  Derek R. Price  <derek@ximbiot.com>
10297
10298         * m4/c-bs-a.m4: Removed.
10299
10300 2006-06-29  Derek R. Price  <derek@ximbiot.com>
10301
10302         * lib/strftime.c: Assume strftime() exists.
10303
10304 2006-06-29  Derek Price  <derek@ximbiot.com>
10305
10306         * modules/c-bs-a: Removed - \a is C89.
10307         * MODULES.html.sh: Remove c-bs-a.
10308
10309 2006-06-29  Bruno Haible  <bruno@clisp.org>
10310
10311         * modules/wcwidth (License): Change to LGPL.
10312
10313 2006-06-28  Simon Josefsson  <jas@extundo.com>
10314
10315         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
10316         on _WIN32.
10317
10318         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
10319         getnameinfo.
10320
10321 2006-06-28  Simon Josefsson  <jas@extundo.com>
10322
10323         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
10324
10325 2006-06-28  Simon Josefsson  <jas@extundo.com>
10326
10327         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
10328         functions there.  It will succeed on Windows XP, but on Windows
10329         2000 and (presumably) earlier, it will fail, and use the internal
10330         re-implementation.
10331         (use_win32_p): New function.
10332         (getaddrinfo): Use strtoul on servname, to support numeric ports.
10333         Support AI_NUMERICSERV to disable getservbyname.
10334         (getnameinfo): New function, only supports
10335         NI_NUMERICHOST|NI_NUMERICSERV for now.
10336
10337         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
10338         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
10339         getnameinfo.
10340
10341 2006-06-28  Eric Blake  <ebb9@byu.net>
10342
10343         * modules/wcwidth: New file.
10344         * modules/mbchar (Depends-on): Add wcwidth.
10345         * modules/mbswidth (Depends-on): Add wcwidth.
10346         * MODULES.html.sh: Add wcwidth.
10347
10348 2006-06-28  Eric Blake  <ebb9@byu.net>
10349
10350         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
10351         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
10352
10353 2006-06-28  Eric Blake  <ebb9@byu.net>
10354
10355         * lib/xvasprintf.h: Fix comments.
10356
10357 2006-06-28  Eric Blake  <ebb9@byu.net>
10358
10359         * lib/mbchar.h (wcwidth): Include wcwidth.h.
10360         * lib/mbswidth.c (wcwidth): Move from here...
10361         * lib/wcwidth.h: ...to this new file.
10362
10363 2006-06-28  Derek R. Price  <derek@ximbiot.com>
10364
10365         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
10366
10367         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
10368         it's obsolete.
10369         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
10370
10371 2006-06-28  Derek R. Price  <derek@ximbiot.com>
10372
10373         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
10374         Autoconf 2.60 says this stuff was obsolete.
10375
10376 2006-06-28  Bruno Haible  <bruno@clisp.org>
10377
10378         * modules/wcwidth (Files): Add m4/wchar_t.m4.
10379
10380 2006-06-28  Bruno Haible  <bruno@clisp.org>
10381
10382         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
10383         gt_TYPE_WCHAR_T.
10384
10385 2006-06-28  Bruno Haible  <bruno@clisp.org>
10386
10387         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
10388         declaration for wcwidth.
10389         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
10390
10391 2006-06-28  Bruno Haible  <bruno@clisp.org>
10392
10393         * lib/mkdtemp.c [MINGW]: Include <io.h>.
10394         (mkdir): Define using _mkdir.
10395
10396 2006-06-28  Bruno Haible  <bruno@clisp.org>
10397
10398         * lib/getaddrinfo.h: Fix POSIX URL.
10399         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
10400         _WIN32.
10401         (use_win32_p): Make static.
10402         (getaddrinfo): Reject service name if it is empty or does not consist
10403         solely of decimal digits, or if its value is > 65535.
10404         (getnameinfo): Remove useless casts.
10405
10406 2006-06-27  Simon Josefsson  <jas@extundo.com>
10407
10408         * modules/sys_select: New file, suggested by Bruno Haible, Paul
10409         Eggert and Martin Lambers.
10410
10411 2006-06-27  Simon Josefsson  <jas@extundo.com>
10412
10413         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
10414         Eggert and Martin Lambers.
10415
10416 2006-06-27  Bruno Haible  <bruno@clisp.org>
10417
10418         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
10419         result to 0, not to empty.
10420         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
10421
10422 2006-06-27  Bruno Haible  <bruno@clisp.org>
10423
10424         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
10425
10426 2006-06-26  Simon Josefsson  <jas@extundo.com>
10427
10428         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
10429         present.
10430
10431 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
10432
10433         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
10434         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
10435         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
10436
10437 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
10438
10439         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
10440
10441 2006-06-26  Bruno Haible  <bruno@clisp.org>
10442
10443         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
10444
10445 2006-06-26  Bruno Haible  <bruno@clisp.org>
10446
10447         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
10448
10449 2006-06-26  Bruno Haible  <bruno@clisp.org>
10450
10451         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
10452         SGI C compiler in pre-C99 mode.
10453         Suggested by Mark D. Baushke and Larry Jones.
10454
10455 2006-06-26  Bruno Haible  <bruno@clisp.org>
10456
10457         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
10458         WCHAR_MAX.
10459         Reported by Mark D. Baushke and Larry Jones.
10460
10461 2006-06-26  Bruno Haible  <bruno@clisp.org>
10462
10463         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
10464         in pre-C99 mode.
10465         Suggested by Mark D. Baushke and Larry Jones.
10466
10467 2006-06-23  Simon Josefsson  <jas@extundo.com>
10468             Bruno Haible  <bruno@clisp.org>
10469
10470         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
10471         Emit mostlyclean-local rule.
10472         (func_emit_tests_Makefile_am): Likewise.
10473         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
10474
10475 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
10476
10477         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
10478
10479 2006-06-23  Bruno Haible  <bruno@clisp.org>
10480
10481         * tests/test-stdint.c: Update to match ISO C 99 Technical
10482         Corrigendum 1.
10483
10484 2006-06-23  Bruno Haible  <bruno@clisp.org>
10485
10486         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
10487
10488 2006-06-23  Bruno Haible  <bruno@clisp.org>
10489
10490         * lib/stdint_.h: Treat IRIX like OpenBSD.
10491
10492 2006-06-23  Bruno Haible  <bruno@clisp.org>
10493
10494         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
10495         ISO C 99 Technical Corrigendum 1.
10496
10497 2006-06-22  Simon Josefsson  <jas@extundo.com>
10498
10499         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
10500         MinGW.
10501
10502 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
10503
10504         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
10505         needed.  Some compiler complained about some of them.  Problem reported
10506         by Larry Jones in
10507         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
10508
10509 2006-06-21  Simon Josefsson  <jas@extundo.com>
10510
10511         * tests/test-getaddrinfo.c: New file.
10512
10513         * modules/getaddrinfo-tests: New file.
10514
10515         * MODULES.html.sh: Add inet_pton.
10516
10517         * modules/inet_pton: New file.
10518
10519 2006-06-21  Simon Josefsson  <jas@extundo.com>
10520
10521         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
10522         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
10523         of using the (limited) gnulib implementation on Windows XP.
10524
10525         * m4/inet_pton.m4: New file.
10526
10527 2006-06-21  Simon Josefsson  <jas@extundo.com>
10528
10529         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
10530         variable.
10531
10532         * lib/socket_.h: Don't define WINVER.
10533
10534         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
10535         slightly modified to work in gnulib.
10536
10537 2006-06-21  Simon Josefsson  <jas@extundo.com>
10538
10539         * doc/gnulib.texi (Windows sockets): Add.
10540
10541 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
10542
10543         * lib/read-file.c (fread_file): Start with buffer allocation of
10544         0 bytes rather than 1 byte; this simplifies the code.
10545         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
10546         code to free buffer and save/restore errno.
10547         (internal_read_file): Remove unused local.
10548
10549 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
10550
10551         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
10552         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
10553         Problem reported by Denis Excoffier in
10554         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
10555
10556 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
10557
10558         * modules/sys_socket, modules/socklen: Include sys/types since
10559         FreeBSD 4.x's sys/socket.h needs it.
10560
10561 2006-06-19  Simon Josefsson  <jas@extundo.com>
10562
10563         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
10564
10565 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
10566
10567         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
10568
10569 2006-06-19  Bruno Haible  <bruno@clisp.org>
10570
10571         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
10572         and FULL_PATH_INTTYPES_H in angle brackets.
10573         Reported by Mark D. Baushke <mdb@gnu.org>.
10574
10575 2006-06-17  Eric Blake  <ebb9@byu.net>
10576
10577         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
10578         errno.
10579
10580 2006-06-17  Bruno Haible  <bruno@clisp.org>
10581
10582         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
10583         <sys/inttypes.h>.
10584
10585 2006-06-17  Bruno Haible  <bruno@clisp.org>
10586
10587         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
10588         whether errno is declared. Assume <errno.h> declares errno.
10589
10590 2006-06-17  Bruno Haible  <bruno@clisp.org>
10591
10592         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
10593
10594 2006-06-17  Bruno Haible  <bruno@clisp.org>
10595
10596         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
10597         problem on Solaris 2.5.1.
10598
10599 2006-06-16  Eric Blake  <ebb9@byu.net>
10600
10601         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
10602         * lib/unicodeio.c [!defined errno]: Likewise.
10603         * lib/strtol.c [!defined errno]: Likewise.
10604         * lib/strtod.c [!defined errno]: Likewise.
10605
10606 2006-06-15  Eric Blake  <ebb9@byu.net>
10607
10608         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
10609
10610 2006-06-15  Eric Blake  <ebb9@byu.net>
10611
10612         * config/srclist.txt (ssize_t.m4): Lose sync.
10613
10614 2006-06-15  Bruno Haible  <bruno@clisp.org>
10615
10616         * modules/stdint (Files): Include m4/full-header-path.m4,
10617         m4/size_max.m4, m4/wchar_t.m4.
10618         (Makefile.am): Many more substitutions.
10619         * modules/stdint-tests: New file.
10620         * tests/test-stdint.c: New file.
10621
10622 2006-06-15  Bruno Haible  <bruno@clisp.org>
10623
10624         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
10625         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
10626         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
10627         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
10628         gl_CHECK_TYPE_SAME): New macros.
10629
10630 2006-06-15  Bruno Haible  <bruno@clisp.org>
10631
10632         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
10633
10634 2006-06-15  Bruno Haible  <bruno@clisp.org>
10635
10636         * lib/stdint_.h: Rewritten to be fully auto-configured.
10637         Fixes bug on HP-UX/IA64.
10638
10639 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
10640
10641         * lib/getdate.y (__attribute__): Don't define if already defined.
10642         Problem reported by Larry Jones.
10643         * lib/utimens.c (__attribute__): Likewise.
10644
10645 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
10646
10647         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
10648         reported by Andreas Schwab.
10649
10650 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10651             Bruno Haible  <bruno@clisp.org>
10652
10653         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
10654         check for the declaration of strnlen and a run test that exposes the
10655         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
10656         rpl_strndup.
10657
10658 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10659             Bruno Haible  <bruno@clisp.org>
10660
10661         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
10662
10663 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10664
10665         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
10666         compile test, for Tru64 4.0D.
10667
10668 2006-05-28  Karl Berry  <karl@gnu.org>
10669
10670         * config/srclist.txt (printf-args.c): lose sync.
10671
10672 2006-05-26  Martin Lambers  <marlam@marlam.de>
10673
10674         * lib/getpass.c: Updates the test for the native W32 API, and adds
10675         missing includes, thus fixing compilation warnings.
10676
10677 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
10678
10679         * lib/exclude.c (exclude_fnmatch): New function.
10680         (excluded_file_name): Call exclude_fnmatch.
10681         * lib/exclude.h (excluded_file_name): New prototype
10682
10683 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
10684
10685         * lib/tempname.c (small_open, large_open): New macros.
10686         (__open, __open64) [!_LIBC]: Remove.
10687         (__gen_tempname): Use small_open and large_open instead of __open
10688         and __open64.  This fixes a portability bug on HP-UX 11.11i
10689         reported by Simon Wing-Tang in
10690         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
10691
10692 2006-05-24  Bruno Haible  <bruno@clisp.org>
10693
10694         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
10695         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
10696         Reported by Thorsten Maerz <torte@netztorte.de> via
10697         Aaron Stone <aaron@serendipity.cx>.
10698
10699 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
10700
10701         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
10702         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
10703         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
10704         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
10705         not really conditional on the cache.
10706         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
10707
10708 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
10709
10710         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
10711         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
10712         (my_usleep): Don't mishandle maximum value.
10713
10714 2006-05-19  Jim Meyering  <jim@meyering.net>
10715
10716         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
10717
10718 2006-05-17  Bruno Haible  <bruno@clisp.org>
10719
10720         Cygwin portability.
10721         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
10722
10723 2006-05-17  Bruno Haible  <bruno@clisp.org>
10724
10725         * lib/stdint_.h: Fix recognition of Cygwin.
10726
10727 2006-05-15  Bruno Haible  <bruno@clisp.org>
10728
10729         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
10730         on libtool patch by Ralf Wildenhues.
10731
10732 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
10733
10734         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
10735         test for C99 conformance; (bool) 0.5 is an integer constant
10736         expression, but (bool) -0.5 is not.  Problem reported by Fedor
10737         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
10738
10739 2006-05-11  Simon Josefsson  <jas@extundo.com>
10740
10741         * m4/xvasprintf.m4: Fix obvious typo.
10742
10743 2006-05-11  Jim Meyering  <jim@meyering.net>
10744
10745         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
10746         James Lemley.
10747
10748 2006-05-10  Simon Josefsson  <jas@extundo.com>
10749
10750         * lib/md4.c: Typo fix, update copyright years.
10751         (K1, K2): Don't use L because it turn computations into 64-bit on
10752         64-bit platforms.
10753
10754 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
10755
10756         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
10757         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
10758         unwanted sign propagation, e.g., on hosts with 64-bit int.
10759         There still are some problems with reeelly weird theoretical hosts
10760         (e.g., 33-bit int) but it's not worth worrying about now.
10761         * lib/sha1.c (rol): Likewise.
10762         (K1, K2, K3, K4): Remove unnecessary L suffix.
10763
10764 2006-05-10  Bruno Haible  <bruno@clisp.org>
10765
10766         * lib/des.c: Cast to avoid warnings.
10767
10768 2006-05-09  Bruno Haible  <bruno@clisp.org>
10769
10770         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
10771         (Depends-on): Depend also on xsize, stdarg.
10772         (configure.ac): Add gl_XVASPRINTF.
10773
10774 2006-05-09  Bruno Haible  <bruno@clisp.org>
10775
10776         * m4/xvasprintf.m4: New file.
10777
10778 2006-05-09  Bruno Haible  <bruno@clisp.org>
10779
10780         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
10781         (EOVERFLOW): Define fallback value.
10782         (xstrcat): New function.
10783         (xvasprintf): Recognize the special case of a string concatenation.
10784
10785 2006-05-08  Eric Blake  <ebb9@byu.net>
10786
10787         * gnulib-tool (func_version): Base copyright year on CVS date.
10788         (func_emit_copyright_notice): New function.
10789         (func_emit_lib_Makefile_am): Use it.
10790         (func_emit_tests_Makefile_am): Likewise.
10791         (func_import): Likewise.
10792
10793 2006-05-08  Bruno Haible  <bruno@clisp.org>
10794
10795         * modules/stdarg: New file.
10796         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
10797
10798 2006-05-08  Bruno Haible  <bruno@clisp.org>
10799
10800         * m4/stdarg.m4: New file, from GNU gettext.
10801
10802 2006-05-08  Bruno Haible  <bruno@clisp.org>
10803
10804         * config/srclist.txt (build-aux/config.rpath): different from latest
10805         release.
10806
10807 2006-05-08  Bruno Haible  <bruno@clisp.org>
10808
10809         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
10810
10811 2006-05-05  Jim Meyering  <jim@meyering.net>
10812
10813         * m4/warning.m4: New file, derived from bison's file by the same name.
10814
10815 2006-05-03  Bruno Haible  <bruno@clisp.org>
10816
10817         * lib/stdint_.h: Shorter URL.
10818         * lib/inttypes.h: Likewise.
10819
10820 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
10821
10822         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
10823
10824 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
10825
10826         * lib/verify.h: Document the internals better.  Most of this change
10827         was written by Bruno Haible.
10828
10829 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
10830
10831         * doc/verify.texi: New file, partly based on a proposal by
10832         Bruno Haible.
10833
10834 2006-05-02  Bruno Haible  <bruno@clisp.org>
10835
10836         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
10837         test from here...
10838         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
10839
10840 2006-04-29  Bruno Haible  <bruno@clisp.org>
10841
10842         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
10843         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
10844
10845 2006-04-29  Bruno Haible  <bruno@clisp.org>
10846
10847         * gnulib-tool: Make --update option actually work.
10848
10849 2006-04-29  Bruno Haible  <bruno@clisp.org>
10850
10851         * doc/gcd.texi: New file.
10852         * doc/gnulib.texi: Include it.
10853
10854 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
10855
10856         * lib/getdate.y (get_date): When adding relative date, start with the
10857         initial time, not with the result of the first mktime call.
10858
10859 2006-04-25  Bruno Haible  <bruno@clisp.org>
10860
10861         * gnulib-tool (func_import): Output the include directives in three
10862         blocks, sorted separately.
10863         Reported by Ben Pfaff <blp@cs.stanford.edu>.
10864
10865 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
10866
10867         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
10868         to define main with arguments, for C++.  Reported by Eric Blake.
10869         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
10870         Prefer 'int main ()' to 'int main (void)', for C++.
10871         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
10872         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
10873         for 'main', for C99 and C++.
10874
10875 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
10876
10877         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
10878         Don't assume that exit status -1 is valid.
10879         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
10880         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
10881         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
10882         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
10883         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
10884         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
10885         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
10886         functions can be used without declaring them, or that you can
10887         exit with status -1.
10888         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
10889
10890 2006-04-24  Karl Berry  <karl@gnu.org>
10891
10892         * config/srclist.txt (longdouble.m4): sync lost.
10893
10894 2006-04-24  Eric Blake  <ebb9@byu.net>
10895
10896         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
10897
10898 2006-04-24  Bruno Haible  <bruno@clisp.org>
10899
10900         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
10901         poll() implementation in AIX.
10902         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10903
10904 2006-04-24  Bruno Haible  <bruno@clisp.org>
10905
10906         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
10907         assigned exactly once.
10908
10909 2006-04-23  Claudio Fontana  <claudio@gnu.org>
10910             Bruno Haible  <bruno@clisp.org>
10911
10912         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
10913         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
10914         for AM_CPPFLAGS.
10915
10916 2006-04-23  Bruno Haible  <bruno@clisp.org>
10917
10918         * modules/copy-file: Depend on unistd.
10919         * modules/execute: Likewise.
10920         * modules/fatal-signal: Likewise.
10921         * modules/findprog: Likewise.
10922         * modules/mkdtemp : Likewise.
10923         * modules/pipe: Likewise.
10924         * modules/wait-process: Likewise.
10925
10926 2006-04-23  Bruno Haible  <bruno@clisp.org>
10927
10928         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
10929         condition was already detected.
10930         Reported by Ben Pfaff <blp@cs.stanford.edu>.
10931
10932 2006-04-23  Bruno Haible  <bruno@clisp.org>
10933
10934         * lib/copy-file.c: Include <unistd.h> unconditionally.
10935         * lib/execute.c: Likewise.
10936         * lib/fatal-signal.c: Likewise.
10937         * lib/findprog.c: Likewise.
10938         * lib/mkdtemp.c: Likewise.
10939         * lib/pipe.h: Likewise.
10940         * lib/pipe.c: Likewise.
10941         * lib/wait-process.h: Likewise.
10942
10943 2006-04-23  Bruno Haible  <bruno@clisp.org>
10944
10945         * gnulib-tool (func_usage): Fix --import description. Document
10946         --update.
10947         (func_import): Create temporary file in a temporary directory, if
10948         --dry-run is specified. Silence errors from 'grep' when there are no
10949         m4 files in $m4dir.
10950         (func_create_testdir): Silence errors from 'grep' when there are no
10951         m4 files in $m4dir.
10952         Reported by Karl Berry <karl@freefriends.org>.
10953
10954 2006-04-20  Bruno Haible  <bruno@clisp.org>
10955
10956         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
10957         one argument, so that the code will be portable to Autoconf 2.60.
10958         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
10959         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
10960         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
10961
10962 2006-04-19  Derek Price  <derek@ximbiot.com>
10963             Eric Blake  <ebb9@byu.net>
10964
10965         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
10966         rather than "/full/path.h".  Update comment to match.  Shorten &
10967         generalize m4_translit call via AS_TR_CPP.
10968
10969 2006-04-19  Derek Price  <derek@ximbiot.com>
10970             Eric Blake  <ebb9@byu.net>
10971
10972         * lib/inttypes.h: Correct grammar in comment.
10973
10974 2006-04-18  Derek Price  <derek@ximbiot.com>
10975             Paul Eggert  <eggert@cs.ucla.edu>
10976
10977         * modules/inttypes: New file.
10978         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
10979
10980 2006-04-18  Derek Price  <derek@ximbiot.com>
10981             Paul Eggert  <eggert@cs.ucla.edu>
10982
10983         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
10984         New files.
10985
10986 2006-04-18  Derek Price  <derek@ximbiot.com>
10987             Paul Eggert  <eggert@cs.ucla.edu>
10988
10989         * lib/inttypes.h: New file.
10990         * lib/strtoimax.c: Assume <inttypes.h>.
10991
10992 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
10993
10994         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
10995         isn't mounted.  Problem reported by Kir Kolyshkin.
10996
10997 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
10998
10999         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
11000         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
11001         Derek R. Price.
11002         * lib/regex.h (RE_DUP_MAX): Update comment to match current
11003         implementation.
11004
11005 2006-04-12  Eric Blake  <ebb9@byu.net>
11006
11007         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
11008         is now done automatically by the corresponding Autoconf macro.
11009
11010 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
11011
11012         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
11013         time_r.h.
11014
11015 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
11016
11017         Merge regex changes from libc, removing some of our
11018         POSIX-conformance changes that were rejected and redoing them in a
11019         less-intrusive way.
11020
11021         * lib/regcomp.c (re_compile_internal, init_dfa):
11022         Length arg is now size_t, not Idx.  All uses changed.
11023         (peek_token): Forward decl now says internal_function.
11024         (__re_error_msgid, __re_error_msgid_idx):
11025         Now static rather than extern with attribute_hidden.
11026         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
11027         For some reason libc prefers K&R style defns for external functions.
11028         (regerror) [!defined _LIBC]: Likewise.
11029         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
11030         (seek_collating_symbol_entry, lookup_collation_sequence_value):
11031         (build_range_exp, build_collating_symbol):
11032         Use K&R-style defn.
11033         (re_compile_fastmap): Use '\0' to memset, not 0.
11034         (utf8_sb_map): Make the calculations more obvious.
11035         (init_dfa, parse_bracket_exp, build_charclass_op):
11036         Call calloc and cast result, as glibc does.
11037         (init_word_char, fetch_token, peek_token, peek_token_bracket):
11038         (build_range_exp, build_collating_symbol):
11039         Now internal functions.
11040
11041         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
11042
11043         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
11044         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
11045         Don't depend on VMS; depend on __VMS instead, for POSIX
11046         namespace cleanness.
11047         (regoff_t): Define to ssize_t, not long int.
11048
11049         Remove the REG_ macros named below.  Instead, make the old names
11050         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
11051         __USE_GNU_REGEX.
11052         (REG_BACKSLASH_ESCAPE_IN_LISTS):
11053         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
11054         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
11055         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
11056         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
11057         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
11058         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
11059         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
11060         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
11061         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
11062         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
11063         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
11064         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
11065         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
11066         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
11067         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
11068         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
11069         (REG_NREGS):
11070         Remove.  All uses replaced by the old RE_* names.
11071         (RE_BACKSLASH_ESCAPE_IN_LISTS):
11072         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
11073         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
11074         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
11075         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
11076         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
11077         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
11078         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
11079         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
11080         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
11081         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
11082         Don't bother having these macros be independent of each others'
11083         values, since they no longer exist in the POSIX name space.
11084
11085         Rename the following member names back to their old names,
11086         unless !__USE_GNU_REGEX.  All uses changed back.
11087         (buffer): Renamed from re_buffer.
11088         (allocated): Renamed from re_allocated.
11089         (used): Renamed from re_used.
11090         (syntax): Renamed from re_syntax.
11091         (fastmap): Renamed from re_fastmap.
11092         (translate): Renamed from re_translate.
11093         (can_be_null): Renamed from re_can_be_null.
11094         (regs_allocated): Renamed from re_regs_allocated.
11095         (fastmap_accurate): Renamed from re_fastmap_accurate.
11096         (no_sub): Renamed from re_no_sub.
11097         (not_bol): Renamed from re_not_bol.
11098         (not_eol): Renamed from re_not_eol.
11099         (newline_anchor): Renamed from re_newline_anchor.
11100         (num_regs): Renamed from rm_num_regs.
11101         (start): Renamed from rm_start.
11102         (end): Renamed from rm_end.
11103
11104         (free_state): Move up a bit.
11105
11106         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
11107         #define to be empty.
11108         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
11109         when that is what is intended.
11110         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
11111         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
11112         (MAX): New macro.
11113         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
11114         All uses changed back to re_malloc, etc.  It's now the caller's
11115         responsibility to check for overflow; all callers changed.
11116         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
11117         (re_x2nrealloc): Remove.
11118         (free_state): Remove decl.
11119
11120         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
11121         (re_set_registers, re_exec):
11122         Use K&R-style defn.
11123
11124         2006-01-31  Roland McGrath  <roland@redhat.com>
11125
11126         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
11127         Reported by Mike Frysinger <vapier@gentoo.org>.
11128
11129         2006-01-15  Andreas Jaeger  <aj@suse.de>
11130
11131         [BZ #1950]
11132         * lib/regex_internal.c (re_string_reconstruct): Adjust for
11133         build_wcs_upper_buffer change.
11134         (build_wcs_upper_buffer): Change return type.
11135
11136         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
11137
11138         * lib/regex_internal.h: Include <stdint.h> if available.
11139
11140         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
11141
11142         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
11143
11144         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
11145
11146         * lib/regcomp.c: Adjust for changed secondary hash function.
11147
11148         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
11149
11150         * lib/regex.h: Pretty printing.
11151         Clean up namespace a bit.
11152
11153         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
11154
11155         * lib/regexec.c (update_cur_sifted_state, check_arrival,
11156         check_arrival_add_next_nodes): Avoid using uninitialized variable.
11157
11158         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
11159                     Ulrich Drepper  <drepper@redhat.com>
11160
11161         [BZ #1302]
11162         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
11163         changed.
11164         (bitset_word_t): Renamed from bitset_word.  All uses changed.
11165
11166         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
11167
11168         [BZ #281]
11169         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
11170         * lib/regcomp.c: Remove unnecessary uses of
11171         unsigned RE_TRANSLATE_TYPE.
11172         * lib/regex_internal.h: Likewise.
11173         * lib/regex_internal.c: Likewise.
11174         * lib/regexec.c: Likewise.
11175         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
11176
11177         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
11178
11179         * lib/regexec.c (find_recover_state): Remove unnecessary
11180         initialization.
11181         (transit_state_bkref): Make DFA a const pointer.
11182         (get_subexp): Likewise.
11183         (check_arrival): Likewise.
11184         (update_cur_sifted_state): Likewise.
11185         (re_search_internal): Likewise.
11186         (prune_impossible_nodes): Likewise.
11187         (acquire_init_state_context): Likewise.
11188         (proceed_next_node): Likewise.
11189         (set_regs): Likewise.
11190         (free_fail_stack_return): Likewise.
11191         (check_arrival_expand_ecl): Mark DFA parameter as const.
11192         (check_arrival_expand_ecl_sub): Likewise.
11193         (check_subexp_limits): Likewise.
11194         (sub_epsilon_src_nodes):  Likewise.
11195         (add_epsilon_src_nodes):  Likewise.
11196         (merge_state_array): Likewise.
11197         (update_regs): Likewise.
11198         (build_trtable): Likewise.
11199         (sift_states_backward): Mark MCTX parameter as const.
11200         (build_sifted_states): Likewise.
11201         (update_cur_sifted_state): Likewise.
11202         (sift_states_mkref): Likewise.
11203         (check_arrival_expand_ecl): Mark eclosure as const.
11204         (check_dst_limits_calc_pos_1): Likewise.
11205         * lib/regex_internal.h (re_match_context_t): Make dfa a const
11206         pointer.
11207
11208         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
11209
11210         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
11211         (transit_state_sb): Likewise.
11212         (transit_state_mb): Likewise.
11213         (sift_states_iter_mb): Likewise.
11214         (check_arrival_add_next_nodes): Likewise.
11215         (check_node_accept_bytes): Change first parameter to pointer-to-const.
11216         [_LIBC] (re_search_2_stub): Use mempcpy.
11217
11218         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
11219         mbrtowc for very simple UTF-8 case.
11220
11221         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
11222         a pointer-to-const.
11223         (re_acquire_state_context): Likewise.
11224         * lib/regex_internal.h: Adjust prototypes.
11225
11226         * lib/regex.c: Prevent using C++ compilers.
11227
11228         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
11229         (re_acquire_state_context): Likewise.
11230
11231 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
11232
11233         * modules/regex (Depends-on): Add ssize_t.
11234
11235 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
11236
11237         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
11238         translation table.
11239
11240 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
11241
11242         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
11243
11244 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
11245             Bruno Haible  <bruno@clisp.org>
11246
11247         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
11248         <sys/types.h> and <inttypes.h>.
11249
11250 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11251
11252         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
11253         `__error_t_defined', so argp.h will not typedef the former.
11254
11255 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
11256
11257         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
11258         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
11259         glibc names.  Even if glibc is changed to conform to POSIX, the
11260         traditional names will be available anyway, since regex depends on
11261         the extensions module.  Also, fix a longstanding typo in the
11262         implementation of Spencer ERE test #75 from grep 2.3.  Problems
11263         reported by Emanuele Giaquinta.  Also, change sense of cached
11264         variable, so that the message makes sense.
11265
11266 2006-03-24  Simon Josefsson  <jas@extundo.com>
11267
11268         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
11269         including some doc fixes.
11270         (base64_encode_alloc): Fix +1 bug on allocation failures.
11271
11272 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11273
11274         * lib/base64.c (base64_encode): Do not read past end of array with
11275         unsanitized input on systems with CHAR_BIT > 8.
11276
11277 2006-03-24  Eric Blake  <ebb9@byu.net>
11278
11279         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
11280
11281 2006-03-22  Karl Berry  <karl@gnu.org>
11282
11283         * config/srclist.txt (*setenv.[ch]): get from coreutils.
11284         * config/srclistvars.sh (COREUTILS): new var.
11285
11286 2006-03-17  Jim Meyering  <jim@meyering.net>
11287
11288         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
11289         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
11290
11291 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
11292
11293         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
11294         no longer needs it.  Instead, check that regoff_t is as least
11295         as wide as ptrdiff_t.
11296
11297         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
11298         so that our regex.h stays compatible with the installed regex.
11299         This is helpful for installers who configure --without-included-regex.
11300         Problem reported by Emanuele Giaquinta.
11301
11302 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
11303
11304         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
11305         Typedef to long int, not to off_, as POSIX will likely change
11306         in that direction.
11307
11308 2006-03-15  Eric Blake  <ebb9@byu.net>
11309
11310         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
11311
11312 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
11313
11314         * lib/argp-help.c (validate_uparams): Fix typo
11315         * lib/argp-parse.c (argp_default_options): Consistently begin help
11316         messages with a lowercase letter.
11317
11318 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
11319
11320         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
11321         overrun buffers and shouldn't be used (much as gets shouldn't be
11322         used).
11323         * lib/time_r.c (asctime_r, ctime_r): Likewise.
11324
11325 2006-03-08  Simon Josefsson  <jas@extundo.com>
11326
11327         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
11328         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
11329
11330 2006-03-08  Simon Josefsson  <jas@extundo.com>
11331
11332         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
11333         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
11334
11335 2006-03-08  Simon Josefsson  <jas@extundo.com>
11336
11337         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
11338         signal that configure disabled the device.
11339
11340 2006-03-08  Simon Josefsson  <jas@extundo.com>
11341
11342         * build-aux/maint.mk: Fix refresh-po, to handle no translated
11343         languages.
11344
11345 2006-03-07  Simon Josefsson  <jas@extundo.com>
11346
11347         * modules/getopt (Depends-on): Add unistd.
11348
11349         * modules/unistd: New file.
11350
11351 2006-03-07  Simon Josefsson  <jas@extundo.com>
11352
11353         * modules/gc-random: New file.
11354
11355 2006-03-07  Simon Josefsson  <jas@extundo.com>
11356
11357         * m4/unistd_h.m4: New file.
11358
11359 2006-03-07  Simon Josefsson  <jas@extundo.com>
11360
11361         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
11362         test to be side-effect free by storing the result in the cache
11363         variable gl_cv_lib_readline, and moving the assignment of
11364         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
11365         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
11366
11367 2006-03-07  Simon Josefsson  <jas@extundo.com>
11368
11369         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
11370         error on missing devices (the functions will return an error).
11371
11372         * m4/gc.m4: Move random stuff to gc-random.m4
11373
11374 2006-03-07  Simon Josefsson  <jas@extundo.com>
11375
11376         * lib/unistd_.h: New file.
11377
11378 2006-03-07  Simon Josefsson  <jas@extundo.com>
11379
11380         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
11381
11382 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
11383
11384         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
11385         Problem reported by Juan Manuel Guerrero.
11386
11387 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
11388
11389         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
11390         the unistd module.
11391         * lib/getlogin_r.c: Likewise.
11392         * lib/getlogin_r.h: Likewise.
11393         * lib/glob.c: Likewise.
11394         * lib/pagealign_alloc.c: Likewise.
11395         * lib/unistd_.h: Remove; no longer needed.
11396
11397 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
11398
11399         * MODULES.html.sh (Support for systems lacking POSIX:2001):
11400         Add unistd.
11401         * modules/c-stack (Depends-on): Add unistd.
11402         * modules/getlogin_r: Likewise.
11403         * modules/glob: Likewise.
11404         * modules/pagealign_alloc: Likewise.
11405         * modules/unistd (Files): Remove lib/unistd_.h.
11406         (EXTRA_DIST): Remove.
11407         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
11408         need unistd_.h.
11409         (MOSTLYCLEANFILES): Remove unistd.h-t.
11410
11411 2006-03-03  Simon Josefsson  <jas@extundo.com>
11412
11413         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
11414
11415 2006-03-03  Simon Josefsson  <jas@extundo.com>
11416
11417         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
11418         libidn and bison.
11419
11420 2006-03-03  Simon Josefsson  <jas@extundo.com>
11421
11422         * build-aux/maint.mk: Add indent target.
11423
11424 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
11425
11426         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
11427         our replacement poll.h in any case, to avoid a differing
11428         declaration from a system header.  Seen on AIX.
11429
11430 2006-03-01  Simon Josefsson  <jas@extundo.com>
11431
11432         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
11433         <kasal@ucw.cz>.
11434
11435 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
11436
11437         * modules/gettime (Depends-on): Add extensions module.
11438         * modules/nanosleep (Depends-on): Likewise.
11439         * modules/settime (Depends-on): Likewise.
11440
11441 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
11442
11443         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
11444         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
11445         pedantically.
11446         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
11447         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
11448
11449         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
11450         not "==".  Reported by Ralf Wildenhues.
11451
11452 2006-03-01  Karl Berry  <karl@gnu.org>
11453
11454         * doc/Copyright/request-*: new files, synced from gnuorg.
11455
11456 2006-03-01  Karl Berry  <karl@gnu.org>
11457
11458         * config/srclist.txt (Copyright/*): new entries.
11459
11460 2006-02-28  Simon Josefsson  <jas@extundo.com>
11461
11462         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
11463
11464 2006-02-27  Simon Josefsson  <jas@extundo.com>
11465
11466         * lib/base64.h: Indent #define's.  From Jim Meyering
11467         <jim@meyering.net>.
11468
11469 2006-02-27  Jim Meyering  <jim@meyering.net>
11470
11471         Revert the change of 2006-02-24, so these files can continue
11472         to be sync'd from gettext.
11473         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
11474         of `config.h'.
11475
11476 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
11477
11478         * modules/intprops: New file.
11479         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
11480         Add intprops.
11481         * modules/getloadavg (Files): Remove lib/intprops.h.
11482         (Depends-on): Add intprops.
11483         * modules/human: Likewise.
11484         * modules/inttostr: Likewise.
11485         * modules/openat: Likewise.
11486         * modules/sig2str: Likewise.
11487         * modules/userspec: Likewise.
11488         * modules/utimecmp: Likewise.
11489         * modules/xnanosleep: Likewise.
11490         * modules/xstrtol: Likewise.
11491
11492 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
11493
11494         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
11495         * modules/lock-tests (TESTS): Use $(EXEEXT).
11496         * modules/tls-tests: Likewise.
11497         * modules/argp-tests: Likewise.
11498         (check_PROGRAMS): New var, replacing...
11499         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
11500
11501 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11502
11503         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
11504         `config.h'.
11505
11506 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
11507
11508         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
11509
11510 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11511
11512         Sync from coreutils.
11513         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
11514         gl_CHDIR_SAFER.
11515
11516 2006-02-22  Jim Meyering  <jim@meyering.net>
11517
11518         Sync from coreutils.
11519         * m4/chdir-safer.m4: New file.
11520
11521 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
11522
11523         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
11524         AT_FDCWD exceeds INT_MAX.
11525         * lib/openat.h (AT_FDCWD): Likewise.
11526
11527 2006-02-17  Eric Blake  <address@hidden>
11528
11529         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
11530
11531 2006-02-16  Simon Josefsson  <jas@extundo.com>
11532
11533         * modules/getaddrinfo (Depends-on): Add sys_socket.
11534
11535 2006-02-15  Simon Josefsson  <jas@extundo.com>
11536
11537         * build-aux/maint.mk: Add dsyntax-check rule.
11538
11539 2006-02-15  Eric Blake  <ebb9@byu.net>
11540
11541         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
11542         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
11543         'present but cannot compile' warnings on cygwin.
11544         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
11545         use ws2tcpip.h if sys/socket.h works.
11546         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
11547         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
11548
11549 2006-02-14  Simon Josefsson  <jas@extundo.com>
11550
11551         * modules/maintainer-makefile (Files): Rename.
11552
11553         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
11554         and (the local) Makefile.cfg to maint-cfg.mk.
11555
11556         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
11557         to the latter.
11558
11559         * modules/maintainer-makefile: New module.
11560
11561         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
11562         severaly stripped to make it possible to build it up from scratch
11563         with reliable tests.
11564
11565         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
11566         fixes to permit overriding the default actions when configure and
11567         makefile are not available.
11568
11569 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
11570
11571         Sync from coreutils.
11572         * modules/lstat (Depends-on): Don't depend on xalloc.
11573         (License): Change from GPL to LGPL, since this is now simply a
11574         replacement for a libc function.
11575
11576 2006-02-14  Jim Meyering  <jim@meyering.net>
11577
11578         Sync from coreutils.
11579
11580         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
11581         failure on deficient systems, and simplify gnulib lgpl dependencies.
11582         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
11583         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
11584
11585         * lib/xalloc-die.c: Remove unused definition of N_.
11586
11587 2006-02-14  Jim Meyering  <jim@meyering.net>
11588
11589         Sync from coreutils.
11590         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
11591         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
11592         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
11593         double-quote uses of that variable, to accommodate the rare case in
11594         which getmntent is available in none of the libraries checked.  This
11595         happens at least on FreeBSD 5.0.
11596
11597 2006-02-13  Simon Josefsson  <jas@extundo.com>
11598
11599         * gnulib-tool (Usage): Fix --import, from
11600         karl@freefriends.org (Karl Berry).
11601
11602 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
11603
11604         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
11605
11606 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
11607
11608         * lib/argp-namefrob.h: Restore changes accidentally lost during the
11609         "autoupdate" on 2005-12-12.
11610
11611 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
11612
11613         * modules/closeout (Depends-on): Remove atexit.
11614
11615 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
11616
11617         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
11618         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
11619
11620 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
11621
11622         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
11623         __EXTENSIONS__ if this causes compilation to fail.  Problem
11624         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
11625         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
11626
11627 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
11628
11629         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
11630         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
11631         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
11632         All uses changed.
11633
11634 2006-01-26  Simon Josefsson  <jas@extundo.com>
11635
11636         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
11637         prototype is visible on mingw32.
11638
11639         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
11640         for mingw32.
11641
11642         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
11643         mingw32).
11644
11645 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
11646
11647         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
11648         attempt to open for write; this always fails, at least on POSIX
11649         hosts.  This reinstates the 2006-01-09 change, which was
11650         inadvertently removed.
11651
11652 2006-01-26  Bruno Haible  <bruno@clisp.org>
11653
11654         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
11655         Reported by Paul Eggert.
11656
11657 2006-01-26  Bruno Haible  <bruno@clisp.org>
11658             Paul Eggert  <eggert@cs.ucla.edu>
11659
11660         * lib/stdbool_.h (_Bool)
11661         [(! (defined __cplusplus || defined __BEOS__)
11662           && !defined __GNUC__
11663           && !(defined __HP_cc || defined __xlc__
11664                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
11665                || defined __sgi))]:
11666         #define to signed char in these cases too; this simplifies
11667         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
11668         etc., separately) and makes it more conservative.
11669
11670 2006-01-25  Simon Josefsson  <jas@extundo.com>
11671
11672         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
11673         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
11674         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
11675
11676 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
11677
11678         * lib/argp-namefrob.h: Bugfix. Remove stray #
11679
11680 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
11681
11682         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
11683         so that we test the test.
11684         Check for yet another HP-UX cc bug involving *bool |= bool.
11685
11686 2006-01-25  Karl Berry  <karl@gnu.org>
11687
11688         * config/srclist.txt (vasnprintf.c): sync lost.
11689
11690 2006-01-25  Jim Meyering  <jim@meyering.net>
11691
11692         Sync from the stable (b5) branch of coreutils:
11693
11694         * lib/fts.c (fts_children): Don't let close() clobber errno from
11695         failed fchdir().
11696
11697         * lib/fts.c (fts_stat): When following a symlink-to-directory,
11698         don't necessarily interpret stat-fails+lstat-succeeds as indicating
11699         a dangling symlink.  That can also happen at least for ELOOP.
11700         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
11701         FYI, this bug predates the inclusion of fts.c in coreutils.
11702
11703         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
11704         in their own block, so pre-c99 compilers don't object.
11705
11706         Avoid the double-free (first in fts_read, second in fts_close) that
11707         would occur when an `active' directory is made inaccessible (e.g.,
11708         via chmod a-x) during a traversal.
11709         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
11710         before returning.  Reproduce this failure by
11711         mkdir -p a/b; cd a; chmod a-x . b
11712         Reported by Stavros Passas.
11713
11714 2006-01-25  Jim Meyering  <jim@meyering.net>
11715
11716         * lib/fileblocks.c: Remove more useless parentheses.
11717         * lib/readutmp.h: Likewise.
11718
11719 2006-01-25  Bruno Haible  <bruno@clisp.org>
11720
11721         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
11722         warnings.
11723         Reported by Paul Eggert.
11724
11725 2006-01-25  Bruno Haible  <bruno@clisp.org>
11726
11727         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
11728         rid of a trap command. For Solaris sh.
11729         Reported by Mark D. Baushke <mdb@gnu.org>.
11730
11731 2006-01-24  Simon Josefsson  <jas@extundo.com>
11732
11733         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
11734         Bruno.
11735
11736 2006-01-24  Karl Berry  <karl@gnu.org>
11737
11738         * config/srclist.txt (argp-namefrob.h): sync lost.
11739
11740 2006-01-24  Jim Meyering  <jim@meyering.net>
11741
11742         * modules/openat (Files): Add lib/intprops.h.
11743         From Mark D. Baushke.
11744
11745 2006-01-24  Jim Meyering  <jim@meyering.net>
11746
11747         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
11748         Reported by Mark D. Baushke.
11749
11750 2006-01-24  Jim Meyering  <jim@meyering.net>
11751
11752         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
11753
11754 2006-01-24  Bruno Haible  <bruno@clisp.org>
11755
11756         * modules/strnlen (Maintainer): Change from glibc to all.
11757
11758 2006-01-24  Bruno Haible  <bruno@clisp.org>
11759
11760         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
11761         Patch by Paul Eggert.
11762
11763 2006-01-24  Bruno Haible  <bruno@clisp.org>
11764
11765         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
11766         already has it.
11767         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
11768         2005-11-26.
11769
11770         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
11771         'signed char' to avoid problems with the built-in _Bool type.
11772         Reported by Paul Eggert on 2005-11-26.
11773
11774 2006-01-24  Bruno Haible  <bruno@clisp.org>
11775
11776         * gnulib-tool (func_import): Avoid constructing complicated sed
11777         expressions inside backquote.
11778         Report and solution by Mark D. Baushke <mdb@gnu.org>.
11779
11780 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
11781
11782         These changes imported from libc.
11783         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
11784         test and two separate function calls.
11785         * lib/strndup.c (__strndup): Add libc_hidden_def.
11786
11787 2006-01-23  Simon Josefsson  <jas@extundo.com>
11788
11789         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
11790         Remove the test_*_SOURCES variable: automake infers it by default.
11791         * modules/tls-tests: Likewise.
11792
11793 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
11794
11795         Work around porting bugs reported by Dieter in
11796         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
11797         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
11798         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
11799         Include "getopt.h" first, to check interface.
11800         (getenv): Declare only if defined HAVE_DECL_GETENV &&
11801         !HAVE_DECL_GETENV.
11802         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
11803         (__strndup): Revert to K&R-style function dfns, the glibc style.
11804         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
11805         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
11806         Include strnlen.h first, to get prototype properly.
11807         (strnlen): Renamed from __strnlen.
11808         Remove weak alias.
11809
11810 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
11811
11812         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
11813
11814 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
11815
11816         * config/srclist.txt: Adjust to reflect glibc reorganization.
11817         This affects only comments.
11818
11819 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
11820
11821          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
11822          Reported by Bruce Korb <bkorb@gnu.org>.
11823
11824 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
11825
11826         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
11827         to pacify gcc -Wswitch-default.
11828
11829 2006-01-22  Bruno Haible  <bruno@clisp.org>
11830
11831         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
11832         temporary buffer for sprintf, take into account the precision also
11833         for 'd', 'i', 'u', 'o', 'x', 'X'.
11834
11835 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
11836
11837         * modules/argp-tests: New module
11838         * tests/test-argp.c: New file
11839         * tests/test-argp-2.sh: New file
11840
11841 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
11842
11843         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
11844         (__argp_base_name): Removed
11845         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
11846         typo.
11847         (__argp_base_name): Provide macro definition or extern declaration
11848         depending on the configuration
11849
11850 2006-01-20  Simon Josefsson  <jas@extundo.com>
11851
11852         * modules/inet_ntop (Depends-on): Depend on sys_socket.
11853
11854 2006-01-20  Simon Josefsson  <jas@extundo.com>
11855
11856         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
11857
11858 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
11859
11860         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
11861         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
11862         Suggested by Bruno Haible.
11863
11864 2006-01-20  Karl Berry  <karl@gnu.org>
11865
11866         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
11867         until changes propagate, I guess.
11868
11869 2006-01-19  Simon Josefsson  <jas@extundo.com>
11870
11871         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
11872
11873 2006-01-19  Simon Josefsson  <jas@extundo.com>
11874
11875         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
11876
11877 2006-01-19  Simon Josefsson  <jas@extundo.com>
11878
11879         * gnulib-tool: Set check_PROGRAMS.
11880
11881         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
11882         modules/des-tests, modules/gc-arcfour-tests,
11883         modules/gc-arctwo-tests, modules/gc-des-tests,
11884         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
11885         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
11886         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
11887         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
11888         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
11889         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
11890         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
11891         test_*_SOURCES.
11892
11893 2006-01-18  Simon Josefsson  <jas@extundo.com>
11894
11895         * modules/socklen (Depends-on): Depend on sys_socket.
11896
11897 2006-01-18  Simon Josefsson  <jas@extundo.com>
11898
11899         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
11900         modules/des-tests, modules/gc-arcfour-tests,
11901         modules/gc-arctwo-tests, modules/gc-des-tests,
11902         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
11903         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
11904         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
11905         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
11906         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
11907         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
11908         $(EXEEXT) to automake TESTS variable, for mingw32.
11909
11910 2006-01-17  Simon Josefsson  <jas@extundo.com>
11911
11912         * modules/socklen (Include): Need sys/socket.h.
11913
11914 2006-01-17  Bruno Haible  <bruno@clisp.org>
11915
11916         * modules/ssize_t (Include): Add <sys/types.h>.
11917
11918 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
11919
11920         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
11921         it's not portable and it doesn't work with cross-compiles.
11922         Problem reported by Bruno Haible.  Fix missing-$ typo in
11923         'test "gl_cv_ignore_unused_libraries" ...' that prevented
11924         -zignore from being used with Sun's C compiler.
11925
11926 2006-01-12  Simon Josefsson  <jas@extundo.com>
11927
11928         * lib/base64.c: Fix warning, reported by Bruno Haible
11929         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
11930
11931 2006-01-12  Bruno Haible  <bruno@clisp.org>
11932
11933         * modules/ldd: New file.
11934         * build-aux/ldd.sh.in: New file.
11935         * MODULES.html.sh (Support for building libraries and executables): Add
11936         ldd.
11937
11938 2006-01-12  Bruno Haible  <bruno@clisp.org>
11939
11940         * m4/ldd.m4: New file.
11941
11942 2006-01-12  Bruno Haible  <bruno@clisp.org>
11943
11944         * gnulib-tool (func_import, func_create_testdir): Don't go into an
11945         endless loop while replacing $auxdir with build-aux.
11946
11947 2006-01-11  Simon Josefsson  <jas@extundo.com>
11948
11949         * lib/stdint_.h (SIZE_MAX): Add missing (.
11950
11951 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
11952
11953         Sync from coreutils.
11954         * lib/md5.c: Fix commentary typos.
11955         (alignof, UNALIGNED_P): No need for a GCC-specific version.
11956         * lib/md5.h (__attribute__): Remove; unused.
11957         * lib/sha1.c: Fix commentary to match md5 better.
11958         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
11959         so that we don't need to worry about alignment.  All uses changed.
11960         This merges the 2005-10-28 md5 change into sha1.
11961
11962 2006-01-11  Jim Meyering  <jim@meyering.net>
11963
11964         Sync from coreutils.
11965         * lib/md5.c (OP): Fix spacing.
11966
11967 2006-01-11  Bruno Haible  <bruno@clisp.org>
11968
11969         Ensure automatic ordering between gl_LOCK and gl_ARGP.
11970         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
11971         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
11972
11973 2006-01-11  Bruno Haible  <bruno@clisp.org>
11974
11975         Ensure automatic ordering between gl_LOCK and gl_ARGP.
11976         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
11977         the "early" section as well.
11978
11979 2006-01-11  Bruno Haible  <bruno@clisp.org>
11980
11981         Avoid "ar: no archive members specified" error on MacOS X.
11982         * gnulib-tool (func_modules_add_dummy): New function.
11983         (func_import, func_create_testdir): Invoke it.
11984
11985 2006-01-11  Bruno Haible  <bruno@clisp.org>
11986
11987         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
11988         with $auxdir in AC_CONFIG_FILES statements.
11989
11990 2006-01-11  Bruno Haible  <bruno@clisp.org>
11991
11992         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
11993         Initialize also noinst_HEADERS to empty.
11994
11995 2006-01-11  Bruno Haible  <bruno@clisp.org>
11996
11997         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
11998         variables.
11999         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
12000         autoreconf.
12001
12002 2006-01-11  Bruno Haible  <bruno@clisp.org>
12003
12004         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
12005         overridable by the user.
12006         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
12007
12008 2006-01-10  Simon Josefsson  <jas@extundo.com>
12009
12010         * modules/sys_socket: New file.
12011
12012 2006-01-10  Simon Josefsson  <jas@extundo.com>
12013
12014         * m4/sys_socket_h.m4: New file.
12015
12016 2006-01-10  Simon Josefsson  <jas@extundo.com>
12017
12018         * lib/socket_.h: New file.
12019
12020 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
12021
12022         * modules/readutmp (Maintainer): Add myself.
12023
12024 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
12025
12026         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
12027         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
12028         People who are still concerned with buggy memcmp implementations
12029         can invoke gl_FUNC_MEMCMP themselves.
12030
12031 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
12032
12033         * lib/regex_internal.h (BITSET_WORD_BITS):
12034         Work around a bug in 64-bit PGC (before version 6.1-2), where the
12035         preprocessor mishandles large unsigned values as if they were signed.
12036         Problem reported by Claudio Fontana in
12037         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
12038
12039 2006-01-10  Jim Meyering  <jim@meyering.net>
12040
12041         Avoid the double-free (first in fts_read, second in fts_close) that
12042         would occur when an `active' directory is made inaccessible (e.g.,
12043         via chmod a-x) during a traversal.
12044         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
12045         before returning.  Reproduce this failure by
12046         mkdir -p a/b; cd a; chmod a-x . b
12047         Reported by Stavros Passas.
12048
12049         Sync from coreutils.
12050         * lib/sha1.c: Tweak grammar in a comment.
12051
12052 2006-01-10  Jim Meyering  <jim@meyering.net>
12053
12054         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
12055         Patch by Joerg Sonnenberger.
12056
12057 2006-01-10  Bruno Haible  <bruno@clisp.org>
12058
12059         * modules/readutmp: Depend on module free.
12060         * modules/strtok_r: Depend on module restrict.
12061
12062 2006-01-10  Bruno Haible  <bruno@clisp.org>
12063
12064         * modules/gettext (configure.ac): Add an invocation of
12065         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
12066
12067 2006-01-10  Bruno Haible  <bruno@clisp.org>
12068
12069         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
12070         Reported by Werner Lemberg <wl@gnu.org>.
12071
12072 2006-01-10  Bruno Haible  <bruno@clisp.org>
12073
12074         * lib/localcharset.c: Update from GNU gettext.
12075
12076 2006-01-10  Bruno Haible  <bruno@clisp.org>
12077
12078         * lib/argp.h (__const): Remove macro. Use const instead.
12079         * lib/argp-fmtstream.h (__const): Likewise.
12080         * lib/glob_.h (__const): Remove macro.
12081         * lib/glob-libc.h: Use const instead of __const.
12082
12083 2006-01-10  Bruno Haible  <bruno@clisp.org>
12084
12085         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
12086         variable.
12087         Needed to avoid an automake error regarding the 'gettext' module.
12088
12089 2006-01-09  Simon Josefsson  <jas@extundo.com>
12090
12091         * modules/inet_ntop (Depends-on): Add restrict.
12092
12093 2006-01-09  Simon Josefsson  <jas@extundo.com>
12094
12095         * modules/gc-rijndael-tests (License): Put under LGPL.
12096
12097         * modules/gc-des-tests (License): Likewise.
12098
12099         * modules/gc-arcfour-tests (License): Likewise.
12100
12101         * modules/gc-arctwo-tests (License): Likewise.
12102
12103         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
12104
12105         * modules/gc-hmac-sha1-tests (Files): Likewise.
12106
12107         * modules/gc-hmac-md5-tests (License): Likewise.
12108
12109         * modules/gc-sha1-tests (License): Likewise.
12110
12111         * modules/gc-md5-tests (License): Likewise.
12112
12113         * modules/gc-md4-tests (License): Likewise.
12114
12115         * modules/gc-md2-tests (License): Likewise.
12116
12117         * modules/gc-tests (License): Likewise.
12118
12119         * modules/des-tests (License): Likewise.
12120
12121         * modules/md4-tests (License): Likewise.
12122
12123         * modules/md2-tests (License): Likewise.
12124
12125 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
12126
12127         Sync from coreutils:
12128
12129         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
12130         * modules/lib-ignore: New file.
12131         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
12132         chdir-safer.m4, lchmod.m4.
12133         * modules/openat: Add mkdirat.c, openat-priv.h.
12134
12135 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
12136
12137         Sync from coreutils.
12138         * m4/lib-ignore.m4: New file.
12139         * m4/lchmod.m4: New file.
12140
12141 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
12142
12143         Sync from coreutils.
12144         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
12145         for write access: POSIX says that must fail.
12146         * lib/fts.c (diropen): Likewise.
12147         * lib/save-cwd.c (save_cwd): Likewise.
12148         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
12149         well, for minor improvements on hosts that lack O_DIRECTORY.
12150         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
12151         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
12152         Fall back on chown if open failed with EACCES.
12153
12154         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
12155         Report an error at compile-time if only a 1-second nominal clock
12156         resolution is found.
12157
12158         * lib/lchmod.h: New file.
12159         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
12160         (make_dir_parents): Use lchown rather than chown, and
12161         lchmod rather than chmod.
12162
12163         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
12164         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
12165         "proc" reported by n0dalus.
12166
12167         * lib/mountlist.c: Include <limits.h>.
12168         (dev_from_mount_options)
12169         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
12170         New function.  It no longer assumes "dev=" has the System V meaning
12171         on Linux (since it doesn't).  It also parses "dev=" more carefully.
12172         (read_file_system_list)
12173         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
12174         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
12175         dev= in that case.
12176
12177         * lib/posixtm.h (PDS_PRE_2000): New macro.
12178         * lib/posixtm.c (year): Arg is now syntax_bits rather than
12179         allow_century.  All usages changed.  Reject dates outside the range
12180         1969-1999 if PDS_PRE_2000 is used.
12181
12182 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
12183
12184         Sync from coreutils.
12185         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
12186         (Time of day items): Mention the possibility of leap seconds.
12187         Problem reported by Dr. David Alan Gilbert.
12188
12189 2006-01-09  Jim Meyering  <jim@meyering.net>
12190
12191         Sync from coreutils.
12192
12193         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
12194
12195         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
12196
12197         * lib/modechange.c (mode_compile): Reject an invalid mode string
12198         that starts with an octal digit.  From Andreas Gruenbacher.
12199
12200         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
12201         and dup to open_safer and dup_safer, respectively.
12202         (openat_permissive): Fix typo in comment.
12203
12204         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
12205         "gettext.h"; either no longer needed or are guaranteed by openat.h.
12206         (_): Remove; no longer needed.
12207         (openat): Renamed from rpl_openat; no need for rpl_openat
12208         since openat.h renames openat for us.
12209         Replace most of the body with a call to openat_permissive,
12210         to avoid duplicate code.
12211         Port to (probably hypothetical) environments were mode_t is
12212         wider than int.
12213         (openat_permissive): Require mode arg, so that we can check
12214         types better.  Put it just after flags.  Change cwd failure
12215         indicator from pointer-to-bool to pointer-to-errno-value.
12216         All callers changed.
12217         Invoke openat_save_fail and/or openat_restore_fail if
12218         cwd_errno is null, so that openat can call us.
12219         (openat_permissive, fdopendir, fstatat, unlinkat):
12220         Simplify errno handling to avoid some duplicate code,
12221         as it's OK to set errno on success.
12222         * lib/openat.h: Revamp code so that function macros depend on
12223         __OPENAT_PREFIX only, not also on AT_FDCWD.
12224         (openat_ro): Remove.  Caller changed to use openat_permissive.
12225         (openat_permissive): Now a macro, if not a function.
12226         (openat_restore_fail, openat_save_fail): Now always functions,
12227         since mkdirat needs them even if __OPENAT_PREFIX is defined.
12228
12229         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
12230         and openat.c.
12231         * lib/mkdirat.c: Include openat-priv.h.
12232         Remove definitions of macros defined therein.
12233         * lib/openat.c: Likewise.
12234
12235         * lib/mkdirat.c (mkdirat): New file and function.
12236         * lib/openat.h (mkdirat): Declare.
12237
12238         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
12239
12240         * lib/openat.h (openat_permissive): Declare.
12241         (openat_ro): Define.
12242
12243         * lib/openat.c (EXPECTED_ERRNO): New macro.
12244         (openat_permissive): New function -- used in remove.c rewrite.
12245         (all functions): Set errno just before returning, only if there
12246         was an actual failure.
12247         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
12248
12249         Emulate openat-family functions using Linux's procfs, if possible.
12250         Idea and some code based on Ulrich Drepper's glibc changes.
12251
12252         * lib/openat.c: (BUILD_PROC_NAME): New macro.
12253         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
12254         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
12255         before falling back on save_cwd and restore_cwd.
12256         (fdopendir, fstatat, unlinkat): Likewise.
12257
12258         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
12259         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
12260
12261         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
12262         as second argument to va_arg.  Otherwise, some versions of gcc
12263         warn that `if this code is reached, the program will abort'.
12264
12265 2006-01-09  Jim Meyering  <jim@meyering.net>
12266
12267         Sync from coreutils.
12268         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
12269         Require openat-priv.h.
12270
12271 2006-01-09  Bruno Haible  <bruno@clisp.org>
12272
12273         * modules/strnlen (Include): Use strnlen.h.
12274
12275 2006-01-09  Bruno Haible  <bruno@clisp.org>
12276
12277         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
12278
12279 2006-01-09  Bruno Haible  <bruno@clisp.org>
12280
12281         * lib/sysexit_.h (EX_OK): New macro.
12282         Suggested by Martin Lambers <marlam@marlam.de>.
12283
12284 2006-01-09  Bruno Haible  <bruno@clisp.org>
12285
12286         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
12287         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
12288
12289 2006-01-09  Bruno Haible  <bruno@clisp.org>
12290
12291         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
12292         numbers.
12293
12294 2006-01-09  Bruno Haible  <bruno@clisp.org>
12295
12296         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
12297         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
12298         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
12299         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
12300
12301 2006-01-09  Bruno Haible  <bruno@clisp.org>
12302
12303         * build-aux/javacomp.sh.in: New file, moved from lib/.
12304         * modules/javacomp-script (Files): Update.
12305         (configure.ac): Add AC_CONFIG_FILES invocation.
12306         (EXTRA_DIST): Remove variable.
12307
12308         * build-aux/javaexec.sh.in: New file, moved from lib/.
12309         * modules/javaexec (Files): Update.
12310         (configure.ac): Add AC_CONFIG_FILES invocation.
12311         (EXTRA_DIST): Remove javaexec.sh.in.
12312
12313         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
12314         * modules/csharpcomp-script (Files): Update.
12315         (configure.ac): Add AC_CONFIG_FILES invocation.
12316         (EXTRA_DIST): Remove variable.
12317
12318         * build-aux/csharpexec.sh.in: New file, moved from lib/.
12319         * modules/csharpexec (Files): Update.
12320         (configure.ac): Add AC_CONFIG_FILES invocation.
12321         (EXTRA_DIST): Remove csharpexec.sh.in.
12322
12323 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
12324
12325         Sync from coreutils.
12326
12327         Add POSIX ACL support
12328         * lib/acl.h (copy_acl, set_acl): Add declarations.
12329         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
12330         systems other than Linux.
12331         (chmod_or_fchmod): New function: use fchmod when possible,
12332         and chmod otherwise.
12333         (file_has_acl): Add a POSIX ACL implementation, with a
12334         Linux-specific subcase.
12335         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
12336         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
12337         acls are unsupported.
12338         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
12339         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
12340         are unsupported.
12341
12342 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
12343
12344         Sync from coreutils.
12345         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
12346
12347 2006-01-07  Bruno Haible  <bruno@clisp.org>
12348
12349         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
12350         gl_EARLY.
12351
12352 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
12353
12354         * lib/strftime.c (tzname): Don't declare if it is already #defined.
12355         Problem reported for Mingw by Mark Junker.
12356
12357 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
12358
12359         * README: Gnulib normally doesn't generate a tarball.
12360
12361 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
12362
12363         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
12364         long int, not int, for nanosecond counts, so that people who are
12365         used to POSIX struct timespec won't be surprised.  Reported by Jim
12366         Meyering.
12367
12368 2005-12-28  Bruno Haible  <bruno@clisp.org>
12369
12370         * build-aux/config.rpath: Update from GNU gettext.
12371
12372 2005-12-16  Jim Meyering  <jim@meyering.net>
12373
12374         * modules/fprintftime: New module.
12375         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
12376
12377 2005-12-16  Jim Meyering  <jim@meyering.net>
12378
12379         * m4/fprintftime.m4: New file.
12380
12381 2005-12-16  Jim Meyering  <jim@meyering.net>
12382
12383         * lib/fprintftime.c, lib/fprintftime.h: New files.
12384
12385 2005-12-15  Simon Josefsson  <jas@extundo.com>
12386
12387         * modules/socklen (configure.ac): Fix M4 macro name, to align with
12388         new m4/socklen.m4.
12389
12390 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
12391
12392         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
12393         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
12394
12395 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
12396
12397         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
12398         * lib/argp-help.c (fill_in_uparams): Check if the constructed
12399         struct uparams is valid. Fall back to the default values if it is
12400         not.
12401
12402 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
12403
12404         * modules/argp (Files): Add argp-pin.c
12405         (Depends-on): dirname
12406         (lib_SOURCES): Add argp-pin.c
12407
12408 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
12409
12410         * m4/argp.m4:  Check if program_invocation_name and
12411         program_invocation_short_name are declared and define appropriate
12412         macros if they are not.
12413
12414 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
12415
12416         * lib/argp-help.c (__argp_base_name): New function
12417         (__argp_short_program_name): Rewrite using __argp_base_name
12418         * lib/argp-namefrob.h: Define program_invocation_name and
12419         program_invocation_short_name if requested
12420         (__argp_base_name): Add prototype
12421         * lib/argp-parse.c (argp_def): Use gettext wrappers
12422         (argp_default_parser): Use __argp_base_name
12423         * lib/argp-pin.c: New file. Defines program_invocation_name and
12424         program_invocation_short_name on systems that lack them.
12425
12426 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
12427
12428         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
12429         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
12430         porting problem reported by Georg Schwarz in
12431         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
12432
12433 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
12434
12435         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
12436         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
12437         porting problem reported by Georg Schwarz in
12438         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
12439
12440 2005-12-05  Bruno Haible  <bruno@clisp.org>
12441
12442         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
12443         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
12444         Reported by Mark Junker <mjscod@gmx.de>.
12445
12446 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
12447
12448         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
12449         Use implementation from Albert Chin, with some
12450         comments/corrections by Stepan Kasal and myself.
12451
12452 2005-12-02  Bruno Haible  <bruno@clisp.org>
12453
12454         * gnulib-tool (func_import): Accept GPLed build tool modules when
12455         --lgpl is given.
12456         * modules/csharpcomp-script: New file.
12457         * modules/csharpcomp: Depend on it.
12458         * modules/javacomp-script: New file.
12459         * modules/javacomp: Depend on it.
12460         Suggested by Simon Josefsson.
12461
12462 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
12463
12464         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
12465         statement, to work around an HP-UX 10.20 compiler bug reported by
12466         Peter O'Gorman.
12467
12468 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
12469
12470         * modules/savedir (Depends-on): Add openat.
12471
12472 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
12473
12474         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
12475         (uintmax_t) [defined uintmax_t]: Do not declare.
12476         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
12477         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
12478         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
12479         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
12480         sake of portability to weird hosts that C allows (though we don't
12481         know of any practical examples).
12482
12483         * lib/savedir.h (fdsavedir): New decl.
12484         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
12485         contains most of the former guts of savedir.
12486         (savedir): Use savedirstream.
12487         Include "openat.h".
12488
12489 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
12490
12491         * modules/obstack (Files): Add m4/ulonglong.m4.
12492         Problem reported by Davide Angelocola.
12493
12494 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
12495
12496         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
12497         coreutils no longer futzes with rounding modes.
12498
12499 2005-11-14  Jim Meyering  <jim@meyering.net>
12500
12501         * lib/mkstemp-safer.c: Include <config.h>, required for possible
12502         replacement of mkstemp.
12503
12504 2005-11-10  Simon Josefsson  <jas@extundo.com>
12505
12506         * lib/readline.c: Remove EOL.
12507
12508 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
12509
12510         * modules/gethrxtime (Depends-on): Add gettime.
12511
12512 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
12513
12514         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
12515         or gettimeofday; no longer needed.
12516
12517 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
12518
12519         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
12520         time business.
12521         (gethrxtime) [! (HAVE_NANOUPTIME
12522         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
12523         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
12524         our own approximation.
12525
12526 2005-11-08  Eric Blake  <ebb9@byu.net>
12527
12528         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
12529
12530 2005-11-08  Eric Blake  <ebb9@byu.net>
12531
12532         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
12533
12534 2005-11-04  Bruno Haible  <bruno@clisp.org>
12535
12536         * gnulib-tool: Implement --update mode.
12537
12538 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
12539
12540         Fix porting problem reported by Theodoros V. Kalamatianos.
12541         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
12542         Don't assume that futimes failing means we must fail.
12543
12544 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
12545
12546         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
12547         variables to suggest the intended function of the PATH_MAX check.
12548
12549 2005-10-30  Kean Johnston  <jkj@sco.com>
12550
12551         Trivial changes to support SCO systems.
12552         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
12553         as PATH_MAX.
12554         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
12555         where __ptr is null when no I/O is pending.
12556
12557 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
12558
12559         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
12560         leave errno alone.  Problem reported by Dmitry V. Levin.
12561
12562 2005-10-28  Simon Josefsson  <jas@extundo.com>
12563
12564         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
12565         Test more.
12566
12567         * tests/test-gc-md2.c, tests/test-md2.c: New files.
12568
12569         * modules/md2, modules/md2-tests: New files.
12570
12571 2005-10-28  Simon Josefsson  <jas@extundo.com>
12572
12573         * m4/inet_ntop.m4: More tests.
12574
12575         * m4/gc-md2.m4, md2.m4: New file.
12576
12577 2005-10-28  Simon Josefsson  <jas@extundo.com>
12578
12579         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
12580         "restrict" keywords, as per POSIX.  Protect the function
12581         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
12582         Don't use K&R prototypes.  Check the sprintf return values.
12583         Re-define EAFNOSUPPORT if not present.  Indent.
12584
12585         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
12586         suggested by Bruno Haible <bruno@clisp.org>.
12587
12588         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
12589
12590         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
12591
12592         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
12593         libgcrypt).
12594
12595         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
12596
12597         * lib/md2.h, lib/md2.c: New files.
12598
12599 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
12600
12601         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
12602         errno alone.  Problem reported by Frederic Jolliton.
12603
12604 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
12605
12606         * modules/verify (License): Change from GPL to LGPL.  This is a
12607         tiny module and there are apparently near-equivalents that are
12608         under the BSD license.
12609
12610 2005-10-24  Simon Josefsson  <jas@extundo.com>
12611
12612         * modules/sha1: Relicense to LGPL.
12613
12614 2005-10-24  Simon Josefsson  <jas@extundo.com>
12615
12616         * lib/md4.h: Shrink buffer size, now that we changed the type.
12617
12618 2005-10-23  Simon Josefsson  <jas@extundo.com>
12619
12620         * gnulib-tool (func_import): Fix --tests-base.
12621
12622 2005-10-22  Simon Josefsson  <jas@extundo.com>
12623
12624         * modules/arcfour (Depends-on): Need stdint.
12625
12626 2005-10-22  Simon Josefsson  <jas@extundo.com>
12627
12628         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
12629         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
12630
12631 2005-10-22  Simon Josefsson  <jas@extundo.com>
12632
12633         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
12634         suggested by Bruno Haible <bruno@clisp.org>.
12635
12636 2005-10-22  Simon Josefsson  <jas@extundo.com>
12637
12638         * lib/crc.h: Include stddef.h, for size_t.
12639
12640 2005-10-22  Simon Josefsson  <jas@extundo.com>
12641
12642         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
12643         arcfour_context struct (simplify test vector testing in GNU
12644         Shishi).
12645
12646 2005-10-21  Simon Josefsson  <jas@extundo.com>
12647
12648         * modules/des, modules/des-tests: New files.
12649
12650         * modules/gc-des, modules/gc-des-tests: New files.
12651
12652         * tests/test-des.c, tests/test-gc-des.c: New file.
12653
12654 2005-10-21  Simon Josefsson  <jas@extundo.com>
12655
12656         * modules/arctwo, modules/arctwo-tests: New files.
12657
12658         * tests/test-arctwo.c: New file.
12659
12660         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
12661
12662         * tests/test-gc-arctwo.c: New file.
12663
12664 2005-10-21  Simon Josefsson  <jas@extundo.com>
12665
12666         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
12667         Bruno Haible <bruno@clisp.org>.
12668
12669         * m4/gc-des.m4: New file.
12670
12671 2005-10-21  Simon Josefsson  <jas@extundo.com>
12672
12673         * m4/arctwo.m4: New file.
12674
12675         * m4/gc-arctwo.m4: New file.
12676
12677 2005-10-21  Simon Josefsson  <jas@extundo.com>
12678
12679         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
12680         block.
12681
12682 2005-10-21  Simon Josefsson  <jas@extundo.com>
12683
12684         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
12685         <bruno@clisp.org>.
12686
12687         * lib/hmac-sha1.c (hmac_sha1): Likewise.
12688
12689         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
12690         Bruno Haible <bruno@clisp.org>.
12691
12692         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
12693         <bruno@clisp.org>.
12694
12695 2005-10-21  Simon Josefsson  <jas@extundo.com>
12696
12697         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
12698
12699 2005-10-21  Simon Josefsson  <jas@extundo.com>
12700
12701         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
12702
12703 2005-10-21  Simon Josefsson  <jas@extundo.com>
12704
12705         * lib/des.h, lib/des.c: New files.
12706
12707         * lib/gc-gnulib.c: Support DES.c
12708
12709 2005-10-21  Simon Josefsson  <jas@extundo.com>
12710
12711         * lib/arctwo.h, lib/arctwo.c: New files.
12712
12713         * lib/gc-gnulib.c: Support ARCTWO.
12714
12715 2005-10-21  Simon Josefsson  <jas@extundo.com>
12716
12717         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
12718         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
12719
12720 2005-10-21  Simon Josefsson  <jas@extundo.com>
12721
12722         * gnulib-tool (func_import, func_create_testdir): Define automake
12723         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
12724         Makefile.am snippet),
12725         suggested by Bruno Haible <bruno@clisp.org>.
12726
12727         * modules/gc (Makefile.am): Use it.
12728
12729 2005-10-21  Bruno Haible  <bruno@clisp.org>
12730
12731         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
12732         patch.
12733
12734 2005-10-19  Simon Josefsson  <jas@extundo.com>
12735
12736         * tests/test-gc-rijndael.c: New file.
12737
12738         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
12739
12740 2005-10-19  Simon Josefsson  <jas@extundo.com>
12741
12742         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
12743         interface too.
12744
12745 2005-10-19  Simon Josefsson  <jas@extundo.com>
12746
12747         * tests/test-gc-arcfour.c: New file.
12748
12749         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
12750
12751 2005-10-19  Simon Josefsson  <jas@extundo.com>
12752
12753         * modules/gc-md4, modules/gc-md4-tests: New file.
12754
12755         * tests/test-gc-md4.c: New file.
12756
12757 2005-10-19  Simon Josefsson  <jas@extundo.com>
12758
12759         * m4/gc-md4.m4: New file.
12760
12761 2005-10-19  Simon Josefsson  <jas@extundo.com>
12762
12763         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
12764         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
12765         <kasal@ucw.cz>.
12766
12767 2005-10-19  Simon Josefsson  <jas@extundo.com>
12768
12769         * m4/gc-arcfour.m4: New file.
12770
12771         * m4/gc-rijndael.m4: New file.
12772
12773 2005-10-19  Simon Josefsson  <jas@extundo.com>
12774
12775         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
12776
12777 2005-10-19  Simon Josefsson  <jas@extundo.com>
12778
12779         * lib/gc-gnulib.c: Support ARCFOUR.
12780
12781 2005-10-19  Simon Josefsson  <jas@extundo.com>
12782
12783         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
12784         support.
12785
12786         * lib/gc.h: Add ECB enum type.
12787
12788         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
12789
12790 2005-10-18  Simon Josefsson  <jas@extundo.com>
12791
12792         * tests/test-md5.c: New file.
12793
12794         * modules/md5-tests: New file.
12795
12796 2005-10-18  Simon Josefsson  <jas@extundo.com>
12797
12798         * tests/test-md4.c: New file.
12799
12800         * modules/md4, modules/md4-tests: New files.
12801
12802 2005-10-18  Simon Josefsson  <jas@extundo.com>
12803
12804         * m4/md4.m4: New file.
12805
12806 2005-10-18  Simon Josefsson  <jas@extundo.com>
12807
12808         * lib/md4.h, lib/md4.c: New files, based on md5.?.
12809
12810 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
12811
12812         * gnulib-tool (func_create_testdir): Omit the second check whether
12813         BUILT_SOURCES in nonempty.
12814
12815 2005-10-17  Simon Josefsson  <jas@extundo.com>
12816
12817         * tests/test-rijndael.c: New file.
12818
12819 2005-10-17  Simon Josefsson  <jas@extundo.com>
12820
12821         * modules/sha1: Depend on stdint instead of md5.
12822
12823         * modules/md5: Depend on stdint, remove uint32_t.
12824
12825 2005-10-17  Simon Josefsson  <jas@extundo.com>
12826
12827         * modules/gc-sha1-tests: New file.
12828
12829         * tests/test-gc-sha1.c: New file.
12830
12831 2005-10-17  Simon Josefsson  <jas@extundo.com>
12832
12833         * m4/md5.m4: Remove call to uint32_t.m4.
12834
12835 2005-10-17  Simon Josefsson  <jas@extundo.com>
12836
12837         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
12838
12839         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
12840         md5.h.
12841
12842         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
12843
12844         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
12845
12846 2005-10-17  Simon Josefsson  <jas@extundo.com>
12847
12848         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
12849
12850 2005-10-17  Simon Josefsson  <jas@extundo.com>
12851
12852         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
12853
12854 2005-10-17  Simon Josefsson  <jas@extundo.com>
12855
12856         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
12857
12858         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
12859
12860 2005-10-17  Bruno Haible  <bruno@clisp.org>
12861
12862         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
12863         that it can also be used in a test.
12864
12865 2005-10-16  Bruno Haible  <bruno@clisp.org>
12866
12867         * gnulib-tool (func_emit_tests_Makefile_am): Also define
12868         TESTS_ENVIRONMENT, so that individual tests can augment it.
12869
12870         * gnulib-tool (func_create_testdir): Use an intermediate target for
12871         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
12872         macros, like $(ALLOCA_H), which cannot be passed through the command
12873         line.
12874
12875 2005-10-15  Simon Josefsson  <jas@extundo.com>
12876
12877         * modules/rijndael-tests: New file.
12878
12879         * modules/rijndael: New file.
12880
12881 2005-10-15  Simon Josefsson  <jas@extundo.com>
12882
12883         * m4/rijndael.m4: New file.
12884
12885 2005-10-15  Simon Josefsson  <jas@extundo.com>
12886
12887         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
12888
12889         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
12890
12891 2005-10-14  Simon Josefsson  <jas@extundo.com>
12892
12893         * tests/test-arcfour.c: New file.
12894
12895         * modules/arcfour, modules/arcfour-tests: New files.
12896
12897 2005-10-14  Simon Josefsson  <jas@extundo.com>
12898
12899         * m4/arcfour.m4: New file.
12900
12901 2005-10-14  Simon Josefsson  <jas@extundo.com>
12902
12903         * lib/arcfour.h, lib/arcfour.c: New files.
12904
12905 2005-10-14  Roland McGrath  <roland@redhat.com>
12906
12907         Import from libc.  [BZ #1331]
12908         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
12909         macro argument.
12910         Reported by Matej Vela <vela@debian.org>.
12911
12912 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
12913
12914         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
12915         include <wchar.h>; no longer needed.
12916
12917 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
12918
12919         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
12920
12921 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
12922         and  Ulrich Drepper  <drepper@redhat.com>
12923
12924         Import from libc.
12925         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
12926         instead of inline stream orientation test and two separate
12927         function calls.  Pay no attention to USE_IN_LIBIO.
12928
12929 2005-10-13  Simon Josefsson  <jas@extundo.com>
12930
12931         * modules/gc-hmac-md5-tests: New file.
12932
12933         * tests/test-gc-hmac-sha1.c: New file.
12934
12935         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
12936
12937         * modules/gc-hmac-md5-tests: New file.
12938
12939         * tests/test-gc-md5.c: New file.
12940
12941         * modules/gc-md5-tests: New file.
12942
12943 2005-10-13  Simon Josefsson  <jas@extundo.com>
12944
12945         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
12946         Move memory allocation outside of loop.
12947
12948 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
12949
12950         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
12951         intermediate directory is in a read-only file system.  Problem
12952         reported by Eric Blake.
12953
12954 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
12955
12956         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
12957
12958 2005-10-12  Simon Josefsson  <jas@extundo.com>
12959
12960         * tests/test-hmac-sha1.c: New file.
12961
12962         * modules/hmac-sha1-tests: New file.
12963
12964         * modules/hmac-sha1: New file.
12965
12966 2005-10-12  Simon Josefsson  <jas@extundo.com>
12967
12968         * modules/gc-sha1: New file.
12969
12970 2005-10-12  Simon Josefsson  <jas@extundo.com>
12971
12972         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
12973
12974         * tests/test-gc-pbkdf2-sha1.c: New file.
12975
12976 2005-10-12  Simon Josefsson  <jas@extundo.com>
12977
12978         * modules/gc-md5, modules/gc-hmac-md5: New files.
12979
12980         * modules/gc (Files): Remove md5, memxor and hmac files.
12981
12982 2005-10-12  Simon Josefsson  <jas@extundo.com>
12983
12984         * m4/gc-pbkdf2-sha1.m4: New file.
12985
12986         * m4/gc-hmac-sha1.m4: New file.
12987
12988         * m4/gc-sha1: New file.
12989
12990         * m4/hmac-sha1.m4: New file.
12991
12992 2005-10-12  Simon Josefsson  <jas@extundo.com>
12993
12994         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
12995
12996         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
12997
12998 2005-10-12  Simon Josefsson  <jas@extundo.com>
12999
13000         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
13001         suggested by Bruno Haible <bruno@clisp.org>.
13002
13003 2005-10-12  Simon Josefsson  <jas@extundo.com>
13004
13005         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
13006
13007 2005-10-12  Simon Josefsson  <jas@extundo.com>
13008
13009         * lib/gc-pbkdf2-sha1.c: New file.
13010
13011         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
13012
13013 2005-10-12  Simon Josefsson  <jas@extundo.com>
13014
13015         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
13016
13017         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
13018
13019 2005-10-12  Simon Josefsson  <jas@extundo.com>
13020
13021         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
13022         GC_USE_HMAC_MD5, respectively.
13023
13024         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
13025         (gc_md5): Fix typo.
13026
13027         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
13028
13029         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
13030
13031         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
13032
13033 2005-10-12  Bruno Haible  <bruno@clisp.org>
13034
13035         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
13036         Reported by Stepan Kasal <kasal@ucw.cz>.
13037
13038 2005-10-11  Simon Josefsson  <jas@extundo.com>
13039
13040         * tests/test-crc.c: New file.
13041
13042         * modules/crc, modules/crc-tests: New files.
13043
13044 2005-10-11  Simon Josefsson  <jas@extundo.com>
13045
13046         * m4/crc.m4: New file.
13047
13048 2005-10-11  Simon Josefsson  <jas@extundo.com>
13049
13050         * lib/gc.h: Add gc_hash and gc_hash_buffer.
13051
13052         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
13053
13054         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
13055
13056 2005-10-11  Simon Josefsson  <jas@extundo.com>
13057
13058         * lib/crc.h, lib/crc.c: New files.
13059
13060         * lib/gc.h (gc_hash_buffer): Add doc.
13061
13062 2005-10-11  Bruno Haible  <bruno@clisp.org>
13063
13064         * modules/c-strcasestr: New file.
13065         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
13066
13067 2005-10-11  Bruno Haible  <bruno@clisp.org>
13068
13069         * modules/c-strcase: New file.
13070         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
13071
13072 2005-10-11  Bruno Haible  <bruno@clisp.org>
13073
13074         * lib/strcasecmp.c: Include limits.h.
13075         (strcasecmp): Avoid integer overflow on exotic platforms.
13076         * lib/strncasecmp.c: Include limits.h.
13077         (strncasecmp): Avoid integer overflow on exotic platforms.
13078         Reported by Paul Eggert.
13079
13080 2005-10-11  Bruno Haible  <bruno@clisp.org>
13081
13082         * lib/c-strcasestr.h: New file, from GNU gettext.
13083         * lib/c-strcasestr.c: New file, from GNU gettext.
13084
13085 2005-10-11  Bruno Haible  <bruno@clisp.org>
13086
13087         * lib/c-strcase.h: New file, from GNU gettext.
13088         * lib/c-strcasecmp.c: New file, from GNU gettext.
13089         * lib/c-strncasecmp.c: New file, from GNU gettext.
13090
13091 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
13092
13093         * modules/mempcpy (License): GPL -> LGPL.
13094         * modules/strchrnul (License): Likewise.
13095         * modules/sysexits (License): Likewise.
13096
13097 2005-10-08  Simon Josefsson  <jas@extundo.com>
13098
13099         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
13100
13101 2005-10-07  Simon Josefsson  <jas@extundo.com>
13102
13103         * m4/memxor.m4: Remove gl_C_RESTRICT call.
13104
13105 2005-10-06  Simon Josefsson  <jas@extundo.com>
13106
13107         * tests/test-hmac-md5.c: New file.
13108
13109         * modules/hmac-md5-tests: New file.
13110
13111         * modules/hmac-md5: New file.
13112
13113 2005-10-06  Simon Josefsson  <jas@extundo.com>
13114
13115         * m4/hmac-md5.m4: New file.
13116
13117         * m4/memxor.m4: Require gl_C_RESTRICT.
13118
13119 2005-10-06  Simon Josefsson  <jas@extundo.com>
13120
13121         * lib/memxor.c (memxor): Avoid casts and warnings.
13122
13123 2005-10-06  Simon Josefsson  <jas@extundo.com>
13124
13125         * lib/hmac-md5.c: New file.
13126
13127         * lib/hmac.h: New file.
13128
13129 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
13130
13131         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
13132         promotes to int, not unsigned int, to catch the AIX 5.3
13133         compiler bug.
13134
13135 2005-10-05  Simon Josefsson  <jas@extundo.com>
13136
13137         * modules/memxor: New file.
13138
13139         * modules/iconv (Files): Move config.rpath to havelib, it is used
13140         there.
13141
13142         * modules/havelib (Files): Add config.rpath.
13143
13144 2005-10-05  Simon Josefsson  <jas@extundo.com>
13145
13146         * m4/memxor.m4: New file.
13147
13148 2005-10-05  Simon Josefsson  <jas@extundo.com>
13149
13150         * lib/memxor.c (memxor): Fix compiler error.
13151
13152         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
13153         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
13154
13155         * lib/memxor.h, lib/memxor.c: New files.
13156
13157         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
13158         we assume all systems have it, suggested by Jim Meyering
13159         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
13160         any systems lack sys/socket.h; mingw32 is known to lack it, but we
13161         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
13162         same reasons.
13163
13164 2005-10-05  Simon Josefsson  <jas@extundo.com>
13165
13166         * config/srclist.txt: Add glibc bug 1423 for md5.h.
13167
13168 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
13169
13170         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
13171         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
13172         needed, since the source code now assumes these .h files.
13173
13174 2005-10-05  Derek Price  <derek@ximbiot.com>
13175
13176         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
13177
13178 2005-10-05  Bruno Haible  <bruno@clisp.org>
13179
13180         * modules/stdint (License): Change to LGPL.
13181
13182 2005-10-04  Simon Josefsson  <jas@extundo.com>
13183
13184         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
13185         D. Baushke" <mdb@gnu.org>.
13186
13187 2005-10-04  Bruno Haible  <bruno@clisp.org>
13188
13189         * lib/verify.h (verify_true): Provide alternative definition for C++.
13190
13191 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
13192
13193         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
13194         (SSIZE_MAX): New macro, if not already defined.
13195         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
13196         than 2 GiB.
13197
13198 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
13199
13200         Sync from coreutils.
13201         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
13202         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
13203         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
13204         ULLONG_MAX doesn't work with 2.7.2.1.
13205
13206 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
13207
13208         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
13209         From Ben Pfaff.
13210
13211         * modules/exclude (Depends-on): Depend on verify.
13212         * modules/strtoimax (Depends-on): Likewise.
13213         * modules/utimecmp (Depends-on): Likewise.
13214
13215 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
13216
13217         * lib/exclude.c: Include verify.h.
13218         (verify): Remove.  All callers changed to use verify.h's version.
13219         * lib/strtoimax.c: Likewise.
13220         * lib/utimecmp.c: Likewis.e
13221
13222         Sync from coreutils.
13223         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
13224         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
13225         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
13226         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
13227         bother returning ENOSYS if settimeofday or stime fails; just let
13228         them return whatever errno they want to return.
13229         * lib/utimens.c: Include unistd.h, for dup2.
13230         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
13231         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
13232
13233 2005-10-02  Jim Meyering  <jim@meyering.net>
13234
13235         Sync from coreutils.
13236         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
13237         from glibc-2.2.5 that fails for read-only files.
13238
13239 2005-10-02  Jim Meyering  <jim@meyering.net>
13240
13241         Sync from coreutils.
13242         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
13243         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
13244         `#if HAVE_CONFIG_H'.
13245         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
13246         Remove AT_FDCWD test.
13247         Do not consume the fd unless successful.
13248         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
13249         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
13250         block, so that we don't even try to compile it if settimeofday is
13251         available.  This works around a compilation failure on OSF1 V5.1,
13252         due to stime requiring a `long int*' while tv_sec is `int'.
13253
13254 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
13255
13256         Sync from coreutils.
13257         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
13258         against `yes', rather than just testing for nonempty.
13259
13260 2005-10-01  Simon Josefsson  <jas@extundo.com>
13261
13262         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
13263         and Darwin.
13264
13265         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
13266         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
13267         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
13268         freeaddrinfo and gai_strerror are declared by the POSIX headers.
13269         Check if struct addrinfo is declared.
13270
13271 2005-10-01  Simon Josefsson  <jas@extundo.com>
13272
13273         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
13274         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
13275         AI_* and EAI_* definitions.  Protect function declarations.
13276
13277 2005-10-01  Jim Meyering  <jim@meyering.net>
13278
13279         Sync from coreutils.
13280
13281         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
13282         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
13283         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
13284         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
13285         in the inet and nsl libraries.  Required on Solaris 5.7.
13286
13287 2005-10-01  Jim Meyering  <jim@meyering.net>
13288
13289         Sync from coreutils.
13290         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
13291         in the inet and nsl libraries.  Required on Solaris 5.7.
13292
13293 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
13294
13295         * lib/getdelim.c (getdelim): Remove unused variables.
13296
13297 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
13298
13299         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
13300         so that the code works even with ancient cpp.  Portability problem
13301         with GCC 2.7.2.1 reported by Thomas M.Ott.
13302
13303 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
13304
13305         * modules/regex (Depends-on): Add strcase.
13306
13307         * modules/gethostname (Licence): Change from GPL to LGPL, since
13308         gethostname.c is a trivial implementation of a standard library
13309         function.
13310         * modules/poll (License): Change from GPL to LGPL, since it's
13311         derived from LGPL code.
13312
13313 2005-09-27  Jim Meyering  <jim@meyering.net>
13314
13315         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
13316         HAVE_CONFIG_H.
13317
13318         * lib/intprops.h (signed_type_or_expr__): Define.
13319         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
13320         for unsigned types.
13321
13322 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
13323
13324         * lib/verify.h (verify_expr): Remove, replacing with:
13325         (verify_true): New macro that returns true instead of void.
13326         (verify_type__): Remove.
13327         (verify): Use verify_true rather than verify_type__.
13328
13329 2005-09-26  Bruno Haible  <bruno@clisp.org>
13330
13331         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
13332         is necessary.
13333         (lib_SOURCES): Remove mbchar.c.
13334         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
13335         (Files): Add m4/mbrtowc.m4.
13336         * modules/mbiter: Likewise.
13337         * modules/mbuiter: Likewise.
13338
13339 2005-09-26  Bruno Haible  <bruno@clisp.org>
13340
13341         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
13342         compile mbchar.c if they are not both present.
13343         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
13344         * m4/mbiter.m4 (gl_MBITER): Likewise.
13345         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
13346         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
13347         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
13348
13349 2005-09-25  Jim Meyering  <jim@meyering.net>
13350
13351         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
13352         also uses socklen_t.
13353
13354 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
13355
13356         * lib/utimens.c (ENOSYS): Define if not already defined.
13357         (futimens): Support having a null PATH if the file descriptor
13358         is nonnegative.
13359
13360         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
13361         Remove.
13362         (__attribute): Define to empty unless GCC 3.1 or later.
13363         This works around a core dump on OpenBSD 3.4, which has GCC
13364         2.95.3, which dumps core when given __attribute__(()).  It also
13365         simplifies other tests, since we really don't want to bother with
13366         worrying about which ancient version of GCC supported what.
13367         Original problem reported by Yoann Vandoorselaere, with part of
13368         the fix suggested by Derek Price.
13369
13370 2005-09-24  Jim Meyering  <jim@meyering.net>
13371
13372         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
13373         so we can once again use a positive bitfield width of 1 -- now we
13374         don't have to explain why we were using a bitfield width of 2.
13375
13376 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
13377
13378         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
13379         and similarly for the other external symbols.  Problem reported
13380         by James Gallager.
13381
13382         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
13383         bug reported by Jim Meyering.
13384
13385         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
13386         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
13387         not needed, since socklen is a prerequisite module.
13388
13389 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
13390
13391         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
13392         Problem reported by Eric Blake.
13393         (getaddrinfo): Initialize se so that it's not garbage.
13394         Redo internal storage allocation so that it doesn't make unportable
13395         assumptions about alignment.
13396         Fix a memory leak.
13397
13398         * lib/utimens.c (futimens): Use futimesat if available.
13399         Prefer it to futimes since it doesn't have the futimes bug.
13400
13401         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
13402         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
13403         Instead, declare a function that returns a pointer to an array,
13404         and use verify_type__ to declare the size of the array.
13405         Problem and germ of a solution reported by Bruno Haible.
13406         (verify_type__): Use 2, not 1, for bitfield size, to avoid
13407         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
13408
13409 2005-09-23  Jim Meyering  <jim@meyering.net>
13410
13411         Sync from coreutils.
13412         Correct build failure (socklen_t not defined) on at least
13413         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
13414         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
13415
13416 2005-09-23  Jim Meyering  <jim@meyering.net>
13417
13418         * modules/getaddrinfo (Depends-on): Add socklen.
13419
13420 2005-09-23  Bruno Haible  <bruno@clisp.org>
13421
13422         * tests/test-verify.c: New file.
13423
13424 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
13425
13426         Sync from coreutils.
13427
13428         * modules/argmatch (Depends-on): Add verify.
13429         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
13430         unistd-safer.
13431         * modules/save-cwd (Depends-on): Likewise.
13432
13433         * modules/openat (Files): Add lib/openat-die.c.
13434         (Depends-on): Remove error, exitfail.
13435         Add dirname.
13436
13437         * modules/verify: New file.
13438         * MODULES.html.sh (Diagnostics <assert.h>): New section,
13439         with "verify" module.
13440
13441 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
13442
13443         Sync from coreutils.
13444
13445         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
13446         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
13447         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
13448         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
13449         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
13450         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
13451         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
13452         Don't bother checking for string.h, stdlib.h, unistd.h.
13453         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
13454         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
13455         module's job.
13456         * m4/jm-macros.m4 (gl_MACROS): Likewise.
13457         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
13458
13459         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
13460         (gl_GETDATE): Use it.
13461
13462         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
13463
13464 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
13465
13466         Sync from coreutils.
13467
13468         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
13469         stat-time.h.
13470         * lib/argmatch.h: Include verify.h
13471         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
13472         (ARGMATCH_ASSERT): Remove; unused.
13473         * lib/canonicalize.c: Assume STDC_HEADERS.
13474         * lib/exclude.c: Include "strcase.h".
13475         * lib/regex_internal.h [!defined _LIBC]: Likewise.
13476         * lib/getusershell.c: Include stdio--.h rather than stdio.h
13477         and stdio-safer.h.
13478         (getusershell): Call fopen, not fopen_safer.
13479         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
13480         Do not include unistd-safer.h.
13481         (save_cwd): Don't call fd_safer; no longer needed
13482         now that we include fcntl--.h.
13483
13484         * lib/getdate.y (relative_time): New type.
13485         (RELATIVE_TIME_0): New constant.
13486         (parser_control): Use relative_time instead of doing it ourselves.
13487         (%union): Add new relative_time rel member.
13488         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
13489         Now typeless.
13490         (relunit, relunit_snumber): Now of type rel.
13491         (zone, rel, relunit, get_date): Adjust to above changes.
13492
13493         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
13494         Do not include unistd-safer.h.
13495         (getloadavg): Don't call fd_safer; no longer needed
13496         now that we include fcntl--.h.
13497
13498         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
13499         (make_dir_parents): Treat ENOSYS like EEXIST.
13500
13501         Improve quality of diagnostics on restore_cwd failure.
13502         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
13503         (make_dir_parents): Last arg is now int * (for errno), not bool *.
13504         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
13505         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
13506         each time through the loop.  Do not diagnose restore_cwd failure;
13507         that is the caller's job (and perhaps the caller does not care).
13508
13509         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
13510         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
13511         If the file already exists but is not a directory, don't bother
13512         to try to make its parents.
13513         Close potential file descriptor leak if we can't chdir("/") (!).
13514         Don't always return true if chdir($PWD) fails; return true only
13515         if the requested action was done successfully (except for the
13516         chdir($PWD)).
13517         Don't log final directory unless we actually made it.
13518         Refactor to avoid duplicate code to fix up permissions.
13519         Don't attempt to fix up parent permissions if chdir($PWD) fails.
13520
13521         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
13522         to make it a bit faster and (I hope) clearer.
13523         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
13524         Fix bug in formats like %2N.
13525
13526         * lib/verify.h: New file.
13527
13528 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
13529
13530         Sync from coreutils.
13531         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
13532
13533 2005-09-22  Jim Meyering  <jim@meyering.net>
13534
13535         Sync from coreutils.
13536
13537         * m4/lstat.m4 (gl_FUNC_LSTAT):
13538         Use AC_LIBSOURCES to require lstat.c and lstat.h.
13539         Remove obsolete comment.
13540         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
13541         * m4/xstrtod.m4: Likewise.
13542
13543         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
13544
13545 2005-09-22  Jim Meyering  <jim@meyering.net>
13546
13547         Sync from coreutils.
13548
13549         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
13550
13551         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
13552         the .tm_year member, since otherwise gcc-4.0 would now warn about
13553         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
13554
13555         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
13556         order to avoid an unsuppressible warning from gcc on 64-bit systems.
13557
13558         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
13559         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
13560         when run in a time zone for which daylight savings time is in effect
13561         for the starting date.
13562
13563         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
13564         stop us from restricting permissions of just-created absolute-named
13565         directories.
13566         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
13567         to restore initial working directory.
13568         * lib/mkdir-p.c (make_dir_parents): New parameter:
13569         different_working_dir, to tell caller if/when we change the working
13570         directory and are unable to return to the initial one.
13571         * lib/mkdir-p.h (make_dir_parents): Update prototype.
13572         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
13573         `return false'.  This fixes a bug introduced on 2004-07-30.
13574
13575         * lib/openat.c (fdopendir): Be sure to close the supplied
13576         file descriptor before returning.  This makes our replacement
13577         implementation a little closer to Solaris's, where fdopendir
13578         ties the file descriptor to the returned DIR* pointer.
13579         * lib/openat.c (unlinkat): New function.
13580         * lib/openat.h (unlinkat): Add prototype.
13581         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
13582         (openat_restore_fail): Rename from openat_restore_die.
13583         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
13584
13585         Provide an alternative to exiting immediately upon save_cwd or
13586         restore_cwd failure.  Now, an application can arrange e.g.,
13587         to perform a longjump in that case.
13588         * lib/openat.c: Include dirname.h.
13589         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
13590         (rpl_openat, fdopendir, fstatat): Call openat_save_die
13591         and openat_restore_die rather than calling error directly.
13592         Don't include "error.h" or "exitfail.h"; they're no longer needed.
13593
13594         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
13595         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
13596         define.
13597
13598         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
13599         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
13600                             int utc, int nanoseconds);
13601         Background:
13602         date should not have to allocate a megabyte of virtual memory to
13603         handle a format argument like +%1048575T.  When implemented with
13604         strftime, it must allocate such a buffer, use strftime to fill it
13605         in, print it, then free it.
13606         With fprintftime, it simply prints everything and exits.
13607         With no need for memory allocation, that's one fewer way to fail.
13608         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
13609         optional field width, not before, so we accept %9:z, not %:9z.
13610         (my_strftime): Be sure to use L_('x') for literals.
13611
13612         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
13613         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
13614         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
13615         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
13616         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
13617         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
13618         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
13619         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
13620         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
13621         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
13622         * lib/xgethostname.c, lib/xreadlink.c:
13623         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
13624
13625         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
13626         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
13627         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
13628         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
13629         and don't include <sys/file.h>).
13630
13631 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
13632
13633         Sync from coreutils.
13634
13635         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
13636         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
13637         [!LDAV_DONE]: Avoid unused variable warning.
13638
13639 2005-09-21  Bruno Haible  <bruno@clisp.org>
13640
13641         * lib/unicodeio.h (unicode_to_mb): New declaration.
13642
13643 2005-09-20  Derek Price  <derek@ximbiot.com>
13644
13645         * lib/getaddrinfo.c: Don't include <netdb.h> included from
13646         getaddrinfo.h.
13647
13648 2005-09-20  Bruno Haible  <bruno@clisp.org>
13649
13650         * gnulib-tool: Remove trailing slashes from the values specified for
13651         --source-base, --m4-base, --tests-base, --aux-dir.
13652         Suggested by Simon Josefsson <jas@extundo.com>.
13653
13654 2005-09-20  Bruno Haible  <bruno@clisp.org>
13655
13656         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
13657         func_modules_to_filelist, func_import, func_create_testdir): Make all
13658         sorting results locale-independent, so that gnulib-cache.m4 doesn't
13659         change when gnulib-tool is invoked in a different locale.
13660
13661 2005-09-19  Simon Josefsson  <jas@extundo.com>
13662
13663         * m4/socklen.m4: Fix typo.
13664
13665 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13666
13667         Use a consistent style for including <config.h>.
13668         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
13669         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
13670         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
13671         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
13672         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
13673         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
13674         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
13675         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
13676         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
13677         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
13678         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
13679         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
13680         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
13681         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
13682         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
13683         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
13684         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
13685         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
13686         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
13687         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
13688         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
13689         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
13690         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
13691         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
13692         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
13693         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
13694         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
13695         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
13696         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
13697         lib/xstrtoumax.c, lib/yesno.c:
13698         Standardize inclusion of config.h.
13699         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
13700         lib/inttostr.h:  Removed inclusion of config.h from header files.
13701         * lib/inttostr.c:  Adjusted in-tree users.
13702         * lib/timespec.h: Remove superfluous warning to include config.h.
13703         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
13704         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
13705         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
13706         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
13707         config.h with HAVE_CONFIG_H.
13708
13709 2005-09-19  Jim Meyering  <jim@meyering.net>
13710
13711         * modules/pathmax (License): Change to LGPL.
13712
13713 2005-09-19  Derek Price  <derek@ximbiot.com>
13714
13715         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
13716
13717 2005-09-19  Bruno Haible  <bruno@clisp.org>
13718
13719         * gnulib-tool (import): Provide default for --tests-base.
13720
13721 2005-09-19  Bruno Haible  <bruno@clisp.org>
13722
13723         * doc/quote.texi: New file, extracted from gnulib.texi.
13724         * doc/ctime.texi: New file, extracted from gnulib.texi.
13725         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
13726         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
13727         * doc/gnulib.texi: Include them.
13728
13729 2005-09-18  Bruno Haible  <bruno@clisp.org>
13730
13731         Portability fix.
13732         * gnulib-tool (func_readlink): New function.
13733         (func_ln_if_changed): Use it.
13734
13735 2005-09-18  Bruno Haible  <bruno@clisp.org>
13736
13737         * gnulib-tool: Support --with-tests also with --import.
13738         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
13739         (func_import): Use variables $testsbase and $inctests. Emit a
13740         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
13741         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
13742         SUBDIRS += $testsdir.
13743         (func_create_testdir): Update.
13744
13745 2005-09-18  Bruno Haible  <bruno@clisp.org>
13746
13747         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
13748         instead of $dry_run.
13749         (func_cp_if_changed, func_mv_if_changed): Remove functions.
13750         (func_ln_if_changed): Don't handle dry-run here.
13751         (func_import): In dry-run mode, detect more precisely which actions
13752         would be performed, and don't use "...ing" verbs.
13753
13754 2005-09-18  Bruno Haible  <bruno@clisp.org>
13755
13756         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
13757         (func_import): Use join on two temporary files instead of three nested
13758         loops, in order to determine which files are new or old.
13759
13760 2005-09-18  Bruno Haible  <bruno@clisp.org>
13761
13762         * gnulib-tool (func_import): Comment out code that spits out the
13763         new files with --dry-run.
13764
13765 2005-09-18  Bruno Haible  <bruno@clisp.org>
13766
13767         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
13768
13769 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
13770
13771         * lib/stat-time.h: New file.
13772         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
13773         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
13774         in a different way.
13775         (timespec_cmp): New function.
13776         * lib/utimecmp.c: Include stat-time.h.
13777         (SYSCALL_RESOLUTION): Depend on whether various struct stat
13778         members exist, not on the obsolescent ST_MTIM_NSEC.
13779         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
13780
13781 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
13782
13783         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
13784
13785 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
13786
13787         * MODULES.html.sh (File system functions): Add stat-time.
13788         * modules/stat-time: New file.
13789         * modules/timespec (Files): Remove m4/st_mtim.m4; this
13790         is now done in a different way, by the stat-time module.
13791         * modules/utimecmp (Depends-on): Add stat-time.
13792
13793 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
13794
13795         * m4/st_mtim.m4: Remove.  Superseded by...
13796         * m4/stat-time.m4: New file.
13797         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
13798         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
13799
13800 2005-09-15  Derek Price  <derek@ximbiot.com>
13801
13802         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
13803
13804 2005-09-15  Derek Price  <derek@ximbiot.com>
13805
13806         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
13807         * lib/regex_internal.c: Ditto, using this...
13808         (__GNUC_PREREQ): ...new macro.
13809         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
13810         using...
13811         (__GNUC_PREREQ): ...this new macro.
13812
13813         * lib/strstr.h: Include string.h. Define strstr as a macro here.
13814
13815 2005-09-15  Derek Price  <derek@ximbiot.com>
13816             Paul Eggert  <eggert@cs.ucla.edu>
13817
13818         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
13819         changes, consolidating in...
13820         * lib/regex_internal.h: ...this file.
13821
13822 2005-09-13  Jim Meyering  <jim@meyering.net>
13823
13824         * lib/canon-host.c: Filter through gnu indent and reword comments
13825         slightly.
13826         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
13827
13828 2005-09-13  Derek Price  <derek@ximbiot.com>
13829
13830         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
13831         failure.
13832         Reported by Jim Meyering  <jim@meyering.net>.
13833
13834 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
13835
13836         * lib/base64.c: Typo.
13837         (base64_encode): Put b64str in initialized data section.
13838
13839 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
13840
13841         Merge glibc and coreutils changes into gnulib, plus a few
13842         extra fixes.
13843         * lib/md5.c: Use #error rather than a string.
13844         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
13845         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
13846         (__attribute__): Define to empty for non recent-GCC.
13847         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
13848         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
13849         Renamed from their non-__ counterparts, with new macros replacing
13850         them if not _LIBC.  Add __THROW attribute.
13851         (rol): Remove.
13852         (struct md5_ctx): Align buffer if using GCC.
13853         * lib/sha1.h (struct sha1_ctx): Likewise.
13854         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
13855         The old name was backwards.
13856         (NOTSWAP): Remove; not used.
13857         (rol): New macro, moved here from md5.h.
13858         (sha1_process_block): Remove a FIXME that doesn't make sense.
13859
13860 2005-09-12  Derek Price  <derek@ximbiot.com>
13861
13862         Return usable errors from canon-host.
13863         * lib/canon-host.h: New file.
13864         * lib/canon-host.c (canon_host): Wrap...
13865         (canon_host_r): ...this new function, which now relies exclusively on
13866         getaddrinfo.
13867         (ch_strerror): New function.
13868         (last_cherror): New global.
13869         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
13870         interface.
13871         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
13872         void *.
13873         (freeaddrinfo): Free ai->ai_canonname when set.
13874
13875 2005-09-12  Derek Price  <derek@ximbiot.com>
13876
13877         Make canon-host require getaddrinfo.
13878         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
13879         AC_LIBSOURCE canon-host.h.  Call...
13880         (gl_PREREQ_CANON_HOST): ...this new function, which requires
13881         gl_GETADDRINFO.
13882         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
13883
13884 2005-09-12  Derek Price  <derek@ximbiot.com>
13885
13886         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
13887         LGPL.
13888         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
13889
13890 2005-09-12  Derek Price  <derek@ximbiot.com>
13891
13892         * lib/gai_strerror.c: Include config.h when available.  Include
13893         getaddrinfo.h before other headers to test interface.
13894         Reported by Larry Jones <lawrence.jones@ugs.com>.
13895
13896 2005-09-12  Derek Price  <derek@ximbiot.com>
13897             Paul Eggert  <eggert@cs.ucla.edu>
13898
13899         * modules/glob (Files): Add glob-libc.h.
13900
13901 2005-09-12  Derek Price  <derek@ximbiot.com>
13902             Paul Eggert  <eggert@cs.ucla.edu>
13903
13904         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
13905         glob_.h, glob-libc.h.
13906         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
13907
13908 2005-09-12  Derek Price  <derek@ximbiot.com>
13909             Paul Eggert  <eggert@cs.ucla.edu>
13910
13911         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
13912         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
13913         protecting things that should be done only in gnulib contexts.
13914         * lib/glob_.h: New file, containing only the glob things needed for
13915         gnulib.
13916         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
13917         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
13918         (glob, globfree, glob_pattern_p): Now defined simply in terms of
13919         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
13920         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
13921         and to respect the namespace rules better.
13922
13923 2005-09-08  Simon Josefsson  <jas@extundo.com>
13924
13925         * modules/socklen: New file.
13926
13927 2005-09-08  Simon Josefsson  <jas@extundo.com>
13928
13929         * m4/socklen.m4: New file.
13930
13931 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
13932
13933         * modules/utimens (Files): Add m4/utimbuf.m4, since
13934         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
13935         Reported by Sergey Poznyakoff.
13936
13937 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
13938
13939         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
13940         definitions, since that's the preferred style in glibc.
13941         Fix a minor spacing issue, and update copyright notice to match
13942         glibc's.
13943
13944 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
13945
13946         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
13947
13948 2005-09-06  Simon Josefsson  <jas@extundo.com>
13949
13950         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
13951         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
13952
13953 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
13954
13955         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
13956         warning.
13957
13958 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
13959
13960         * config/srclist.txt: Add glibc bug 1302.
13961
13962 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
13963
13964         Change bitset word type from unsigned int to unsigned long int,
13965         as this has better performance on typical 64-bit hosts.
13966         Port bitset code to hosts with unusual word sizes.
13967         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
13968         (build_collating_symbol):
13969         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
13970         argument is a bitset.  This is merely a style issue, but it makes
13971         it clearer that an entire array is expected.
13972         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
13973         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
13974         Port to the case where bitset_word is not the same as unsigned int.
13975         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
13976         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
13977         Likewise.
13978         * lib/regexec.c (check_dst_limits_calc_pos_1,
13979         check_subexp_matching_top):
13980         (build_trtable, group_nodes_into_DFAstates):
13981         Likewise.
13982         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
13983         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
13984         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
13985         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
13986         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
13987         * lib/regcomp.c (optimize_subexps, lower_subexp):
13988         Work even if bitset_word has holes in its bitwise representation.
13989         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
13990         * lib/regexec.c (check_dst_limits_calc_pos_1,
13991         check_subexp_matching_top):
13992         Likewise.
13993         * lib/regex_internal.c (re_string_reconstruct):
13994         Don't assume UCHAR_MAX == 255.
13995         * lib/regex_internal.h (bitset_set_all): Likewise.
13996         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
13997         All uses changed.
13998         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
13999         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
14000         All uses changed.
14001         (BITSET_WORD_MAX): New macro.
14002         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
14003         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
14004         (bitset_empty, bitset_copy):
14005         Prefer sizeof (bitset) to multiplying it out ourselves.
14006         (bitset_not_merge): Remove; unused.
14007         (bitset_contain): Return bool, not unsigned int with one bit on.
14008         All callers changed.
14009         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
14010         alignment than re_node_set; do this by defining a new internal
14011         type struct dests_alloc and using it to allocate memory.
14012
14013 2005-09-05  Bruno Haible  <bruno@clisp.org>
14014
14015         * gnulib-tool (func_import): Fix comparison in handling of symbolic
14016         links.
14017
14018 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
14019
14020         * modules/size_max (Makefile.am): Add size_max.h
14021
14022 2005-09-04  Derek Price  <derek@ximbiot.com>
14023
14024         * gnulib-tool (func_import): Fix reversed $symbolic logic.
14025
14026 2005-09-03  Simon Josefsson  <jas@extundo.com>
14027
14028         * gnulib-tool: Fix typo.
14029
14030 2005-09-03  Simon Josefsson  <jas@extundo.com>
14031
14032         * config/srclist.txt: Add glibc bug 1293.
14033
14034 2005-09-03  Derek Price  <derek@ximbiot.com>
14035
14036         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
14037         From Larry Jones <lawrence.jones@ugs.com>.
14038
14039 2005-09-02  Simon Josefsson  <jas@extundo.com>
14040
14041         * modules/socklen: New file.
14042
14043 2005-09-02  Simon Josefsson  <jas@extundo.com>
14044
14045         * modules/havelib: New module.
14046
14047         * modules/gettext, modules/iconv, modules/lock, modules/readline:
14048         Use havelib.
14049
14050 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
14051
14052         Check for arithmetic overflow when calculating sizes, to prevent
14053         some buffer-overflow issues.  These patches are conservative, in the
14054         sense that when I couldn't determine whether an overflow was possible,
14055         I inserted a run-time check.
14056         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
14057         macros.
14058         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
14059         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
14060         (re_xnrealloc, re_x2nrealloc): New inline functions.
14061         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
14062         parse_bracket_exp):
14063         (build_equiv_class, build_charclass): Check for arithmetic overflow
14064         in size expression calculations.
14065         * lib/regex_internal.c (re_string_realloc_buffers):
14066         (build_wcs_upper_buffer, re_node_set_add_intersect):
14067         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
14068         (re_dfa_add_node, register_state): Likewise.
14069         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
14070         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
14071         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
14072         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
14073
14074 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
14075
14076         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
14077         m4/ulonglong.m4.  Problem reported by Martin Lambers.
14078
14079 2005-09-02  Bruno Haible  <bruno@clisp.org>
14080
14081         Support for lib vs. lib64 distinction on biarch platforms.
14082         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
14083         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
14084         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
14085
14086 2005-09-02  Bruno Haible  <bruno@clisp.org>
14087
14088         * gnulib-tool (import): In the other first-use case, provide defaults
14089         as well.
14090
14091 2005-09-02  Bruno Haible  <bruno@clisp.org>
14092
14093         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
14094         patches not yet found in the latest gettext release.
14095
14096 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
14097
14098         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
14099         to avoid a collision with bits/local_lim.h in glibc.
14100         All uses changed.  Problem reported by Dmitry V. Levin in
14101         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
14102
14103         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
14104         bugs in int versus size_t comparisons.
14105         (re_string_context_at): Fix bug where the code assumed that
14106         Idx is signed.
14107
14108         Use bool where appropriate.
14109         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
14110         All callers changed.
14111         (calc_eclosure_iter): Likewise, for ROOT arg.
14112         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
14113         (build_charclass_op): Likewise, for NON_MATCH arg.
14114         * lib/regex_internal.c (re_string_allocate, re_string_construct):
14115         (re_string_construct_common): Likewise, for ICASE arg.
14116         * lib/regexec.c (re_search_2_stub, re_search_stub):
14117         Likewise, for RET_LEN arg.
14118         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
14119         (set_regs): Likewise, for FL_BACKTRACK arg.
14120         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
14121         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
14122         (calc_eclosure_iter, parse_bracket_exp):
14123         Use bool for internal variables that are booleans.
14124         * lib/regexec.c (re_search_internal, check_matching,
14125         proceed_next_node):
14126         (set_regs, build_sifted_states, sift_states_bkref):
14127         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
14128         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
14129         (find_collation_sequence_value):
14130         Likewise.
14131         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
14132         (re_node_set_compare):
14133         Return bool, not int. All callers changed.
14134         * lib/regexec.c (check_halt_node_context, check_dst_limits):
14135         (build_trtable, check_node_accept): Likewise.
14136         * lib/regex_internal.h: Include stdbool.h.
14137
14138         Fix bugs uncovered when converting to bool.
14139         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
14140         failure instead of charging ahead blindly.
14141         * lib/regex_internal.c (register_state): Likewise.
14142         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
14143         for freeing internal storage.
14144         (group_nodes_into_DFA_states): Use unsigned int, not int, for
14145         bitset pieces used as boolean, to avoid undefined behavior
14146         on hosts that do int overflow checking.
14147
14148 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
14149
14150         * config/srclist.txt: Add glibc bugs 1285-1287.
14151
14152 2005-09-01  Jim Meyering  <jim@meyering.net>
14153
14154         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
14155         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
14156         Require gl_STAT_MACROS, too.
14157
14158 2005-09-01  Bruno Haible  <bruno@clisp.org>
14159
14160         * gnulib-tool (import): In the first-use case, provide defaults.
14161
14162 2005-09-01  Bruno Haible  <bruno@clisp.org>
14163
14164         * gnulib-tool (func_import): Remove the .tmp files.
14165
14166 2005-09-01  Bruno Haible  <bruno@clisp.org>
14167
14168         * gnulib-tool (func_import): Fix handling of symbolic links.
14169
14170 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
14171
14172         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
14173         old glibc regex code mishandles strings longer than 2**31 bytes.
14174         This patch fixes this when the regex code is used in gnulib
14175         (i.e., outside glibc).
14176
14177         This patch should not affect the use of the regex code inside
14178         glibc.  No doubt this problem also needs to be handled for glibc
14179         as well, but the result will be an incompatible change to the
14180         glibc ABI, and the old ABI will have to be supported too.  That
14181         can be the the subject for another patch.
14182
14183         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
14184         governing whether the rest of this patch is active.  By default,
14185         the macro is disabled and the patch has no effect.
14186         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
14187         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
14188         (struct re_pattern_buffer, re_search, re_search_2, re_match):
14189         (re_match_2, re_set_registers): Use the new types.
14190         * lib/regex_internal.h (Idx, re_hashval_t): New types.
14191         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
14192         New macros.
14193         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
14194         (re_string_context_at, bin_tree_t, re_dfastate_t):
14195         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
14196         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
14197         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
14198         (re_string_char_size_at, re_string_wchar_at):
14199         (re_string_elem_size_at):
14200         Use the new types and macros to port to 64-bit hosts.
14201         Use unsigned types for internal values, so that the code
14202         mostly works even for arrays larger than SSIZE_MAX.
14203         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
14204         (search_duplicated_node, calc_eclosure_iter, fetch_number):
14205         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
14206         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
14207         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
14208         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
14209         (calc_inveclosure, parse_dup_op, build_range_exp):
14210         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
14211         (fetch_number, create_token_tree, mark_opt_subexp):
14212         Likewise.
14213         * lib/regex_internal.c (re_string_construct_common,
14214         create_ci_newstate):
14215         (create_cd_newstate, re_string_allocate, re_string_construct):
14216         (re_string_realloc_buffers, build_wcs_upper_buffer):
14217         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
14218         (re_string_reconstruct, re_string_peek_byte_case):
14219         (re_string_fetch_byte_case, re_string_context_at):
14220         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
14221         (re_node_set_init_copy, re_node_set_add_intersect):
14222         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
14223         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
14224         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
14225         (re_acquire_state, re_acquire_state_context, register_state):
14226         Likewise.
14227         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
14228         search_cur_bkref_entry):
14229         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
14230         (re_search_internal, re_search_2_stub, re_search_stub)
14231         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
14232         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
14233         (update_cur_sifted_state, check_dst_limits):
14234         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
14235         (check_subexp_limits, sift_states_bkref, merge_state_array):
14236         (check_subexp_matching_top, get_subexp, get_subexp_sub):
14237         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
14238         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
14239         (expand_bkref_cache, check_node_accept_bytes):
14240         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
14241         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
14242         (acquire_init_state_context, check_halt_node_context):
14243         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
14244         (sift_states_backward, clean_state_log_if_needed):
14245         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
14246         (find_recover_state, transit_state_sb, transit_state_mb):
14247         (transit_state_bkref, build_trtable, match_ctx_clean):
14248         Likewise.
14249         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
14250         to work around an assumption that REG_MISSING is negative.
14251
14252         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
14253         (seek_collating_symbol_entry) [defined _LIBC]:
14254         (lookup_collation_sequence_value) [defined _LIBC]:
14255         (build_range_exp, build_collating_symbol) [defined _LIBC]:
14256         Use prototypes rather than old-style function definitions.
14257         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
14258         (transit_state_sb) [0]:
14259         (find_collation_sequence_value) [defined _LIBC]: Likewise.
14260
14261         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
14262         rm_eo.
14263
14264         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
14265         (optimize_subexps, lower_subexp):
14266         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
14267         since the signed shift might overflow.  Use 1u<<31 instead.
14268         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
14269         Likewise.
14270         * lib/regexec.c (check_dst_limits_calc_pos_1,
14271         check_subexp_matching_top): Likewise.
14272
14273         * lib/regcomp.c (optimize_subexps, lower_subexp):
14274         Use CHAR_BIT rather than 8, for clarity.
14275         * lib/regexec.c (check_dst_limits_calc_pos_1):
14276         (check_subexp_matching_top): Likewise.
14277         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
14278         have to worry about portability issues when shifting it left.
14279         Remove no-longer-needed test for table_size > 0.
14280         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
14281         in a word, as the resulting behavior is undefined.
14282         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
14283         in one case, a <= should have been an <, and in another case the
14284         whole test was missing.
14285         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
14286         the standard name CHAR_BIT.
14287         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
14288         this is not true on one's complement and signed-magnitude hosts.
14289
14290         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
14291         next_last_offset.
14292         (struct re_dfa_t): Remove unused member states_alloc.
14293         * lib/regcomp.c (init_dfa): Don't initialize unused members.
14294
14295 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
14296
14297         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
14298         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
14299         and large-file glibc and in 32-bit large-file Solaris.
14300
14301 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
14302
14303         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
14304         lengths fit in regoff_t; this isn't true if regoff_t is the same
14305         width as size_t.
14306         * lib/regex.c (re_search_internal): 5th arg is LAST_START
14307         (= START + RANGE) instead of RANGE.  This avoids overflow
14308         problems when regoff_t is the same width as size_t.
14309         All callers changed.
14310         (re_search_2_stub): Check for overflow when adding the
14311         sizes of the two strings.
14312         (re_search_stub): Check for overflow when adding START
14313         to RANGE; if it occurs, substitute the extreme value.
14314
14315 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
14316
14317         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
14318
14319 2005-08-31  Jim Meyering  <jim@meyering.net>
14320
14321         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
14322         a pointer-to-const.
14323         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
14324         (register_state): Likewise.
14325         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
14326         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
14327         (group_nodes_into_DFAstates): Likewise.
14328
14329 2005-08-31  Jim Meyering  <jim@meyering.net>
14330
14331         * check-module: Add a FIXME comment.
14332
14333 2005-08-31  Eric Blake  <ebb9@byu.net>
14334
14335         * modules/unistd-safer (Files): Add unistd--.h.
14336         * modules/stdio-safer (Files): Add stdio--.h.
14337
14338 2005-08-31  Derek Price  <derek@ximbiot.com>
14339
14340         * lib/getdelim.c (getdelim): Return EOF on EOF.
14341         Reported by Larry Jones <lawrence.jones@ugs.com>.
14342
14343 2005-08-31  Bruno Haible  <bruno@clisp.org>
14344
14345         Avoid unnecessary diffs in the generated lib/Makefile.am.
14346         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
14347         the generated files.
14348         (func_import): Don't set cmd.
14349
14350 2005-08-31  Bruno Haible  <bruno@clisp.org>
14351
14352         * lib/strstr.c: Include <stddef.h>, for NULL.
14353         * lib/strcasestr.c: Likewise.
14354         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
14355
14356 2005-08-31  Bruno Haible  <bruno@clisp.org>
14357
14358         * gnulib-tool: New option --macro-prefix.
14359         (func_import): Use macro_prefix.
14360         (import): Handle option --macro-prefix.
14361
14362 2005-08-31  Bruno Haible  <bruno@clisp.org>
14363
14364         * gnulib-tool (import): Rename most ac_* variables to cached_*.
14365         Also use new variables cached_lgpl, cached_libtool.
14366
14367 2005-08-31  Bruno Haible  <bruno@clisp.org>
14368
14369         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
14370         always instantiating them.
14371
14372 2005-08-31  Bruno Haible  <bruno@clisp.org>
14373
14374         * gnulib-tool (func_import): Read the previous cached settings
14375         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
14376         earlier added by gnulib but are now dropped. Warn when a gnulib file
14377         overwrites a non-gnulib file.
14378
14379 2005-08-31  Bruno Haible  <bruno@clisp.org>
14380
14381         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
14382         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
14383         projects that don't keep autogenerated files in CVS. Put into
14384         actioncmd only the specified modules, not the transitive closure.
14385
14386 2005-08-31  Bruno Haible  <bruno@clisp.org>
14387
14388         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
14389         Create directories that shall be filled.
14390         (import): Don't look for gl_* macros in configure.ac. Recurse across
14391         all directories containing a gnulib-cache.m4 files, if meaningful.
14392
14393 2005-08-31  Bruno Haible  <bruno@clisp.org>
14394
14395         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
14396         (import): Set seen_libtool when we see gl_LIBTOOL.
14397
14398 2005-08-31  Bruno Haible  <bruno@clisp.org>
14399
14400         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
14401         declaration macro definitions from generated gnulib.m4.
14402
14403 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
14404
14405         * lib/iconvme.h: Add prototype for iconv_alloc.
14406
14407 2005-08-29  Simon Josefsson  <jas@extundo.com>
14408
14409         * lib/iconvme.c: Fix errno.
14410
14411 2005-08-29  Bruno Haible  <bruno@clisp.org>
14412
14413         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
14414         that it works when the directory contains spaces.
14415
14416 2005-08-29  Bruno Haible  <bruno@clisp.org>
14417
14418         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
14419
14420 2005-08-29  Bruno Haible  <bruno@clisp.org>
14421
14422         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
14423         Emit more advice.
14424
14425 2005-08-29  Bruno Haible  <bruno@clisp.org>
14426         and Stepan Kasal  <kasal@ucw.cz>
14427
14428         * check-module: If more parameters are given, check each of them
14429         separately; add more exceptions, as noted by Jim Meyering.
14430         (check_module): New procedure.
14431         (%exempt_header): Now contains all exceptions.
14432
14433 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
14434
14435         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
14436
14437 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
14438
14439         * lib/iconvme.c: Split iconv_string into iconv_alloc.
14440
14441 2005-08-28  Bruno Haible  <bruno@clisp.org>
14442
14443         * m4/gnulib-tool.m4: New file.
14444
14445 2005-08-27  Jim Meyering  <jim@meyering.net>
14446
14447         * modules/unistd-safer (Files): Add pipe-safer.c.
14448         * modules/fcntl-safer (Files): Add creat-safer.c.
14449
14450 2005-08-27  Jim Meyering  <jim@meyering.net>
14451
14452         * m4/stdlib-safer.m4: New file.  From coreutils.
14453         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
14454         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
14455         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
14456         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
14457         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
14458
14459 2005-08-27  Jim Meyering  <jim@meyering.net>
14460
14461         * lib/fopen-safer.c: Merge minor changes from coreutils.
14462         * lib/dup-safer.c: Likewise.
14463         * lib/fd-safer.c: Likewise.
14464
14465         Merge from coreutils.
14466         * lib/stdio--.h: New file.
14467         * lib/stdlib--.h: New file.
14468         * lib/mkstemp-safer.c: New file.
14469
14470         GNU tar needs these.
14471         * lib/pipe-safer.c: New file.
14472         * lib/creat-safer.c: New file.
14473         * lib/fcntl--.h (creat): Define to creat_safer.
14474         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
14475         * lib/unistd--.h (pipe): Define to pipe_safer.
14476         * lib/unistd-safer.h: Declare pipe_safer.
14477
14478 2005-08-26  Simon Josefsson  <jas@extundo.com>
14479
14480         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
14481         Haible <bruno@clisp.org>.
14482
14483 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
14484
14485         * lib/regex_internal.h: Remove all references to
14486         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
14487         or better.
14488         (bitset_not, bitset_merge, bitset_not_merge):
14489         (bitset_mask, re_string_allocate, re_string_construct):
14490         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
14491         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
14492         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
14493         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
14494         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
14495         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
14496         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
14497         (re_acquire_state_context):
14498         Remove unnecessary forward decls.
14499         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
14500         Put __attribute at function definition,
14501         now that the function decl has been removed.
14502         * lib/regex_internal.c (re_string_peek_byte_case):
14503         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
14504         Likewise.
14505
14506 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
14507
14508         * m4/regex.m4: Add AC_PREREQ(2.50).
14509         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
14510
14511 2005-08-25  Simon Josefsson  <jas@extundo.com>
14512
14513         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
14514         __fsetlocking.
14515
14516 2005-08-25  Simon Josefsson  <jas@extundo.com>
14517
14518         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
14519         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
14520         GLIBC specific code.
14521
14522 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
14523
14524         Make regex safe for g++.  This fixes one real bug (an "err"
14525         that should have been "*err").  g++ problem reported by
14526         Sam Steingold.
14527         * lib/regex_internal.h (re_calloc): New macro, consistent with
14528         re_malloc etc.  All callers of calloc changed to use re_calloc.
14529         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
14530         not int.  All callers changed.
14531         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
14532         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
14533         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
14534         (find_recover_state): Change "err" to "*err"; this fixes what
14535         appears to be a real bug.
14536         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
14537         versus int.
14538
14539 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
14540
14541         * modules/regex (Depends-on): Add malloc, since the code
14542         assumes that !malloc(0) means failure.
14543
14544 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
14545
14546         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
14547
14548         alloca modernization/simplification for regex.
14549         * lib/regex.c: Remove portability cruft for alloca.  This no longer
14550         needs to be at the start of the file, and can be moved into
14551         regex_internal.h and simplified.
14552         * lib/regex_internal.h: Include <alloca.h>.
14553         (__libc_use_alloca) [!defined _LIBC]: New macro.
14554         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
14555         now works outside glibc.
14556
14557 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
14558
14559         * config/srclist.txt: Add glibc bugs 1241, 1245.
14560
14561 2005-08-25  Jim Meyering  <jim@meyering.net>
14562
14563         * lib/open-safer.c: Include <config.h>.
14564         Otherwise, we'd lose LARGEFILE support in any file using
14565         e.g. "fcntl--.h"
14566
14567 2005-08-25  Bruno Haible  <bruno@clisp.org>
14568
14569         * m4/minmax.m4: Require autoconf 2.52.
14570         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
14571         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
14572         alternatives of translit over the alphabet.
14573         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
14574
14575 2005-08-24  Simon Josefsson  <jas@extundo.com>
14576
14577         * tests/test-getpass.c: New file.
14578
14579 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
14580
14581         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
14582         for GNU regex features.
14583
14584 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
14585
14586         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
14587         * lib/regex.h (regerror): Likewise.
14588
14589         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
14590         requires this.  (The code never needed it.)
14591
14592         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
14593         All uses of recently-renamed identifiers changed to use the new,
14594         POSIX-compliant names.  The code will build and run just fine
14595         without these changes, but it's better to eat our own dog food
14596         and use the standard-conforming names.
14597
14598         * lib/regex.h: Fix a multitude of POSIX name space violations.
14599         These changes have an effect only for programs that define
14600         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
14601         do not change anything for programs compiled in the normal way.
14602         Also, there is no effect on the ABI.
14603
14604         (_REGEX_SOURCE): New macro.
14605         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
14606         defined and _GNU_SOURCE is not; this fixes a name space violation.
14607
14608         Rename the following macros to obey POSIX requirements.
14609         The old names are still visible as macros if _REGEX_SOURCE is defined.
14610         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
14611         RE_BACKSLASH_ESCAPE_IN_LISTS.
14612         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
14613         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
14614         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
14615         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
14616         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
14617         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
14618         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
14619         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
14620         (REG_INTERVALS): renamed from RE_INTERVALS.
14621         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
14622         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
14623         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
14624         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
14625         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
14626         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
14627         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
14628         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
14629         RE_UNMATCHED_RIGHT_PAREN_ORD.
14630         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
14631         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
14632         (REG_DEBUG): renamed from RE_DEBUG.
14633         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
14634         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
14635         unusual, since we can't clash with the POSIX REG_ICASE.
14636         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
14637         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
14638         (REG_NO_SUB): renamed from RE_NO_SUB.
14639         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
14640         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
14641         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
14642         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
14643         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
14644         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
14645         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
14646         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
14647         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
14648         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
14649         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
14650         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
14651         RE_SYNTAX_POSIX_MINIMAL_BASIC.
14652         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
14653         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
14654         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
14655         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
14656         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
14657         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
14658         (REG_FIXED): Renamed from REGS_FIXED.
14659         (REG_NREGS): Renamed from RE_NREGS.
14660
14661         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
14662         of other REG_* macros, since POSIX says the user is allowed to
14663         #undef these macros selectively.
14664
14665         (reg_errcode_t): Update comment stating what other tables need
14666         to be consistent.
14667
14668         Rename the following enum values to obey POSIX requirements.
14669         The old names are still visible as macros.
14670         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
14671         is not defined, since GNU is supposed to be a superset of POSIX as
14672         much as possible, and since we want reg_errcode_t to be a signed
14673         type for implementation consistency.
14674         (_REG_NOERROR): Renamed from REG_NOERROR.
14675         (_REG_NOMATCH): Renamed from REG_NOMATCH.
14676         (_REG_BADPAT): Renamed from REG_BADPAT.
14677         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
14678         (_REG_ECTYPE): Renamed from REG_ECTYPE.
14679         (_REG_EESCAPE): Renamed from REG_EESCAPE.
14680         (_REG_ESUBREG): Renamed from REG_ESUBREG.
14681         (_REG_EBRACK): Renamed from REG_EBRACK.
14682         (_REG_EPAREN): Renamed from REG_EPAREN.
14683         (_REG_EBRACE): Renamed from REG_EBRACE.
14684         (_REG_BADBR): Renamed from REG_BADBR.
14685         (_REG_ERANGE): Renamed from REG_ERANGE.
14686         (_REG_ESPACE): Renamed from REG_ESPACE.
14687         (_REG_BADRPT): Renamed from REG_BADRPT.
14688         (_REG_EEND): Renamed from REG_EEND.
14689         (_REG_ESIZE): Renamed from REG_ESIZE.
14690         (_REG_ERPAREN): Renamed from REG_ERPAREN.
14691         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
14692         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
14693         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
14694         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
14695
14696         (_REG_RE_NAME, _REG_RM_NAME): New macros.
14697         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
14698         changed.  But support the old name if the new one is not defined
14699         and if _REGEX_SOURCE.
14700
14701         Change the following member names in struct re_pattern_buffer.
14702         The old names are still supported if !_REGEX_SOURCE.
14703         The new names are always supported, regardless of _REGEX_SOURCE.
14704         (re_buffer): Renamed from buffer.
14705         (re_allocated): Renamed from allocated.
14706         (re_used): Renamed from used.
14707         (re_syntax): Renamed from syntax.
14708         (re_fastmap): Renamed from fastmap.
14709         (re_translate): Renamed from translate.
14710         (re_can_be_null): Renamed from can_be_null.
14711         (re_regs_allocated): Renamed from regs_allocated.
14712         (re_fastmap_accurate): Renamed from fastmap_accurate.
14713         (re_no_sub): Renamed from no_sub.
14714         (re_not_bol): Renamed from not_bol.
14715         (re_not_eol): Renamed from not_eol.
14716         (re_newline_anchor): Renamed from newline_anchor.
14717
14718         Change the following member names in struct re_registers.
14719         The old names are still supported if !_REGEX_SOURCE.
14720         The new names are always supported, regardless of _REGEX_SOURCE.
14721         (rm_num_regs): Renamed from num_regs.
14722         (rm_start): Renamed from start.
14723         (rm_end): Renamed from end.
14724
14725         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
14726         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
14727         Prepend __ to parameter names.
14728
14729         Undo yesterday's changes.
14730
14731 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
14732
14733         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
14734         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
14735         lib/regex.c.
14736
14737 2005-08-24  Jim Meyering  <jim@meyering.net>
14738
14739         Sync from coreutils.
14740         * m4/fcntl-safer.m4: New file.
14741
14742         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
14743         and object files for this module.
14744
14745 2005-08-24  Jim Meyering  <jim@meyering.net>
14746
14747         Sync from coreutils.
14748         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
14749
14750 2005-08-24  Jim Meyering  <jim@meyering.net>
14751
14752         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
14753         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
14754
14755 2005-08-24  Jim Meyering  <jim@meyering.net>
14756
14757         * modules/fcntl-safer: New module.
14758         * modules/fts (Depends-on): Add fcntl-safer.
14759         * MODULES.html.sh (File descriptor based Input/Output):
14760         Add fcntl-safer.
14761
14762 2005-08-24  Bruno Haible  <bruno@clisp.org>
14763
14764         Support for unit test modules.
14765         * modules/README: Mention tests modules.
14766         * modules/TEMPLATE-TESTS: New file.
14767         * gnulib-tool: New options --extract-tests-module, --with-tests and
14768         --tests-base (unused for the moment).
14769         (testsbase, inctests): New variables.
14770         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
14771         (func_verify_module): Exclude TEMPLATE-TESTS.
14772         (func_verify_nontests_module, func_verify_tests_module): New functions.
14773         (func_get_dependencies): Add implicit dependency for tests modules.
14774         (func_get_tests_module): New function.
14775         (func_modules_transitive_closure): When --with-tests was specified,
14776         include the unit tests as well, unless explicitly avoided.
14777         (func_emit_lib_Makefile_am): Ignore the tests modules here.
14778         (func_emit_tests_Makefile_am): New function.
14779         (func_create_testdir): When --with-tests was specified, emit a
14780         tests/ directory.
14781         * MODULES.html.sh (Future developments): Update.
14782
14783 2005-08-24  Bruno Haible  <bruno@clisp.org>
14784
14785         * modules/tls-tests: New file.
14786         * tests/test-tls.c: New file, from GNU gettext.
14787
14788 2005-08-24  Bruno Haible  <bruno@clisp.org>
14789
14790         * modules/lock-tests: New file.
14791         * tests/test-lock.c: New file, from GNU gettext.
14792
14793 2005-08-24  Bruno Haible  <bruno@clisp.org>
14794
14795         * lib/lock.h: Add multiple inclusion guard.
14796         * lib/tls.h: Add multiple inclusion guard.
14797
14798 2005-08-24  Bruno Haible  <bruno@clisp.org>
14799
14800         * gnulib-tool: Add support for the --aux-dir option to
14801         --create-testdir, --create-megatestdir, --test, --megatest.
14802         (func_create_testdir, func_create_megatestdir): Optionally emit a
14803         AC_CONFIG_AUX_DIR directive.
14804         (create-testdir, create-megatestdir, test, megatest): Provide a
14805         default value for $auxdir.
14806
14807 2005-08-24  Bruno Haible  <bruno@clisp.org>
14808
14809         * gnulib-tool (import): Use compound statement instead of subshell
14810         where possible.
14811
14812 2005-08-24  Bruno Haible  <bruno@clisp.org>
14813
14814         * gnulib-tool (import): Change --aux-dir default to "build-aux".
14815
14816 2005-08-24  Bruno Haible  <bruno@clisp.org>
14817
14818         * gnulib-tool (func_version): Update.
14819
14820 2005-08-24  Bruno Haible  <bruno@clisp.org>
14821
14822         * gnulib-tool (func_import, func_create_testdir,
14823         func_create_megatestdir): Quote all autoconf macro arguments.
14824
14825 2005-08-24  Bruno Haible  <bruno@clisp.org>
14826
14827         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
14828         option --force, because --force causes the aclocal.m4 of each
14829         subdirectory to be newer than the corresponding config.h.in.
14830
14831 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
14832
14833         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
14834         All contents moved to gl_REGEX.
14835         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
14836         assume that it does.
14837
14838 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
14839
14840         * lib/regex.h (REG_NOSYS)
14841         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
14842         Define, since POSIX requires it as of 2001.
14843         (_REG_ENOSYS)
14844         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
14845         New private symbol, used to keep the enum signed in all cases.
14846         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
14847         Youngman in
14848         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
14849
14850         * lib/regex_internal.c (re_string_skip_chars, register_state):
14851         (calc_state_hash):
14852         Remove forward decls; no longer needed now that we use prototypes.
14853         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
14854         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
14855         (clean_state_log_if_needed): Likewise.
14856
14857 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
14858
14859         * config/srclist.txt: Add glibc bugs 1231-1233.
14860
14861 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
14862
14863         Fix problems reported by Sam Steingold in
14864         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
14865         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
14866         assumed that reg_errcode_t is a signed type, which is not
14867         necessarily true if _XOPEN_SOURCE is not defined.
14868         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
14869         since some compilers warn about it otherwise.
14870
14871 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
14872
14873         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
14874         (init_word_char, create_initial_state, duplicate_node_closure):
14875         (fetch_token, peek_token_bracket, build_range_exp):
14876         (build_collating_symbol): Remove forward decls; no longer needed
14877         now that we use prototypes.
14878
14879         * lib/regcomp.c:
14880         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
14881         (re_compile_fastmap_iter, regcomp, regerror, regfree):
14882         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
14883         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
14884         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
14885         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
14886         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
14887         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
14888         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
14889         (build_range_exp, build_collating_symbol, parse_bracket_exp):
14890         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
14891         (build_charclass, build_charclass_op, fetch_number, create_tree):
14892         (create_token_tree, mark_opt_subexp, duplicate_tree):
14893         Use prototypes rather than old-style definitions.
14894
14895         * lib/regex_internal.c:
14896         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
14897         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
14898         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
14899         (re_string_reconstruct, re_string_peek_byte_case):
14900         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
14901         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
14902         (re_node_set_init_copy, re_node_set_add_intersect):
14903         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
14904         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
14905         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
14906         (re_acquire_state, re_acquire_state_context, register_state):
14907         (create_ci_newstate, create_cd_newstate, free_state):
14908         Likewise.
14909         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
14910         re_search_2):
14911         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
14912         (re_search_internal, prune_impossible_nodes):
14913         (acquire_init_state_context, check_matching, static):
14914         (check_halt_node_context, check_halt_state_context, proceed_next_node):
14915         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
14916         (update_regs, sift_states_backward, build_sifted_states):
14917         (clean_state_log_if_needed, merge_state_array):
14918         (update_cur_sifted_state, add_epsilon_src_nodes):
14919         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
14920         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
14921         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
14922         (find_recover_state, check_subexp_matching_top, transit_state_mb):
14923         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
14924         (check_arrival, check_arrival_add_next_nodes):
14925         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
14926         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
14927         (check_node_accept_bytes, check_node_accept, extend_buffers):
14928         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
14929         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
14930         (sift_ctx_init):
14931         Likewise.
14932
14933         * lib/regex_internal.h:
14934         (re_string_allocate, re_string_construct, re_string_reconstruct):
14935         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
14936         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
14937         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
14938         (re_string_context_at, re_string_peek_byte_case):
14939         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
14940         is defined, since we now use prototypes always.
14941
14942         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
14943         C89 or better.  All uses removed.
14944
14945 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
14946
14947         * config/srclist.txt: Add glibc bugs 1220-1227.
14948
14949 2005-08-20  Jim Meyering  <jim@meyering.net>
14950
14951         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
14952         of unused local, dfa.
14953
14954 2005-08-20  Bruno Haible  <bruno@clisp.org>
14955
14956         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
14957
14958 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
14959
14960         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
14961         (re_node_set_insert_last, re_dfa_add_node):
14962         Rename local variables to avoid GCC shadowing warnings.
14963
14964 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
14965
14966         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
14967         [defined lint]: Suppress bogus uninitialized-variable warnings.
14968
14969         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
14970         and let the caller return REG_ESPACE if out of space.  This
14971         removes an uninitialied-variable warning with GCC 4.0.1, and also
14972         avoids taking the address of a local variable.  All callers
14973         changed.
14974
14975 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
14976
14977         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
14978         $LIBCSRC/posix/regexec.c.
14979         Add glibc bug 1217 for regcomp.c.
14980
14981 2005-08-19  Jim Meyering  <jim@meyering.net>
14982
14983         * lib/regexec.c (proceed_next_node): Redo local variables to
14984         avoid GCC shadowing warnings.
14985
14986 2005-08-18  Bruno Haible  <bruno@clisp.org>
14987
14988         * lib/strstr.c (strstr): Fix return value in multibyte case.
14989         * lib/strcasestr.c (strcasestr): Likewise.
14990
14991 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
14992
14993         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
14994
14995 2005-08-17  Jim Meyering  <jim@meyering.net>
14996
14997         Make the %s format (seconds since the epoch) work for a negative
14998         number and when used with a zero-padded field width, e.g. %015s.
14999
15000         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
15001         label so that it precedes the code to set `digits'.  Otherwise,
15002         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
15003         print `00-22'.  Now, it prints `-0022', as it should.
15004
15005 2005-08-17  Bruno Haible  <bruno@clisp.org>
15006
15007         * modules/strstr (Files): Add m4/mbrtowc.m4.
15008         (Depends-on): Add mbuiter.
15009
15010 2005-08-17  Bruno Haible  <bruno@clisp.org>
15011
15012         * modules/strcasestr: New file.
15013         * MODULES.html.sh (String handling, based on ANSI C 89): Add
15014         strcasestr.
15015
15016 2005-08-17  Bruno Haible  <bruno@clisp.org>
15017
15018         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
15019
15020 2005-08-17  Bruno Haible  <bruno@clisp.org>
15021
15022         * modules/mbuiter: New file.
15023         * MODULES.html.sh (Extended multibyte and wide character utilities):
15024         Add mbuiter.
15025
15026 2005-08-17  Bruno Haible  <bruno@clisp.org>
15027
15028         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
15029         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
15030
15031 2005-08-17  Bruno Haible  <bruno@clisp.org>
15032
15033         * m4/strcasestr.m4: New file.
15034
15035 2005-08-17  Bruno Haible  <bruno@clisp.org>
15036
15037         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
15038         * lib/strstr.c: Completely rewritten, with multibyte locale support.
15039
15040 2005-08-17  Bruno Haible  <bruno@clisp.org>
15041
15042         * lib/strcasestr.h: New file.
15043         * lib/strcasestr.c: New file.
15044
15045 2005-08-17  Bruno Haible  <bruno@clisp.org>
15046
15047         * lib/strcasecmp.c: Use mbuiter.h.
15048
15049 2005-08-17  Bruno Haible  <bruno@clisp.org>
15050
15051         * lib/mbuiter.h: New file.
15052
15053 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
15054
15055         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
15056         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
15057         and gl_GETOPT are both invoked via different paths (as happens
15058         with GNU tar CVS because it uses both argp and getopt), the former
15059         wins.
15060
15061 2005-08-16  Bruno Haible  <bruno@clisp.org>
15062
15063         * modules/tls: New file.
15064         * MODULES.html.sh (Multithreading): Add tls.
15065
15066 2005-08-16  Bruno Haible  <bruno@clisp.org>
15067
15068         * modules/strnlen1: New file.
15069         * MODULES.html.sh (String handling): Add strnlen1.
15070
15071 2005-08-16  Bruno Haible  <bruno@clisp.org>
15072
15073         * modules/strcase (Files): Add m4/mbrtowc.m4.
15074         (Depends-on): Add strnlen1, mbchar.
15075
15076 2005-08-16  Bruno Haible  <bruno@clisp.org>
15077
15078         * modules/mbiter: New file.
15079         * MODULES.html.sh (Extended multibyte and wide character utilities):
15080         Add mbiter.
15081
15082 2005-08-16  Bruno Haible  <bruno@clisp.org>
15083
15084         * modules/mbfile: New file.
15085         * MODULES.html.sh (Extended multibyte and wide character utilities):
15086         Add mbfile.
15087
15088 2005-08-16  Bruno Haible  <bruno@clisp.org>
15089
15090         * modules/mbchar: New file.
15091         * MODULES.html.sh (Extended multibyte and wide character utilities):
15092         New section.
15093
15094 2005-08-16  Bruno Haible  <bruno@clisp.org>
15095
15096         * m4/tls.m4: New file, from GNU gettext.
15097
15098 2005-08-16  Bruno Haible  <bruno@clisp.org>
15099
15100         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
15101         always.
15102         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
15103
15104 2005-08-16  Bruno Haible  <bruno@clisp.org>
15105
15106         * m4/mbiter.m4: New file.
15107
15108 2005-08-16  Bruno Haible  <bruno@clisp.org>
15109
15110         * m4/mbfile.m4: New file.
15111
15112 2005-08-16  Bruno Haible  <bruno@clisp.org>
15113
15114         * m4/mbchar.m4: New file.
15115
15116 2005-08-16  Bruno Haible  <bruno@clisp.org>
15117
15118         * lib/tls.h: New file, from GNU gettext.
15119         * lib/tls.c: New file, from GNU gettext.
15120
15121 2005-08-16  Bruno Haible  <bruno@clisp.org>
15122
15123         * lib/strnlen1.h: New file.
15124         * lib/strnlen1.c: New file.
15125
15126 2005-08-16  Bruno Haible  <bruno@clisp.org>
15127
15128         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
15129         (mbi_init): Update.
15130         (mbi_avail, mbi_advance): Let the iteration end before the terminating
15131         NUL byte, not after it.
15132
15133 2005-08-16  Bruno Haible  <bruno@clisp.org>
15134
15135         * lib/strcase.h (strcasecmp): Add note in comments.
15136         * lib/strncasecmp.c: Use code from strcasecmp.c.
15137         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
15138         (strcasecmp): Work correctly in multibyte locales.
15139
15140 2005-08-16  Bruno Haible  <bruno@clisp.org>
15141
15142         * lib/mbiter.h: New file.
15143
15144 2005-08-16  Bruno Haible  <bruno@clisp.org>
15145
15146         * lib/mbfile.h: New file.
15147
15148 2005-08-16  Bruno Haible  <bruno@clisp.org>
15149
15150         * lib/mbchar.h: New file.
15151         * lib/mbchar.c: New file.
15152
15153 2005-08-16  Bruno Haible  <bruno@clisp.org>
15154
15155         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
15156         the valid ones. Makes the comparison operations transitive:
15157         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
15158         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
15159
15160 2005-08-15  Simon Josefsson  <jas@extundo.com>
15161
15162         * modules/ssize_t (License): Change to 'unlimited'.
15163
15164         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
15165
15166 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
15167
15168         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
15169         Add comments for each pending glibc patch.
15170
15171 2005-08-15  Bruno Haible  <bruno@clisp.org>
15172
15173         * lib/regex.h (__restrict_arr): Don't define to __restrict if
15174         __cplusplus is defined.
15175
15176 2005-08-14  Jim Meyering  <jim@meyering.net>
15177
15178         Sync from coreutils.
15179
15180         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
15181         Use the hash-table-based cycle-detection code not just when
15182         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
15183         Reported by James Youngman in
15184         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
15185         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
15186         FTS_TIGHT_CYCLE_CHECK.
15187         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
15188         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
15189         once again.
15190         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
15191         * lib/fts.c (fd_safer): Remove decl.
15192         Include fcntl--.h rather than unistd-safer.h
15193         (fts_safe_changedir): Don't call fd_safer; no longer needed
15194         now that we include fcntl--.h.
15195
15196 2005-08-12  Simon Josefsson  <jas@extundo.com>
15197
15198         * modules/getndelim2: Use ssize_t module.
15199         * modules/getnline: Likewise.
15200         * modules/safe-read: Likewise.
15201         * modules/xreadlink: Likewise.
15202
15203         * modules/ssize_t: New file.
15204
15205 2005-08-12  Simon Josefsson  <jas@extundo.com>
15206
15207         * m4/readline.m4: Look for termcap, curses or ncurses if required.
15208
15209 2005-08-12  Simon Josefsson  <jas@extundo.com>
15210
15211         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
15212         ssize_t.
15213
15214 2005-08-12  Simon Josefsson  <jas@extundo.com>
15215
15216         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
15217         readline, getdelim and check_version.
15218         (Support for systems lacking ISO C 99: Sizes of integer types):
15219         Add size_max.
15220
15221 2005-08-12  Bruno Haible  <bruno@clisp.org>
15222
15223         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
15224
15225 2005-08-11  Simon Josefsson  <jas@extundo.com>
15226
15227         * modules/readline: New file.
15228
15229         * modules/strnlen (Files): Add strnlen.h.
15230
15231 2005-08-11  Simon Josefsson  <jas@extundo.com>
15232
15233         * m4/readline.m4: New file.
15234
15235 2005-08-11  Simon Josefsson  <jas@extundo.com>
15236
15237         * lib/readline.h, readline.c: New file.
15238
15239 2005-08-11  Simon Josefsson  <jas@extundo.com>
15240
15241         * doc/gnulib.texi (Initial import, Finishing touches): Mention
15242         gl_AVOID.
15243
15244 2005-08-11  Bruno Haible  <bruno@clisp.org>
15245
15246         * lib/strnlen.h (strnlen): Change parameter name to match comment.
15247
15248 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
15249
15250         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
15251
15252 2005-08-10  Simon Josefsson  <jas@extundo.com>
15253
15254         * tests/test-iconvme.c: New file.
15255
15256 2005-08-10  Simon Josefsson  <jas@extundo.com>
15257
15258         * m4/strnlen.m4: New file.
15259
15260         * m4/strndup.m4: Don't check for strnlen declaration, done in
15261         strnlen.m4.
15262
15263 2005-08-10  Simon Josefsson  <jas@extundo.com>
15264
15265         * lib/strndup.c: Use strnlen.h.
15266
15267         * lib/strnlen.h: New file.
15268
15269 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
15270
15271         * README: Typos.
15272
15273 2005-08-02  Simon Josefsson  <jas@extundo.com>
15274
15275         * modules/readline: New file.
15276
15277 2005-08-02  Simon Josefsson  <jas@extundo.com>
15278
15279         * modules/getdelim: New file.
15280
15281         * modules/getline: Rewrite, don't use getndelim2.
15282
15283 2005-08-02  Simon Josefsson  <jas@extundo.com>
15284
15285         * m4/getline.m4: Separate out getdelim stuff into separate module.
15286
15287         * m4/getdelim.m4: New file.
15288
15289 2005-08-02  Simon Josefsson  <jas@extundo.com>
15290
15291         * lib/getline.h, getline.c: Rewrite.
15292
15293         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
15294
15295 2005-07-31  Bruno Haible  <bruno@clisp.org>
15296
15297         * lib/lock.h (gl_lock_initializer): New macro.
15298         (gl_lock_define_initialized): Use it.
15299         (gl_rwlock_initializer): New macro.
15300         (gl_rwlock_define_initialized): Use it.
15301         (gl_recursive_lock_initializer): New macro.
15302         (gl_recursive_lock_define_initialized): Use it.
15303
15304 2005-07-30  Karl Berry  <karl@gnu.org>
15305
15306         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
15307         Report from Ben Pfaff, regarding getopt.
15308
15309 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
15310
15311         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
15312         normal way.
15313         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
15314         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
15315         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
15316         (gl_GETOPT): Use the new macros.  Most of the implementation
15317         is moved to the new macros.  This is for programs like Emacs
15318         that don't want all the functionality of gl_GETOPT.
15319
15320 2005-07-26  Bruno Haible  <bruno@clisp.org>
15321
15322         * m4/lock.m4: Update from GNU gettext.
15323
15324 2005-07-26  Bruno Haible  <bruno@clisp.org>
15325
15326         * lib/lock.h: Update from GNU gettext.
15327         * lib/lock.c: Update from GNU gettext.
15328
15329 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
15330
15331         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
15332         obsolescent AC_TRY_RUN.  Include the default includes files, for
15333         'exit'.
15334
15335 2005-07-24  Bruno Haible  <bruno@clisp.org>
15336
15337         * modules/visibility: New file.
15338         * MODULES.html.sh (Misc): Add visibility.
15339
15340 2005-07-24  Bruno Haible  <bruno@clisp.org>
15341
15342         * m4/visibility.m4: New file.
15343
15344 2005-07-24  Bruno Haible  <bruno@clisp.org>
15345
15346         * doc/visibility.texi: New file.
15347
15348 2005-07-22  Bruno Haible  <bruno@clisp.org>
15349
15350         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
15351         $(ALLOCA_H), redundant through BUILT_SOURCES.
15352         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
15353         redundant through BUILT_SOURCES.
15354         * modules/byteswap (Makefile.am): Remove explicit dependency on
15355         $(BYTESWAP_H), redundant through BUILT_SOURCES.
15356         * modules/fnmatch (Makefile.am): Remove explicit dependency on
15357         $(FNMATCH_H), redundant through BUILT_SOURCES.
15358         * modules/getopt (Makefile.am): Remove explicit dependency on
15359         $(GETOPT_H), redundant through BUILT_SOURCES.
15360         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
15361         redundant through BUILT_SOURCES.
15362         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
15363         redundant through BUILT_SOURCES.
15364         * modules/stdbool (Makefile.am): Remove explicit dependency on
15365         $(STDBOOL_H), redundant through BUILT_SOURCES.
15366         * modules/stdint (Makefile.am): Remove explicit dependency on
15367         $(STDINT_H), redundant through BUILT_SOURCES.
15368         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
15369         Remove explicit dependency on $(SYSEXITS_H).
15370         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
15371
15372 2005-07-18  Simon Josefsson  <jas@extundo.com>
15373
15374         * lib/check-version.c (check_version): Accept identical versions too.
15375
15376 2005-07-18  Bruno Haible  <bruno@clisp.org>
15377
15378         * modules/lock: New file.
15379         * MODULES.html.sh (Multithreading): New section.
15380
15381 2005-07-18  Bruno Haible  <bruno@clisp.org>
15382
15383         * m4/lock.m4: New file, from GNU gettext.
15384
15385 2005-07-18  Bruno Haible  <bruno@clisp.org>
15386
15387         * lib/lock.h: New file, from GNU gettext.
15388         * lib/lock.c: New file, from GNU gettext.
15389
15390 2005-07-18  Bruno Haible  <bruno@clisp.org>
15391
15392         * lib/lock.h (gl_once_t): New type.
15393         (gl_once_define, gl_once): New macros.
15394         * lib/lock.c (fresh_once): New variable.
15395         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
15396         functions.
15397
15398 2005-07-16  Simon Josefsson  <jas@extundo.com>
15399
15400         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
15401         workaround, suggested by Bruno.
15402
15403 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
15404
15405         * modules/xalloc (Depends-on): Add xalloc-die.
15406         * modules/xvasprintf (Depends-on): Add xalloc-die.
15407
15408 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
15409
15410         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
15411         with a minor change.
15412
15413 2005-07-15  Bruno Haible  <bruno@clisp.org>
15414
15415         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
15416         When using lib/poll.c, define poll as rpl_poll.
15417
15418 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
15419
15420         * modules/argp (Depends-on): Remove unlocked-io.
15421
15422 2005-07-14  Derek Price  <derek@ximbiot.com>
15423
15424         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
15425         for glob symlink bug.
15426
15427 2005-07-14  Bruno Haible  <bruno@clisp.org>
15428
15429         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
15430         Instead, test for *_unlocked function declarations directly.
15431
15432 2005-07-11  Simon Josefsson  <jas@extundo.com>
15433
15434         * modules/size_max: New file.
15435
15436         * modules/xsize: Depend on size_max module for size_max.m4.
15437
15438 2005-07-11  Simon Josefsson  <jas@extundo.com>
15439
15440         * lib/size_max.h: New file.
15441
15442 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
15443
15444         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
15445         copyright symbol and the year.
15446         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
15447         (version_etc_va): Use parameterized copyright notice.
15448         Reword to conform to the current GNU coding standards.
15449
15450 2005-07-11  Karl Berry  <karl@gnu.org>
15451
15452         * doc/gnulib.texi (Quoting): new node.
15453         (Initial import): more info, from Patrice.
15454
15455 2005-07-11  Bruno Haible  <bruno@clisp.org>
15456
15457         * gnulib-tool (func_usage): Document option --avoid.
15458         (Command line options): Handle --avoid.
15459         (func_acceptable): New function.
15460         (func_modules_transitive_closure): Use it.
15461
15462 2005-07-11  Bruno Haible  <bruno@clisp.org>
15463
15464         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
15465         Reported by Jim Meyering.
15466
15467 2005-07-10  Bruno Haible  <bruno@clisp.org>
15468
15469         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
15470         Needed when size_t is smaller than 'unsigned int'.
15471         Reported by Paul Eggert.
15472
15473 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
15474
15475         * modules/argp (Depends-on): Add unlocked-io
15476
15477 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
15478
15479         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
15480         block of defines.
15481
15482 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
15483
15484         * config/srclist.txt: Comment out regcomp.c, since we have a porting
15485         fix now.
15486
15487 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
15488         and Paul Eggert  <eggert@cs.ucla.edu>
15489
15490         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
15491         in wint_t, not wchar_t.  Remove now-unnecessary cast.
15492
15493 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
15494
15495         * modules/regex (Files): Add lib/regex_internal.c,
15496         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
15497         (Depends-on): Add extensions.
15498         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
15499
15500 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
15501
15502         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
15503         pathconf.
15504         * m4/same.m4 (gl_SAME): Likewise.
15505         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
15506
15507         * m4/regex.m4: Adjust to new libc regex implementation.
15508         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
15509         all the .c and .h parts of (the new) regex.
15510         Quote the m4 stuff better.
15511         Check for RE_ICASE bug of old gnulib.
15512         Check for REG_STARTEND of recent libc.
15513         Rename local variables from jm_* to gl_*.
15514         Quote operand of "test -f".
15515         Say "recent enough" version of libc, not "version 2".
15516         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
15517         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
15518         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
15519         Remove check for btowc, isascii.
15520         Require AM_LANGINFO_CODESET.
15521
15522 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
15523
15524         * lib/regex.c, regex.h: Sync from libc.
15525         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
15526         * lib/regexec.c:
15527         New files, synced from libc, except that regex_internal.h
15528         currently has a small porting fix.
15529
15530 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
15531
15532         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
15533         regex_internal.c, regexec.c.
15534         Add regex_internal.h too, but as a comment, since the libc version
15535         is currently broken in gnulib mode.
15536
15537 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
15538
15539         Support programs like Emacs that use gnulib but not gettext.
15540         * MODULES.html.sh (Internationalization functions): Add gettext-h.
15541         * modules/gettext-h: New file.
15542         * modules/gettext (Files): Remove lib/gettext.h.
15543         (Depends-on): Add gettext-h.
15544         (Makefile.am): Remove lib_SOURCES.
15545         * modules/argmatch, modules/c-stack, modules/closeout:
15546         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
15547         * modules/execute, modules/file-type, modules/getaddrinfo:
15548         * modules/getopt, modules/human, modules/javacomp:
15549         * modules/javaexec, modules/mkdir-p, modules/obstack:
15550         * modules/openat, modules/pagealign_alloc, modules/pipe:
15551         * modules/quotearg, modules/regex, modules/rpmatch:
15552         * modules/unicodeio, modules/userspec, modules/version-etc:
15553         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
15554         * modules/xsetenv:
15555         Depend on gettext-h, not gettext.
15556
15557 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
15558
15559         * gnulib-tool (func_import): Add support for 'public domain' license.
15560         * modules/alloca, modules/atexit, modules/memmove:
15561         Now public domain, not GPL.
15562         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
15563         * modules/realloc, modules/strerror, modules/strtod:
15564         Now LGPL, not GPL.
15565
15566 2005-07-05  Bruno Haible  <bruno@clisp.org>
15567
15568         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
15569         autoconf CVS. Needed for mingw.
15570
15571 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
15572
15573         Remove the dependency of the strftime module on the tzset module.
15574         * modules/strftime (Depends-on): Remove dependency on tzset.
15575
15576 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
15577
15578         Remove the dependency of the strftime module on the tzset module.
15579         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
15580         gl_FUNC_TZSET_CLOBBER.
15581
15582 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
15583
15584         Remove the dependency of the strftime module on the tzset module.
15585         * lib/strftime.c (my_strftime)
15586         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
15587         Copy the input structure, to work around some of the bug with
15588         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
15589         Solaris releases, you should also use the tzset module, but we won't
15590         require it as a dependency any more since we don't want LGPLed code
15591         to depend on GPLed code.
15592
15593 2005-07-02  Jim Meyering  <jim@meyering.net>
15594
15595         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
15596         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
15597         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
15598         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
15599
15600 2005-07-02  Jim Meyering  <jim@meyering.net>
15601
15602         * lib/backupfile.c (backup_args): Change a `0' to NULL.
15603
15604 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
15605
15606         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
15607         declares only 'struct timespec;' (!).
15608
15609 2005-07-01  Jim Meyering  <jim@meyering.net>
15610
15611         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
15612         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
15613         * lib/save-cwd.c, tempname.c:
15614         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
15615         and don't include <sys/file.h>).
15616
15617 2005-06-29  Jim Meyering  <jim@meyering.net>
15618
15619         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
15620         type name.  Use the variable name instead.
15621         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
15622         Likewise.
15623
15624 2005-06-28  Simon Josefsson  <jas@extundo.com>
15625
15626         * modules/check-version (Files): Add check-version.m4.
15627
15628 2005-06-28  Simon Josefsson  <jas@extundo.com>
15629
15630         * m4/check-version.m4: New file, suggested by Jim Meyering
15631         <jim@meyering.net>.
15632
15633 2005-06-28  Simon Josefsson  <jas@extundo.com>
15634
15635         * lib/check-version.h, lib/check-version.c: New files.
15636
15637 2005-06-28  Simon Josefsson  <jas@extundo.com>
15638
15639         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
15640         collision with global variable.  Better indentation.  Don't
15641         increment buffer pointer beyond buffer end.  Based on comments
15642         from Paul Eggert <eggert@cs.ucla.edu>.
15643
15644         * lib/base64.h: Indent.
15645
15646 2005-06-28  Simon Josefsson  <jas@extundo.com>
15647
15648         * doc/gnulib.texi (Library version handling): New section.
15649
15650 2005-06-28  Jim Meyering  <jim@meyering.net>
15651
15652         * check-module (find_included_lib_files): Hard-code another
15653         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
15654         but modules/fts-lgpl (correctly) does not list those files.
15655
15656         * modules/canonicalize (Files): Add lib/pathmax.h.
15657
15658 2005-06-25  Simon Josefsson  <jas@extundo.com>
15659
15660         * modules/check-version: New file.
15661
15662 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
15663
15664         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
15665         initializer of struct addrinfo, as an indication that we don't
15666         care how many members the structure has.
15667
15668 2005-06-24  Derek Price  <derek@ximbiot.com>
15669         and Bruno Haible  <bruno@clisp.org>
15670
15671         Remove stat module & update lstat.
15672         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
15673         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
15674         * m4/stat.m4: Remove this file.
15675
15676 2005-06-24  Derek Price  <derek@ximbiot.com>
15677         and Bruno Haible  <bruno@clisp.org>
15678
15679         Remove stat module & update lstat.
15680         * lib/stat.c: Remove this file...
15681         (slash_aware_lstat): ...moving this content and its support...
15682         * lib/lstat.c (rpl_lstat): ...into here.
15683         * lib/lstat.h: New file.
15684
15685 2005-06-24  Derek Price  <derek@ximbiot.com>
15686         and Bruno Haible  <bruno@clisp.org>
15687
15688         Remove stat module & update lstat.
15689         * config/srclist.txt (libc sources): Remove stat.
15690
15691 2005-06-24  Derek Price  <derek@ximbiot.com>
15692         and Bruno Haible  <bruno@clisp.org>
15693
15694         Remove stat module & update lstat.
15695         * MODULES.html.sh (stat): Remove.
15696         * MODULES.html: Regenerated.
15697         * modules/lstat (Description): Correct function name.
15698         (Files): Add "lstat.h".
15699         (Depends-on): Remove stat, add xalloc, stat-macros.
15700         * modules/stat: Remove this file.
15701         (Include): Add "lstat.h", remove <sys/stat.h>.
15702
15703 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
15704
15705         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
15706         (ranged_convert): Don't save conversion in a temporary struct.
15707         This causes a warning with GCC 4.0.0, and anyway in the typical
15708         case it's not worth the extra 100 bytes or so of code.
15709         (ranged_convert, __mktime_internal): When calling a function via a
15710         pointer P, use P () rather than (*P) (), as we now assume C89 or
15711         better.
15712
15713 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
15714
15715         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
15716         "who -r" failed to give output.  Problem reported by Tim Waugh.
15717
15718         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
15719         (xcalloc): Use it to avoid needless tests.
15720         Problem reported by Jim Meyering.
15721
15722 2005-06-20  Derek Price  <derek@ximbiot.com>
15723
15724         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
15725         unnecessary for Autoconfs > 2.59c.
15726
15727 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15728
15729         * lib/argp.h (__option_is_short): Check upper limit of
15730         __key. Isprint() requires its argument to have the value
15731         of an unsigned char or EOF.
15732
15733 2005-06-16  Jim Meyering  <jim@meyering.net>
15734
15735         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
15736         when either N or S is zero.
15737
15738 2005-06-16  Derek Price  <derek@ximbiot.com>
15739
15740         * m4/bison.m4: Declare YACC & YFLAGS precious.
15741
15742 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
15743
15744         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
15745         multibyte string or pattern, fall back on unibyte matching.
15746         Problem reported by James Youngman.
15747
15748 2005-06-08  Bruno Haible  <bruno@clisp.org>
15749
15750         * modules/csharpcomp: New file.
15751         * MODULES.html.sh (C#): Add csharpcomp.
15752
15753 2005-06-08  Bruno Haible  <bruno@clisp.org>
15754
15755         * m4/csharpcomp.m4: New file, from GNU gettext.
15756
15757 2005-06-08  Bruno Haible  <bruno@clisp.org>
15758
15759         * lib/csharpcomp.h: New file, from GNU gettext.
15760         * lib/csharpcomp.c: New file, from GNU gettext.
15761         * lib/csharpcomp.sh.in: New file, from GNU gettext.
15762
15763 2005-06-08  Bruno Haible  <bruno@clisp.org>
15764
15765         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
15766         warning on mingw.
15767
15768 2005-06-07  Derek Price  <derek@ximbiot.com>
15769
15770         Sync from CVS.
15771         * lib/glob_.h: Indent nested #ifdef.
15772
15773 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
15774
15775         Sync from coreutils.
15776         Use "file name" when talking about file names, instead of "filename"
15777         or "path", as per the GNU coding standards.
15778         * lib/mkdir-p.c: Renamed from makepath.c.
15779         (make_dir_parents): Renamed from make_path.  All callers changed.
15780         * lib/mkdir-p.h: Likewise.  All includers changed.
15781         * lib/filenamecat.c: Renamed from path-concat.c.
15782         (file_name_concat): Renamed from path_concat.  All callers changed.
15783         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
15784         * lib/filenamecat.h: Likewise.  All includers changed.
15785         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
15786         in comments or local variable names.
15787         * lib/basename.c: Likewise.
15788         * lib/canonicalize.c, canonicalize.h: Likewise.
15789         * lib/dirname.c, dirname.h: Likewise.
15790         * lib/euidaccess.c: Likewise.
15791         * lib/exclude.c: Likewise
15792         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
15793         * lib/fsusage.c, fsuage.h: Likewise.
15794         * lib/fts.c, fts_.h: Likewise.
15795         * lib/getcwd.c: Likewise.
15796         * lib/getloadavg.c: Likewise.
15797         * lib/mkstemp.c: Likewise.
15798         * lib/mountlist.c, mountlist.h: Likewise.
15799         * lib/openat.c, openat.h: Likewise.
15800         * lib/readlink-stub.c: Likewise.
15801         * lib/readutmp.c, readutmp.h: Likewise.
15802         * lib/rename.c: Likewise.
15803         * lib/rmdir.c: Likewise.
15804         * lib/same.c: Likewise.
15805         * lib/savedir.c: Likewise.
15806         * lib/stripslash.c: Likewise.
15807         * lib/tempname.c: Likewise.
15808         * lib/xreadlink.c: Likewise.
15809         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
15810         All uses changed.
15811         * lib/exclude.h: Likewise.
15812
15813         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
15814         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
15815         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
15816         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
15817         * lib/pathmax.h: Include <limits.h> unconditionally, since other
15818         files have been getting away with it for years (MORE/BSD 4.3
15819         is extinct now).
15820         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
15821         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
15822
15823         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
15824         Define to 256, not 255, as per modern POSIX.
15825
15826 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
15827
15828         Sync from coreutils.
15829         Use "file name" when talking about file names, instead of "filename"
15830         or "path", as per the GNU coding standards.
15831         * MODULES.html.sh: mkdir-p renamed from makepath.
15832         filenamecat renamed from path-concat.
15833         * modules/filenamecat: Renamed from modules/path-concat.
15834         (Files): filenamecat.h and filenamecat.c renamed from
15835         path-concat.h and path-concat.c.
15836         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
15837         (Include): filenamecat.h, not path-concat.h.
15838         * modules/mkdir-p: Renamed from modules/makepath.
15839         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
15840         makepath.c.
15841         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
15842         (Include): mkdir-p.h, not makepath.h.
15843
15844 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
15845
15846         Sync from coreutils.
15847         * m4/mkdir-p.m4: Renamed from makepath.m4.
15848         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
15849         Rename files from makepath.c to mkdir-p.c, and from
15850         makepath.h to mkdir-p.h.
15851         * m4/filenamecat.m4: Renamed from path-concat.m4.
15852         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
15853         Rename files from path-concat.c to filenamecat.c,
15854         and from path-concat.h to filenamecat.h.
15855         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
15856         "file name" in local variables or comments.
15857         * m4/rename.m4: Likewise.
15858
15859 2005-06-01  Bruno Haible  <bruno@clisp.org>
15860
15861         * modules/csharpexec: New file.
15862         * MODULES.html.sh (C#): New section.
15863
15864 2005-06-01  Bruno Haible  <bruno@clisp.org>
15865
15866         * m4/csharp.m4: New file, from GNU gettext.
15867         * m4/csharpexec.m4: New file, from GNU gettext.
15868
15869 2005-06-01  Bruno Haible  <bruno@clisp.org>
15870
15871         * lib/csharpexec.h: New file, from GNU gettext.
15872         * lib/csharpexec.c: New file, from GNU gettext.
15873         * lib/csharpexec.sh.in: New file, from GNU gettext.
15874
15875 2005-05-31  Derek Price  <derek@ximbiot.com>
15876             Paul Eggert  <eggert@cs.ucla.edu>
15877
15878         Sync from cvs.
15879         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
15880
15881 2005-05-31  Derek Price  <derek@ximbiot.com>
15882             Paul Eggert  <eggert@cs.ucla.edu>
15883
15884         Sync from cvs.
15885         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
15886
15887 2005-05-29  Derek Price  <derek@ximbiot.com>
15888
15889         * config/srclist.txt (glob_.h, glob.c): Add these files.
15890
15891 2005-05-29  Derek Price  <derek@ximbiot.com>
15892
15893         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
15894         * modules/glob: New file.
15895         * modules/getlogin_r: Add link to POSIX spec in description.
15896
15897 2005-05-29  Derek Price  <derek@ximbiot.com>
15898             Paul Eggert  <eggert@cs.ucla.edu>
15899
15900         * m4/glob.m4: New file.
15901
15902 2005-05-29  Derek Price  <derek@ximbiot.com>
15903             Paul Eggert  <eggert@cs.ucla.edu>
15904
15905         * lib/glob_.h, lib/glob.c: New files.
15906
15907 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
15908
15909         * modules/fts (Files): Remove m4/inttypes-pri.m4.
15910         * modules/fts-lgpl (Depends-on): Remove gettext.
15911
15912 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
15913
15914         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
15915         and don't require gt_INTTYPES_PRI.
15916
15917 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
15918
15919         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
15920
15921         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
15922         the configuration hassle isn't worth it.
15923         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
15924         (LONGEST_MODIFIER, PRIuMAX): Remove.
15925
15926 2005-05-27  Bruno Haible  <bruno@clisp.org>
15927
15928         * lib/getlogin_r.h: Remove second include of <stddef.h>.
15929
15930 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
15931
15932         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
15933         _POSIX_PTHREAD_SEMANTICS for Solaris.
15934
15935 2005-05-25  Derek Price  <derek@ximbiot.com>
15936
15937         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
15938
15939 2005-05-25  Derek Price  <derek@ximbiot.com>
15940             Paul Eggert  <eggert@cs.ucla.edu>
15941
15942         * modules/getlogin_r, m4/getlogin_r.m4: New files.
15943         * lib/getlogin_r.c, getlogin_r.h: New files.
15944
15945 2005-05-25  Bruno Haible  <bruno@clisp.org>
15946             Derek Price  <derek@ximbiot.com>
15947
15948         * lib/getlogin_r.h: Simplify API documentation.
15949
15950 2005-05-23  Derek Price  <derek@ximbiot.com>
15951
15952         * modules/minmax (Files): Add m4/minmax.m4.
15953         (configure.ac): Add gl_MINMAX.
15954
15955 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
15956
15957         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
15958         so that unistd-safer.h (GPL'ed code) need not be included.
15959
15960 2005-05-22  Bruno Haible  <bruno@clisp.org>
15961
15962         * m4/minmax.m4: New file.
15963         Based on a patch by Derek Price <derek@ximbiot.com>.
15964
15965 2005-05-22  Bruno Haible  <bruno@clisp.org>
15966
15967         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
15968         (INT64_MIN): Fix definition.
15969         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
15970
15971         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
15972         NEED_SIGNED_INT_TYPES.
15973
15974         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
15975         HAVE_SYSTEM_INTTYPES.
15976
15977 2005-05-22  Bruno Haible  <bruno@clisp.org>
15978
15979         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
15980         Also include <sys/param.h> if it defines MIN, MAX.
15981         Based on a patch by Derek Price <derek@ximbiot.com>.
15982
15983 2005-05-21  Jim Meyering  <jim@meyering.net>
15984
15985         * modules/fts (Files): Add m4/inttypes-pri.m4.
15986         (Depends-on): Add lstat and remove gettext.  Alphabetize.
15987
15988 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
15989
15990         New fts module.
15991         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
15992         (setup_dir, free_dir): New functions.
15993         (enter_dir, leave_dir): Define trivial
15994         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
15995         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
15996         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
15997         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
15998         Move to fts-cycle.c.
15999         (fts_open): Use setup_dir.
16000         (fts_close): Use free_dir.
16001         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
16002         This adds a label and some gotos, but the alternatives were messier.
16003         Check for memory allocation failure when entering a dir.
16004         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
16005         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
16006         (FTS): New member fts_cycle, that is a union that contains the
16007         old active_dir_ht and cycle_state.  All uses changed to mention
16008         fts_cycle.ht and fts_cycle.state.
16009         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
16010         fts.c, with the following changes:
16011         (setup_dir, free_dir): New functions.
16012         (enter_dir): Now returns bool.  Return true if successful, false
16013         if memory exhausted.  All callers changed.
16014         Do not bother partly cleaning up on
16015         memory allocation failure; that is free_dir's job.
16016         However, free ad if hash_insert fails, to avoid memory leak.
16017         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
16018         fts->fts_options to see which union member to use.
16019
16020 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
16021
16022         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
16023         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
16024
16025 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
16026
16027         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
16028
16029 2005-05-20  Jim Meyering  <jim@meyering.net>
16030
16031         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
16032         Now a macro, to pacify GCC.
16033
16034 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
16035
16036         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
16037         of -1.
16038
16039 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
16040
16041         * lib/chown.c (rpl_chown): Return -1 on failure.
16042
16043 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
16044
16045         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
16046         Don't check for stddef.h.
16047         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
16048         don't use its results.
16049         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
16050         since we include them unconditionally.  Don't require
16051         AM_STDBOOL_H, since stdbool is a prerequisite.
16052         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
16053         since we assume C89 or better.
16054         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
16055         as we don't use their results.
16056         Don't check for fchdir, memmove, memset, strrchr, as we use
16057         them unconditionally.
16058         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
16059         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
16060
16061 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
16062
16063         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
16064         Include <stddef.h> unconditionally, since we assume C89 now.
16065         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
16066         * lib/fts.c: Include fts_.h first, to check interface.
16067         Do not include intprops.h; no longer needed.
16068         Include cycle-check.h and hash.h, since fts_.h no longer does.
16069         Remove unnecessary casts of closedir to void.
16070         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
16071         decide whether to decrement nlinks.
16072         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
16073         (FTS): Use struct hash_table * instead of Hash_table, so that
16074         we no longer need to include hash.h here.
16075
16076 2005-05-18  Jim Meyering  <jim@meyering.net>
16077
16078         * modules/dirfd (License): Change to LGPL.  Most of the code
16079         is already in the public domain.
16080
16081 2005-05-18  Jim Meyering  <jim@meyering.net>
16082
16083         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
16084         Reported by Yoann Vandoorselaere.
16085
16086 2005-05-17  Jim Meyering  <jim@meyering.net>
16087
16088         * m4/fts.m4: New file, from coreutils.
16089
16090 2005-05-17  Jim Meyering  <jim@meyering.net>
16091
16092         * lib/fts.c, lib/fts_.h: New files, from coreutils.
16093
16094 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
16095
16096         Sync from coreutils.
16097         * m4/unlinkdir.m4: New file.
16098
16099 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
16100
16101         Sync from coreutils.
16102         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
16103         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
16104         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
16105         White space changes only.
16106         * lib/makepath.c (make_path): Port to hosts where leading "//" is
16107         special.
16108         * lib/yesno.c: Include getline.h, not ctype.h.
16109         (yesno): Don't remove leading white space; POSIX doesn't allow it.
16110         Use getline to remove arbitrary restriction on response length.
16111
16112 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
16113
16114         * config/srclist-update: Spell out "Street" in FSF postal
16115         mail address; this is the style the FSF seems to prefer.
16116
16117         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
16118         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
16119         this updates FSF postal mail address.
16120
16121         Sync from coreutils.
16122         * modules/unlinkdir: New file.
16123         * modules/yesno (Depends-on): Add getline.
16124         * MODULES.html.sh (File system functions): Add unlinkdir.
16125
16126 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
16127
16128         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
16129         lib/strsep.h:
16130         Change the initial comment to refer to GPL, not LGPL.
16131         gnulib-tool will change it to LGPL as needed.
16132
16133         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
16134         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
16135         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
16136         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
16137         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
16138         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
16139         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
16140         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
16141         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
16142         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
16143         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
16144         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
16145         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
16146         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
16147         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
16148         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
16149         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
16150         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
16151         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
16152         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
16153         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
16154         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
16155         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
16156         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
16157         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
16158         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
16159         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
16160         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
16161         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
16162         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
16163         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
16164         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
16165         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
16166         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
16167         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
16168         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
16169         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
16170         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
16171         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
16172         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
16173         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
16174         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
16175         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
16176         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
16177         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
16178         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
16179         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
16180         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
16181         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
16182         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
16183         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
16184         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
16185         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
16186         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
16187         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
16188         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
16189         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
16190         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
16191         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
16192         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
16193         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
16194         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
16195         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
16196         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
16197         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
16198         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
16199         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
16200         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
16201         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
16202         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
16203         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
16204         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
16205         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
16206         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
16207         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
16208         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
16209         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
16210         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
16211         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
16212         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
16213         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
16214         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
16215         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
16216         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
16217         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
16218         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
16219         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
16220         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
16221         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
16222         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
16223         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
16224         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
16225         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
16226         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
16227         lib/yesno.c, lib/yesno.h:
16228         Update FSF postal mail address.
16229
16230 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
16231
16232         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
16233         tests/test-memmem.c, tests/test-stpncpy.c:
16234         Update FSF postal mail address.
16235
16236 2005-05-13  Bruno Haible  <bruno@clisp.org>
16237
16238         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
16239         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
16240         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
16241         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
16242         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
16243         Add support for 64-bit integers in the MSVC compiler.
16244
16245 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16246
16247         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
16248
16249 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
16250
16251         * gnulib-tool (func_import): Sort and uniquify recommended includes.
16252
16253 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
16254
16255         * doc/getdate.texi (General date syntax): Don't say that date
16256         date --iso-8601=ns generates acceptable dates; it doesn't yet.
16257         Problem reported by Nic Ferrier.
16258
16259 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
16260
16261         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
16262         specified in ai_socktype. Fix invalid ai_protocol
16263         check. ai_protocol is usually set to 0 or depending on
16264         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
16265         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
16266         ai_socktype / ai_protocol in the returned addrinfo structure.
16267
16268 2005-05-10  Simon Josefsson  <jas@extundo.com>
16269
16270         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
16271         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
16272
16273 2005-05-10  Karl Berry  <karl@gnu.org>
16274
16275         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
16276         (from http://www.gnu.org/licenses).
16277         * doc/COPYING.LIB: also rename to COPYING.LESSER.
16278         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
16279         fdl.texi suffices.
16280
16281 2005-05-10  Karl Berry  <karl@gnu.org>
16282
16283         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
16284         (COPYING.DOC): remove.
16285
16286         * config/srclist-update: new FSF address.
16287
16288 2005-05-10  Derek Price  <derek@ximbiot.com>
16289
16290         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
16291         possible.
16292
16293 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
16294             Bruno Haible  <bruno@clisp.org>
16295
16296         * modules/inet_ntop: New file.
16297         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
16298         inet_ntop.
16299
16300 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
16301             Bruno Haible  <bruno@clisp.org>
16302
16303         * m4/inet_ntop.m4: New file.
16304
16305 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
16306             Bruno Haible  <bruno@clisp.org>
16307
16308         * lib/inet_ntop.h: New file.
16309         * lib/inet_ntop.c: New file, from glibc with modifications.
16310
16311 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
16312
16313         * modules/time_r (License): Change to LGPL.
16314         * modules/extensions (License): Change to LGPL.  Actually,
16315         the license is more permissive than that, but currently gnulib-tool
16316         doesn't know how to handle more-permissive licenses.
16317
16318         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
16319         Problem reported by Dave Love.
16320
16321 2005-05-08  Jim Meyering  <jim@meyering.net>
16322
16323         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
16324         blank.
16325
16326 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
16327
16328         * modules/argmatch (Depends-on): Add stdbool.
16329         * modules/backupfile (Depends-on): Likewise.
16330         * modules/chdir-long (Depends-on): Likewise.
16331         * modules/closeout (Depends-on): Likewise.
16332         * modules/cycle-check (Depends-on): Likewise.
16333         * modules/dirname (Depends-on): Likewise.
16334         * modules/fnmatch (Depends-on): Likewise.
16335         * modules/fsusage (Depends-on): Likewise.
16336         * modules/fwriteerror (Depends-on): Likewise.
16337         * modules/getcwd (Depends-on): Likewise.
16338         * modules/getloadavg (Depends-on): Likewise.
16339         * modules/hard-locale (Depends-on): Likewise.
16340         * modules/makepath (Depends-on): Likewise.
16341         * modules/mountlist (Depends-on): Likewise.
16342         * modules/nanosleep (Depends-on): Likewise.
16343         * modules/posixtm (Depends-on): Likewise.
16344         * modules/quotearg (Depends-on): Likewise.
16345         * modules/readtokens (Depends-on): Likewise.
16346         * modules/readtokens0 (Depends-on): Likewise.
16347         * modules/readutmp (Depends-on): Likewise.
16348         * modules/save-cwd (Depends-on): Likewise.
16349         * modules/strftime (Depends-on): Likewise.
16350         * modules/userspec (Depends-on): Likewise.
16351         * modules/utimecmp (Depends-on): Likewise.
16352         * modules/xgetcwd (Depends-on): Likewise.
16353         * modules/xnanosleep (Depends-on): Likewise.
16354         * modules/xstrtod (Depends-on): Likewise.
16355         * modules/yesno (Depends-on): Likewise.
16356
16357 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
16358
16359         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
16360         needless checks.
16361
16362 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
16363
16364         Merge from coreutils.  Among other things,
16365         add bulletproofing for cases where stdin, stdout, or stderr are closed.
16366         * lib/fd-safer.c: New file.
16367         * lib/fcntl-safer.h, open-safer.c: Remove.
16368         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
16369         * lib/dup-safer.c: Include unistd-safer.h first.
16370         Don't include errno.h.
16371         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
16372         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
16373         * lib/file-type.c: Rely on file-type.h change.
16374         * lib/getloadavg.c: Include unistd-safer.h.
16375         (getloadavg): Use safer open.
16376         * lib/getusershell.c: Include "stdio-safer.h".
16377         (getusershell): Use safer fopen.
16378         * lib/long-options.c (long_options): Use NULL rather than 0.
16379         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
16380         'free'.
16381         * lib/modechange.c: Likewise.
16382         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
16383         (MODE_DONE): New constant.
16384         (struct mode_change): Remove 'next' member.
16385         (make_node_op_equals): New function; like the old one of the
16386         same name, except it allocates an array.
16387         (mode_compile, mode_create_from_ref): Use it.
16388         (mode_compile): Allocate result as an array, not a linked list.
16389         Parse octal string ourself, so that we catch mistakes like "+0".
16390         (mode_adjust): Arg is an array, not a linked list.
16391         * lib/modechange.c: Include stat-macros.h, xalloc.h.
16392         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
16393         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
16394         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
16395         Remove.  This is now stat-macros.h's job.
16396         (talloc): Remove.  All callers replaced by xalloc, so that
16397         our invokers don't have to worry about reporting memory failures.
16398         (make_node_op_equals): Remove.
16399         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
16400         New constants.
16401         (struct mode_change): Moved here from modechange.h.
16402         (mode_append_entry): Remove.
16403         (mode_compile): Remove MASKED_OPS arg, since it encouraged
16404         apps to have incorrect behavior.  Use simpler algorithm for head
16405         and tail.  Don't futz with umask; that's now the job of mode_adjust.
16406         Detect more invalid usages rather than having somewhat-random behavior.
16407         Don't insert an "a=" action, as that leads to incorrect behavior.
16408         (mode_compile, mode_create_from_ref): Return NULL on error instead
16409         of an enum, since now there's only one way to have an error.  All
16410         callers changed.
16411         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
16412         at the correct time.  Simplify calculation of "+u" and its ilk.
16413         Don't mishandle "+X".
16414         (mode_free): Remove "register" and localize decls.
16415         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
16416         (struct mode_change): Move to modechange.c; callers don't
16417         need to see this stuff.
16418         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
16419         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
16420         (mode_change, mode_adjust): Reflect the new signatures noted above.
16421         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
16422         that might redefine system include files.
16423         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
16424         (my_usleep): Use NULL rather than (void *) 0.
16425         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
16426         Use siginterrupt to specify that system calls should be interrupted.
16427         (rpl_nanosleep): Move initialization of suspended closer to call of
16428         my_usleep.
16429         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
16430         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
16431         (desirable_utmp_entry): New function.
16432         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
16433         using x2nrealloc, to simplify logic.
16434         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
16435         size calculation.  Do not assume utmp file is a regular file.
16436         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
16437         (READ_UTMP_CHECK_PIDS): New constant.
16438         * lib/save-cwd.c: Include unistd-safer.h.
16439         (save_cwd): Use fd_safer.
16440         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
16441         [!_LIBC] Include "stat-macros.h" instead.
16442         * lib/unistd-safer.h (fd_safer): New decl.
16443
16444 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
16445
16446         * modules/getloadavg (Depends-on): Add unistd-safer.
16447         * modules/getusershell (Depends-on): Add stdio-safer.
16448         * modules/lstat (Depends-on): Remove xalloc.
16449         * modules/mkstemp (Depends-on): Add stat-macros.
16450         * modules/modechange (Depends-on): Remove xstrtol.
16451         Add stat-macros, xalloc.
16452         * modules/save-cwd (Depends-on): Add unistd-safer.
16453         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
16454         * modules/unistd-safer (Files): Add lib/fd-safer.c
16455         (Makefile.am): Remove lib_SOURCES.
16456
16457         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
16458         Remove fcntl-safer; unistd-safer supersedes it.
16459
16460 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
16461
16462         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
16463         AC_HEADER_STAT.
16464         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
16465         (gl_PREREQ_CHOWN): Remove.
16466         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
16467         it.  Don't require AC_HEADER_STAT.
16468         (gl_PREREQ_LSTAT): Remove.
16469         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
16470         Don't require AC_HEADER_STAT.
16471         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
16472         (gl_PREREQ_RMDIR): Remove.
16473         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
16474         mention stat-macros.h or AC_HEADER_STAT, since we'll make
16475         the stat-macros module a prerequisite.
16476         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
16477         * m4/filemode.m4 (gl_FILEMODE): Likewise.
16478         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
16479         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
16480         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
16481         variable names.
16482         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
16483         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
16484         variable prefixes.
16485         * m4/fcntl-safer.m4: Remove.
16486         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
16487         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
16488         Invoke gl_PREREQ_FD_SAFER.
16489         (gl_PREREQ_FD_SAFER): New macro.
16490         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
16491         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
16492         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
16493         Remove duplicate call to AC_LIBOBJ(readutmp).
16494         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
16495
16496         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
16497         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
16498
16499 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
16500
16501         * MODULES.html.sh (Misc): Add byteswap.
16502
16503 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
16504
16505         * modules/getcwd (Depends-on): Add extensions.
16506         * modules/openat (Depends-on): Likewise.
16507
16508 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
16509
16510         * modules/byteswap: New file.
16511
16512 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
16513
16514         * m4/byteswap.m4: New file.
16515
16516 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
16517
16518         * lib/byteswap_.h: New file.
16519
16520 2005-04-25  Karl Berry  <karl@gnu.org>
16521
16522         * m4/gettext.m4: Update from GNU gettext 0.14.4.
16523
16524 2005-04-25  Albert Chin  <china@thewrittenword.com>
16525
16526         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
16527         Toolkit C bug.
16528
16529 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
16530
16531         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
16532         (func_ln_if_changed) Remove forcibly for no error message
16533         in case file does not exist.
16534
16535 2005-04-19  Simon Josefsson  <jas@extundo.com>
16536
16537         * gnulib-tool (Options): Make --symlink mean --symbolic.
16538
16539 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
16540
16541         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
16542
16543 2005-04-16  Simon Josefsson  <jas@extundo.com>
16544
16545         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
16546
16547 2005-04-15  Simon Josefsson  <jas@extundo.com>
16548
16549         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
16550
16551 2005-04-15  Simon Josefsson  <jas@extundo.com>
16552
16553         * gnulib-tool: Rename --symlink to --symbolic.
16554
16555 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
16556
16557         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
16558         symbolic links to files instead of copying/moving.  Add --aux-dir,
16559         specifying directory relative --dir where auxiliary build tools
16560         are placed.
16561
16562 2005-04-14  Bruno Haible  <bruno@clisp.org>
16563
16564         * modules/allocsa (License): Change to LGPL.
16565         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
16566
16567 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
16568
16569         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
16570         that "UTC +1 second" continues to work.  Problem reported
16571         by Dmitry V. Levin.
16572         (relunit_snumber): New rule.
16573         (relunit): Use it.
16574
16575 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
16576
16577         * lib/getdate.y (universal_time_zone_table): New constant.
16578         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
16579         universal_time_zone_table.
16580         (lookup_zone): Prefer universal_time_zone_table to
16581         local_time_zone_table, so that "GMT" time stamps are allowed in
16582         London during the summer.  Problem reported by Ian Abbott.
16583
16584 2005-04-12  Jim Meyering  <jim@meyering.net>
16585
16586         * lib/human.c (humblock): Set *options even when returning due to
16587         xstrtoumax conversion failure.  Thanks to a used-uninitialized
16588         warning from gcc-4.
16589
16590 2005-04-09  Jim Meyering  <jim@meyering.net>
16591
16592         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
16593         -Wuninitialized: initialize tm0.tm_year.
16594
16595 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
16596
16597         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
16598         count, since there's no maximum.  All uses changed.
16599         Add member dsts_seen.
16600         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
16601         not being INT_MAX.
16602         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
16603         Use pc_rels_seen to decide whther a date is absolute.
16604
16605         * lib/getdate.y (number): Don't overwrite year.
16606         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
16607         check.
16608
16609 2005-04-02  Simon Josefsson  <jas@extundo.com>
16610
16611         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
16612         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
16613
16614 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
16615
16616         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
16617         where no absolute path name can be longer than PATH_MAX.
16618
16619 2005-03-27  Jim Meyering  <jim@meyering.net>
16620
16621         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
16622
16623 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
16624
16625         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
16626         "one's complement" -> "ones' complement" in comment, as per Knuth.
16627         "value of type" -> "type or expression" in comment.
16628         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
16629
16630 2005-03-26  Jim Meyering  <jim@meyering.net>
16631
16632         Comment nits.
16633         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
16634         Correct typos: s/or/of/.
16635
16636 2005-03-26  Jim Meyering  <jim@meyering.net>
16637
16638         * modules/check-include-files: Move to ../ and rename to...
16639         * check-module: ...this.
16640
16641 2005-03-25  Jim Meyering  <jim@meyering.net>
16642
16643         * modules/xvasprintf (Files): Add xalloc.h.
16644
16645 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
16646
16647         * modules/gettext (Files): config/config.rpath ->
16648         build-aux/config.rpath
16649         * modules/iconv (Files): Likewise.
16650         Problem reported by Oskar Liljeblad.
16651
16652 2005-03-23  Jim Meyering  <jim@meyering.net>
16653
16654         * modules/check-include-files: New script to check for
16655         missing dependencies, multiple includes, etc.
16656
16657         * modules/c-strtold (Depends-on): Add xalloc.
16658         * modules/c-strtod (Depends-on): Add xalloc.
16659         * modules/hash (Depends-on): Add xalloc.
16660         (Files): Remove lib/xalloc.h.
16661
16662         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
16663         * modules/userspec (Files): Add lib/inttostr.h.
16664
16665 2005-03-23  Jim Meyering  <jim@meyering.net>
16666
16667         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
16668
16669 2005-03-22  Jim Meyering  <jim@meyering.net>
16670
16671         * modules/stat-macros: New module.
16672         * modules/canonicalize, modules/euidaccess, modules/file-type,
16673         * modules/filemode, modules/lchown, modules/makepath,
16674         * modules/rmdir, modules/stat: Depend on new stat-macros module
16675         rather than listing lib/stat-macros.h manually.
16676         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
16677
16678 2005-03-22  Jim Meyering  <jim@meyering.net>
16679
16680         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
16681
16682 2005-03-22  Bruno Haible  <bruno@clisp.org>
16683
16684         * config/srclist.txt: Replace target directory 'config' with
16685         'build-aux'.
16686         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
16687         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
16688         ../build-aux/.
16689
16690 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
16691
16692         * modules/chdir-long (Depends-on): Add mempcpy.
16693
16694         * modules/acl, modules/backupfile, modules/c-strtod,
16695         modules/c-strtold, modules/canon-host, modules/canonicalize,
16696         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
16697         modules/exclude, modules/exitfail, modules/file-type,
16698         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
16699         modules/getdate, modules/getline, modules/getpagesize,
16700         modules/getpass, modules/getugroups, modules/group-member,
16701         modules/hard-locale, modules/hash, modules/human, modules/idcache,
16702         modules/inttostr, modules/long-options, modules/makepath,
16703         modules/md5, modules/memcasecmp, modules/memcoll,
16704         modules/modechange, modules/mountlist, modules/path-concat,
16705         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
16706         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
16707         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
16708         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
16709         modules/strftime, modules/strndup, modules/strverscmp,
16710         modules/timespec, modules/unlocked-io, modules/userspec,
16711         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
16712         modules/yesno:
16713         Remove lib_SOURCES line from Makefile.am section, as this is now
16714         done automatically by the corresponding Autoconf macro.
16715
16716 2005-03-21  Jim Meyering  <jim@meyering.net>
16717
16718         Changes imported from coreutils.
16719
16720         * lib/cycle-check.c: Don't include xalloc.h.
16721
16722         * lib/path-concat.c: Don't include assert.h.
16723         (path_concat): Remove assertion that would have triggered
16724         for ABASE starting with more than one slash.
16725         Reported by Andreas Schwab.
16726
16727         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
16728         properly when ABASE is an absolute file name.
16729         Correct the description of this function.
16730         Include <assert.h>.
16731         Add an assertion and a test driver.
16732         This fixes a bug introduced on 2004-07-02.
16733         Andreas Schwab reported the resulting failure of cp --parents:
16734         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
16735
16736 2005-03-21  Jim Meyering  <jim@meyering.net>
16737
16738         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
16739         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
16740
16741 2005-03-21  Jim Meyering  <jim@meyering.net>
16742         and  Paul Eggert  <eggert@cs.ucla.edu>
16743
16744         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
16745         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
16746         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
16747         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
16748         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
16749         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
16750         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
16751         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
16752         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
16753         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
16754         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
16755         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
16756         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
16757         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
16758         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
16759         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
16760         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
16761         for these modules.
16762
16763 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
16764
16765         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
16766         (which shouldn't happen), generate nothing instead of returning 0
16767         immediately, so that nstrftime (NULL, ...) doesn't return 0.
16768
16769 2005-03-16  Bruno Haible  <bruno@clisp.org>
16770
16771         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
16772         HAVE_LONGLONG_64BIT.
16773
16774 2005-03-16  Bruno Haible  <bruno@clisp.org>
16775
16776         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
16777         HAVE_LONGLONG_64BIT.
16778
16779 2005-03-16  Bruno Haible  <bruno@clisp.org>
16780
16781         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
16782         HAVE_LONGLONG_64BIT.
16783
16784 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
16785
16786         * lib/strftime.c (my_strftime): Prepend space to format so that we can
16787         reliably distinguish strftime failure from empty output on POSIX
16788         hosts.
16789
16790 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
16791
16792         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
16793         (iconv_string): Don't guess a size-zero buffer, as that might cause
16794         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
16795         result would be 'too large', where 'too large' is (heuristically)
16796         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
16797         overflow concerns.  This will prevent some unwanted malloc failures
16798         when the inputs are very large.
16799
16800 2005-03-15  Karl Berry  <karl@gnu.org>
16801
16802         * config/srclist.txt (config.rpath): from gettext.
16803         * config/config.rpath: update.
16804
16805 2005-03-15  Bruno Haible  <bruno@clisp.org>
16806
16807         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
16808         to 'negate'.
16809
16810         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
16811         variable.
16812
16813         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
16814         results.
16815
16816 2005-03-14  Simon Josefsson  <jas@extundo.com>
16817
16818         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
16819         <fx@gnu.org>.
16820
16821 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
16822
16823         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
16824         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
16825         intprops.h.
16826         * lib/strtol.c: Likewise.
16827
16828 2005-03-14  Jim Meyering  <jim@meyering.net>
16829
16830         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
16831         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
16832         to be nonzero so that we (and caller) can detect the difference
16833         between a valid zero-length expansion and an error return, even
16834         when the underlying strftime fails before writing anything into
16835         that location.
16836
16837 2005-03-14  Bruno Haible  <bruno@clisp.org>
16838
16839         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
16840         Update from GNU gettext 0.14.3.
16841
16842 2005-03-10  Jim Meyering  <jim@meyering.net>
16843
16844         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
16845
16846 2005-03-10  Jim Meyering  <jim@meyering.net>
16847
16848         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
16849         so that this module works on systems without fchdir.
16850
16851 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
16852
16853         Factor int-properties macros into a single file, except for
16854         glibc-related files.
16855         * lib/intprops.h: New file.
16856         * lib/getloadavg.c: Include it instead of limits.h.
16857         (INT_STRLEN_BOUND): Remove.
16858         * lib/human.c: Include intprops.h.
16859         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
16860         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
16861         302/1000.
16862         * lib/inttostr.h: Include intprops.h instead of limits.h.
16863         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
16864         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
16865         for consistency with intprops.h.
16866         (time_t_is_integer, twos_complement_arithmetic): Use them.
16867         * lib/sig2str.h: Include <signal.h>, intprops.h.
16868         (INT_STRLEN_BOUND): Remove.
16869         * lib/strftime.c (TYPE_SIGNED): Remove.
16870         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
16871         * lib/strtol.c: Adjust comments to match intprops.h.
16872         * lib/userspec.c: Include intprops.h.
16873         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
16874         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
16875         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
16876         instead of rolling our own expressions.
16877         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
16878
16879         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
16880         instead of int.
16881         (my_strftime): Do not mishandle years close to INT_MAX, by doing
16882         the right thing even if adding 1900 would overflow.  Similarly
16883         for tm_mon + 1 and tm_yday + 1.
16884         Make %Y always equivalent to %C%y, and similarly for %G and %g.
16885         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
16886         (DO_SIGNED_NUMBER): New macro.
16887         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
16888
16889 2005-03-07  Bruno Haible  <bruno@clisp.org>
16890
16891         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
16892
16893 2005-03-07  Bruno Haible  <bruno@clisp.org>
16894
16895         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
16896
16897 2005-03-04  Derek R. Price  <derek@ximbiot.com>
16898
16899         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
16900         (func_import): Only replace files via --import when they have actually
16901         changed.
16902
16903 2005-03-03  Derek R. Price  <derek@ximbiot.com>
16904
16905         * m4/mmap-anon.m4: New file.
16906         * m4/pagealign_alloc.m4: New file.
16907
16908 2005-03-03  Derek R. Price  <derek@ximbiot.com>
16909             Bruno Haible  <bruno@clisp.org>
16910
16911         * modules/pagealign_alloc: New file.
16912         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
16913
16914 2005-03-03  Derek R. Price  <derek@ximbiot.com>
16915             Bruno Haible  <bruno@clisp.org>
16916
16917         * lib/pagealign_alloc.h: New file.
16918         * lib/pagealign_alloc.c: New file.
16919
16920 2005-03-03  Bruno Haible  <bruno@clisp.org>
16921
16922         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
16923         Use an all-permissive copyright notice, recommended by RMS.
16924
16925 2005-03-02  Bruno Haible  <bruno@clisp.org>
16926
16927         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
16928         of AIX, the replacement has to be done only after <string.h> is
16929         included, therefore not in config.h. stpncpy.h does the replacement,
16930         and stpncpy.c uses it.
16931
16932 2005-03-02  Bruno Haible  <bruno@clisp.org>
16933
16934         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
16935         stpncpy.c uses it.
16936
16937 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
16938
16939         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
16940         The workaround isn't strictly needed for POSIX conformance, and
16941         it's too much of a pain to configure and maintain.  We'll ask
16942         people to fix their kernels instead.
16943         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
16944         (NANOSLEEP_BUG_WORKAROUND): Remove.
16945         (xnanosleep): Remove the workaround.
16946
16947 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
16948
16949         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
16950         Reported by Derek Price.
16951         (Include): Add "timespec.h".
16952
16953         * modules/xnanosleep (Depends-on): Remove gethrxtime.
16954
16955 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
16956
16957         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
16958         to detect nanosleep bug.
16959
16960 2005-03-01  Bruno Haible  <bruno@clisp.org>
16961
16962         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
16963
16964 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
16965
16966         * modules/gethrxtime: New file.
16967         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
16968         (Depends-on): Add gethrxtime.
16969         (configure.ac): Add gl_XNANOSLEEP.
16970         (Makefile.am): Remove lib_SOURCES line.
16971
16972 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
16973
16974         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
16975         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
16976
16977 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
16978
16979         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
16980         * lib/timespec.h (gettime): Return void, since it always
16981         succeeds now.  All uses changed.
16982         * lib/gettime.c (gettime) Likewise.
16983         [HAVE_NANOTIME]: Prefer nanotime.
16984         Assume gettimeofday succeeds, as POSIX requires.
16985         Assime time () succeeds, since other code already does.
16986         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
16987         (timespec_subtract): Remove.
16988         (NANOSLEEP_BUG_WORKAROUND): New constant.
16989         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
16990         things considerably.  Use it only on GNU/Linux hosts, since the
16991         workaround shouldn't be needed elsewhere.
16992
16993 2005-02-24  Bruno Haible  <bruno@clisp.org>
16994
16995         * modules/gettext (Files): Add m4/glibc2.m4.
16996
16997 2005-02-24  Bruno Haible  <bruno@clisp.org>
16998
16999         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
17000         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
17001         * m4/progtest.m4:
17002         Update from GNU gettext 0.14.2.
17003         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
17004
17005 2005-02-24  Bruno Haible  <bruno@clisp.org>
17006
17007         * lib/localcharset.c: Update from GNU gettext 0.14.2.
17008         * lib/config.charset: Update from GNU gettext 0.14.2.
17009
17010 2005-02-24  Bruno Haible  <bruno@clisp.org>
17011
17012         * lib/gettext.h: Update from GNU gettext 0.14.2.
17013
17014 2005-02-23  Simon Josefsson  <jas@extundo.com>
17015
17016         * m4/iconvme.m4: New file.
17017
17018 2005-02-23  Jim Meyering  <jim@meyering.net>
17019
17020         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
17021         change.
17022         Thanks to Bruno Haible for catching it.
17023
17024 2005-02-22  Simon Josefsson  <jas@extundo.com>
17025
17026         * modules/iconvme: New file.
17027
17028         * MODULES.html.sh: Add iconvme.
17029
17030 2005-02-22  Simon Josefsson  <jas@extundo.com>
17031
17032         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
17033
17034 2005-02-22  Simon Josefsson  <jas@extundo.com>
17035
17036         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
17037
17038 2005-02-22  Jim Meyering  <jim@meyering.net>
17039
17040         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
17041         s/ifndef/ifdef/.
17042
17043 2005-02-20  Neil Conway  <neilc@samurai.com>
17044
17045         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
17046         returned by OSX/Darwin if the specified buffer is not large
17047         enough for the hostname.
17048
17049 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17050
17051         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
17052         pass it to _help, otherwise the latter coredumps trying to
17053         dereference state.root_argp.
17054
17055 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
17056
17057         * modules/chdir-long (Depends-on): Add memrchr.
17058         * modules/memrchr (Files): Add lib/memrchr.h.
17059         (Include): "memrchr.h".
17060
17061 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
17062
17063         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
17064
17065 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
17066
17067         * lib/memrchr.h: New file.
17068         * lib/chdir-long.c: Include it.
17069         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
17070         Don't bother including stddef.h.
17071
17072 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
17073
17074         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
17075         inclusion.
17076         Include <sys/types.h>, for dev_t.
17077         (ME_DUMMY, ME_REMOTE): Move from here....
17078         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
17079         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
17080         Dmitry V. Levin.
17081         Include mountlist.h first, to test the interface.
17082
17083 2005-01-29  Bruno Haible  <bruno@clisp.org>
17084
17085         * lib/progname.c (program_name): Initialize.
17086         Needed when linking statically on MacOS X.
17087
17088 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
17089
17090         Sync from coreutils.
17091         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
17092         (Depends-on): Add c-strtod.
17093         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
17094
17095 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
17096
17097         Sync from coreutils.
17098         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
17099
17100         Remove files that are specific to coreutils.
17101         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
17102
17103 2005-01-28  Bruno Haible  <bruno@clisp.org>
17104
17105         * modules/javacomp: New file.
17106         * MODULES.html.sh (Java): Add javacomp.
17107
17108 2005-01-28  Bruno Haible  <bruno@clisp.org>
17109
17110         * m4/javacomp.m4: New file, from GNU gettext.
17111
17112 2005-01-28  Bruno Haible  <bruno@clisp.org>
17113
17114         * lib/javacomp.sh.in: New file, from GNU gettext.
17115         * lib/javacomp.h: New file, from GNU gettext.
17116         * lib/javacomp.c: New file, from GNU gettext.
17117
17118 2005-01-26  Simon Josefsson  <jas@extundo.com>
17119
17120         * lib/gai_strerror.c: Use GPL in header.
17121
17122 2005-01-26  Bruno Haible  <bruno@clisp.org>
17123
17124         * modules/javaexec: New file.
17125         * MODULES.html.sh (Java): Add javaexec.
17126
17127 2005-01-26  Bruno Haible  <bruno@clisp.org>
17128
17129         * m4/javaexec.m4: New file, from GNU gettext.
17130
17131 2005-01-26  Bruno Haible  <bruno@clisp.org>
17132
17133         * lib/javaexec.sh.in: New file, from GNU gettext.
17134         * lib/javaexec.h: New file, from GNU gettext.
17135         * lib/javaexec.c: New file, from GNU gettext.
17136
17137 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17138
17139         * modules/lchown (Depends-on): Remove lchown.h
17140
17141 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17142
17143         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
17144         must be defined if the header file was not found, in order
17145         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
17146
17147 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17148
17149         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
17150         initializers for struct pentry_state.
17151         (__argp_error): Check return value of __asprintf
17152         (__argp_failure): Translate error message
17153
17154         * lib/argp-parse.c: Removed braces around the expansion of N_()
17155
17156 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
17157
17158         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
17159         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
17160         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
17161         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
17162         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
17163         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
17164         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
17165         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
17166         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
17167         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
17168         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
17169         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
17170         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
17171         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
17172         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
17173         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
17174         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
17175         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
17176         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
17177         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
17178         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
17179         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
17180         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
17181         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
17182         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
17183         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
17184         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
17185         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
17186         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
17187         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
17188         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
17189         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
17190         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
17191         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
17192         xstrtol.m4, xstrtoumax.m4, yesno.m4:
17193         Use an all-permissive copyright notice, recommended by RMS.
17194
17195 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
17196
17197         * modules/chdir-long (Depends-on): Remove mempcpy.
17198
17199 2005-01-21  Jim Meyering  <jim@meyering.net>
17200
17201         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
17202         same value as for Solaris 9.
17203
17204         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
17205         component length.  This included changing the parameter to be
17206         of type `char *' rather than `char const *'.
17207         * lib/chdir-long.h (chdir_long): Update prototype.
17208
17209         * lib/openat.c (fdopendir, fstatat): New functions.
17210         * lib/openat.h: Include headers required for use of DIR and struct
17211         stat.
17212         [AT_SYMLINK_NOFOLLOW]: Define.
17213         (fdopendir, fstatat): Add prototypes.
17214
17215 2005-01-21  Bruno Haible  <bruno@clisp.org>
17216
17217         * modules/classpath: New file.
17218         * MODULES.html.sh (Java): Add classpath.
17219
17220 2005-01-21  Bruno Haible  <bruno@clisp.org>
17221
17222         * lib/classpath.h: New file, from GNU gettext.
17223         * lib/classpath.c: New file, from GNU gettext.
17224
17225 2005-01-20  Simon Josefsson  <jas@extundo.com>
17226
17227         * modules/version-etc-fsf: New file.
17228
17229 2005-01-20  Simon Josefsson  <jas@extundo.com>
17230
17231         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
17232         * lib/version-etc.c: Remove version_etc_copyright.
17233         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
17234         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
17235
17236 2005-01-20  Simon Josefsson  <jas@extundo.com>
17237
17238         * lib/base64.h (isbase64): Add.
17239
17240         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
17241         using a unsigned prototype, don't inline.
17242         (base64_decode): Use it.
17243
17244 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
17245
17246         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
17247         it.
17248
17249 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
17250
17251         * lib/save-cwd.c (save_cwd): Remove code to support the case
17252         where fchdir is missing or flaky.
17253
17254 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
17255
17256         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
17257
17258 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
17259
17260         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
17261         AC_LIBSOURCES now does this.
17262         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
17263         with new ullong_max module.
17264
17265 2005-01-19  Bruno Haible  <bruno@clisp.org>
17266
17267         * modules/sh-quote: New file.
17268         * MODULES.html.sh (Executing programs): Add sh-quote.
17269
17270 2005-01-19  Bruno Haible  <bruno@clisp.org>
17271
17272         * lib/sh-quote.h: New file, from GNU gettext.
17273         * lib/sh-quote.c: New file, from GNU gettext.
17274
17275 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
17276
17277         Merge from coreutils.
17278         * m4/ullong_max.m4: New file.
17279         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
17280         (gl_MACROS): Assume localeconv exists.
17281
17282 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
17283
17284         Merge changes from coreutils, as described below in several
17285         changelogs dated today.
17286
17287         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
17288         (O_DIRECTORY): Remove; not needed here, since "." must be
17289         a directory.  All uses removed.
17290         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
17291         universal on Suns, and we also need to test for IRIX.
17292         Revamp code to use 'if' rather than '#if'.
17293         Avoid unnecessary comparison of cwd->desc to 0.
17294
17295         * lib/utimens.c (futimens): Robustify the previous patch, by checking
17296         for known valid error numbers rather than observed invalid ones.
17297
17298 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
17299
17300         * modules/ullong_max: New file.
17301
17302         * modules/chdir-long, modules/openat: New files.
17303         * modules/save-cwd (Depends-on): Depend on chdir-long.
17304         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
17305
17306 2005-01-18  Jim Meyering  <jim@meyering.net>
17307
17308         Merge from coreutils.
17309         * m4/chdir-long.m4, m4/openat.m4: New files.
17310         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
17311         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
17312         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
17313         is sane and DOES follow symlinks.  Besides, testing 20 different
17314         systems found no broken chown implementations.
17315         Prompted by a change in rsync's copy of this macro.
17316         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
17317
17318         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
17319
17320         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
17321         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
17322         NULL-means-set-to-current-time semantics.
17323         Remove temporary file immediately, rather than waiting
17324         for configure's at-exit trap code to do it.
17325
17326 2005-01-18  Jim Meyering  <jim@meyering.net>
17327
17328         * lib/version-etc.c (version_etc_copyright): Update copyright date.
17329
17330         * lib/utimens.c (futimens): Account for the fact that futimes
17331         can also fail with errno == ENOSYS or errno == ENOENT.
17332         Patch from Dmitry V. Levin.
17333
17334         Change the name of the robust chdir function from chdir to chdir_long.
17335         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
17336         (restore_cwd): Use chdir_long, not chdir.
17337         * lib/chdir-long.c: Renamed from chdir.c.
17338         * lib/chdir-long.h: Renamed from chdir.h.
17339         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
17340         Hurd.
17341
17342 2005-01-18  Bruno Haible  <bruno@clisp.org>
17343
17344         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
17345         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
17346         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
17347         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
17348         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
17349         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
17350         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
17351         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
17352         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
17353         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
17354         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
17355         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
17356         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
17357         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
17358         Use an all-permissive copyright notice, recommended by RMS.
17359
17360 2005-01-18  Bob Proulx  <bob@proulx.com>
17361
17362         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
17363         simplify offsetof() macro construct to avoid compile failure with
17364         native HP-UX 11.0 ANSI C compiler.
17365
17366 2005-01-17  Bruno Haible  <bruno@clisp.org>
17367
17368         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
17369         redundant because stpncpy.m4 takes care of it.
17370
17371 2005-01-17  Bruno Haible  <bruno@clisp.org>
17372
17373         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
17374
17375 2005-01-17  Bruno Haible  <bruno@clisp.org>
17376
17377         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
17378         used.
17379
17380 2005-01-17  Bruno Haible  <bruno@clisp.org>
17381
17382         * lib/fwriteerror.h (fwriteerror): Change specification to include
17383         fclose.
17384         * lib/fwriteerror.c: Include <stdbool.h>.
17385         (fwriteerror): At the end, close the file stream. Record whether
17386         stdout was already closed.
17387
17388 2005-01-17  Bruno Haible  <bruno@clisp.org>
17389
17390         * lib/execute.c (environ): Declare if needed.
17391         * lib/pipe.c (environ): Likewise.
17392         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
17393
17394 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17395
17396         * modules/argp: Depend on vsnprintf
17397
17398 2005-01-10  Jim Meyering  <jim@meyering.net>
17399
17400         * modules/closeout (Depends-on): Add atexit.
17401
17402 2005-01-06  Bruno Haible  <bruno@clisp.org>
17403
17404         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
17405
17406 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
17407
17408         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
17409         definitions to be after all include files, to avoid collisions.
17410         Problem reported by Bob Proulx.
17411
17412 2005-01-04  Jim Meyering  <jim@meyering.net>
17413
17414         Changes imported from coreutils.
17415         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
17416         as the mkstemp template, use a temporary directory and an
17417         8.3-friendly template to avoid trouble on systems like DJGPP.
17418         Reported by Juan M. Guerrero via Stepan Kasal.
17419         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
17420         close. Remove the temporary directory right away, rather than waiting
17421         for configure's at-exit trap code to do it.
17422         Suggestion from Stepan Kasal.
17423
17424 2005-01-01  Simon Josefsson  <jas@extundo.com>
17425
17426         * gnulib-tool: Print #include directives when --import'ing.
17427
17428 2004-12-28  Simon Josefsson  <jas@extundo.com>
17429
17430         * tests/test-base64.c: Include required header files.  Remove
17431         unused variables.
17432
17433 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
17434
17435         * modules/error (Depends-on): Remove gettext.
17436
17437 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
17438
17439         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
17440         not needed.  This removes a dependency on the gettext module.
17441         [defined _LIBC]: Do not include <libintl.h>; not needed.
17442
17443 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
17444
17445         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
17446         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
17447
17448 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
17449
17450         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
17451         HAVE_DECL_STRTOLD.
17452
17453 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
17454
17455         * modules/getdate (Depends-on): Remove alloca-opt.
17456
17457 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
17458
17459         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
17460
17461 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
17462
17463         * lib/argp-parse.c: Include <stddef.h>.
17464         (alignof, alignto): New macros.
17465         (parser_init): Don't assume that void * is aligned sufficiently
17466         for struct option.
17467
17468         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
17469         need to extend the stack.
17470         (YYINITDEPTH): New macro, so that the initial stack isn't overly
17471         large.
17472
17473 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17474
17475         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
17476
17477 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
17478
17479         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
17480         (2004-10-24) change.  Apparently this was a false alarm.
17481
17482         * modules/getdate: Depend on alloca-opt, not alloca.
17483
17484 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
17485
17486         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
17487         Remove now-obsolete comment about AIX.
17488         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
17489         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
17490         (YYMAXDEPTH): New macro.
17491
17492 2004-12-18  Simon Josefsson  <jas@extundo.com>
17493
17494         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
17495
17496 2004-12-18  Bruno Haible  <bruno@clisp.org>
17497
17498         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
17499
17500 2004-12-18  Bruno Haible  <bruno@clisp.org>
17501
17502         * lib/fatal-signal.c (fatal_signals): Make non-const.
17503         (init_fatal_signals): New function.
17504         (uninstall_handlers, install_handlers): Ignore signals that were set to
17505         SIG_IGN.
17506         (at_fatal_signal): Call init_fatal_signals.
17507         (init_fatal_signal_set): Likewise. Ignore signals that were set to
17508         SIG_IGN.
17509         Reported by Paul Eggert.
17510
17511 2004-12-18  Bruno Haible  <bruno@clisp.org>
17512
17513         * doc/alloca.texi: New file.
17514         * doc/alloca-opt.texi: New file.
17515
17516 2004-12-17  Jim Meyering  <jim@meyering.net>
17517
17518         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
17519         Otherwise, install-sh could exit with improper exit status when
17520         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
17521
17522 2004-12-16  Simon Josefsson  <jas@extundo.com>
17523
17524         * tests/test-base64.c: Add license.
17525
17526 2004-12-15  Stepan Kasal  <address@hidden>
17527
17528         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
17529
17530 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
17531
17532         * modules/getcwd (Files): Add m4/d-ino.m4.
17533         Suggested by Mark D. Baushke.
17534
17535 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
17536
17537         * lib/getdate.y (textint): New member "negative".
17538         (time_zone_hhmm): New function.
17539         Expect 14 shift-reduce conflicts, not 13.
17540         (o_colon_minutes): New rule.
17541         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
17542         (yylex): Set the "negative" member of signed numbers.
17543
17544 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
17545
17546         * doc/getdate.texi (Time of day items, Time zone items):
17547         Describe new formats +00:00, UTC+00:00.
17548
17549 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
17550
17551         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
17552         spurious "-l"s.  Problem reported by Stepan Kasal.
17553
17554 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
17555
17556         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
17557         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
17558
17559 2004-12-04  Simon Josefsson  <jas@extundo.com>
17560
17561         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
17562         Vandoorselaere <yoann@prelude-ids.org>.
17563
17564 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
17565
17566         Changes imported from coreutils.
17567         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
17568         exist.
17569         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
17570
17571 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
17572
17573         Changes imported from coreutils.
17574         * lib/hard-locale.c: Assume <locale.h> exists.
17575         Include "strdup.h".
17576         (GLIBC_VERSION): New macro.
17577         (hard_locale): Assume setlocale exists.
17578         Rewrite to avoid #ifdef.
17579         Use strdup rather than malloc + strcpy.
17580         * lib/human.c: Assume <locale.h> exists.
17581         (human_readable): Assume localeconv exists.
17582
17583 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
17584
17585         * modules/hard-locale (Depends-on): Add strdup.
17586
17587 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
17588
17589         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
17590         convert T2, not T.  (Imported from libc.)
17591
17592 2004-11-30  Simon Josefsson  <jas@extundo.com>
17593
17594         * modules/restrict (License): Change to LGPL.
17595
17596 2004-11-30  Simon Josefsson  <jas@extundo.com>
17597
17598         * m4/restrict.m4: Add copyright and copying conditions.
17599
17600 2004-11-30  Simon Josefsson  <jas@extundo.com>
17601
17602         * m4/base64.m4: New file.
17603
17604 2004-11-30  Simon Josefsson  <jas@extundo.com>
17605
17606         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
17607         base64.
17608
17609         * tests/test-base64.c: New file.
17610
17611         * modules/base64: New file.
17612
17613 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
17614
17615         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
17616         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
17617
17618         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
17619
17620 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
17621
17622         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
17623         (__getcwd.c): Don't restore errno; glibc doesn't.
17624         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
17625         first, falling back to our code only if its results look suspicious.
17626         Ensure that the resulting buffer is only as large as necessary.
17627
17628         * lib/readutmp.c: Include readutmp.h first.
17629         Include <errno.h>, since readutmp.h no longer does that.
17630         * lib/readutmp.h: Don't include <errno.h>,
17631         <sys/param.h>, <time.h>; not needed to establish interface.
17632         (errno): Remove decl.
17633         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
17634         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
17635         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
17636
17637 2004-11-28  Simon Josefsson  <jas@extundo.com>
17638
17639         * lib/base64.h, base64.c: New file.
17640
17641 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
17642
17643         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
17644
17645 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
17646
17647         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
17648         (Depends-on): Remove pathmax, same.  Add mempcpy.
17649         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
17650         (Makefile.am): Append getcwd.h to lib_SOURCES.
17651         (Include): Add getcwd.h.
17652         (Maintainer): Change from Jim Meyering to "all, glibc",
17653         since getdate now uses intended-for-glibc code.
17654         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
17655         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
17656
17657 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
17658
17659         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
17660         HP's ANSI C compiler.
17661         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
17662         Declaring int functions causes warnings on some modern systems and
17663         shouldn't be needed to compile on ancient ones.
17664         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
17665         defined.
17666
17667         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
17668         with the following changes.
17669         (__set_errno): Parenthesize properly.
17670         Include <stdbool.h>.
17671         (MIN, MAX, MATCHING_INO): New macros.
17672         (__getcwd): Define with prototype, not K&R form.
17673         Use heuristics to allocate default buffer on stack if possible.
17674         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
17675         behavior, and to avoid the PATH_MAX limit when computing
17676         ../../../../...
17677         Use MATCHING_INO to compare inode number to file.
17678         Check for arithmetic overflow in size calculations.
17679         Fix bug in reallocation of dot array that caused getcwd to fail
17680         on directories nested deeper than 75.
17681         Be more careful about saving errno on error.
17682         Do not use realloc; use only free+malloc, as this is a bit
17683         more flexible and avoids a needless copy operation.
17684         Do not inspect st_dev and st_ino for symbolic links; POSIX
17685         doesn't specify the latter.
17686         Check for closedir errors.
17687         Avoid needless casts.
17688         Use "#ifdef weak_alias" around weak_alias, to be like other
17689         glibc code.
17690         The following changes to getcwd.c have effect only when used in
17691         gnulib; they have no effect inside glibc proper.
17692         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
17693         as alloca isn't used.
17694         (alloca, __alloca): Likewise.
17695         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
17696         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
17697         unconditionally, as gnulib assumes C89 or better.
17698         Do not include <sys/param.h>.
17699         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
17700         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
17701         better.
17702         (NULL) [!defined NULL]: Remove; we assume C89 or better.
17703         Include <dirent.h> in a way that is compatible with modern Autoconf.
17704         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
17705         New macros, if not already defined.
17706         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
17707         Use "_LIBC", not "defined _LIBC", for consistency.
17708         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
17709         a mempcpy module.
17710         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
17711         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
17712         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
17713         credit only to Jim Meyering and adjust the copyright dates.
17714         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
17715         <stdlib.h>, <unistd.h>, "pathmax.h".
17716         Instead, include "xgetcwd.h" (first) and "getcwd.h".
17717         (INITIAL_BUFFER_SIZE): Remove.
17718         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
17719
17720 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
17721
17722         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
17723         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
17724         Use the _ONCE methods, for efficiency.
17725         Check for fcntl.h.  In test program, include <errno.h>
17726         and <fcntl.h> if available.  Remove old K&R cruft from
17727         test program.  Check for common errors in GNU/Linux,
17728         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
17729         don't do AC_LIBOBJ, as that's getcwd.m4's job.
17730         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
17731         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
17732         name accordingly.
17733         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
17734         accommodate new getcwd.c.
17735         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
17736         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
17737         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
17738         that's all we need now.
17739
17740 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17741
17742         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
17743         argp-parse.c depends on getopt internals, that means we should
17744         always use our getopt, to be on the safe side.
17745         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
17746         order not to spoil the result of an eventual previous invocation
17747         of gl_GETOPT_SUBSTITUTE.
17748
17749 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17750
17751         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
17752         redefinition warnings. To avoid them, include the defines
17753         in `#if !defined __need_getopt ... #endif'. The only place
17754         where __getopt_argv_const is used is in definitions
17755         of getopt_long and getopt_long_only below, which are as well
17756         protected by `#ifndef __need_getopt'.
17757         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
17758         __need_getopt after including <stdio.h> and <unistd.h> These
17759         headers might have defined it.
17760
17761 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
17762
17763         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
17764
17765 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
17766
17767         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
17768         (futimens): New function, which uses futimes if available.
17769         (futimens, utimens): Support timespec==NULL, with same semantics
17770         as utime and utimens.
17771         * lib/utimens.h (futimens): New decl.
17772
17773 2004-11-23  Jim Meyering  <jim@meyering.net>
17774
17775         * lib/getopt_.h: Remove trailing blanks.
17776
17777 2004-11-23  Jim Meyering  <jim@meyering.net>
17778
17779         * lib/__fpending.c: Add comment.
17780
17781 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
17782
17783         * modules/canonicalize (Depends-on): Add xreadlink.
17784         Problem reported by James Youngman.
17785
17786 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
17787
17788         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
17789         New macros.
17790         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
17791         optopt): Use them instead of invoking ## directly; otherwise, the
17792         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
17793
17794 2004-11-19  Bruno Haible  <bruno@clisp.org>
17795
17796         * lib/strtok_r.c: Move comments from here...
17797         * lib/strtok_r.h: ... to here.
17798
17799 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
17800
17801         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
17802         implementations that mishandle size_t overflow.
17803
17804 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
17805
17806         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
17807         might fail.  Problem reported by Yoann Vandoorselaere.
17808         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
17809         implementations that mishandle size_t overflow.
17810
17811 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
17812
17813         * modules/canon-host (Depends-on): Add strdup.
17814
17815 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
17816
17817         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
17818
17819 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
17820
17821         * lib/canon-host.c: Include "strdup.h".
17822         (canon_host): Use getaddrinfo if available, so that IPv6 works.
17823         Use strdup instead of malloc/strcpy to duplicate strings.
17824
17825         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
17826         (human_space_before_unit): New constant.
17827         * lib/human.c (human_readable): Support it.
17828
17829         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
17830         (xgetcwd): Set errno correctly when failing.
17831         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
17832         the failure is actually due to a PATH_MAX problem.
17833
17834         Further getopt changes to make it more likely that glibc will
17835         buy the changes back.
17836         * lib/getopt.c (POSIXLY_CORRECT): New constant.
17837         (getopt): Use it, so to preserve glibc semantic
17838         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
17839         when compiling for libc.
17840         * lib/getopt_.h (__getopt_argv_const): Bring it back.
17841         (getopt_long, getopt_long_only): Use it.
17842
17843         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
17844         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
17845         (getopt): Argv is now char * const *, as per standard.
17846         (_getopt_internal_r, _getopt_internal): Argv is now char **,
17847         not char *__getopt_argv_const *.
17848         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
17849         _getopt_long_only_r): Likewise.
17850         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
17851         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
17852         _getopt_long_r, _getopt_long_only_r): Likewise.
17853         * lib/getopt_.h (__getopt_argv_const): Remove.
17854         (getopt): Argv is now char * const *, as per standard.
17855
17856         * lib/getdate.y (tORDINAL): New token.
17857         (day, relunit): Allow it for relative times.
17858         (relative_time_table): Use tORDINAL for ordinals.
17859
17860 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
17861
17862         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
17863         Document that "second" isn't allowed as an ordinal number.
17864
17865 2004-11-16  Jim Meyering  <jim@meyering.net>
17866
17867         * modules/closeout (Depends-on): Add fpending.
17868
17869 2004-11-15  Jim Meyering  <jim@meyering.net>
17870
17871         * lib/closeout.c: Include "__fpending.h" once again.
17872         Include <stdbool.h>.
17873         (close_stdout): Don't fail just because stdout was closed initially,
17874         since some programs don't write to stdout in the normal course of
17875         operation (other than --version and --help), and we don't want this
17876         function to make e.g. `touch file >&-' fail.
17877         But do fail if it was closed and someone has tried to write to it.
17878         E.g., `printf foo >&-' must fail.
17879
17880 2004-11-13  Jim Meyering  <jim@meyering.net>
17881
17882         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
17883
17884 2004-11-12  Simon Josefsson  <jas@extundo.com>
17885
17886         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
17887         small doc fix is still pending.
17888
17889 2004-11-11  Simon Josefsson  <jas@extundo.com>
17890
17891         * modules/strtok_r: New file.
17892
17893         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
17894         strtok_r.
17895
17896 2004-11-11  Simon Josefsson  <jas@extundo.com>
17897
17898         * m4/strtok_r.m4: New file.
17899
17900         * m4/getopt.m4: Replace opterr.
17901
17902 2004-11-11  Simon Josefsson  <jas@extundo.com>
17903
17904         * lib/strtok_r.h, strtok_r.c: New file.
17905
17906 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
17907
17908         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
17909         of replacing opterr, getopt, etc.  This should handle the
17910         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
17911
17912 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
17913
17914         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
17915         we can stop lying to compilers about the constness of argv when we
17916         are compiled outside glibc.
17917         (getopt, getopt_long, getopt_long_only): Use it.
17918         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
17919         _getopt_internal, getopt): Likewise.
17920         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
17921         _getopt_long_only_r): Likewise.
17922         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
17923         _getopt_long_r, _getopt_long_only_r): Likewise.
17924
17925         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
17926         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
17927         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
17928         the other external symbols.
17929         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
17930         declaration, since the above renaming now works around collisions.
17931
17932 2004-11-11  Jim Meyering  <jim@meyering.net>
17933
17934         * lib/linebreak.c: Remove trailing blanks.
17935         * lib/alloca_.h: Likewise.
17936         * lib/acosl.c: Likewise.
17937         * lib/euidaccess.c: Likewise.
17938         * lib/allocsa.h: Likewise.
17939
17940 2004-11-10  Simon Josefsson  <jas@extundo.com>
17941
17942         * m4/getaddrinfo.m4: New file.
17943
17944 2004-11-10  Simon Josefsson  <jas@extundo.com>
17945
17946         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
17947
17948 2004-11-10  Simon Josefsson  <jas@extundo.com>
17949
17950         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
17951         getaddrinfo.
17952
17953         * modules/getaddrinfo: New file.
17954
17955 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
17956
17957         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
17958
17959 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
17960
17961         * lib/mktime.c (SHR): New macro, which is a portable
17962         substitute for >> that should work even on Crays.
17963         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
17964         Problem reported by Mark D. Baushke in
17965         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
17966         * lib/getdate.y (SHR): Likewise.
17967         (tm_diff): Use it.
17968         * lib/strftime.c (SHR): Likewise.
17969         (tm_diff): Use it.
17970         * lib/quotearg.c (struct quoting_options): Use unsigned int for
17971         quote_these_too, so that right shifts are well defined.  All uses
17972         changed.
17973
17974 2004-11-10  Jim Meyering  <jim@meyering.net>
17975
17976         Ensure that no close failure goes unreported.
17977         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
17978         return early when it seems there's nothing to flush.
17979         Don't include __fpending.h.
17980
17981 2004-11-10  Jim Meyering  <jim@meyering.net>
17982
17983         * modules/closeout (Depends-on): Remove fpending.
17984
17985 2004-11-10  Jim Meyering  <jim@meyering.net>
17986
17987         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
17988
17989 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
17990
17991         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
17992         gl_FUNC_STRFTIME.
17993         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
17994         and AC_REQUIRE when possible, to avoid duplicate checks.
17995         Check for <wchar.h>.
17996
17997 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
17998
17999         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
18000
18001 2004-11-09  Bruno Haible  <bruno@clisp.org>
18002
18003         * m4/sockpfaf.m4: New file.
18004
18005 2004-11-05  Bruno Haible  <bruno@clisp.org>
18006
18007         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
18008         Reported by Mark D. Baushke <mdb@cvshome.org>.
18009
18010 2004-11-04  Bruno Haible  <bruno@clisp.org>
18011
18012         2004-09-11  Bruno Haible  <bruno@clisp.org>
18013                 * allocsa.valgrind: New file.
18014         2004-02-06  Bruno Haible  <bruno@clisp.org>
18015                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
18016                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
18017                 Reported by Christopher Seip <chris.seip@hp.com>.
18018
18019 2004-11-04  Bruno Haible  <bruno@clisp.org>
18020
18021         * modules/allocsa (Files): Add lib/allocsa.valgrind.
18022         (Makefile.am): Distribute it.
18023
18024 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
18025
18026         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
18027         with errno == ERANGE if the buffer is too small.
18028         Problem reported by Mark D. Baushke.
18029
18030 2004-11-03  Albert Chin  <china@thewrittenword.com>
18031             Paul Eggert  <eggert@cs.ucla.edu>
18032
18033         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
18034         equivalent, substitute $ac_type for equivalent type rather than
18035         blindly using uint32_t *always* which won't work if uint32_t is not
18036         available.  Define _UINT32_T to work around typedef of uint32_t if
18037         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
18038         2.5.1.
18039
18040 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
18041
18042         * m4/jm-macros.m4: Sync from coreutils.
18043         (gl_MACROS): Check for mbrlen, for pathchk.
18044         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
18045
18046 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
18047
18048         * lib/xreadlink.c (MAXSIZE): New macro.
18049         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
18050         size does not exceed MAXSIZE.  Avoid cast.
18051         As suggested by Mark D. Baushke in
18052         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
18053         if readlink fails with buffer size just under MAXSIZE, try again
18054         with MAXSIZE.
18055
18056 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
18057
18058         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
18059
18060 2004-11-02  Derek R. Price  <derek@ximbiot.com>
18061         and  Paul Eggert  <eggert@cs.ucla.edu>
18062
18063         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
18064         (get_date): Overparenthesize to avoid GCC warning.
18065
18066 2004-11-02  Bruno Haible  <bruno@clisp.org>
18067
18068         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
18069         returns void.
18070
18071 2004-11-02  Bruno Haible  <bruno@clisp.org>
18072
18073         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
18074         function returns void.
18075
18076 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
18077
18078         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
18079         fflush_unlocked, flockfile, funlockfile, funlockfile,
18080         fputs_unlocked, putc_unlocked.
18081
18082 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
18083
18084         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
18085         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
18086         already declared.
18087
18088 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
18089
18090         * modules/getdate (Files): Add doc/getdate.texi.
18091         (Depends-on): Add setenv, xalloc.
18092
18093 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
18094
18095         * lib/getdate.y: Add support for TZ="foo" within a date string.
18096         Fix some bugs near time_t boundaries.  Reject dates with
18097         out-of-range components, e.g., "Sept 31".
18098         Include <stdlib.h>, "setenv.h", "xalloc.h".
18099         (ISDIGIT_LOCALE): Remove; unused.
18100         Note that the TZ and time functions used here are not reentrant.
18101         (mktime_ok, get_tz): New functions.
18102         (TZBUFSIZE): New constant.
18103         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
18104         This requires that we sometimes generate our own TZ="XXX..." setting.
18105
18106 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
18107
18108         * doc/getdate.texi: New file, from coreutils with modifications for
18109         the new TZ parsing.
18110
18111 2004-10-27  Derek R. Price  <derek@ximbiot.com>
18112
18113         * lib/mktime.c (not_equal_tm): Remove redundant check.
18114
18115 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
18116
18117         * modules/regex (lib_SOURCES): Add regex.c.
18118         Reported by James Youngman in
18119         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
18120
18121 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
18122
18123         * lib/getdate.y: Use Bison 1.875 features, and some minor
18124         code cleanups.  This change does not affect semantics.
18125         Don't include <stdlib.h>; no longer needed.
18126         Don't include unlocked-io.h; only the "#if TEST" code uses
18127         stdio, and performance isn't crucial there.
18128         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
18129         Bison 1.875 features as described below.
18130         All uses of "PC." replaced by "pc->".
18131         (YYSTYPE): Add a forward declaration.
18132         (yylex, yyerror): Use full prototypes in forward decls.
18133         Use "%pure-parser" rather than obsolescent "%pure_parser".
18134         Use %parse-param and %lex-param instead of obsolescent
18135         YYPARSE_PARAM and YYLEX_PARAM.
18136         (meridian_table, month_and_day_table, time_units_table,
18137         relative_time_table, time_zone_table, military_table,
18138         lookup_zone, lookup_word, get_date):
18139         Use NULL instead of 0 where appropriate.
18140         (to_hour): Avoid abort (), to avoid a dependency on
18141         stdlib.h.
18142         (yyerror, yylex): Now accepts parser_control * arg.
18143         (main) [TEST]: Use '\0' rather than 0 for char.
18144
18145 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
18146
18147         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
18148
18149 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
18150
18151         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
18152         It's now the caller's responsibility to handle the case where
18153         !HAVE_GETPAGESIZE && !defined getpagesize.
18154
18155         * lib/mktime.c (leapyear): Arg is long int, not int.
18156
18157 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
18158
18159         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
18160
18161 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
18162
18163         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
18164         missing.  Problem reported by James Youngman.
18165
18166 2004-10-16  Simon Josefsson  <jas@extundo.com>
18167
18168         * gnulib-tool: Fix comments.  Fix parse problem.
18169         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
18170
18171 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
18172
18173         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
18174         implementation of getopt_long.  Problem reported by Alexander Taler in:
18175         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
18176
18177 2004-10-15  Bruno Haible  <bruno@clisp.org>
18178
18179         * gnulib-tool: Untabify. Initialize supplied_libname.
18180         (func_usage): More homogenous output.
18181         (func_modules_transitive_closure, func_modules_to_filelist,
18182         func_emit_lib_Makefile_am): New functions.
18183         (func_import): New function, extracted from big case statement. Use
18184         func_get_license, func_modules_transitive_closure,
18185         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
18186         opt_lgpl. Don't use test -a, as it's not portable.
18187         (func_create_testdir): Use func_modules_transitive_closure,
18188         func_modules_to_filelist, func_emit_lib_Makefile_am.
18189
18190 2004-10-15  Bruno Haible  <bruno@clisp.org>
18191
18192         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
18193
18194 2004-10-15  Bruno Haible  <bruno@clisp.org>
18195
18196         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
18197         the portions belonging to each module.
18198         Suggested by Derek Robert Price <derek@ximbiot.com>.
18199
18200 2004-10-12  Simon Josefsson  <jas@extundo.com>
18201
18202         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
18203         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
18204         to real functions.
18205
18206 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
18207
18208         * modules/vsnprintf: New file.
18209
18210 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
18211
18212         * m4/vsnprintf.m4: New file.
18213
18214 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
18215
18216         * lib/vsnprintf.h: New file.
18217         * lib/vsnprintf.c: New file.
18218
18219 2004-10-11  Bruno Haible  <bruno@clisp.org>
18220
18221         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
18222         vsnprintf.
18223
18224 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
18225
18226         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
18227
18228 2004-10-07  Bruno Haible  <bruno@clisp.org>
18229
18230         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
18231         fits into the provided buffer.
18232
18233 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
18234
18235         * lib/diacrit.c, diacrit.h: Add GPL notice.
18236
18237         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
18238         notice.
18239         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
18240         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
18241         This avoids a potential constant-folding bug.
18242
18243 2004-10-05  Bruno Haible  <bruno@clisp.org>
18244
18245         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
18246         for the declaration of strsep.
18247
18248 2004-10-05  Bruno Haible  <bruno@clisp.org>
18249
18250         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
18251
18252 2004-10-04  Simon Josefsson  <jas@extundo.com>
18253
18254         * modules/memmem: New file.
18255         * tests/test-memmem.c: New file.
18256         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
18257
18258 2004-10-04  Simon Josefsson  <jas@extundo.com>
18259
18260         * m4/memmem.m4: New file.
18261
18262 2004-10-04  Simon Josefsson  <jas@extundo.com>
18263
18264         * lib/memmem.h: New file.
18265         * lib/memmem.c: New file, taken from glibc.
18266
18267 2004-10-04  Simon Josefsson  <jas@extundo.com>
18268
18269         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
18270         '#ifdef USE_UNLOCKED_IO'.
18271
18272 2004-10-04  Simon Josefsson  <jas@extundo.com>
18273
18274         * config/srclist.txt: Add memmem from glibc.
18275
18276 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
18277
18278         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
18279
18280         * modules/argmatch, modules/argp, modules/closeout, modules/error,
18281         modules/exclude, modules/getdate, modules/getline,
18282         modules/getndelim2, modules/getpass, modules/getpass-gnu,
18283         modules/getusershell, modules/linebuffer, modules/md5,
18284         modules/mountlist, modules/posixtm, modules/readtokens,
18285         modules/readutmp, modules/regex, modules/sha1,
18286         modules/version-etc, modules/yesno:
18287         Remove dependency on unlocked-io.
18288
18289 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
18290
18291         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
18292
18293         * m4/unlocked-io.m4: Add copyright notice.
18294         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
18295
18296 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
18297
18298         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
18299         * lib/xmalloc.c (xmemdup): Likewise.
18300         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
18301         XFREE): Remove these long-obsolescent macros.
18302         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
18303         * lib/xstrdup.c: Remove.
18304
18305         * lib/regex.c (re_comp): Cast gettext return value to char *,
18306         Problem reported by Martin Neitzel via Mark D. Baushke.
18307
18308 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
18309
18310         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
18311         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
18312         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
18313         regex.c, sha1.c, version-etc.c, yesno.c:
18314         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
18315         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
18316         the includer's responsibility.
18317
18318         Sync from coreutils.
18319
18320         * lib/modechange.c (mode_compile): Don't decrement a pointer that
18321         points to the start of a string, as the C Standard says the
18322         resulting behavior is undefined.
18323
18324         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
18325         simple -> simple_backups, numbered_existing ->
18326         numbered_existing_backups, numbered -> numbered_backups
18327         to avoid shadowing problems.  All uses changed.
18328         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
18329         * lib/backupfile.c (check_extension, numbered_backup):
18330         Rename locals to avoid shadowing 'basename'.
18331         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
18332         once.
18333
18334         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
18335         * lib/.cvsignore: Add getopt.h.
18336
18337 2004-10-04  Bruno Haible  <bruno@clisp.org>
18338
18339         * modules/README: New file.
18340         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
18341         not a module.
18342
18343 2004-10-02  Jim Meyering  <jim@meyering.net>
18344
18345         * lib/dirfd.h, getpagesize.h: Add copyright notice.
18346
18347 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
18348
18349         * modules/strsep: New file.
18350
18351 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
18352
18353         * m4/strsep.m4: New file.
18354
18355 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
18356
18357         * lib/strsep.h: New file.
18358         * lib/strsep.c: New file.
18359
18360 2004-10-01  Simon Josefsson  <jas@extundo.com>
18361
18362         * lib/snprintf.c (snprintf): Handle size==0.
18363
18364 2004-10-01  Simon Josefsson  <jas@extundo.com>
18365             Bruno Haible  <bruno@clisp.org>
18366
18367         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
18368         (snprintf): Declare 'args'.
18369
18370 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
18371
18372         * lib/snprintf.c: Remove comments as to why each header is needed.
18373
18374 2004-10-01  Bruno Haible  <bruno@clisp.org>
18375
18376         * MODULES.html.sh: Add strsep.
18377
18378 2004-09-30  Simon Josefsson  <jas@extundo.com>
18379
18380         * modules/snprintf: New file.
18381
18382 2004-09-30  Simon Josefsson  <jas@extundo.com>
18383
18384         * m4/snprintf.m4: New file.
18385
18386 2004-09-30  Simon Josefsson  <jas@extundo.com>
18387
18388         * lib/snprintf.h, lib/snprintf.c: New files.
18389
18390 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
18391
18392         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
18393         (hol_entry_help): Never translate an empty string.
18394         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
18395         * lib/argp.h (OPTION_NO_TRANS): New option.
18396
18397 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
18398
18399         * modules/argp (Maintainer): Replace Simon Josefsson
18400         by Sergey Poznyakoff.
18401
18402 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
18403
18404         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
18405         changes merged back into glibc.
18406
18407 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
18408
18409         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
18410
18411 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
18412
18413         * lib/xvasprintf.c: Include xalloc.h.
18414         (xvasprintf): Use xalloc_die, not xmalloc_die.
18415
18416 2004-09-29  Bruno Haible  <bruno@clisp.org>
18417
18418         * modules/alloca-opt: New file, derived from modules/alloca.
18419         * modules/allocsa: Depend on alloca-opt instead of alloca.
18420         * modules/setenv: Likewise.
18421         * modules/vasnprintf: Likewise.
18422         * MODULES.html.sh: Add alloca-opt.
18423
18424 2004-09-28  Simon Josefsson  <jas@extundo.com>
18425
18426         * gnulib-tool: New parameter --lgpl, to asseert that modules are
18427         LGPL, and to replace license template from GPL to LGPL.
18428
18429 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
18430
18431         * modules/dummy: Change license to LGPL.
18432
18433 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
18434
18435         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
18436
18437 2004-09-24  Simon Josefsson  <jas@extundo.com>
18438
18439         * modules/minmax (License): Change from GPL to LGPL.
18440
18441 2004-09-23  Simon Josefsson  <jas@extundo.com>
18442
18443         * gnulib-tool (--import): Typo.
18444
18445 2004-09-23  Simon Josefsson  <jas@extundo.com>
18446
18447         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
18448
18449 2004-09-22  Bruno Haible  <bruno@clisp.org>
18450
18451         * modules/*: Add 'License' field.
18452         * gnulib-tool: Accept --extract-license option.
18453         (func_get_license): New function.
18454
18455 2004-09-21  Bruno Haible  <bruno@clisp.org>
18456
18457         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
18458         Reported by Simon Josefsson.
18459
18460 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
18461
18462         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
18463         gl_AC_TYPE_LONG_LONG.
18464
18465 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
18466
18467         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
18468
18469 2004-09-18  Simon Josefsson  <jas@extundo.com>
18470         and  Paul Eggert  <eggert@cs.ucla.edu>
18471
18472         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
18473         calls with autoreconf.  Define GL_LIB.
18474
18475 2004-09-14  Karl Berry  <karl@gnu.org>
18476
18477         * config/srclist.txt: unsync setenv.c, sigh.
18478
18479 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
18480
18481         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
18482         Problem reported by Bruno Haible in:
18483         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
18484
18485 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
18486
18487         * config/srclist.txt: Comment out argp-pvh.c.
18488
18489 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
18490
18491         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
18492         in case some system header has #define'd it.  Problem reported by
18493         Soeren D. Schulze in
18494         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
18495
18496 2004-09-09  Karl Berry  <karl@gnu.org>
18497
18498         * regex.[ch]: delete from the root.  These were supposed to be
18499                 synced with emacs cvs, but this has not happened for about
18500                 a year, and anyway nothing else uses emacs regex.[ch].
18501                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
18502                 lib/regex[.ch] is untouched.
18503
18504 2004-09-09  Bruno Haible  <bruno@clisp.org>
18505
18506         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
18507
18508 2004-09-09  Bruno Haible  <bruno@clisp.org>
18509
18510         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
18511         modifications.
18512         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
18513
18514 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
18515
18516         * modules/xvasprintf: New file.
18517         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
18518
18519 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
18520
18521         * lib/xvasprintf.h: New file.
18522         * lib/xvasprintf.c: New file.
18523         * lib/xasprintf.c: New file.
18524
18525 2004-09-08  Bruno Haible  <bruno@clisp.org>
18526
18527         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
18528
18529 2004-09-08  Bruno Haible  <bruno@clisp.org>
18530
18531         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
18532         length is > INT_MAX.
18533         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
18534         more.
18535
18536 2004-09-08  Bruno Haible  <bruno@clisp.org>
18537
18538         * lib/stdint_.h: New file, taken from GNU clisp.
18539
18540 2004-09-08  Bruno Haible  <bruno@clisp.org>
18541             Oskar Liljeblad  <oskar@osk.mine.nu>
18542
18543         * modules/stdint: New file.
18544         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
18545
18546 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
18547
18548         Import from coreutils.
18549         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
18550         strings on unbounded length.  alloca's performance benefits aren't
18551         that important here.
18552         (V_STRDUP): Remove.
18553         (parse_with_separator): New function, with most of the internals
18554         of the old parse_user_spec.  Allow user to omit both user and group,
18555         for compatibility with FreeBSD.
18556         Clone only the user name, not the entire spec.
18557         Do not set *uid, *gid unless entirely successful.
18558         Avoid memory leak in some failing cases.
18559         Fix regression for USER.GROUP reported by Dmitry V. Levin in
18560         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
18561         (parse_user_spec): Rewrite to use parse_with_separator.
18562
18563 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
18564
18565         * modules/userspec: Don't depend on alloca.
18566
18567 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
18568
18569         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
18570
18571 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
18572
18573         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
18574         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
18575         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
18576
18577 2004-08-16  Simon Josefsson  <jas@extundo.com>
18578
18579         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
18580         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
18581         Add --dry-run for --import.
18582         Let user provided command line parameters override configure.ac
18583         settings.
18584
18585 2004-08-12  Simon Josefsson  <jas@extundo.com>
18586
18587         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
18588         as discussed with Paul Eggert in threads rooted at
18589         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
18590         and
18591         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
18592         Before, the test was empty, and relied on ELIDE_CODE in source
18593         code.)
18594         (gl_PREREQ_GETOPT): New macro.
18595         (gl_GETOPT): Use them.
18596
18597 2004-08-12  Simon Josefsson  <jas@extundo.com>
18598
18599         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
18600         * lib/getopt_.h: Renamed from getopt.h.
18601
18602 2004-08-12  Simon Josefsson  <jas@extundo.com>
18603
18604         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
18605         Change default library name from libfoo to libgnu.
18606         Now, if you have a configure.ac that says:
18607                 gl_SOURCE_BASE(gl)
18608                 gl_M4_BASE(gl/m4)
18609                 gl_MODULES(error getopt etcetera)
18610                 gl_INIT
18611         you can import all you need by running:
18612                 ../gnulib/gnulib-tool --import
18613
18614         * modules/getopt (Files): Rename getopt.h to getopt_.h.
18615         (Makefile.am): Rewrite, use logic from argz.
18616         (Include): Use <getopt.h> instead of "getopt.h".
18617
18618 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
18619
18620         * modules/argp (Files): Add m4/unlocked-io.m4.
18621         (Depends-on): Add extensions.
18622
18623 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
18624
18625         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
18626         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
18627         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
18628         Check for program_invocation_name, program_invocation_short_name,
18629         flockfile, funlockfile, features.h, _getopt_long_only_r.
18630
18631 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
18632
18633         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
18634         its complicated substitute.
18635         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
18636         and program_invocation_name.
18637         (__argp_basename) [!_LIBC]: Remove; the only use was
18638         replaced by its body.
18639         (__argp_short_program_name): Change condition from
18640         !defined __argp_short_program_name to
18641         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
18642         to match argp-namefrob.h.
18643         (__argp_failure): Don't assume strerror_r returns char *.
18644         * lib/argp-parse.c (N_): Define unconditionally.
18645         (argp_default_options): Fill out initializers with 0 to avoid
18646         gcc warnings.
18647
18648 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
18649
18650         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
18651         getopt1.c.
18652
18653 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
18654
18655         Merge from coreutils.
18656
18657         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
18658
18659         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
18660         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
18661
18662 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
18663
18664         Merge from coreutils.
18665
18666         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
18667         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
18668         for Reliant Unix 5.43.
18669
18670         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
18671         (union fooround): Use uintmax_t, not long int.
18672         The rest is a merge from libc:
18673         [defined _LIBC]: Include <shlib-compat.h>.
18674         (_obstack) [defined _LIBC]: Remove after 2.3.4.
18675
18676         * lib/settime.c (settime): Recode to avoid warning with
18677         Sun Forte C 6U2.
18678
18679         * lib/strverscmp.c: Convert to UTF-8.
18680
18681 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
18682
18683         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
18684         m4/uintmax_t.m4.
18685
18686 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
18687
18688         * modules/xalloc-die: New file.
18689         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
18690
18691         * modules/md5 (Files): Add m4/uint32_t.m4.
18692         * modules/sha1: Renamed from modules/sha.
18693         (Files):
18694         Rename lib/sha.h to lib/sha1.h.
18695         Rename lib/sha.c to lib/sha1.c.
18696         Rename m4/sha.m4 to m4/sha1.m4.
18697         (lib_SOURCES): Likewise.
18698         (configure.ac): Rename gl_SHA to gl_SHA1.
18699         (Include): sha.h -> sha1.h.
18700
18701 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
18702
18703         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
18704         * m4/sha1.m4: Renamed from sha.m4.
18705         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
18706
18707 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
18708
18709         * lib/obstack.h (obstack_empty_p):
18710         Don't assume that chunk->contents is suitably aligned.
18711         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
18712         Likewise. Problem reported by Benno in
18713         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
18714
18715         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
18716         readable.  This could be improved further but it'd take some work.
18717
18718 2004-08-08  Simon Josefsson  <jas@extundo.com>
18719
18720         * modules/xgethostname (Depends-on): Remove exit and error (not
18721         used).
18722
18723         * modules/getpass-gnu: Add getpass.h.
18724         (Depends-on): Add stdbool.
18725         * modules/getpass: Add getpass.h.
18726
18727 2004-08-08  Simon Josefsson  <jas@extundo.com>
18728
18729         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
18730         Check getpass declaration.
18731
18732 2004-08-08  Simon Josefsson  <jas@extundo.com>
18733
18734         * lib/xgethostname.c: Don't include error.h (not used).
18735
18736         * lib/getpass.h: Add.
18737         * lib/getpass.c: Include getpass.h first.
18738
18739 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
18740
18741         * lib/xalloc-die.c: New file.
18742         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
18743         All uses removed.
18744         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
18745         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
18746         xalloc-die.c.
18747         (_, N_, xalloc_die): Move to xalloc-die.c.
18748         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
18749         so that we needn't mess with xalloc_msg_memory_exhausted.
18750
18751         * lib/sha1.h: Renamed from sha.h.
18752         (SHA1_H): Renamed from _SHA_H.
18753         (sha1_ctx): Renamed from sha_ctx.
18754         (sha1_init_ctx): Renamed from sha_init_ctx.
18755         (sha1_process_block): Renamed from sha_process_block.
18756         (sha1_process_bytes): Renamed from sha_process_bytes.
18757         (sha1_finish_ctx): Renamed from sha_finish_ctx.
18758         (sha1_read_ctx): Renamed from sha_read_ctx.
18759         (sha1_stream): Renamed from sha_stream.
18760         (sha1_buffer): Renamed from sha_buffer.
18761         * lib/sha1.c: Likewise; renamed from sha.c.
18762         Do not include <sys/types.h>.
18763         Include <stddef.h> rather than <stdlib.h>.
18764
18765 2004-08-08  Bruno Haible  <bruno@clisp.org>
18766
18767         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
18768         FILESYSTEM_PREFIX_LEN.
18769         * lib/progreloc.c: Likewise.
18770         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
18771
18772 2004-08-06  Simon Josefsson  <jas@extundo.com>
18773
18774         * modules/progname (Depends-on): Don't depend on stdbool.
18775
18776 2004-08-06  Simon Josefsson  <jas@extundo.com>
18777
18778         * modules/getsubopt: New file.
18779         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
18780         getsubopt.
18781
18782 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
18783
18784         More merge from coreutils.
18785
18786         * m4/utimens.m4, m4/utimecmp.m4: New files.
18787         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
18788         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
18789         prereq.m4, sha.m4: Import changes from coreutils.
18790
18791 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
18792
18793         More merge from coreutils.
18794         * modules/raise, modules/readtokens0, modules/utimens:
18795         * modules/utimecmp, module/xnanosleep: New files.
18796         * modules/strftime: Add lib/strftime.h.
18797         Change include from <time.h> to "strftime.h".
18798         * modules/yesno: Add lib/yesno.h.
18799         * modules/backupfile: Remove lib/addext.c.
18800         * modules/euidaccess: Add stat-macros.h.
18801         * modules/canonicalize, modules/euidaccess,
18802         modules/filemode, modules/lchown, modules/makepath,
18803         modules/rmdir, modules/stat: Likewise.
18804
18805 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
18806
18807         Merge from tar.
18808         * lib/argp-help.c (make_hol, hol_append): Don't assume that
18809         SIZE_MAX is a valid preprocessor constant.
18810         (__argp_basename): Change from "#ifndef _LIBC"
18811         to "#ifndef __argp_short_program_name", so that
18812         we don't compile these functions for tar.
18813
18814         More merges from coreutils.
18815         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
18816         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
18817         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
18818         * lib/addext.c: Remove; no longer needed.
18819         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
18820         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
18821         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
18822         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
18823         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
18824         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
18825         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
18826         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
18827         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
18828         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
18829         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
18830         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
18831         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
18832         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
18833         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
18834         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
18835         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
18836         Import changes from coreutils.
18837
18838 2004-08-05  Simon Josefsson  <jas@extundo.com>
18839
18840         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
18841
18842 2004-08-05  Simon Josefsson  <jas@extundo.com>
18843
18844         * m4/getsubopt.m4: New file.
18845
18846 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
18847
18848         Merge from coreutils.
18849
18850         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
18851         * m4/getcwd-path-max.m4: New files.
18852
18853         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
18854         FILESYSTEM_PREFIX_LEN ->
18855         FILE_SYSTEM_PREFIX_LEN.
18856         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
18857         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
18858         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
18859         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
18860
18861         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
18862         prerequisite modules now handle the DOS stuff.
18863         Don't check for unistd.h.
18864
18865 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
18866
18867         Merge from coreutils.
18868
18869         * lib/.gdb-history: Remove; this doesn't belong here.
18870
18871         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
18872         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
18873         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
18874         * lib/getcwd.c: New files.
18875
18876         * lib/dirname.h: Include <stdbool.h>.
18877         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
18878         for consistency with POSIX terminology.  All uses changed.
18879         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
18880         (strip_trailing_slashes): Use bool for booleans.
18881         * lib/stripslash.c (strip_trailing_slashes): Likewise.
18882
18883         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
18884         sometimes returns a positive errno value even when it succeeds.
18885         (print_errno_message) [!LIBC]: Fall back on strerror if
18886         __strerror_r fails.
18887
18888         * lib/path-concat.c (mempcpy): Don't define if a system header defines
18889         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
18890         (longest_relative_suffix): New function.
18891         (path_concat): Use it.  Assume first argument is not NULL.
18892         Port to DOS.  Omit redundant separators.
18893         Report an error instead of returning NULL.
18894         Use mempcpy instead of memcpy.
18895         (xpath_concat): Remove: not declared or used.
18896
18897         * lib/same.h: Include <stdbool.h>
18898         (same_name): Return bool, not int.
18899         * lib/same.c (same_name): Likewise.
18900         (errno): Don't declare; we assume C89 or better now.
18901
18902         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
18903         if not already defined.
18904
18905         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
18906         * lib/dup-safer.c (errno): Likewise.
18907
18908 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
18909
18910         Merge from coreutils.
18911         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
18912         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
18913         * modules/path-concat: Don't depend on strdup.
18914
18915 2004-08-03  Simon Josefsson  <jas@extundo.com>
18916
18917         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
18918         * lib/progname.h: Don't include stdbool.h.
18919
18920 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
18921
18922         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
18923         * MODULES.html.sh (func_all_modules): Remove fatal.
18924
18925 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
18926
18927         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
18928
18929 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
18930
18931         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
18932         working.
18933
18934 2004-08-02  Simon Josefsson  <jas@extundo.com>
18935
18936         * lib/getsubopt.h: New file, with comments from Bruno Haible.
18937         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
18938         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
18939
18940 2004-08-01  Simon Josefsson  <jas@extundo.com>
18941
18942         * lib/xgetdomainname.c: Include stdlib.h, for free().
18943
18944 2004-07-19  Bruno Haible  <bruno@clisp.org>
18945
18946         * MODULES.html.sh (func_all_modules): Add dummy.
18947
18948 2004-07-16  Simon Josefsson  <jas@extundo.com>
18949
18950         * modules/dummy: New file.
18951
18952 2004-07-16  Simon Josefsson  <jas@extundo.com>
18953
18954         * lib/dummy.c: New file.
18955
18956 2004-07-16  Bruno Haible  <bruno@clisp.org>
18957
18958         * lib/backupfile.h: Add extern "C" for C++.
18959         * lib/closeout.h: Likewise.
18960         * lib/copy-file.h: Likewise.
18961         * lib/findprog.h: Likewise.
18962         * lib/full-write.h: Likewise.
18963         * lib/pathname.h: Likewise.
18964         * lib/progname.h: Likewise.
18965         * lib/stpcpy.h: Likewise.
18966         * lib/stpncpy.h: Likewise.
18967         * lib/strcase.h: Likewise.
18968         * lib/strstr.h: Likewise.
18969         * lib/xalloc.h: Likewise.
18970
18971         * lib/mbswidth.h: Add extern "C" for C++.
18972         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
18973
18974 2004-07-13  Robert Millan  <robertmh@gnu.org>
18975
18976         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
18977
18978 2004-07-09  Simon Josefsson  <jas@extundo.com>
18979
18980         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
18981         failed without this.)
18982
18983 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
18984
18985         * modules/chown (Files): Add lib/fchown-stub.c, since
18986         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
18987
18988 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
18989
18990         * lib/fchown-stub.c: New file.
18991
18992 2004-06-24  Jim Meyering  <jim@meyering.net>
18993
18994         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
18995
18996 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
18997
18998         * modules/argz: Omit "#include".
18999
19000         * MODULES.html.sh (func_all_modules): Add calloc, to match
19001         2004-06-01 addition of calloc module.
19002
19003 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
19004
19005         * m4/argz.m4: New file, which is autoupdated from libtool.
19006
19007 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
19008
19009         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
19010         libtool.
19011
19012 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
19013
19014         * config/srclist-update: Don't insist on "USA." before the
19015         close-comment, as libtool omits the period and puts the */ on a
19016         separate line.
19017         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
19018         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
19019
19020 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
19021
19022         * modules/argz: New file.
19023         * MODULES.html.sh (func_all_modules): Add argz.
19024
19025 2004-06-12  Jim Meyering  <jim@meyering.net>
19026         and  Paul Eggert  <eggert@cs.ucla.edu>
19027
19028         * modules/hash (Files): Add lib/xalloc.h.
19029         * modules/pipe (Depends-on): Add wait-process.
19030         * modules/stat (Depends-on): Add xalloc.
19031         * modules/userspec (Files): Add lib/userspec.h.
19032         * modules/xstrto
19033
19034         Upgrade from gettext-0.13.
19035         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
19036         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
19037         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
19038
19039 2004-06-10  Jim Meyering  <jim@meyering.net>
19040
19041         * lib/calloc.c: New file.
19042
19043 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
19044
19045         * lib/getdate.y (yylex): Allow space between sign and number.
19046         Problem reported by Dan Jacobson.
19047
19048 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
19049
19050         Merge from coreutils CVS.
19051
19052         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
19053         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
19054         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
19055         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
19056         xstrtol.m4: Fix copyright date and/or serial number.
19057
19058         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
19059         See if we need an fchown replacement.
19060         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
19061         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
19062         and use the replacement function if we detect either defect.
19063
19064         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
19065         gl_UTIMECMP.
19066
19067 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
19068         and  Jim Meyering  <jim@meyering.net>
19069
19070         Merge from coreutils CVS.
19071
19072         * lib/stat-macros.h: New file, with contents from file-type.h
19073         and coreutils' system.h.
19074         * lib/file-type.c: Include "stat-macros.h".
19075         * lib/file-type.h (file_type): Move all macro definitions to new file,
19076         stat-macros.h.
19077
19078         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
19079         Wrap old code with this conditional.
19080         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
19081         function that does not dereference symlinks.
19082         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
19083
19084         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
19085         dependency problems.
19086         (xreadlink): Accept new arg SIZE, for efficiency.
19087         All decls and uses changed.
19088         * lib/xreadlink.h: Include <stddef.h>, for size_t.
19089
19090         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
19091         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
19092
19093         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
19094         sysexits.h.
19095
19096 2004-06-01  Jim Meyering  <jim@meyering.net>
19097
19098         * m4/calloc.m4: New file.
19099
19100 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
19101
19102         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
19103         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
19104         Also, fix a typo in a diagnostic.
19105
19106 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
19107
19108         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
19109         or AC_FUNC_REALLOC.
19110
19111 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
19112
19113         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
19114         macros to be defined.
19115         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
19116         the allocator returns NULL because the requested size is zero.
19117
19118 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
19119
19120         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
19121         var.  Add comment explaining why libc still defines it.  This
19122         merges the following patch from glibc:
19123         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
19124
19125 2004-05-20  Andreas Schwab  <schwab@suse.de>
19126
19127         * m4/free.m4: Replace free if it not known to work, not the other
19128         way round.
19129
19130 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
19131
19132         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
19133         present in glibc since revision 1.1 of this file.
19134         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
19135         obstack_alignment_mask, obstack_alloc, obstack_base,
19136         obstack_blank, obstack_blank_fast, obstack_chunk_size,
19137         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
19138         obstack_grow0, obstack_init, obstack_int_grow,
19139         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
19140         obstack_next_free, obstack_object_size, obstack_ptr_grow,
19141         obstack_ptr_grow_fast, obstack_room): Remove declarations of
19142         nonexistent functions.
19143
19144 2004-05-18  Karl Berry  <karl@gnu.org>
19145
19146         * config/srclist.txt: break link for vasnprintf.c.
19147
19148 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
19149
19150         Port obstack to the AS/400, where pointers are 16 bytes wide and
19151         you cannot cast an integer to a valid pointer.  This patch is
19152         currently waiting to be integrated into glibc; see
19153         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
19154
19155         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
19156         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
19157         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
19158         (struct obstack): temp member is now a union of a pointer and
19159         an integer, instead of an integer.  All integer uses changed.
19160         This does not affect the physical layout of struct obstack,
19161         except on hosts (like the AS/400) where the size or alignment of
19162         void * is greater than that of ptrdiff_t.
19163         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
19164         __STDC__)]: Store temporary in pointer member of union, not
19165         integer member.
19166         * lib/obstack.c: Include <stddef.h>, for offsetof.
19167         (struct fooalign): Remove; it doesn't need a name.
19168         (union fooround): Change double to long double, and add void *.
19169         (DEFAULT_ALIGNMENT): Use offsetof to compute.
19170         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
19171         not a macro.  Hence the values are always int; so remove all
19172         casts-to-int in uses.
19173
19174 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
19175
19176         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
19177         we can get this patch merged into glibc.
19178
19179 2004-05-17  Derek R. Price  <derek@ximbiot.com>
19180             Paul Eggert  <eggert@cs.ucla.edu>
19181
19182         * m4/argp: Depend on alloca.
19183
19184 2004-05-17  Derek R. Price  <derek@ximbiot.com>
19185             Paul Eggert  <eggert@cs.ucla.edu>
19186
19187         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
19188         freecoding.
19189
19190 2004-05-17  Bruno Haible  <bruno@clisp.org>
19191
19192         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
19193         precision that consists of a '.' followed by an empty digit string.
19194         Patch by Tor Lillqvist <tml@iki.fi>.
19195
19196 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
19197
19198         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
19199         for backward compatibility with older code.  We need our own
19200         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
19201         it under some other name, and our alloca.h will define it.
19202
19203 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
19204             Derek Price  <derek@ximbiot.com>
19205
19206         * lib/alloca.c: Include <alloca.h>, to get our interface.
19207         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
19208         include <alloca.h> first.  Use C89 prototype for alloca; this
19209         requires including <stddef.h> for size_t.  Use extern "C" if C++.
19210         Use #elif for simplicity, since we can assume C89 now.
19211         Don't try to source the system alloca.h since it will not be found
19212         and to prevent recursively including its replacement.
19213         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
19214         * lib/regex.c: Likewise.
19215
19216 2004-05-16  Derek Price  <derek@ximbiot.com>
19217             Paul Eggert  <eggert@cs.ucla.edu>
19218
19219         getline cleanup.  This changes the getndelim2 API: both order of
19220         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
19221         no delimiter).
19222
19223         * lib/getline.c: Don't include stddef.h or stdio.h, since our
19224         interface does that.
19225         (getline): Always use getdelim, so that we don't have two
19226         copies of this code.
19227         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
19228         if available.
19229         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
19230         (GETNDELIM2_MAXIMUM): New macro.
19231         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
19232         instead of the old practice of delim2==0.  All callers changed.
19233         Return -1 on overflow, instead of returning junk.
19234         Do not set *linesize unless allocation succeeds.
19235         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
19236         that we include sys/types.h.
19237         * lib/getnline.h: Likewise.
19238         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
19239         (getndelim2): Reorder arguments.
19240         * lib/getnline.c (getnline, getndelim):
19241         Don't discard the NMAX argument.
19242         (getnline): Invoke getndelim, to avoid code duplication.
19243         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
19244         of (size_t) -1 by callers of the getnline family.
19245
19246 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
19247
19248         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
19249         Check for gettimeofday.
19250         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
19251         Check for settimeofday, stime.
19252
19253 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
19254
19255         * lib/nanosleep.c (suspended): Change its type from int to
19256         sig_atomic_t volatile.
19257         (first_call): Make it private to rpl_nanosleep, and have it
19258         be zero initially as that's a bit faster.
19259         (my_usleep): Round up fractional times instead of truncating them,
19260         as this is the usual meaning for 'sleep'.
19261
19262         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
19263         doesn't work.
19264         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
19265         (ENOSYS): Define if not defined.
19266         (settime): Fall back on stime if it exists and settimeofday fails.
19267         But don't bother with fallbacks if a method fails with errno == EPERM.
19268
19269 2004-05-11  Jim Meyering  <jim@meyering.net>
19270
19271         Prior to this change, the save_cwd caller required read access to the
19272         current directory on most systems (ones with the fchdir function).
19273
19274         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
19275         fails, try write-only, and finally, resort to using xgetcwd.
19276
19277 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
19278
19279         * lib/obstack.c, obstack.h: Import changes from libc.
19280
19281 2004-04-28  Bruno Haible  <bruno@clisp.org>
19282
19283         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
19284         also implicitly appends .exe to executables.
19285         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
19286         accepts Windows pathnames.
19287         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
19288         Treat Cygwin like Windows, since it now accepts Windows pathnames.
19289         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
19290         Treat Cygwin like Windows, since it now accepts Windows pathnames.
19291         Reported by Derek Robert Price <derek@ximbiot.com>.
19292
19293 2004-04-21  Karl Berry  <karl@gnu.org>
19294
19295         * config/srclist.txt (localcharset.c): break sync.
19296
19297 2004-04-20  Paul Eggert  <eggert@twinsun.com>
19298
19299         * m4/host-os.m4: Add a copyright notice.
19300
19301 2004-04-20  Jim Meyering  <jim@meyering.net>
19302
19303         Change UTILS_ to gl_ in AC_DEFINE'd names.
19304         Change utils_- and jm_-prefixed variables, too.
19305         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
19306         UTILS_FUNC_MKDIR_TRAILING_SLASH.
19307         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
19308
19309         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
19310         Don't emit trailing blanks.
19311         Also rename jm_-prefixed variables to have gl_ prefix.
19312
19313         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
19314         Also rename jm_-prefixed variables to have gl_ prefix.
19315
19316         * m4/jm-macros.m4: Reflect the renamings.
19317         * m4/prereq.m4: Likewise.
19318
19319 2004-04-20  Jim Meyering  <jim@meyering.net>
19320
19321         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
19322         memory.
19323
19324 2004-04-20  Jim Meyering  <jim@meyering.net>
19325             Bruno Haible  <bruno@clisp.org>
19326
19327         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
19328         memory when realloc fails.
19329
19330 2004-04-19  Jim Meyering  <jim@meyering.net>
19331
19332         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
19333         now that readutmp.c may call `free (0)'.
19334
19335 2004-04-19  Bruno Haible  <bruno@clisp.org>
19336
19337         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
19338         * m4/inttypes_h.m4: Likewise.
19339         * m4/stdint_h.m4: Likewise.
19340         * m4/intmax_t.m4: Likewise.
19341         * m4/uintmax_t.m4: Likewise.
19342
19343 2004-04-18  Jim Meyering  <jim@meyering.net>
19344
19345         * m4/prereq.m4: Don't forbid jm_ prefix.
19346
19347         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
19348         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
19349         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
19350         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
19351         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
19352         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
19353         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
19354         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
19355         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
19356         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
19357         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
19358         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
19359         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
19360         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
19361         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
19362         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
19363         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
19364         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
19365         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
19366
19367 2004-04-18  Jim Meyering  <jim@meyering.net>
19368
19369         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
19370         failure, don't leak memory and do call END_UTMP_ENT.
19371
19372 2004-04-16  Jim Meyering  <jim@meyering.net>
19373
19374         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
19375         coreutils' stat program.
19376         (gl_PREREQ): Don't require jm_PREREQ_STAT.
19377
19378 2004-04-11  Paul Eggert  <eggert@twinsun.com>
19379
19380         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
19381         C89.
19382         (CHAR_BIT): Remove, since we assume C89.
19383         Include <stdint.h> if available, as per current Autoconf CVS advice.
19384
19385 2004-03-31  Jim Meyering  <jim@meyering.net>
19386
19387         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
19388         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
19389         * m4/xalloc.m4: Likewise.
19390
19391 2004-03-30  Paul Eggert  <eggert@twinsun.com>
19392
19393         Merge from coreutils.
19394
19395         * m4/inttostr.m4: New file.
19396         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
19397         Require AM_STDBOOL_H and gl_TIMESPEC instead.
19398         Require gl_CLOCK_TIME.
19399         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
19400
19401 2004-03-30  Paul Eggert  <eggert@twinsun.com>
19402
19403         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
19404         not bool, to be more consistent with Unix conventions.
19405         Suggested by Bruno Haible.
19406
19407         Merge from coreutils.
19408
19409         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
19410         * lib/umaxtostr.c: New files.
19411
19412         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
19413         the usual <time.h> dance.
19414         (get_date): Change signature to support fractional time stamps.
19415         All callers changed.
19416         * lib/getdate.y: Include "getdate.h" first, as we can now
19417         assume C89 and don't need to worry about 'const'.
19418         Similarly, include "unlocked-io.h" near start, not in middle.
19419         Include <limits.h>.
19420         (textint.value): Use long int rather than int.
19421         (textint.digits): Use size_t rather than int.
19422         (BILLION, LOG10_BILLION): New constants.
19423         (parser_control): New member rel_ns.  Members day_ordinal,
19424         time_zone, month, day, hour, minutes, rel_year, rel_month,
19425         rel_day, rel_hour, rel_minutes, rel_seconds
19426         are now long int, not int.  Member seconds is now struct timespec,
19427         not int.  New member timespec_seen.  Members dates_seen, days_seen,
19428         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
19429         not int.
19430         (%union.intval): Now long int, not int.
19431         New member timespec.
19432         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
19433         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
19434         (spec): Now is a timespec or an item list.
19435         (timespec, items): New nonterminals.
19436         (time, rel, relunit, number, get_date):
19437         Add support for fractional seconds.
19438         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
19439         (gmtime, localtime, mktime): Remove decls; not needed with C89.
19440         (to_hour): First arg is now long int, not int.
19441         (to_year): Returns long int, not int.
19442         Don't treat year -70 like 70.
19443         (tm_diff): Returns long int, not int.
19444         (lookup_word): Use bool instead of int when appropriate.
19445         (yylex): Use size_t for count, not int.
19446         Detect overflow when parsing large integer constants.
19447         Add support for fractions.
19448         (get_date): Make pointers 'const' if possible.
19449         Use more-portable code to detect integer overflow.
19450         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
19451         Don't use ctime; it's not reliable if the year has >4 digits.
19452
19453         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
19454         This is for compatibility with BSD.
19455
19456         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
19457         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
19458         From coreutils' system.h.
19459
19460         * lib/userspec.c: Don't include "posixver.h".
19461         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
19462         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
19463         compatible extension.  Simplify code by removing a boolean int
19464         that was always nonzero if a string was nonnull.
19465
19466 2004-03-30  Jim Meyering  <jim@meyering.net>
19467
19468         Merge from coreutils.
19469
19470         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
19471         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
19472         on some systems one must include <grp.h> before it.
19473         Reported by Christian Krackowizer.
19474
19475 2004-03-30  Jim Meyering  <jim@meyering.net>
19476
19477         Merge from coreutils.
19478
19479         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
19480
19481         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
19482         an empty input stream.
19483
19484         * lib/readtokens.c: Include <stdbool.h>.
19485         (readtoken): Use `size_t' rather than int/long.
19486         All callers adjusted.
19487         Use `bool' rather than `int' where appropriate.
19488         Use memset rather than an explicit loop.
19489         Use x2nrealloc rather than xrealloc.
19490         Allow the use of `\0' as a delimiter.
19491         (readtokens): Likewise.
19492         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
19493
19494 2004-03-30  Jim Meyering  <jim@meyering.net>
19495
19496         * m4/realloc.m4: Remove file, since now it does no more than
19497         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
19498         the `configure.ac' section of module/realloc.
19499         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
19500
19501 2004-03-30  Bruno Haible  <bruno@clisp.org>
19502
19503         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
19504         nonnull.
19505
19506 2004-03-29  Paul Eggert  <eggert@twinsun.com>
19507
19508         Merge changes to getloadavg.c from coreutils and Emacs.
19509
19510         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
19511         Define to an expression, not to the empty string.
19512         Include cloexec.h and xalloc.h.
19513         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
19514         Use set_cloexec_flag rather than rolling our own.
19515         * lib/cloexec.c, lib/cloexec.h: New files.
19516
19517 2004-03-29  Paul Eggert  <eggert@twinsun.com>
19518
19519         * m4/cloexec.m4: New file.
19520
19521 2004-03-18  Paul Eggert  <eggert@twinsun.com>
19522
19523         * lib/getopt.h: Sync with libc CVS.
19524
19525 2004-03-18  Paul Eggert  <eggert@twinsun.com>
19526             Bruno Haible  <bruno@clisp.org>
19527
19528         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
19529         mbswidth.
19530
19531 2004-03-18  Paul Eggert  <eggert@twinsun.com>
19532             Bruno Haible  <bruno@clisp.org>
19533
19534         * lib/mbswidth.h: Include <wchar.h> only if
19535         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
19536         <wchar.h>.
19537         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
19538
19539 2004-03-09  Paul Eggert  <eggert@twinsun.com>
19540
19541         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
19542         Sync with libc CVS.
19543         * lib/getopt_int.h: New file, also synced from libc.
19544
19545 2004-03-09  Paul Eggert  <eggert@twinsun.com>
19546
19547         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
19548         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
19549         Bring back getopt.c, getopt.h, getopt1.c.
19550
19551 2004-03-07  Paul Eggert  <eggert@twinsun.com>
19552
19553         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
19554         All uses changed.  Check for sa_sigaction member; this fixes
19555         a bug first reported by Jason Andrade in
19556         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
19557
19558 2004-03-07  Paul Eggert  <eggert@twinsun.com>
19559
19560         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
19561         '#if' expressions.  Unlike the code it replaces, it does not
19562         depend on (defined _SC_PAGESIZE).  However, it does depend on
19563         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
19564         first reported by Jason Andrade in
19565         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
19566
19567 2004-02-25  Simon Josefsson  <jas@extundo.com>
19568
19569         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
19570
19571 2004-02-25  Simon Josefsson  <jas@extundo.com>
19572
19573         * lib/strdup.h: New file.
19574         * lib/strdup.c: Include it.
19575         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
19576         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
19577
19578 2004-02-23  Karl Berry  <karl@gnu.org>
19579
19580         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
19581         (from fencepost.gnu.org:/gd/gnuorg).
19582
19583 2004-02-23  Karl Berry  <karl@gnu.org>
19584
19585         * config/srclistvars.sh (GNUORG) [karl]: redefine.
19586         * config/srclist.txt: add maintain/standards documents.
19587
19588 2004-02-18  Bruno Haible  <bruno@clisp.org>
19589
19590         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
19591         Reported by Derek Robert Price <derek@ximbiot.com>.
19592
19593 2004-02-16  Karl Berry  <karl@gnu.org>
19594
19595         * config/mkinstalldirs, install-sh: update from automake.
19596
19597 2004-02-06  Karl Berry  <karl@gnu.org>
19598
19599         * m4/po.m4: update from gettext 0.14.1.
19600
19601 2004-02-06  Karl Berry  <karl@gnu.org>
19602
19603         * lib/config.charset: update from gettext 0.14.1.
19604
19605 2004-02-05  Paul Eggert  <eggert@twinsun.com>
19606
19607         Add comments and code, prompted by suggestions from Bruno Haible
19608         for sh-quote.
19609         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
19610         describing the enum quoting_style values.
19611         * lib/quotearg.c (quotearg_alloc): New function.
19612         (quotearg_buffer_restyled): Treat lone { and } as special.
19613         Treat = as special.  Work around bug with older shells
19614         that "see" a '\' that is really the 2nd byte of a multibyte char.
19615         Quote empty string with shell_quoting_style.
19616
19617 2004-02-03  Bruno Haible  <bruno@clisp.org>
19618
19619         * m4/pipe.m4: New file, from GNU gettext.
19620
19621 2004-02-03  Bruno Haible  <bruno@clisp.org>
19622
19623         * lib/pipe.h: New file, from GNU gettext.
19624         * lib/pipe.c: New file, from GNU gettext.
19625
19626 2004-01-27  Bruno Haible  <bruno@clisp.org>
19627
19628         * m4/execute.m4: New file, from GNU gettext.
19629
19630 2004-01-27  Bruno Haible  <bruno@clisp.org>
19631
19632         * lib/execute.h: New file, from GNU gettext.
19633         * lib/execute.c: New file, from GNU gettext.
19634         * lib/w32spawn.h: New file, from GNU gettext.
19635
19636 2004-01-24  Paul Eggert  <eggert@twinsun.com>
19637
19638         Merge from diffutils.
19639
19640         * lib/file-type.c (file_type): Add typed memory objects.
19641         * lib/file-type.h (S_TYPEISTMO): New macro.
19642
19643         * lib/c-stack.h (c_stack_action): Remove argv argument.
19644         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
19645         (die): Don't calculate message unless segv_action returns.
19646         (get_stack_location, min_address_from_argv, max_address_from_argv,
19647         volatile stack_base, volatile_stack_size): Remove.
19648         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
19649         that every segmentation violation is a stack overflow.  (Ouch!)
19650         See Debian bug 136249 (still outstanding) for more info about why
19651         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
19652
19653 2004-01-24  Paul Eggert  <eggert@twinsun.com>
19654
19655         Exit-status fix from coreutils.
19656
19657         Use exit_failure consistently in place of EXIT_FAILURE,
19658         so that program exit statuses are consistent on failure.
19659
19660         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
19661         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
19662         * lib/argmatch.h: Comment fix to match the above.
19663         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
19664         Now a macro referring to exit_failure, instead of a separate
19665         variable.  Include "exitfail.h" to get it.
19666         * lib/xstrtol.h: Include "exitfail.h".
19667         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
19668
19669         * lib/long-options.c (parse_long_options): Use prototype
19670         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
19671         for clarity.
19672
19673 2004-01-21  Jim Meyering  <jim@meyering.net>
19674
19675         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
19676         so as not to conflict with a different-sized __mktime_internal
19677         function in GNU libc.
19678         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
19679         Problem building statically-linked `ls' reported by Michael Brunnbauer.
19680
19681 2004-01-20  Karl Berry  <karl@gnu.org>
19682
19683         * config/config.guess: update from config.
19684
19685         * config/srclistvars.sh: GNUWWWLICENSES for karl.
19686
19687 2004-01-20  Bruno Haible  <bruno@clisp.org>
19688
19689         Safer stack allocation.
19690         * lib/setenv.c: Include allocsa.h.
19691         (alloca): Remove fallback definition.
19692         (freea): Remove macro.
19693         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
19694         instead of freea.
19695
19696 2004-01-20  Bruno Haible  <bruno@clisp.org>
19697
19698         * m4/eealloc.m4: New file, from GNU gettext.
19699
19700 2004-01-20  Bruno Haible  <bruno@clisp.org>
19701
19702         * m4/allocsa.m4: New file, from GNU gettext.
19703
19704 2004-01-20  Bruno Haible  <bruno@clisp.org>
19705
19706         * lib/xallocsa.h: New file, from GNU gettext.
19707         * lib/xallocsa.c: New file, from GNU gettext.
19708
19709 2004-01-20  Bruno Haible  <bruno@clisp.org>
19710
19711         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
19712
19713 2004-01-20  Bruno Haible  <bruno@clisp.org>
19714
19715         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
19716         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
19717         specially.
19718
19719 2004-01-20  Bruno Haible  <bruno@clisp.org>
19720
19721         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
19722         patch.
19723
19724 2004-01-20  Bruno Haible  <bruno@clisp.org>
19725
19726         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
19727
19728 2004-01-20  Bruno Haible  <bruno@clisp.org>
19729
19730         * lib/eealloc.h: New file.
19731
19732 2004-01-20  Bruno Haible  <bruno@clisp.org>
19733
19734         * lib/binary-io.h: Avoid warnings on Cygwin.
19735
19736 2004-01-20  Bruno Haible  <bruno@clisp.org>
19737
19738         * lib/allocsa.h: New file, from GNU gettext.
19739         * lib/allocsa.c: New file, from GNU gettext.
19740
19741 2004-01-18  Karl Berry  <karl@gnu.org>
19742
19743         * doc/gpl.texi, doc/lgpl.texi: new files.
19744
19745 2004-01-18  Karl Berry  <karl@gnu.org>
19746
19747         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
19748         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
19749
19750 2004-01-15  Paul Eggert  <eggert@twinsun.com>
19751
19752         Merge from coreutils.
19753
19754         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
19755         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
19756         (gl_DEFAULT_POSIX2_VERSION): Move
19757         the documentation from 'configure' into 'config.hin',
19758         so that 'configure --help' isn't burdened by it and
19759         we don't have to worry about its formatting there.
19760         Reword the documentation so that it's more succinct
19761         and can be run together into a single paragraph.
19762         * m4/same.m4 (gl_SAME): Check for pathconf.
19763
19764 2004-01-15  Paul Eggert  <eggert@twinsun.com>
19765
19766         Merge from coreutils.
19767
19768         * lib/posixver.c: Include posixver.h.
19769
19770         * lib/same.c: Include <stdbool.h>, <limits.h>.
19771         (_POSIX_NAME_MAX): Define if not defined.
19772         (MIN): New macro.
19773         (same_name): If file names are silently truncated, report
19774         that the file names are the same if they are the same after
19775         the silent truncation.
19776
19777         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
19778         conversion function.
19779         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
19780         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
19781         longer needed.
19782
19783 2004-01-15  Jim Meyering  <jim@meyering.net>
19784
19785         Merge from coreutils.
19786
19787         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
19788         if no library is required.
19789         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
19790         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
19791         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
19792         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
19793         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
19794         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
19795         value, $ac_cv_search_crypt, if it's "none required".
19796         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
19797         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
19798         not gl_FUNC_GETLOADAVG.
19799         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
19800         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
19801
19802 2004-01-15  Jim Meyering  <jim@meyering.net>
19803
19804         Merge from coreutils.
19805
19806         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
19807         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
19808         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
19809
19810         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
19811         optional configure-time default.
19812
19813         * lib/version-etc.c (version_etc_copyright): Update copyright date.
19814
19815         * lib/xreadlink.c (xreadlink): Correct outdated comment.
19816
19817 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
19818
19819         Merge from coreutils.
19820
19821         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
19822         value, $ac_cv_search_nanosleep, if it's "none required".
19823
19824 2004-01-14  Paul Eggert  <eggert@twinsun.com>
19825
19826         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
19827         with like-named macro in fnmatch.c.
19828         (EXT): Use an internal constant instead.
19829
19830         Merge fnmatch patches from glibc.
19831         * lib/fnmatch.c (mbsinit): Remove define.
19832         Add libc_hidden_ver (__fnmatch, fnmatch).
19833         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
19834         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
19835
19836 2004-01-14  Karl Berry  <karl@gnu.org>
19837
19838         * config/install-sh: update from automake.
19839
19840 2004-01-13  Karl Berry  <karl@gnu.org>
19841
19842         * config/install-sh: update from automake.
19843
19844 2004-01-09  Karl Berry  <karl@gnu.org>
19845
19846         * config/install-sh: update from automake.
19847
19848 2004-01-05  Karl Berry  <karl@gnu.org>
19849
19850         * config/config.{sub,guess}: update from config.
19851
19852 2003-12-31  Karl Berry  <karl@gnu.org>
19853
19854         * config/depcomp: update from automake.
19855
19856 2003-12-14  Karl Berry  <karl@gnu.org>
19857
19858         * lib/config.charset: update from gettext-runtime.
19859
19860 2003-12-03  Paul Eggert  <eggert@twinsun.com>
19861
19862         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
19863         Bug reported by Alfred M. Szmidt.
19864
19865 2003-12-03  Bruno Haible  <bruno@clisp.org>
19866
19867         * m4/gettext.m4: Upgrade from gettext-0.13.
19868         * m4/po.m4: Upgrade from gettext-0.13.
19869         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
19870         * m4/intmax.m4: New file, from gettext-0.13.
19871         * m4/printf-posix.m4: New file, from gettext-0.13.
19872
19873 2003-11-29  Karl Berry  <karl@gnu.org>
19874
19875         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
19876
19877 2003-11-25  Paul Eggert  <eggert@twinsun.com>
19878             Bruno Haible  <bruno@clisp.org>
19879
19880         * lib/printf-parse.h: Don't include sys/types.h.
19881         (ARG_NONE): New macro.
19882         (char_directive): Change type of *arg_index fields to size_t.
19883         * lib/printf-parse.c: Don't include sys/types.h.
19884         (SSIZE_MAX): Remove macro.
19885         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
19886         Remove unnecessary overflow check.
19887         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
19888         fields.
19889
19890 2003-11-25  Bruno Haible  <bruno@clisp.org>
19891
19892         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
19893
19894 2003-11-25  Bruno Haible  <bruno@clisp.org>
19895
19896         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
19897         gt_TYPE_SSIZE_T.
19898
19899 2003-11-24  Paul Eggert  <eggert@twinsun.com>
19900
19901         * modules/alloca: Remove dependency on xalloc.
19902
19903 2003-11-24  Paul Eggert  <eggert@twinsun.com>
19904
19905         * lib/alloca.c: Remove dependency on xalloc module.
19906         (xalloc_die): Remove.
19907         (memory_full) [!defined emacs]: New macro.
19908         [!defined emacs]: Don't include xalloc.h.
19909         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
19910         address arithmetic overflows.  Change datatypes a bit to avoid
19911         unnecessary casts.
19912
19913 2003-11-22  Jim Meyering  <jim@meyering.net>
19914
19915         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
19916         s/size/size_t/.
19917
19918 2003-11-21  Karl Berry  <karl@gnu.org>
19919
19920         * config/config.{sub,guess}: update from config.
19921
19922 2003-11-18  Karl Berry  <karl@gnu.org>
19923
19924         * config/config.{sub,guess}: update from config.
19925
19926         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
19927
19928 2003-11-17  Paul Eggert  <eggert@twinsun.com>
19929
19930         * README: Mention that S+T cannot overflow if S is the size of
19931         an existing object and T is sufficiently small.
19932
19933 2003-11-17  Jim Meyering  <jim@meyering.net>
19934
19935         On systems without utime and without a utimes function capable of
19936         dealing with a NULL struct utimbuf* argument, this utime replacement
19937         could -- in unusual circumstances -- leak a file descriptor.
19938         * lib/utime.c: Include <unistd.h> and <errno.h>.
19939         (utime_null): Be sure to close `fd' and to preserve errno.
19940         Reported by Geoff Collyer via Arnold Robbins.
19941
19942 2003-11-17  Bruno Haible  <bruno@clisp.org>
19943
19944         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
19945         (Depends-on): Add xsize.
19946
19947 2003-11-17  Bruno Haible  <bruno@clisp.org>
19948
19949         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
19950
19951 2003-11-17  Bruno Haible  <bruno@clisp.org>
19952
19953         * lib/vasnprintf.c (alloca): Remove fallback definition.
19954         (freea): Remove definition.
19955         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
19956         Reported by Paul Eggert.
19957
19958 2003-11-16  Paul Eggert  <eggert@twinsun.com>
19959             Bruno Haible  <bruno@clisp.org>
19960
19961         Protect against address arithmetic overflow.
19962         * lib/printf-args.h: Include stddef.h.
19963         (arguments): Change type of field 'count' to size_t.
19964         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
19965         'unsigned int' where appropriate.
19966         * lib/printf-parse.h: Include sys/types.h.
19967         (char_directive): Change type of *arg_index fields to ssize_t.
19968         (char_directives): Change type of fields 'count', max_*_length to
19969         size_t.
19970         * lib/printf-parse.c: Include sys/types.h and xsize.h.
19971         (SSIZE_MAX): Define fallback value.
19972         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
19973         instead of 'int' where appropriate. Check a_allocated, d_allocated
19974         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
19975         * lib/vasnprintf.c: Include xsize.h.
19976         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
19977         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
19978         overflow. Avoid wraparound when converting a width or precision from
19979         decimal to binary.
19980
19981 2003-11-16  Bruno Haible  <bruno@clisp.org>
19982
19983         Update from GNU gettext.
19984         * lib/printf-parse.c: Generalize to it can be compiled for wide
19985         strings.
19986         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
19987         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
19988         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
19989         SNPRINTF): New macros.
19990         Don't include <alloca.h> if the file is used inside libintl.
19991         (local_wcslen): New function, for Solaris 2.5.1.
19992         (VASNPRINTF): Use it instead of wcslen.
19993
19994 2003-11-16  Bruno Haible  <bruno@clisp.org>
19995
19996         * lib/xsize.h (xmax): New function.
19997         (xsum, xsum3, xsum4): Declare as "pure" functions.
19998
19999 2003-11-12  Paul Eggert  <eggert@twinsun.com>
20000
20001         * modules/xalloc (Files): Undo latest change, since xalloc.h
20002         no longer needs SIZE_MAX or PTRDIFF_MAX.
20003
20004 2003-11-12  Paul Eggert  <eggert@twinsun.com>
20005
20006         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
20007         gl_PTRDIFF_MAX.
20008
20009 2003-11-12  Paul Eggert  <eggert@twinsun.com>
20010
20011         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
20012         "return", to pacify some unknown compiler.  Problem reported
20013         by Joerg Schilling.
20014
20015 2003-11-12  Paul Eggert  <eggert@twinsun.com>
20016
20017         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
20018         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
20019         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
20020         heuristic is just as accurate as far as we know, and it removes a
20021         dependency on size_max.m4 and ptrdiff_max.m4.
20022
20023 2003-11-11  Bruno Haible  <bruno@clisp.org>
20024
20025         * modules/xsize (Files): Add m4/size_max.m4.
20026         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
20027
20028 2003-11-11  Bruno Haible  <bruno@clisp.org>
20029
20030         * m4/size_max.m4: New file.
20031         * m4/ptrdiff_max.m4: New file.
20032         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
20033         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
20034         (gl_XALLOC): Invoke it.
20035
20036 2003-11-11  Bruno Haible  <bruno@clisp.org>
20037
20038         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
20039         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
20040         defined.
20041
20042 2003-11-10  Paul Eggert  <eggert@twinsun.com>
20043
20044         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
20045         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
20046         rejected some allocations of exactly SIZE_MAX - 2 bytes.
20047         From Bruno Haible.
20048         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
20049         not (size_t) -1, since it's defined here.
20050
20051 2003-11-09  Karl Berry  <karl@gnu.org>
20052
20053         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
20054
20055 2003-11-06  Paul Eggert  <eggert@twinsun.com>
20056
20057         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
20058         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
20059         Reject sizes of exactly SIZE_MAX bytes.
20060         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
20061         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
20062
20063 2003-11-05  Bruno Haible  <bruno@clisp.org>
20064
20065         * lib/xsize.h: Include limits.h, to avoid a possible collision with
20066         SIZE_MAX defined in <limits.h> on Solaris.
20067
20068 2003-11-04  Jim Meyering  <jim@meyering.net>
20069
20070         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
20071         variable names, rather than @VAR@.
20072         * modules/poll: Likewise.
20073
20074 2003-11-04  Bruno Haible  <bruno@clisp.org>
20075
20076         * modules/xsize: New file.
20077         * modules/linebreak: Depend on xsize.
20078         * MODULES.html.sh (func_all_modules): Add xsize.
20079
20080 2003-11-04  Bruno Haible  <bruno@clisp.org>
20081
20082         * m4/xsize.m4: New file.
20083
20084 2003-11-04  Bruno Haible  <bruno@clisp.org>
20085
20086         * lib/xsize.h: New file.
20087         * lib/linebreak.c: Include xsize.h.
20088         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
20089         argument for overflow.
20090         Suggested by Paul Eggert.
20091
20092 2003-11-03  Karl Berry  <karl@gnu.org>
20093
20094         * config/config.{guess,sub}: update from config.
20095
20096 2003-11-03  Jim Meyering  <jim@meyering.net>
20097
20098         * modules/userspec (lib_SOURCES): Add userspec.h.
20099         (Include): Add "userspec.h".
20100         Improve description.
20101
20102 2003-11-03  Jim Meyering  <jim@meyering.net>
20103
20104         * lib/userspec.c: Include "userspec.h".
20105         * lib/userspec.h: New file.
20106
20107 2003-11-03  Bruno Haible  <bruno@clisp.org>
20108
20109         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
20110
20111 2003-11-03  Bruno Haible  <bruno@clisp.org>
20112
20113         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
20114         available, to avoid (extremely rare) race condition.
20115         Suggested by Paul Eggert.
20116
20117 2003-11-02  Karl Berry  <karl@gnu.org>
20118
20119         * config/srclist.txt (vasprintf.c): sync broken, sigh.
20120
20121 2003-10-31  Paul Eggert  <eggert@twinsun.com>
20122
20123         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
20124         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
20125         (read_filesystem_list): Set and use me_type_malloced.
20126         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
20127         whatever the type happens to be), for brevity and consistency.
20128         Check for size calculation overflow on Alphas running OSF/1.
20129
20130 2003-10-31  Jim Meyering  <jim@meyering.net>
20131
20132         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
20133
20134         * lib/linebuffer.c: Include <string.h> for declaration of memset.
20135
20136 2003-10-30  Paul Eggert  <eggert@twinsun.com>
20137             Bruno Haible  <bruno@clisp.org>
20138
20139         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
20140         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
20141
20142 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
20143
20144         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
20145         netbsd*-gnu*.  Suggested by Robert Millan.
20146
20147 2003-10-29  Paul Eggert  <eggert@twinsun.com>
20148
20149         * modules/group-member: Depend on stdbool.
20150
20151 2003-10-29  Paul Eggert  <eggert@twinsun.com>
20152
20153         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
20154
20155 2003-10-29  Paul Eggert  <eggert@twinsun.com>
20156
20157         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
20158         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
20159         after the 'gnu' in these cases.  This fixes some bugs in the
20160         previous change, and is based on suggestions by Robert Millan.
20161
20162 2003-10-29  Paul Eggert  <eggert@twinsun.com>
20163
20164         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
20165         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
20166         no longer needed.
20167         * lib/quotearg.c (quotearg_n_options): Use it.
20168         * lib/group-member.c: Include <stdbool.h>.
20169         (free_group_info): Arg is now const *; don't free arg.
20170         (get_group_info): Now returns bool and accepts struct group_info *,
20171         rather than returning a malloc'ed struct group_info *.
20172         All uses changed.  Check for overflow in internal size calculation.
20173
20174         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
20175         rather than xmalloc/xrealloc.
20176         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
20177         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
20178         conformance bug: the old code used a pointer after freeing the
20179         storage that it addressed.
20180         * lib/hash.c (hash_initialize): Simplify the code by using
20181         xalloc_oversized rather than doing it by hand.
20182         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
20183         the buffer preserved.  Use free and xmalloc instead.
20184         * lib/quotearg.c (quotearg_n_options): Likewise.
20185         Use a simpler test for size overflow.  Don't use xalloc_oversized
20186         because unsigned int might be wider than size_t (!); this suggests
20187         that we should switch from unsigned int to size_t for slot numbers.
20188
20189 2003-10-28  Paul Eggert  <eggert@twinsun.com>
20190
20191         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
20192         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
20193         NetBSD kernels.  Requested by Richard Stallman.
20194
20195 2003-10-27  Paul Eggert  <eggert@twinsun.com>
20196
20197         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
20198         to allocate the returned structure.  Do not allocate a subarray,
20199         as x2nrealloc will do that.
20200         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
20201         instead of xnrealloc.
20202         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
20203
20204 2003-10-27  Bruno Haible  <bruno@clisp.org>
20205
20206         * lib/stdbool_.h: Better support for BeOS.
20207
20208 2003-10-26  Paul Eggert  <eggert@twinsun.com>
20209
20210         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
20211         now uses inline.
20212
20213 2003-10-26  Paul Eggert  <eggert@twinsun.com>
20214
20215         * lib/xalloc.h (xalloc_oversized): New static inline function, for
20216         callers that want to do their own size-overflow checking.  Include
20217         <stdbool.h>, since xalloc_oversized returns bool.
20218         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
20219         to use xalloc_oversized.
20220
20221         Add two functions x2realloc, x2nrealloc, for programs that grow
20222         arrays dynamically by doubling their sizes.
20223         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
20224         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
20225         New functions.
20226
20227         Port to C99 semantics for 'inline' of external functions.
20228         Bug reported by Bruno Haible.
20229         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
20230         with the old contents of xnmalloc.
20231         (xnmalloc, xmalloc): Use it.
20232         (xnrealloc_inline): New static inline function,
20233         with the old contents of xnrealloc.
20234         (xnrealloc, xrealloc): Use it.
20235
20236         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
20237         that.
20238
20239 2003-10-26  Karl Berry  <karl@gnu.org>
20240
20241         * config/srclist.txt (COPYING.DOC): no longer available from
20242         /gd/gnuorg; don't know where the ultimate source is.
20243
20244 2003-10-25  Paul Eggert  <eggert@twinsun.com>
20245
20246         Fix several address-calculation bugs in the hash modules,
20247         plus some minor code cleanup.
20248
20249         * lib/hash.h: Include <stdbool.h>, for bool.
20250         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
20251         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
20252         hash_get_n_entries, hash_get_max_bucket_length,
20253         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
20254         hash_rehash): Use size_t rather than unsigned.
20255         * lib/hash.c (struct hash_table, hash_get_n_buckets,
20256         hash_get_n_buckets_used, hash_get_n_entries,
20257         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
20258         hash_get_entries, hash_do_for_each, hash_string, is_prime,
20259         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
20260         Likewise.
20261         (SIZE_MAX): Define if not defined.
20262         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
20263         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
20264         hash_print):
20265         Use const * when possible.
20266         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
20267         (check_tuning): Fix bug: if tuning parameters were very close to
20268         0 or 1, rounding errors could have caused subscript violations.
20269         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
20270         (hash_initialize): Add 'fail:' label
20271         to free table and return NULL, and use it to simplify code.
20272         Use calloc rather than clearing the storage ourself.
20273         (hash_initialize, hash_rehash): Check for arithmetic overflow in
20274         buffer size calculations.
20275         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
20276         Include <stddef.h>, for size_t.
20277         * lib/hash-pjw.c (hash_pjw): Likewise.
20278         Switch to method described by Bruno Haible.
20279         Include <limits.h>, for CHAR_BIT.
20280         (SIZE_BITS): New macro.
20281
20282 2003-10-23  Paul Eggert  <eggert@twinsun.com>
20283
20284         * m4/getline.m4 (AM_FUNC_GETLINE):
20285         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
20286         hosts.  Problem reported by Derek Robert Price in
20287         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
20288         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
20289         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
20290
20291 2003-10-21  Paul Eggert  <eggert@twinsun.com>
20292
20293         * lib/getndelim2.c (getndelim2): When size calculation overflows,
20294         ceiling the allocation at NMAX bytes rather than silently
20295         discarding input bytes before NMAX is reached.  This makes
20296         a difference only if NMAX exceeds SIZE_MAX / 2.
20297
20298         * lib/obstack.c: Merge from glibc.
20299         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
20300         Add libc_hidden_def (_obstack_newchunk).
20301         (_obstack_free) [! defined _LIBC]: Remove.
20302         [defined _LIBC]: Make a strong alias from obstack_free, rather than
20303         a clone of the function body.
20304         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
20305         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
20306
20307         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
20308         glibc.
20309         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
20310         arg to memcpy.
20311
20312         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
20313         (obstack_ptr_grow_fast, obstack_int_grow_fast):
20314         Don't use lvalue casts, as GCC plans to remove support for them
20315         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
20316         was also present in the non-GCC version, indicating that this
20317         code had always been buggy and had never been widely used.
20318         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
20319         Use the fast variant of each macro, rather than copying the
20320         definiens of the fast variant; that way, we'll be more likely to
20321         catch future bugs in the fast variants.
20322
20323 2003-10-20  Bruno Haible  <bruno@clisp.org>
20324
20325         * modules/wait-process: New file.
20326         * MODULES.html.sh (func_all_modules): Add wait-process.
20327
20328 2003-10-20  Bruno Haible  <bruno@clisp.org>
20329
20330         * m4/wait-process.m4: New file.
20331
20332 2003-10-20  Bruno Haible  <bruno@clisp.org>
20333
20334         * lib/wait-process.h: New file, from GNU gettext.
20335         * lib/wait-process.c: New file, from GNU gettext.
20336
20337 2003-10-19  Jim Meyering  <jim@meyering.net>
20338
20339         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
20340         HPUX 10.20.
20341
20342 2003-10-18  Karl Berry  <karl@gnu.org>
20343
20344         * config/config.guess: update from config.
20345
20346 2003-10-16  Paul Eggert  <eggert@twinsun.com>
20347
20348         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
20349         (getgroups): First arg is int, not size_t.
20350         Don't let 'free' mangle errno.
20351
20352 2003-10-16  Paul Eggert  <eggert@twinsun.com>
20353
20354         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
20355
20356 2003-10-16  Karl Berry  <karl@gnu.org>
20357
20358         * config/config.{guess,sub}: update from config.
20359
20360 2003-10-16  Jim Meyering  <jim@meyering.net>
20361
20362         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
20363         memcpy.
20364
20365 2003-10-15  Paul Eggert  <eggert@twinsun.com>
20366
20367         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
20368         (SIZE_MAX): Remove.
20369         (new_exclude, add_exclude_file): Initial size no longer needs to
20370         be a power of 2.
20371         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
20372         our own address arithmetic overflow checking.
20373
20374         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
20375         (fnmatch): Do not alloca more than 2000 wide characters;
20376         instead, use malloc for large buffers.
20377         Check for address arithmetic overflow, and return -1
20378         with errno set to ENOMEM in that case.
20379         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
20380         (NEW_PATTERN): Do not alloca more than 8000 bytes;
20381         instead, return -1.  Check for address arithmetic overflow.
20382
20383 2003-10-14  Paul Eggert  <eggert@twinsun.com>
20384
20385         Handle invalid suffixes and overflow independently, so that
20386         callers can treat them independently as needed.  Fix some bugs in
20387         suffix handling, e.g., "100k@" was not diagnosed as an invalid
20388         suffix for a human-readable blocksize.  The major caller-visible
20389         change is the addition of a new
20390         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
20391         that both overflow and suffix chars were found.
20392
20393         * lib/human.c (humblock): Don't check separately for invalid suffix
20394         char; that is xstrtoumax's job (now that its bug is fixed).
20395         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
20396         INTMAX_MAX]: New macros.
20397         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
20398         TYPE_MAXIMUM): New macros.
20399         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
20400         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
20401         if overflow occurs, as it's what __strtol does and it's more useful
20402         in practice.
20403         (__xstrtol): If __strtol reports some error other than ERANGE,
20404         reflect it to the caller as LONGINT_INVALID.  If it reports
20405         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
20406         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
20407         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
20408         value.
20409         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
20410         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
20411         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
20412         [defined UINTMAX_MAX]: New macros.
20413
20414 2003-10-14  Bruno Haible  <bruno@clisp.org>
20415
20416         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
20417
20418 2003-10-14  Bruno Haible  <bruno@clisp.org>
20419
20420         * m4/sig_atomic_t: New file, from GNU gettext.
20421         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
20422
20423 2003-10-14  Bruno Haible  <bruno@clisp.org>
20424
20425         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
20426         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
20427         Also use volatile where needed.
20428
20429 2003-10-12  Paul Eggert  <eggert@twinsun.com>
20430
20431         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
20432         Change maintainer from Bruno Haible to 'all'.
20433
20434 2003-10-12  Paul Eggert  <eggert@twinsun.com>
20435
20436         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
20437
20438 2003-10-12  Paul Eggert  <eggert@twinsun.com>
20439
20440         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
20441         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
20442         and define in terms of the other primitives.
20443         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
20444         (SIZE_MAX): Define if not already defined.
20445         (array_size_overflow): New function.
20446         (xalloc_die): Abort instead of exiting if 'error' returns.
20447         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
20448         (xmalloc, xrealloc): Use them.
20449         (xcalloc): Check for address arithmetic overflow.
20450         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
20451         a bit faster than strcpy.
20452
20453 2003-10-10  Simon Josefsson  <jas@extundo.com>
20454
20455         * modules/argp (Depends-on): Add restrict and strcase.
20456
20457 2003-10-10  Simon Josefsson  <jas@extundo.com>
20458
20459         * m4/argp.m4: Add AC_C_INLINE.
20460
20461 2003-10-08  Paul Eggert  <eggert@twinsun.com>
20462
20463         Merge getpass from libc, plus a few fixes.
20464
20465         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
20466         Include <stdbool.h>.
20467         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
20468         __fsetlocking to empty.
20469         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
20470         do include <bits/libc-lock.h>.
20471         Do not include <fcntl.h>; not needed.
20472         [_LIBC]: Include <wchar.h>.
20473         (NOTCANCEL_MODE): New macro.
20474         (flockfile, funlockfile) [_LIBC]: New macros.
20475         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
20476         [!_LIBC]: New macros.
20477         (call_fclose): New function.
20478         (getpass): Use it.  Save tty stream separately; this simplifies the
20479         code and makes it more reliable if stdin happens to equal stdout.
20480         Invoke __fsetlocking on tty.
20481         Handle thread cancellation if needed.
20482         Namespace cleanup (use __tcgetattr, __getline).
20483         Use bool for Booleans.
20484         [USE_IN_LIBIO]: Handle wide streams.
20485         [!_LIBC]: Unconditionally do the fseek, since we don't know what
20486         stream might go where.
20487
20488         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
20489         doesn't have to include <stdio.h> before us.
20490         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
20491         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
20492         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
20493         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
20494         if not declared, so that we can use getpass.c code from libc without
20495         rewriting it.
20496         (flockfile, ftrylockfile, funlockfile): New macros.
20497
20498 2003-10-08  Paul Eggert  <eggert@twinsun.com>
20499
20500         * modules/getpass: Depend on stdbool.
20501
20502 2003-10-08  Paul Eggert  <eggert@twinsun.com>
20503
20504         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
20505
20506 2003-10-07  Karl Berry  <karl@gnu.org>
20507
20508         * config/config.{guess,sub}: update from config.
20509
20510 2003-10-06  Jim Meyering  <jim@meyering.net>
20511             Bruno Haible  <bruno@clisp.org>
20512
20513         This lets translators provide better translations for the
20514         "Written by ..." part of --version output.
20515         * lib/version-etc.h: Include stdarg.h.
20516         (version_etc_copyright): Declare as readonly.
20517         (version_etc): Make this function variadic with a NULL-terminated list
20518         of author name strings.
20519         (version_etc_va): New declaration.
20520         * lib/version-etc.c: Include stdarg.h, stdlib.h.
20521         (version_etc_copyright): Declare as readonly.
20522         (version_etc_va): New function. Provide a different translatable string
20523         for each possible number of authors < 10. Abbreviate when there are 10
20524         authors or more.
20525         (version_etc): Make this function variadic. Call version_etc_va.
20526         Suggestion from Gary V. Vaughan.
20527
20528         * lib/long-options.h (parse_long_options): Change prototype: the
20529         authors string is moved to the end and becomes variadic.
20530         * lib/long-options.c: Include stdarg.h.
20531         (parse_long_options): Make this function variadic, too.
20532         Call version_etc_va, not version_etc.
20533
20534 2003-10-06  Bruno Haible  <bruno@clisp.org>
20535
20536         * modules/version-etc-2: Remove file.
20537         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
20538
20539 2003-10-06  Bruno Haible  <bruno@clisp.org>
20540
20541         * modules/fatal-signal: New file.
20542         * MODULES.html.sh (func_all_modules): Add fatal-signal.
20543
20544 2003-10-06  Bruno Haible  <bruno@clisp.org>
20545
20546         * m4/fatal-signal.m4: New file.
20547         * m4/signalblocking.m4: New file, from GNU gettext.
20548
20549 2003-10-06  Bruno Haible  <bruno@clisp.org>
20550
20551         * lib/version-etc-2.h: Remove file.
20552         * lib/version-etc-2.c: Remove file.
20553
20554 2003-10-06  Bruno Haible  <bruno@clisp.org>
20555
20556         * lib/fatal-signal.h: New file, from GNU gettext.
20557         * lib/fatal-signal.c: New file, from GNU gettext.
20558
20559 2003-10-05  Paul Eggert  <eggert@twinsun.com>
20560
20561         * README: Rework advice for preventing empty .o files.
20562         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
20563         not <sys/types.h>.
20564
20565 2003-10-04  Karl Berry  <karl@gnu.org>
20566
20567         * lib/argp*: update from libc.
20568
20569 2003-10-04  Karl Berry  <karl@gnu.org>
20570
20571         * config/config.{guess,sub}: update from config.
20572
20573 2003-10-02  Bruno Haible  <bruno@clisp.org>
20574
20575         * modules/lchown (Include): Add lchown.h.
20576         * modules/time_r (Include): Use "..." syntax.
20577         * modules/xgetdomainname (Include): Add xgetdomainname.h.
20578
20579 2003-10-01  Simon Josefsson  <jas@extundo.com>
20580
20581         * MODULES.html.sh (func_all_modules): Move gethostname from section
20582         'based on' to section 'lacking' POSIX:2001.
20583
20584 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
20585
20586         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
20587         to output mode on the same stream.
20588
20589 2003-09-29  Paul Eggert  <eggert@twinsun.com>
20590
20591         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
20592         Fix arg typo in previous patch.
20593
20594 2003-09-28  Jim Meyering  <jim@meyering.net>
20595
20596         * lib/error.c: Correct cpp indentation.
20597
20598 2003-09-27  Paul Eggert  <eggert@twinsun.com>
20599
20600         * modules/free: New file.
20601
20602 2003-09-27  Paul Eggert  <eggert@twinsun.com>
20603
20604         * m4/free.m4: New file.
20605
20606 2003-09-27  Paul Eggert  <eggert@twinsun.com>
20607
20608         * lib/minmax.h (MIN, MAX)
20609         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
20610         Omit the special code that used __typeof__, since we worry that
20611         it could be more trouble than it's worth.  See:
20612         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
20613         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
20614
20615         * lib/free.c: New file.
20616
20617 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
20618
20619         Trivial fixes to Makefile.am parts of module listings.
20620         * modules/strstr: Append strstr.h to lib_SOURCES.
20621         * modules/strcase: Likewise, for strcase.h.
20622
20623 2003-09-27  Karl Berry  <karl@gnu.org>
20624
20625         * config/mkinstalldirs: update from automake.
20626
20627 2003-09-26  Paul Eggert  <eggert@twinsun.com>
20628
20629         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
20630         (error_tail): Do not loop, reallocating temporary buffer, since
20631         the output cannot contain more wide characters than the input
20632         contains bytes, the size must be big enough already.  This avoids
20633         one potential size overflow calculation.  Check for size overflow
20634         when calculating temporary buffer size.  Free temporary buffer
20635         when done, if it was allocated with malloc; this plugs a memory
20636         leak.  Remove casts from void * to pointers, that are no longer
20637         needed now that we're assuming C89 or better.
20638
20639         Merge error changes from glibc.
20640
20641         * lib/error.c, error.h: Update copyright notice header to match glibc.
20642         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
20643         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
20644         Disable cancellation while printing error.
20645         * lib/error.h: Prepend __ to parameter names.
20646
20647 2003-09-26  Jim Meyering  <jim@meyering.net>
20648
20649         * lib/error.c (error_tail): Move some declarations
20650         into inner scope where the local variables are used.
20651
20652 2003-09-26  Bruno Haible  <bruno@clisp.org>
20653
20654         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
20655         stpncpy().
20656         Don't define stpncpy through config.h; it's now done through stpncpy.h.
20657
20658 2003-09-26  Bruno Haible  <bruno@clisp.org>
20659
20660         * lib/stpncpy.h (gnu_stpncpy): New declaration.
20661         (stpncpy): Define as alias for gnu_stpncpy.
20662         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
20663
20664 2003-09-25  Simon Josefsson  <jas@extundo.com>
20665
20666         * lib/xgetdomainname.h: New file.
20667         * lib/xgetdomainname.c: New file.
20668
20669 2003-09-25  Simon Josefsson  <jas@extundo.com>
20670             Bruno Haible  <bruno@clisp.org>
20671
20672         * modules/getdomainname: New file.
20673         * modules/xgetdomainname: New file.
20674         * MODULES.html.sh (func_all_modules): Add getdomainname,
20675         xgetdomainname.
20676
20677 2003-09-25  Simon Josefsson  <jas@extundo.com>
20678             Bruno Haible  <bruno@clisp.org>
20679
20680         * m4/getdomainname.m4: New file.
20681
20682 2003-09-25  Simon Josefsson  <jas@extundo.com>
20683             Bruno Haible  <bruno@clisp.org>
20684
20685         * lib/getdomainname.h: New file.
20686         * lib/getdomainname.c: New file.
20687
20688 2003-09-25  Karl Berry  <karl@gnu.org>
20689
20690         * lib/argp-fmtstream.c, argp-help.c: update from libc.
20691
20692 2003-09-25  Karl Berry  <karl@gnu.org>
20693
20694         * config/install-sh: update from automake.
20695
20696 2003-09-25  Bruno Haible  <bruno@clisp.org>
20697
20698         * modules/version-etc-2: New file, from modules/version-etc with
20699         modifications.
20700         * MODULES.html.sh (func_all_modules): Add version-etc-2.
20701
20702 2003-09-25  Bruno Haible  <bruno@clisp.org>
20703
20704         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
20705         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
20706
20707 2003-09-24  Simon Josefsson  <jas@extundo.com>
20708
20709         * modules/xgethostname: Add xgethostname.h.
20710
20711 2003-09-24  Paul Eggert  <eggert@twinsun.com>
20712
20713         * lib/linebuffer.c (freebuffer): Don't free the argument, just
20714         the buffer associated with the argument.  Bug reported by
20715         Simon Josefsson.
20716
20717 2003-09-24  Paul Eggert  <eggert@twinsun.com>
20718
20719         * README: Document assumptions that 'int' is at least 32 bits
20720         wide, that integer arithmetic is 2's complement without overflow,
20721         that there are no holes in integer values, that adding sizes of
20722         two nonoverlapping objects can't overflow, and that all-bits-zero
20723         yields scalar zero.  Fix spelling and capitalization typos.
20724
20725 2003-09-19  Karl Berry  <karl@gnu.org>
20726
20727         * lib/argp.h: update from libc.
20728
20729 2003-09-17  Paul Eggert  <eggert@twinsun.com>
20730
20731         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
20732         to avoid spurious warnings like "AC_RUN_IFELSE was called before
20733         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
20734
20735 2003-09-17  Paul Eggert  <eggert@twinsun.com>
20736
20737         * gnulib-tool: Use "test -h", not "test -L", for portability
20738         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
20739         (tags_regexp): Remove, since \| doesn't conform to POSIX.
20740         (sed_extract_prog): Issue s commands one-by-one, rather than
20741         using \| in one s command.
20742
20743 2003-09-16  Paul Eggert  <eggert@twinsun.com>
20744
20745         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
20746         input error, instead of returning NULL the next time we are called
20747         (and therefore losing track of errno).
20748
20749 2003-09-16  Bruno Haible  <bruno@clisp.org>
20750
20751         * gnulib-tool (func_create_testdir): Warn about duplicated
20752         dependencies.
20753
20754 2003-09-15  Paul Eggert  <eggert@twinsun.com>
20755
20756         * modules/argmatch, modules/fatal, modules/obstack,
20757         modules/xalloc, modules/xgethostname: Sort dependencies by
20758         importance, not alphabetically.
20759
20760 2003-09-15  Paul Eggert  <eggert@twinsun.com>
20761
20762         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
20763         fails, so that the caller gets the proper errno.
20764
20765         * lib/readutmp.c (read_utmp): Likewise.
20766         Check for fstat error.  Close stream and free storage
20767         when failing.
20768
20769 2003-09-14  Karl Berry  <karl@gnu.org>
20770
20771         * config/srclist.txt (strdup.c): disable for c89 changes.
20772
20773 2003-09-14  Jim Meyering  <jim@meyering.net>
20774
20775         * lib/getloadavg.c: Correct cpp indentation.
20776         * lib/strdup.c: Likewise.
20777         * lib/vasnprintf.c: Likewise.
20778
20779 2003-09-14  Bruno Haible  <bruno@clisp.org>
20780
20781         * modules/fwriteerror: New file.
20782         * MODULES.html.sh (func_all_modules): Add fwriteerror.
20783
20784 2003-09-14  Bruno Haible  <bruno@clisp.org>
20785
20786         * lib/fwriteerror.h: New file.
20787         * lib/fwriteerror.c: New file.
20788
20789 2003-09-12  Paul Eggert  <eggert@twinsun.com>
20790
20791         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
20792         modules/xgethostname, modules/xalloc: Depend on exit.
20793
20794 2003-09-12  Paul Eggert  <eggert@twinsun.com>
20795
20796         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
20797
20798         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
20799         and AC_MINIX, too, so that their extensions are available.
20800
20801         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
20802         This macro has been superseded by gl_BACKUPFILE.
20803
20804         More patches to assume C89 or better.
20805
20806         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
20807
20808         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
20809         unconditionally.
20810         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
20811         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
20812         Include <string.h>, <stdlib.h> unconditionally.
20813         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
20814         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
20815         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
20816         headers or for string.h.
20817         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
20818         or strtoul.
20819
20820         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
20821         headers.
20822         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
20823         * m4/userspec.m4 (gl_USERSPEC): Likewise.
20824         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
20825         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
20826         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
20827         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
20828         memcpy, memset.
20829         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
20830         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
20831         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
20832         strtol.
20833         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
20834         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
20835         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
20836         strtoul.
20837
20838 2003-09-12  Paul Eggert  <eggert@twinsun.com>
20839
20840         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
20841         * lib/obstack.c [!defined _LIBC]: Likewise.
20842         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
20843         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
20844         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
20845
20846         More changes to assume C89 or better.
20847
20848         * lib/error.c (error_tail): Assume vprintf.
20849
20850         * lib/argmatch.c (getenv): Remove decl.
20851         * lib/progreloc.c (get_full_program_name): Define via prototype.
20852         * lib/setenv.c (clearenv): Likewise.
20853         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
20854         needed.
20855         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
20856         (malloc, memcpy): Remove decls.
20857         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
20858         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
20859         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
20860         (memcpy): Remove macro.
20861         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
20862         (__P): Remove.  All uses removed.
20863         (PTR): Remove.  All uses changed to void *.
20864         (CHAR_BIT, NULL): Remove.
20865         (spaces, zeros, memset_space, memset_zero)
20866         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
20867         Remove.
20868         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
20869         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
20870         Define with prototype.
20871         Remove now-unnecessary prototype decl.
20872         (extra_args_spec): Assume ANSI C.  All uses changed.
20873         (extra_args_spec_iso): Remove.
20874         (my_strftime, emacs_strftimeu): Define via prototype.
20875         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
20876         unconditionally.
20877         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
20878         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
20879         (strtoul, strtol): Remove decls.
20880         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
20881         LONG_MAX): Remove.
20882         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
20883         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
20884         (LOCALE_PARAM_PROTO): New macro.
20885         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
20886         (INTERNAL (strtol), strtol): Define with a prototype.
20887         (PARAMS): Remove.  All uses removed.
20888         * lib/tempname.c: Include <string.h> unconditionally.
20889         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
20890         * lib/xgethostname.c (main): Define with a prototype.
20891         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
20892         Include <stdlib.h> unconditionally.
20893         (calloc, malloc, realloc, free): Remove decls.
20894         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
20895         Include <stdlib.h> unconditionally.  Sort include file names.
20896         (strtod): Remove.
20897         (xstrtod): Define with a prototype.
20898         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
20899         (strtol, strtoul): Remove decls.
20900
20901 2003-09-11  Paul Eggert  <eggert@twinsun.com>
20902
20903         More patches to assume C89 or better.
20904         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
20905         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
20906         string.h, memchr, STDC_HEADERS.
20907
20908 2003-09-11  Paul Eggert  <eggert@twinsun.com>
20909
20910         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
20911         Include <stdlib.h>, <string.h> unconditionally.
20912         Remove now-unnecessary cast to char *.
20913         * lib/strnlen.c: Include <string.h> unconditionally.
20914         * lib/yesno.c (yesno): Define with a prototype.
20915
20916 2003-09-11  Bruno Haible  <bruno@clisp.org>
20917
20918         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
20919
20920 2003-09-10  Jim Meyering  <jim@meyering.net>
20921
20922         * lib/error.c: Correct indentation of cpp directives.
20923
20924 2003-09-10  Bruno Haible  <bruno@clisp.org>
20925
20926         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
20927         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
20928         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
20929         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
20930         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
20931         <stdlib.h> and <string.h> checks.
20932         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
20933         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
20934
20935 2003-09-10  Bruno Haible  <bruno@clisp.org>
20936
20937         * lib/strcspn.c: Include <string.h> unconditionally.
20938         * lib/strpbrk.c: Include <string.h> unconditionally.
20939         * lib/strstr.c: Include <string.h> unconditionally.
20940         * lib/unicodeio.c: Include <string.h> unconditionally.
20941         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
20942         * lib/unsetenv.c: Likewise.
20943         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
20944         * lib/yesno.c: Include <stdlib.h> unconditionally.
20945         (rpmatch): Add prototype.
20946
20947 2003-09-09  Paul Eggert  <eggert@twinsun.com>
20948
20949         More patches to assume C89 or better.
20950         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
20951         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
20952         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
20953         or for string.h.
20954         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
20955         stdlib.h.
20956         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
20957         C headers.
20958         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
20959         string.h.
20960         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
20961         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
20962         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
20963         or for string.h.
20964         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
20965         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
20966         C headers.
20967         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
20968         memcpy.
20969         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
20970         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
20971         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
20972         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
20973         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
20974         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
20975         string.h, free.
20976         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
20977         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
20978         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
20979         C headers, or for string.h.
20980         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
20981         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
20982         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
20983         headers, memory.h, stdlib.h, string.h, strings.h.
20984         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
20985         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
20986         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
20987         strchr.
20988         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
20989         headers, memory.h, string.h.
20990         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
20991         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
20992         free.
20993         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
20994         headers.
20995         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
20996         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
20997         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
20998         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
20999         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
21000
21001 2003-09-09  Paul Eggert  <eggert@twinsun.com>
21002
21003         More K&R removal.
21004
21005         * lib/acosl.c (main): Use a prototype.
21006         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
21007         tanl.c: Likewise.
21008
21009         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
21010
21011         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
21012         (getopt, etopt_long, getopt_long_only, _getopt_internal)
21013         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
21014         with a prototype.
21015         * lib/getopt.c (const): Remove macro.
21016         Include <string.h> unconditionally.
21017         (my_index): Remove; all uses changed to strchr.
21018         (strlen): Remove decl.
21019         (exchange): Remove forward decl; no longer needed.
21020         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
21021         Define with prototype.
21022         * lib/getopt1.c (const): Remove macro.
21023         (getopt_long, getopt_long_only, main): Define with prototype.
21024
21025         * lib/getugroups.c: Include <string.h> unconditionally.
21026
21027         * lib/getusershell.c: Include <stdlib.h> unconditionally.
21028         (getusershell, setusershell, endusershell, readname, main):
21029         Define with prototypes.
21030
21031         * lib/group-member.c: Include group-member.h first.
21032         Include <stdlib.h> unconditionally.
21033
21034         * lib/hard-locale.c: Include hard-locale.h first.
21035         Include <stdlib.h>, <string.h> unconditionally.
21036
21037         * lib/hash.c (free, malloc): Remove decls.
21038         Include <stdlib.h> unconditionally.
21039
21040         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
21041         (getenv): Do not declare.
21042
21043         * lib/idcache.c: Include <string.h> unconditionally.
21044
21045         * lib/long-options.c: Include long-options.h first, to test interface.
21046         Include <stdlib.h> unconditionally.
21047
21048         * lib/makepath.c: Include makepath.h first, to test interface.
21049         Include <stdlib.h> and <string.h> unconditionally.
21050
21051         * lib/linebuffer.c: Include <stdlib.h>.
21052         (free): Remove decl.
21053
21054         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
21055         stddef.h. rpl_malloc returns void *, not char *.
21056         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
21057         prototype.
21058
21059         * lib/md5.h: Include <limits.h> unconditionally.
21060         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
21061         (__P): Remove; all uses removed.
21062         * lib/md5.c: Include "md5.h" first.
21063         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
21064         md5_buffer, md5_process_bytes, md5_process_block):
21065         Define with prototypes.
21066         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
21067         * lib/sha.c: Include "sha.h" first.
21068         Include <stdlib.h>, <string.h> unconditionally.
21069
21070         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
21071         * lib/memcmp.c (__ptr_t): Likewise.
21072         * lib/memrchr.c (__ptr_t): Likewise.
21073         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
21074         Include <string.h> unconditionally.
21075         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
21076         * lib/memchr.c: Include <stdlib.h> unconditionally.
21077         * lib/memchr.c (LONG_MAX): Remove.
21078         * lib/memrchr.c (LONG_MAX): Likewise.
21079         * lib/memchr.c (__memchr): Define via a prototype.
21080         * lib/memrchr.c (__memrchr): Likewise.
21081         * lib/memcmp.c (__P): Remove, and remove all uses.
21082         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
21083         Remove forward decls; no longer needed.
21084         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
21085         Use types required by C89 in prototype.
21086
21087         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
21088         * lib/savedir.c: Likewise.
21089         * lib/mkdir.c (free): Remove decl.
21090         * lib/rmdir.c (rmdir): Define with a prototype.
21091         * lib/savedir.c: Include savedir.h first, to test interface.
21092
21093         * lib/mktime.c (STDC_HEADERS): Remove.
21094         Include <stdlib.h>, <string.h> unconditionally.
21095
21096         * lib/modechange.c: Include <stdlib.h> unconditionally.
21097         (malloc): Remove decl.
21098
21099         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
21100         (free): Remove decl.
21101
21102         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
21103         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
21104         (This type really should be intptr_t, but that's a C99ism.)
21105         (_obstack_memcpy): Remove: all uses changed to memcpy.
21106         Include <string.h> unconditionally.
21107         (struct obstack): Assume __STDC__ for types of members
21108         chunkfun, freefun, extra_arg.
21109         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
21110         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
21111         obstack_begin, obstack_specify_allocation,
21112         obstack_specify_allocation_with_arg, obstack_chunkfun,
21113         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
21114         Remove unprototyped decls and the macros that use them.
21115         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
21116         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
21117         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
21118         (defined __STDC__ && __STDC__)]:
21119         Remove nonprototyped code.
21120         Include <stdlib.h> unconditionally.
21121         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
21122         _obstack_allocated_p, _obstack_free, obstack_free,
21123         _obstack_memory_used, print_and_abort):
21124         Define using prototypes.
21125         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
21126         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
21127         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
21128         obstack_next_free, obstack_object_size, obstack_room) [0]:
21129         Remove unused, unprototyped code.
21130
21131         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
21132
21133         * lib/physmem.c (physmem_total, physmem_available, main): Define
21134         with prototypes.
21135
21136         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
21137         (main): Define with a prototype.
21138
21139         * lib/posixver.c (getenv): Remove decl.
21140
21141         * lib/putenv.c (malloc): Returns void *, not char *.
21142         Include <string.h> unconditionally.
21143         (strchr, memcpy, NULL): Do not define.
21144
21145         * lib/readtokens.c: Include readtokens.h first, to test interface.
21146         Include <stdlib.h>, <string.h> unconditionally.
21147         (init_tokenbuffer): Define with a prototype.
21148
21149         * lib/regex.c (PARAMS): Remove.  All uses removed.
21150         All uses of _RE_ARGS removed, too.
21151         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
21152         unconditionally.
21153         (bzero): Assume memset exists.
21154         (memcmp, memcpy, NULL): Remove.
21155         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
21156         char, or assignments to local vars of type signed char.
21157         (init_syntax_once, PREFIX(extract_number_and_incr),
21158         PREFIX(print_partial_compiled_pattern),
21159         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
21160         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
21161         PREFIX(regex_grow_registers), PREFIX(regex_compile),
21162         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
21163         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
21164         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
21165         wcs_compile_range, byte_compile_range, truncate_wchar,
21166         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
21167         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
21168         count_mbs_length, wcs_re_match_2_internal,
21169         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
21170         PREFIX(alt_match_null_string_p),
21171         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
21172         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
21173         regfree, PREFIX(extract_number)): Define with prototype.  Remove
21174         now-unnecessary declaration, if any.
21175         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
21176         regcomp, regexec):
21177         Remove now-unnecessary casts among pointer types.
21178         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
21179
21180         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
21181         (free): Remove decl.
21182
21183         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
21184
21185         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
21186         (free): Remove decl.
21187
21188         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
21189         * lib/xgetcwd.c: Likewise.
21190
21191         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
21192         (free): Remove decl.
21193
21194         * lib/strchrnul.c (strchrnul): Define with a prototype.
21195         Fix bug: c_in was not converted to char before searching.
21196
21197         The following changes are not K&R related:
21198
21199         * lib/group-member.h: Include <sys/types.h>, so that this file is
21200         self-contained.
21201         * lib/makepath.h: Likewise.
21202
21203         * lib/getusershell.c (readname, default_index, line_size, readname):
21204         Use size_t, not int, for sizes.
21205         (readname): If the size overflows, report an error instead of
21206         looping forever.
21207
21208 2003-09-09  Paul Eggert  <eggert@twinsun.com>
21209
21210         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
21211         libc.
21212
21213 2003-09-09  Paul Eggert  <eggert@twinsun.com>
21214
21215         * README: New section: portability guidelines.
21216
21217 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
21218
21219         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
21220         C89 spec.
21221
21222 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
21223
21224         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
21225
21226 2003-09-08  Paul Eggert  <eggert@twinsun.com>
21227
21228         Assume C89 or better; remove K&R cruft.
21229         A few of these changes were first proposed by Derek Robert Price
21230         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
21231
21232         * lib/addext.c: Include <string.h> unconditionally.
21233         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
21234         Don't declare getenv or malloc.
21235
21236         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
21237         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
21238         (NULL): Remove.
21239         (find_stack_direction, alloca): Use prototypes.
21240
21241         * lib/atexit.c (atexit): Define using a prototype.
21242
21243         * lib/basename.c, dirname.c, stripslash.c:
21244         Include <string.h> unconditionally.
21245
21246         * lib/bcopy.c: Include <stddef.h>.
21247         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
21248
21249         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
21250
21251         * lib/error.h (error, error_at_line, error_print_progname)
21252         [! (defined (__STDC__) && __STDC__)]: Remove decls.
21253         * lib/error.c: Include error.h first, to check interface.
21254         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
21255         (VA_START): Remove; all uses changeed to va_start.
21256         (exit, strerror): Remove decls.
21257         (error_print_progname): Prototype uncondionally.
21258         Don't include <errno.h>; no longer needed.
21259         (private_strerror): Remove.
21260         (error_tail): Always define.
21261         (error, error_at_line): Assume C89 or better; always use prototypes.
21262         * lib/fatal.c: Include "fatal.h" first, to test interface.
21263         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
21264         (VA_START): Remove; all uses changed to va_start.
21265         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
21266         this case.
21267         (exit): Remove decl.
21268         (fatal): Prototype unconditionally.  Assume va_start works.
21269         Abort at end, to pacify gcc.
21270
21271         * lib/euidaccess.c (main): Define with a prototype.
21272
21273         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
21274
21275         * lib/exitfail.c: Include <stdlib.h> unconditionally.
21276
21277         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
21278         prototypes.
21279         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
21280         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
21281         (getenv): Remove decl.
21282         (fnmatch): Define using a prototype.
21283         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
21284         (FCT): Define using a prototype.
21285
21286         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
21287
21288         * lib/gethostname.c: Include <stddef.h>.
21289         (gethostname): Define with prototype.  Length is size_t, not int.
21290
21291 2003-09-08  Paul Eggert  <eggert@twinsun.com>
21292
21293         Assume C89 or better; remove K&R cruft.
21294         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
21295         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
21296         string.h, getenv, malloc.
21297         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
21298         headers.
21299         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
21300         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
21301         do not check for strerror.
21302         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
21303         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
21304         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
21305         do not check for doprnt or vprintf.
21306         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
21307         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
21308
21309 2003-09-08  Paul Eggert  <eggert@twinsun.com>
21310
21311         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
21312         getversion.c should have been removed then, but was accidentally
21313         preserved.
21314
21315         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
21316         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
21317
21318 2003-09-08  Karl Berry  <karl@gnu.org>
21319
21320         * config/config.sub, config.guess, srclistvars.sh: update from savannah
21321                 config, forget about prep.
21322
21323         * config/depcomp, missing: update from automake.
21324
21325 2003-09-07  Paul Eggert  <eggert@twinsun.com>
21326
21327         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
21328         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
21329
21330 2003-09-07  Paul Eggert  <eggert@twinsun.com>
21331
21332         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
21333         copy_tm_result.  Bug reported by Simon Josefsson in
21334         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
21335
21336 2003-09-06  Paul Eggert  <eggert@twinsun.com>
21337
21338         * m4/time_r.m4: New file.
21339         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
21340         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
21341         is. Check for timegm declaration.
21342         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
21343         Do not check for gmtime_r.
21344         Replace mktime if __mktime_internal does not exist and if mktime
21345         hasn't been replaced already.
21346
21347 2003-09-06  Paul Eggert  <eggert@twinsun.com>
21348
21349         * lib/time_r.c, lib/time_r.h: New files.
21350
21351         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
21352         __localtime_r.
21353         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
21354         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
21355
21356         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
21357         __gmtime_r.
21358         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
21359         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
21360         Include <time_r.h>.
21361
21362         * lib/timegm.c: Switch to glibc implementation, with the following
21363         changes:
21364         [defined HAVE_CONFIG_H]: Include <config.h>.
21365         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
21366         (__mktime_internal) [!defined _LIBC]: New decl.
21367         (__gmtime_r) [!defined _LIBC]: New macro and function.
21368         (timegm): Use a prototype, since gnulib assumes C89.
21369         Do not bother declaring tmp to be const, as it's not really usefu.
21370         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
21371         (timegm): Declare only if HAVE_DECL_TIMEGM.
21372
21373 2003-09-06  Paul Eggert  <eggert@twinsun.com>
21374
21375         * MODULES.html.sh (func_all_modules): Add time_r.
21376         * modules/time_r: New file.
21377         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
21378         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
21379
21380 2003-09-03  Paul Eggert  <eggert@twinsun.com>
21381
21382         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
21383         Bug reported by Lute Kamstra in
21384         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
21385
21386         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
21387         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
21388         course with correspondingly smaller numbers for tomorrow and
21389         yesterday.  From Tadayoshi Funaba.  Originally installed into
21390         sh-utils on 1999-08-07, but the patch got lost (I guess during the
21391         coreutils merge?).
21392
21393 2003-08-31  Simon Josefsson  <jas@extundo.com>
21394
21395         * modules/timegm: New file.
21396         * MODULES.html.sh (func_all_modules): Add timegm.
21397
21398 2003-08-31  Simon Josefsson  <jas@extundo.com>
21399
21400         * m4/timegm.m4: New file.
21401
21402 2003-08-31  Simon Josefsson  <jas@extundo.com>
21403
21404         * lib/timegm.h: New file.
21405         * lib/timegm.c: New file.  Based on
21406         wget-1.8.2/src/http.c:mktime_from_utc.
21407
21408 2003-08-31  Karl Berry  <karl@gnu.org>
21409
21410         * lib/argp.h: update from libc.
21411
21412 2003-08-28  Bruno Haible  <bruno@clisp.org>
21413
21414         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
21415         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
21416         followed by '#define fnmatch fnmatch_posix' gives an error.
21417
21418 2003-08-28  Bruno Haible  <bruno@clisp.org>
21419
21420         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
21421         warning on QNX, which defines O_BINARY to 000000.
21422
21423 2003-08-27  Jim Meyering  <jim@meyering.net>
21424
21425         * m4/mkstemp.m4: Require that the system mkstemp be able to create
21426         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
21427         would fail after 32.  Reported by Danny Levinson.  Details here:
21428         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
21429
21430 2003-08-24  Bruno Haible  <bruno@clisp.org>
21431
21432         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
21433         MSVC7 <stdio.h> is included later.
21434
21435 2003-08-22  Simon Josefsson  <jas@extundo.com>
21436
21437         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
21438
21439 2003-08-20  Karl Berry  <karl@gnu.org>
21440
21441         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
21442
21443 2003-08-20  Bruno Haible  <bruno@clisp.org>
21444
21445         * modules/progname: New file.
21446         * MODULES.html.sh (func_all_modules): Add progname.
21447
21448 2003-08-20  Bruno Haible  <bruno@clisp.org>
21449
21450         * lib/progname.h: New file, from GNU gettext.
21451         * lib/progname.c: New file, from GNU gettext.
21452         * lib/progreloc.c: New file, from GNU gettext.
21453
21454 2003-08-19  Jim Meyering  <jim@meyering.net>
21455
21456         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
21457         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
21458
21459 2003-08-19  Bruno Haible  <bruno@clisp.org>
21460
21461         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
21462         more.
21463
21464 2003-08-19  Bruno Haible  <bruno@clisp.org>
21465
21466         * lib/xstrdup.c: Assume <string.h> exists.
21467
21468 2003-08-18  Paul Eggert  <eggert@twinsun.com>
21469
21470         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
21471         in makefile rules.
21472
21473 2003-08-18  Jim Meyering  <jim@meyering.net>
21474
21475         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
21476         * m4/lib-ld.m4: Likewise.
21477
21478 2003-08-18  Jim Meyering  <jim@meyering.net>
21479
21480         * lib/setenv.h: Indent nested cpp directive.
21481         * lib/vasnprintf.c: Remove trailing blanks.
21482
21483 2003-08-17  Simon Josefsson  <jas@extundo.com>
21484
21485         * modules/xstrndup: New file.
21486         * MODULES.html.sh (func_all_modules): Add xstrndup.
21487
21488 2003-08-17  Simon Josefsson  <jas@extundo.com>
21489
21490         * modules/argp: Fix autoconf macro name. Add more dependencies.
21491
21492 2003-08-17  Simon Josefsson  <jas@extundo.com>
21493
21494         * m4/xstrndup.m4: New file.
21495
21496 2003-08-17  Simon Josefsson  <jas@extundo.com>
21497
21498         * m4/argp.m4: New file.
21499
21500 2003-08-17  Simon Josefsson  <jas@extundo.com>
21501             Bruno Haible  <bruno@clisp.org>
21502
21503         * lib/xstrndup.h: New file.
21504         * lib/xstrndup.c: New file.
21505
21506 2003-08-17  Bruno Haible  <bruno@clisp.org>
21507
21508         * modules/strndup (Files, Include): Add lib/strndup.h.
21509
21510 2003-08-17  Bruno Haible  <bruno@clisp.org>
21511
21512         * modules/euidaccess (Files): Add lib/euidaccess.h.
21513
21514 2003-08-17  Bruno Haible  <bruno@clisp.org>
21515
21516         * lib/strndup.h: New file.
21517
21518 2003-08-17  Bruno Haible  <bruno@clisp.org>
21519
21520         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
21521         like AC_GNU_SOURCE.
21522         * modules/extensions (configure.ac): Comment out the invocation of
21523         gl_USE_SYSTEM_EXTENSIONS.
21524
21525 2003-08-16  Paul Eggert  <eggert@twinsun.com>
21526
21527         Merges from coreutils, etc.
21528         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
21529         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
21530         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
21531         fixing a typo.
21532         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
21533         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
21534
21535 2003-08-16  Paul Eggert  <eggert@twinsun.com>
21536
21537         Document merge from coreutils.
21538         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
21539         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
21540         * modules/utime: Add m4/utimes-null.m4.
21541
21542 2003-08-16  Paul Eggert  <eggert@twinsun.com>
21543
21544         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
21545         space, undoing this 2003-08-12 change:
21546         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
21547
21548 2003-08-16  Paul Eggert  <eggert@twinsun.com>
21549
21550         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
21551         strtoul.c from libc, undoing this 2003-08-12 change:
21552         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
21553
21554 2003-08-16  Jim Meyering  <jim@meyering.net>
21555
21556         Merges from coreutils.
21557         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
21558         prefix.  Adjust cache variables similarly.  Create 500 rather than
21559         just 300 files, to exercise bug on Darwin6.5, too.
21560         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
21561         $missing_dir.
21562         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
21563         AM_SYS_POSIX_TERMIOS.
21564         Reported by mkc@mathdogs.com.
21565         Also change use of $am_cv_sys_posix_termios
21566         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
21567         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
21568         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
21569         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
21570         in /proc/mounts until it finds one with matching device number.  This
21571         is unnecessary when the FILE argument *is* a mount point.  No stat call
21572         is necessary in that case.  So, disable the statvfs-testing code on
21573         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
21574         as RedHat bug# 84846.
21575         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
21576         to 1MB, so as not to render systems with no stack size limit (e.g.,
21577         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
21578         Include <unistd.h>.  On some systems,
21579         it is required for the definition of _SC_PAGESIZE.
21580
21581 2003-08-16  Jim Meyering  <jim@meyering.net>
21582
21583         Merge from coreutils.
21584         * lib/xstrtoimax.c: #else #if -> #elif.
21585         * lib/xstrtoumax.c: Likewise.
21586
21587 2003-08-16  Jim Meyering  <jim@meyering.net>
21588
21589         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
21590         * m4/utimes.m4: Removed.
21591         * m4/utimes-null.m4: Renamed from utimes.m4.
21592
21593         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
21594         to 1MB, so as not to render systems with no stack size limit (e.g.,
21595         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
21596         Include <unistd.h>.  On some systems,
21597         it is required for the definition of _SC_PAGESIZE.
21598
21599 2003-08-16  Jim Meyering  <jim@meyering.net>
21600         and Paul Eggert  <eggert@cs.ucla.edu>
21601
21602         Merges from coreutils, etc.
21603
21604         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
21605         using the latest version from cvs.  This avoids problems with #line
21606         directives using a vendor (Sun) compiler.
21607         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
21608         Don't set GETGROUPS_LIB here; now it's
21609         done via getgroups.m4's wrapper function.
21610         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
21611         rather than just in sh-util/configure.in, so that the
21612         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
21613         same.
21614         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
21615         AC_FUNC_GETLOADAVG where to find getloadavg.c.
21616         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
21617         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
21618         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
21619         Remove code that is now done by the newly-required macros.
21620         Append $(EXEEXT) to DF_PROG.
21621         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
21622         Do not invoke or require the following here,
21623         since prereq.m4 or some gnulib .m4 now does this for us:
21624         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
21625         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
21626         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
21627         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
21628         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
21629         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
21630         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
21631         AC_FUNC_OBSTACK.
21632         Do not replace the following functions, as this is now the job
21633         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
21634         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
21635         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
21636         atexit getpass, strdup, getpagesize.
21637         Replace 'raise'.
21638         Do not check for the following functions, as this is now the job
21639         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
21640         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
21641         setregid.
21642         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
21643         Check for sys/sysctl.h.
21644         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
21645         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
21646         of checking for ssize_t ourselves.
21647
21648         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
21649         Require every macro that gnulib/modules/* suggests for us.
21650         (jm_PREREQ_ADDEXT): New macro.
21651         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
21652         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
21653
21654         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
21655         (gl_PHYSMEM): Use it.
21656         Also check for `table' function.
21657         Check for new headers and functions.
21658         Add check for sys/sysmp.h.
21659         With suggestions from Kaveh Ghazi.
21660         Ignore headers that are present but cannot be compiled.  This
21661         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
21662         C 5.4.
21663
21664 2003-08-15  Paul Eggert  <eggert@twinsun.com>
21665
21666         Document merge from coreutils.
21667         * modules/userspec: Depend on posixver.
21668         * modules/strftime: Depend on tzset.
21669
21670 2003-08-15  Paul Eggert  <eggert@twinsun.com>
21671
21672         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
21673         rather than tab, after '#' in shell-script copyright notices.
21674         Suggested by Bruno Haible.
21675
21676 2003-08-15  Paul Eggert  <eggert@twinsun.com>
21677
21678         * config/srclist-update: Use three spaces, rather than tab, after '#'
21679         in shell-script copyright notices.  Suggested by Bruno Haible.
21680         Remove unnecessary parenthesization in regular expression.
21681
21682 2003-08-15  Jim Meyering  <jim@meyering.net>
21683
21684         Merge from coreutils.
21685         * lib/xgethostname.c: Include <stdlib.h>.
21686         (xghostname): Don't exit for anything other than memory-related
21687         failure; just return NULL.
21688         * lib/userspec.c: Include "posixver.h".
21689         (parse_user_spec): Accept `.' as a separator only
21690         in pre-POSIX-200112 mode.
21691         * lib/strtoimax.c: Use #elif rather than #else #if.
21692         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
21693         Remove function, now that we can rely on a working tzset function.
21694         [!_LIBC]: Ensure that the required autoconf test has been run.
21695         [!defined _NL_CURRENT && HAVE_STRFTIME]:
21696         Use underlying_strftime for %r.
21697         * lib/sha.c: Merge in some clean-up and optimization changes from
21698         glibc.
21699         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
21700         Ensure that it is a multiple of 64.
21701         Rearrange loop exit tests so as to avoid performing an
21702         additional fread after encountering an error or EOF.
21703         * lib/realloc.c: Update copyright date.
21704
21705 2003-08-15  Jim Meyering  <jim@meyering.net>
21706         and Paul Eggert  <eggert@twinsun.com>
21707
21708         Merge from coreutils.
21709         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
21710         member but strut utmpx does not.  Needed for AIX 4.3.3.
21711         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
21712
21713 2003-08-15  Jim Meyering  <jim@meyering.net>
21714         and Paul Eggert  <eggert@cs.ucla.edu>
21715
21716         Merges from coreutils, etc.
21717         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
21718         Require gl_FUNC_TZSET_CLOBBER.
21719         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
21720         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
21721         members.
21722
21723 2003-08-14  Paul Eggert  <eggert@twinsun.com>
21724
21725         Help the merge from coreutils.
21726         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
21727         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
21728         * m4/tzset.m4: Use it too.
21729
21730 2003-08-14  Paul Eggert  <eggert@twinsun.com>
21731
21732         * modules/tzset: New file.
21733
21734 2003-08-14  Jim Meyering  <jim@meyering.net>
21735
21736         Merges from coreutils.
21737         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
21738         variable names, rather than @FNMATCH_H@.
21739         * modules/alloca: Likewise for $(ALLOCA_H).
21740
21741         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
21742         the three copies of the literal target, `fnmatch.h'.
21743         * modules/alloca (alloca.h): Likewise.
21744
21745 2003-08-14  Jim Meyering  <jim@meyering.net>
21746
21747         Merge from coreutils.
21748         * m4/tzset.m4: New file.
21749         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
21750         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
21751         otherwise, AIX 5.1 systems would end up using the latter.
21752         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
21753         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
21754         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
21755         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
21756
21757 2003-08-14  Jim Meyering  <jim@meyering.net>
21758
21759         Merge from coreutils.
21760         * lib/obstack.h: Whitespace changes.
21761         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
21762         and xcalloc return values.
21763         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
21764         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
21765         hang on OSF/1 5.1 for DIR on both local and remote file systems.
21766         Reported by (and fix confirmed by) Nelson H. F. Beebe.
21767         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
21768         error from mntctl.
21769         Use mntctl's return value to drive the entry-processing loop, since
21770         we can't rely on the value of the vmt_length member in the last
21771         entry.  On some systems doing so could result in exhausting
21772         virtual memory.  Based in part on a patch from Mike Jetzer.
21773
21774 2003-08-14  Jim Meyering  <jim@meyering.net>
21775         and Paul Eggert  <eggert@twinsun.com>
21776
21777         Merges from coreutils, plus other fixes.
21778         * lib/physmem.c: Merge in portability changes from gcc/libiberty
21779         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
21780         for credits and details.  Thanks to Kaveh Ghazi for helping
21781         to keep these files in sync.
21782         (ARRAY_SIZE): Define it.
21783         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
21784         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
21785         (memcasecmp): Don't assume size_t fits in unsigned int.
21786         Remove casts and duplicate code.
21787         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
21788         (memcpy): Remove definition.
21789         Merge in some clean-up and optimization changes from glibc.
21790         [BLOCKSIZE]: Move definition to top of file.
21791         Ensure that it is a multiple of 64.
21792         Rearrange loop exit tests so as to avoid performing an
21793         additional fread after encountering an error or EOF.
21794         * lib/md5.h (md5_uintptr): Define.
21795         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
21796         return to the initial working directory.  Preserve errno
21797         for caller.
21798         * lib/idcache.c: Include "xalloc.h".
21799         (xmalloc, xrealloc): Remove decls.
21800         (getuser): Remove casts no longer required in C89.
21801         * lib/human.c: Include stdio.h, for sprintf.
21802         * lib/group-member.c: Include "xalloc.h".
21803         (xmalloc, xrealloc): Remove decls.
21804         (get_group_info): Remove casts no longer required in C89.
21805         * lib/getusershell.c (readname): Remove casts no longer required in
21806         C89.
21807         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
21808         * lib/getline.c: Whitespace fix, from coreutils.
21809
21810 2003-08-13  Paul Eggert  <eggert@twinsun.com>
21811
21812         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
21813         Check for isascii.
21814
21815         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
21816         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
21817         Undo previous (whitespace-only) change.
21818
21819 2003-08-13  Paul Eggert  <eggert@twinsun.com>
21820
21821         * lib/exclude.c: Include <ctype.h>
21822         (IN_CTYPE_DOMAIN): New macro.
21823         (is_space): New fn.
21824         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
21825         and empty lines.
21826
21827         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
21828         Undo previous (whitespace-only) change.
21829
21830 2003-08-13  Paul Eggert  <eggert@twinsun.com>
21831
21832         * config/srclist-update: Change update back to the old behavior,
21833         leaving whitespace alone.  Use one 'sed' command rather than a
21834         pipeline.
21835         (fixlicense): Now a variable, not a function.
21836         (remove_trailing_blanks): Remove.
21837         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
21838         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
21839         Undo previous (whitespace-only) change.
21840
21841 2003-08-12  Paul Eggert  <eggert@twinsun.com>
21842
21843         Merge from coreutils.
21844         * modules/euidaccess: Add lib_SOURCES, include for new
21845         file euidaccess.h
21846
21847 2003-08-12  Paul Eggert  <eggert@twinsun.com>
21848
21849         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
21850         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
21851         Normalize leading white space and remove trailing white space.
21852
21853         Merge from coreutils
21854         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
21855
21856         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
21857         0.12.1.  These files are now being upgraded automatically by
21858         ../config/srclist-update.
21859
21860 2003-08-12  Paul Eggert  <eggert@twinsun.com>
21861
21862         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
21863         Normalize leading white space and remove trailing white space.
21864         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
21865         notice, as per ../config/srclist-update.
21866
21867         Merge from coreutils.
21868         * lib/euidaccess.h: New file.
21869         * lib/euidaccess.c: Include it.
21870         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
21871         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
21872         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
21873
21874 2003-08-12  Paul Eggert  <eggert@twinsun.com>
21875
21876         * config/srclist-update: Add copyright notice.
21877         (remove_id_lines, remove_trailing_blanks): New constants.
21878         (fixfile): Use them to normalize spacing a bit in copied files.
21879         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
21880         Normalize leading white space and remove trailing white space.
21881
21882         * config/texinfo.tex: Sync with texinfo.
21883
21884         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
21885         strtoul.c from libc, to merge coreutils whitespace changes.
21886
21887         * config/srclist.txt: Get the following m4 files from gettext:
21888         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
21889         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
21890         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
21891         wint_t.m4.
21892
21893 2003-08-12  Karl Berry  <karl@gnu.org>
21894
21895         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
21896         been made.
21897
21898 2003-08-11  Paul Eggert  <eggert@twinsun.com>
21899
21900         * modules/gnu-source, m4/gnu-source.m4:
21901         Remove; we're assuming Autoconf 2.54 or later now.
21902         Suggested by Bruno Haible.
21903         * MODULES.html.sh (func_all_modules): Remove gnu-source.
21904
21905 2003-08-11  Bruno Haible  <bruno@clisp.org>
21906
21907         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
21908
21909 2003-08-11  Bruno Haible  <bruno@clisp.org>
21910
21911         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
21912         (vasnprintf): Use it instead of wcslen.
21913
21914 2003-08-11  Bruno Haible  <bruno@clisp.org>
21915
21916         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
21917         value to ensure that _Bool promotes to int. Use #define for _Bool when
21918         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
21919
21920 2003-08-10  Karl Berry  <karl@gnu.org>
21921
21922         * lib/regex.h: update from libc (whitespace fix).
21923
21924 2003-08-09  Paul Eggert  <eggert@twinsun.com>
21925
21926         Merge some files from coreutils.  These changes were
21927         originally made by Jim Meyering.
21928         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
21929         many older Unixes require this.
21930         * lib/alloca.c (alloca): Remove cast to argument of free;
21931         no longer needed in C89.
21932         * lib/alloca_.h, regex.h: Fix white space to match
21933         what GNU indent does.
21934
21935 2003-08-09  Paul Eggert  <eggert@twinsun.com>
21936
21937         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
21938         apparently Emacs's Unicode mode got confused before my 2003-08-05
21939         checkin.
21940
21941 2003-08-08  Paul Eggert  <eggert@twinsun.com>
21942
21943         * m4/extensions.m4: New file.
21944         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
21945         Require gl_USE_SYSTEM_EXTENSIONS.
21946         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
21947         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
21948
21949 2003-08-08  Paul Eggert  <eggert@twinsun.com>
21950
21951         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
21952         * modules/extensions, modules/gnu-source: New files.
21953         * modules/timespec, modules/unlocked-io: Depend on extensions.
21954
21955 2003-08-07  Paul Eggert  <eggert@twinsun.com>
21956
21957         * modules/restrict: New file.
21958         * MODULES.html.sh (func_all_modules): Add restrict.
21959         * modules/regex: Depend on restrict.
21960
21961 2003-08-07  Paul Eggert  <eggert@twinsun.com>
21962
21963         * m4/restrict.m4: New file.
21964         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
21965
21966 2003-08-07  Bruno Haible  <bruno@clisp.org>
21967
21968         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
21969         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
21970
21971 2003-08-07  Bruno Haible  <bruno@clisp.org>
21972
21973         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
21974         makes the module 'getndelim2' compatible with the module 'getline'.
21975
21976 2003-08-05  Paul Eggert  <eggert@twinsun.com>
21977
21978         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
21979         byte with "\201" to avoid glitches when editing that source file
21980         with multi-gnome-terminal.
21981
21982 2003-08-05  Paul Eggert  <eggert@twinsun.com>
21983
21984         * lib/bumpalloc.h: Remove.
21985
21986 2003-08-05  Paul Eggert  <eggert@twinsun.com>
21987
21988         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
21989         * modules/bumpalloc: Remove.
21990
21991 2003-08-04  Paul Eggert  <eggert@twinsun.com>
21992
21993         * lib/getloadavg.c: Change copyright notice and spacing to conform to
21994         GNU coding style.
21995
21996         Merge from coreutils.
21997         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
21998         1. From glibc.
21999         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
22000         from Karl Berry, implemented by Jim Meyering.
22001         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
22002         from Dmitry V. Levin.
22003         Remove anachronistic cast of xrealloc.
22004         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
22005         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
22006         type. Otherwise, it wouldn't compile with at least /bin/cc on
22007         ymp-cray-unicos9.0.2.X.
22008         Combine two mostly-identical uses of alloca into one.
22009         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
22010
22011 2003-08-04  Dave Love  <d.love@dl.ac.uk>
22012
22013         [From Emacs.]
22014
22015         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
22016         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
22017         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
22018         obsolete NLIST_NAME_UNION.
22019         [__GNU__]: Undef BSD and FSCALE.
22020         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
22021
22022 2003-08-03  Paul Eggert  <eggert@twinsun.com>
22023
22024         * lib/stdbool_.h (_Bool): Make it signed char, instead of
22025         an enum type, so that it's guaranteed to promote to int.  See:
22026         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
22027
22028 2003-08-03  Karl Berry  <karl@gnu.org>
22029
22030         * config/depcomp: update from automake.
22031
22032 2003-07-31  Paul Eggert  <eggert@twinsun.com>
22033
22034         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
22035         (strerror): Don't assume that a printable int fits in 14 bytes.
22036
22037 2003-07-31  Bruno Haible  <bruno@clisp.org>
22038
22039         * modules/getpass-gnu: New file.
22040         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
22041
22042 2003-07-31  Bruno Haible  <bruno@clisp.org>
22043
22044         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
22045
22046 2003-07-24  Karl Berry  <karl@gnu.org>
22047
22048         * config/missing: update from automake.
22049
22050 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
22051             Bruno Haible  <bruno@clisp.org>
22052
22053         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
22054         * lib/getline.c (getline, getdelim): Likewise.
22055         Remove _GNU_SOURCE define; now it's defined in config.h through
22056         m4/getline.m4.
22057
22058 2003-07-23  Karl Berry  <karl@gnu.org>
22059
22060         * config/config.sub: update from prep.
22061
22062 2003-07-22  Paul Eggert  <eggert@twinsun.com>
22063
22064         * modules/xalloc (Depends-on): Add exitfail.
22065         * modules/xmemcoll: Likewise.
22066
22067 2003-07-22  Paul Eggert  <eggert@twinsun.com>
22068
22069         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
22070         over-parenthesization in macros.
22071
22072         Sync with coreutils.
22073
22074         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
22075         required by C99.
22076
22077         Use `exit_failure' for xalloc and xmemcoll instead of their own
22078         private exit-failure variables.
22079         * lib/xalloc.h (xalloc_exit_failure): Remove.
22080         * lib/xmalloc.c: Likewise.  Include exitfail.h.
22081         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
22082         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
22083         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
22084         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
22085
22086 2003-07-20  Jim Meyering  <jim@meyering.net>
22087
22088         * modules/closeout (Depends-on): Add exitfail.
22089         Suggestion from Bruno Haible.
22090
22091 2003-07-19  Karl Berry  <karl@gnu.org>
22092
22093         * config/config.sub: update from prep.
22094
22095 2003-07-18  Paul Eggert  <eggert@twinsun.com>
22096
22097         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
22098         Remove.
22099         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
22100         to test that it can stand by itself.  Include "exitfail.h".
22101         Clients should set exit_failure instead.
22102         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
22103
22104 2003-07-18  Bruno Haible  <bruno@clisp.org>
22105
22106         * modules/getndelim2: New file.
22107         * modules/getline: Share files with module getndelim2.
22108         * modules/getnline: Depend on getndelim2 instead of sharing files with
22109         it. Add getnline.c to lib_SOURCES.
22110         * MODULES.html.sh (func_all_modules): Add getndelim2.
22111
22112 2003-07-18  Bruno Haible  <bruno@clisp.org>
22113
22114         * m4/getndelim2.m4: New file.
22115         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
22116         invoke gl_PREREQ_GETNDELIM2.
22117         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
22118         gl_PREREQ_GETNDELIM2.
22119         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
22120         gl_GETNDELIM2.
22121
22122 2003-07-18  Bruno Haible  <bruno@clisp.org>
22123
22124         * lib/getndelim2.h: New file.
22125         * lib/getndelim2.c: Make into a module of its own. Include config.h,
22126         getndelim2.h.
22127         (getndelim2): Make non-static. Change return type to ssize_t.
22128         * lib/getline.h: Change argument names.
22129         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
22130         * lib/getnline.c: Include getndelim2.h.
22131
22132 2003-07-18  Andreas Schwab  <schwab@suse.de>
22133
22134         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
22135
22136 2003-07-17  Karl Berry  <karl@gnu.org>
22137
22138         * config/config.sub: update from prep.
22139
22140 2003-07-17  Bruno Haible  <bruno@clisp.org>
22141
22142         * modules/getnline: New file.
22143         * modules/getline: Add lib/getndelim2.c to source file list.
22144         * MODULES.html.sh (func_all_modules): Add getnline.
22145
22146 2003-07-17  Bruno Haible  <bruno@clisp.org>
22147
22148         * m4/getnline.m4: New file.
22149
22150 2003-07-17  Bruno Haible  <bruno@clisp.org>
22151
22152         * m4/Makefile.am.in: Remove file.
22153         * m4/Makefile.am: Remove file.
22154         * m4/Makefile.in: Remove file.
22155
22156 2003-07-17  Bruno Haible  <bruno@clisp.org>
22157
22158         * lib/getnline.h: New file.
22159         * lib/getnline.c: New file.
22160         * lib/getndelim2.c: New file, extracted from getline.c.
22161         (getndelim2): Renamed from getdelim2, with added nmax argument.
22162         * lib/getline.c: Include getndelim2.c.
22163         (getdelim2): Moved out to getndelim2.c.
22164         (getline, getdelim): Update.
22165
22166 2003-07-17  Bruno Haible  <bruno@clisp.org>
22167
22168         * lib/Makefile.am: Remove file.
22169         * lib/Makefile.in: Remove file.
22170
22171 2003-07-17  Bruno Haible  <bruno@clisp.org>
22172
22173         * configure.in: Remove file.
22174         * Makefile.in: Remove file.
22175
22176 2003-07-17  Bruno Haible  <bruno@clisp.org>
22177
22178         * MODULES.html.sh: Put the </BODY> right before </HTML>.
22179
22180 2003-07-16  Karl Berry  <karl@gnu.org>
22181
22182         * config/srclist-update: was running fixlicense twice, which caused
22183                 texinfo.tex to be nullified for some reason.  Simplify,
22184                 $gplsrc is no longer needed as far as I can see?
22185
22186 2003-07-16  Jim Meyering  <jim@meyering.net>
22187
22188         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
22189
22190 2003-07-15  Paul Eggert  <eggert@twinsun.com>
22191
22192         * config/srclist.txt: Get the following files from gettext-runtime/intl
22193         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
22194         ref-del.sin.  From Bruno Haible.
22195         * config/srclist-update (fixfile): Change grep pattern again, since the
22196         previous fix didn't work (there was another trailing $).  Use
22197         '[$]' to escape the $s.
22198
22199 2003-07-15  Karl Berry  <karl@gnu.org>
22200
22201         * lib/vasnprintf.c: update from gettext.
22202
22203 2003-07-15  Karl Berry  <karl@gnu.org>
22204
22205         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
22206         gets expanded when surrounded by '$'.
22207
22208 2003-07-15  Jim Meyering  <jim@meyering.net>
22209
22210         * modules/save-cwd: Don't depend on error.  From Derek Price.
22211
22212 2003-07-15  Jim Meyering  <jim@meyering.net>
22213
22214         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
22215
22216 2003-07-14  Simon Josefsson  <jas@extundo.com>
22217
22218         * modules/mempcpy: New file.
22219         * MODULES.html.sh (func_all_modules): Add mempcpy.
22220
22221 2003-07-14  Simon Josefsson  <jas@extundo.com>
22222
22223         * m4/mempcpy.m4: New file.
22224
22225 2003-07-14  Simon Josefsson  <jas@extundo.com>
22226
22227         * lib/mempcpy.h: New file.
22228         * lib/mempcpy.c: New file.
22229
22230 2003-07-14  Paul Eggert  <eggert@twinsun.com>
22231
22232         * modules/getdate, modules/posixtm: Depend on mktime.
22233
22234 2003-07-14  Paul Eggert  <eggert@twinsun.com>
22235
22236         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
22237         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
22238         unicodeio.c, unicodeio.h, unlocked-io.h:
22239         Switch from LGPL to GPL.
22240
22241 2003-07-14  Paul Eggert  <eggert@twinsun.com>
22242
22243         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
22244         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
22245         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
22246         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
22247         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
22248         updated automatically by ../config/srclist-update.  This changes
22249         their license from LPGL to GPL.
22250
22251 2003-07-14  Paul Eggert  <eggert@twinsun.com>
22252
22253         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
22254         assumed to refer to the root of the most recent stable gettext version.
22255         * config/srclistvars.sh: Add defaults for eggert.
22256         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
22257         Match "This program" as well as "The program".  This is needed
22258         for gettext.
22259
22260 2003-07-14  Jim Meyering  <jim@meyering.net>
22261
22262         Don't emit diagnostics.  Let callers do that.
22263         * lib/save-cwd.c: Don't include "error.h".
22264         (save_cwd): Don't call error.  Ensure that errno is valid
22265         when returning nonzero.
22266
22267         * lib/save-cwd.h (restore_cwd): Update prototype.
22268         * lib/save-cwd.c (restore_cwd): Remove two parameters.
22269         Simplify.  Don't call error upon failure.  Let callers do that.
22270         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
22271         when auditing is enabled.  But don't bother updating the #if.
22272
22273 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
22274
22275         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
22276         it breaks C++ compilation.
22277         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
22278
22279 2003-07-10  Simon Josefsson  <jas@extundo.com>
22280
22281         * modules/strchrnul (Makefile.am): Add strchrnul.h.
22282
22283 2003-07-10  Jim Meyering  <jim@meyering.net>
22284
22285         * m4/clock_time.m4: Remove trailing blank.
22286         * m4/intmax_t.m4: Likewise.
22287
22288 2003-07-10  Jim Meyering  <jim@meyering.net>
22289
22290         * lib/vasnprintf.c: Remove trailing blanks.
22291         Make cpp indentation consistent.
22292
22293 2003-07-09  Paul Eggert  <eggert@twinsun.com>
22294
22295         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
22296         posixver.c, strftime.c, strnlen.c, strverscmp.c:
22297         Switch from LGPL to GPL.
22298
22299 2003-07-09  Paul Eggert  <eggert@twinsun.com>
22300
22301         * config/srclist.txt: Sort sublists.  Add
22302         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
22303         that differ from gnulib for one reason or another; we'd like this list
22304         to be smaller but for now let's document what we have.
22305
22306 2003-07-08  Paul Eggert  <eggert@twinsun.com>
22307
22308         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
22309         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
22310         and sweeter "eval x=$x".
22311         * config/srclist.txt: Get lib/argp* from glibc.
22312
22313 2003-07-07  Paul Eggert  <eggert@twinsun.com>
22314
22315         * lib/mktime.c: Fix some boundary cases and remove need for floating
22316         point.
22317
22318         Issue a compile-time diagnostic if time_t is floating point, or if
22319         two's complement arithmetic is not in effect, or if arithmetic
22320         right shift does not propagate the sign.  These assumptions were
22321         all in the original code but they weren't checked.
22322
22323         (TIME_T_MIDPOINT, verify): New macros.
22324         (__isleap): Remove; it has integer overflow problems.
22325         (leapyear): New function, without those problems.
22326         (ydhms_tm_diff): Remove; splitting into two parts.
22327         (ydhms_diff): New function, containing the arithmetic part of
22328         the old ydhms_tm_diff function.  Issue a compile-time
22329         diagnostic if we are not using C99 integer division.
22330         Avoid casts when possible.
22331         (guess_time_tm): New function, containing the checking part of
22332         the old ydhms_tm_diff function.  Return the new value, rather than
22333         the difference between it and the old.  Accept a new argument T
22334         so that *T specifies the old value.  Check for overflow in the result.
22335
22336         (__mktime_internal): Use a time_t offset, not a long int offset.
22337         This undoes the 2003-06-04 change, which is no longer needed now
22338         that we have better overflow checking.
22339         (localtime_offset): Likewise.
22340
22341         (__mktime_internal): Avoid harmful overflow on hosts where time_t
22342         and long are 64-bit but int is only 32-bit.
22343         (ydhms_diff): Use long int to store year1 and yday1.
22344         Issue a compile-time diagnostic if long int is not wide enough.
22345
22346         (__mktime_internal): Use long int to store adjusted year and yday.
22347         Use plain C rather than preprocessor commands, if that doesn't
22348         affect efficiency.
22349         Check for overflow (and try to repair) after each probe
22350         rather than checking only at the very end.  This avoids some bugs
22351         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
22352         does not equal GMT offset at maximum time).
22353         Use integer to check for overflow rather than floating point; this
22354         is more portable to non-IEEE hosts, and is a tad faster.
22355         When we detect that we are oscillating between two values,
22356         don't check whether tm_isdst has the requested value, since
22357         we already know the answer.  When tm_isdst has the wrong value,
22358         use a different heuristic to find the right one, based on the
22359         extreme values actually observed in practice in tz2003a,
22360         rather than the (overly optimistic) "previous 3 calendar quarters".
22361
22362         (not_equal_tm, print_tm, check_result): Use "const T" rather than
22363         "T const" to accommodate glibc style.
22364         (check_result): Use less-confusing report format.  "long" -> "long int.
22365         (main): Likewise.
22366         Don't loop if the iteration overflows time_t.
22367         Allow a negative step in the iteration.
22368
22369 2003-07-06  Karl Berry  <karl@gnu.org>
22370
22371         * config/depcomp: update from automake.
22372         * config/config.sub: update from prep.
22373
22374 2003-07-03  Karl Berry  <karl@gnu.org>
22375
22376         * config/config.guess: update from prep.
22377
22378 2003-07-01  Paul Eggert  <eggert@twinsun.com>
22379
22380         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
22381         xreadlink.c now includes it unconditionally.
22382
22383 2003-07-01  Paul Eggert  <eggert@twinsun.com>
22384
22385         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
22386         having it depend on HAVE_SYS_TYPES_H.
22387
22388 2003-07-01  Bruno Haible  <bruno@clisp.org>
22389
22390         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
22391         <sys/types.h> should be sufficient.
22392         Reported by Paul Eggert.
22393
22394 2003-06-26  Karl Berry  <karl@gnu.org>
22395
22396         * config/depcomp: update from automake.
22397
22398 2003-06-26  Bruno Haible  <bruno@clisp.org>
22399
22400         * modules/human: Depend on module stdbool.
22401
22402 2003-06-25  Bruno Haible  <bruno@clisp.org>
22403
22404         * modules/readlink: New file.
22405         * modules/xreadlink: Depend on it.
22406         * MODULES.html.sh (func_all_modules): Add readlink.
22407
22408 2003-06-25  Bruno Haible  <bruno@clisp.org>
22409
22410         * m4/readlink.m4: New file.
22411
22412 2003-06-25  Bruno Haible  <bruno@clisp.org>
22413
22414         * lib/readlink.c: New file.
22415
22416 2003-06-22  Karl Berry  <karl@gnu.org>
22417
22418         * config/srclist.txt: update mkinstalldirs from automake.
22419         * config/mkinstalldirs: update.
22420
22421 2003-06-22  Bruno Haible  <bruno@clisp.org>
22422
22423         Portability to mingw32.
22424         * m4/ssize_t.m4: New file, from GNU gettext.
22425         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
22426         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
22427
22428 2003-06-22  Bruno Haible  <bruno@clisp.org>
22429
22430         * modules/safe-read: Add m4/ssize_t.m4.
22431         * modules/xreadlink: Add m4/ssize_t.m4.
22432
22433 2003-06-20  Bruno Haible  <bruno@clisp.org>
22434
22435         Assume C89, so PARAMS isn't needed.
22436         * lib/unicodeio.h (PARAMS): Remove.
22437         * lib/unicodeio.c: Don't use PARAMS.
22438
22439 2003-06-18  Karl Berry  <karl@gnu.org>
22440
22441         * config/config.{guess,sub}: update from prep.
22442
22443 2003-06-18  Jim Meyering  <jim@meyering.net>
22444
22445         Merge changes from coreutils.
22446         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
22447         Remove explicit declarations of xmalloc and realloc.
22448         Include xalloc.h.
22449         (read_utmp): Remove anachronistic cast of xmalloc.
22450
22451 2003-06-17  Paul Eggert  <eggert@twinsun.com>
22452
22453         Assume C89, so PARAMS isn't needed.
22454         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
22455         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
22456         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
22457         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
22458         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
22459         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
22460         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
22461         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
22462         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
22463         lib/xstrtod.h, lib/xstrtol.h: Likewise.
22464         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
22465         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
22466         no longer needed. Anyway, config.h should always be included before any
22467         other file.
22468
22469 2003-06-11  Simon Josefsson  <jas@extundo.com>
22470
22471         * modules/sysexits: New file.
22472         * MODULES.html.sh (func_all_modules): Add sysexits.
22473
22474 2003-06-11  Simon Josefsson  <jas@extundo.com>
22475
22476         * lib/sysexit_.h: New file.
22477
22478 2003-06-11  Derek Price  <derek@ximbiot.com>
22479
22480         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
22481         necessary.
22482
22483 2003-06-11  Bruno Haible  <bruno@clisp.org>
22484
22485         * m4/sysexits.m4: New file.
22486
22487 2003-06-10  Simon Josefsson  <jas@extundo.com>
22488
22489         * lib/argp.h: New file, from glibc.
22490         * lib/argp-ba.c: New file, from glibc.
22491         * lib/argp-eexst.c: New file, from glibc.
22492         * lib/argp-fmtstream.c: New file, from glibc.
22493         * lib/argp-fmtstream.h: New file, from glibc.
22494         * lib/argp-fs-xinl.c: New file, from glibc.
22495         * lib/argp-help.c: New file, from glibc.
22496         * lib/argp-namefrob.h: New file, from glibc.
22497         * lib/argp-parse.c: New file, from glibc.
22498         * lib/argp-pv.c: New file, from glibc.
22499         * lib/argp-pvh.c: New file, from glibc.
22500         * lib/argp-xinl.c: New file, from glibc.
22501
22502 2003-06-10  Simon Josefsson  <jas@extundo.com>
22503
22504         * modules/strchrnul: New file.
22505
22506 2003-06-10  Simon Josefsson  <jas@extundo.com>
22507
22508         * modules/argp: New file.
22509
22510 2003-06-10  Simon Josefsson  <jas@extundo.com>
22511
22512         * m4/strchrnul.m4: New file.
22513
22514 2003-06-10  Simon Josefsson  <jas@extundo.com>
22515
22516         * lib/strchrnul.h: New file.
22517         * lib/strchrnul.c: New file.
22518
22519 2003-06-10  Bruno Haible  <bruno@clisp.org>
22520
22521         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
22522
22523 2003-06-07  Karl Berry  <karl@gnu.org>
22524
22525         * config/config.{guess,sub}: update from prep.
22526
22527 2003-06-07  Jim Meyering  <jim@meyering.net>
22528
22529         * modules/strtod: Use $(...) notation, not @...@ for
22530         AC_REPLACE'd variables.
22531         * modules/localcharset: Likewise.
22532
22533 2003-06-07  Jim Meyering  <jim@meyering.net>
22534
22535         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
22536         in place of my name in the copyright comment.
22537         Remove definition and uses of __P.
22538
22539         From coreutils.
22540         * lib/stat.c: Don't declare xmalloc explicitly.
22541         Instead, include "xalloc.h".
22542         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
22543         xrealloc, and xcalloc return values.
22544         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
22545         Improve comment.
22546         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
22547
22548 2003-06-07  Bruno Haible  <bruno@clisp.org>
22549
22550         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
22551         avoid AC_CONFIG_LINKS.
22552         * modules/fnmatch (Makefile.am): Use explicit creation rule for
22553         fnmatch.h, to avoid AC_CONFIG_LINKS.
22554         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
22555
22556 2003-06-07  Bruno Haible  <bruno@clisp.org>
22557
22558         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
22559         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
22560         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
22561         directory.
22562         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
22563         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
22564         directory.
22565
22566 2003-06-06  Jim Meyering  <jim@meyering.net>
22567
22568         Merge from coreutils.
22569         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
22570         Consolidate declarations and initializations of *_base* locals.
22571
22572         Merge from coreutils.
22573         This avoids a core dump on systems without GNU putenv,
22574         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
22575         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
22576         (unsetenv): New static function, from GNU libc.
22577         (rpl_putenv): Use it.
22578
22579         * lib/modechange.c: Remove trailing blanks.
22580
22581         Merge from coreutils.
22582         * lib/fsusage.c: Remove declaration of statfs.
22583         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
22584
22585         * lib/posixtm.c: Include <stdbool.h> unconditionally.
22586
22587 2003-06-06  Jim Meyering  <jim@meyering.net>
22588
22589         * lib/stdbool_.h: Renamed from stdbool.h.in.
22590
22591 2003-06-06  Jim Meyering  <jim@meyering.net>
22592             Bruno Haible  <bruno@clisp.org>
22593
22594         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
22595         Adjust Makefile.am snippet not to redirect directly to target.
22596         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
22597
22598 2003-06-05  Paul Eggert  <eggert@twinsun.com>
22599
22600         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
22601         mismatch, look in future quarters as well as past.  This fixes a
22602         bug when processing fall-backwards gaps immediately after a long
22603         period of daylight-saving time.
22604
22605         * lib/mktime.c: Assume freestanding C89 or better.
22606         (HAVE_LIMITS_H): Remove.  Assume it's 1.
22607         (__P): Remove; not used.
22608         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
22609         (mktime, not_equal_tm, print_tm, check_result,
22610         main): Use prototypes.  Use const * where appropriate.
22611         (main): Fix typo in testing code that uncovered by above changes.
22612         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
22613
22614 2003-06-04  Paul Eggert  <eggert@twinsun.com>
22615
22616         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
22617         locale.h, localeconv.  This merges changes from coreutils.
22618
22619         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
22620         It can be removed after the next Autoconf is released.
22621         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
22622         needed.
22623
22624 2003-06-04  Paul Eggert  <eggert@twinsun.com>
22625
22626         * lib/mktime.c: Fix Debian bug 177940
22627         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
22628         (localtime_offset): Now long int, not time_t, because we want it
22629         to be guaranteed to be signed.  All uses changed.
22630         (__mktime_internal): If overflow would occur when adding offset,
22631         don't add it.
22632
22633         Merge 'human' changes from coreutils.  Rewrite to support
22634         locale-specific notations like thousands separators.
22635         * lib/human.c: Simplify authorship notice.
22636         Include human.h immediately after config.h.
22637         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
22638         <limits.h>: Do not include, since human.h does.
22639         (SIZE_MAX, UINTMAX_MAX): New macros.
22640         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
22641         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
22642         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
22643         (power_letter): Renamed from suffixes.
22644         (generate_suffix_backwards): Remove.
22645         (adjust_value): Now takes int style (because of human.h changes)
22646         and long double value (for greater precision on some platforms).
22647         (group_number): New function.
22648         (human_readable): Use it.  Use integer options, not enum.
22649         Put the options before the sizes in the arg list.
22650         Support all the new options.
22651         The old human_readable function has been removed;
22652         use inttostr.h instead.
22653         (human_readable, default_block_size, humblock):
22654         Use uintmax_t, not int, for block sizes.
22655         (human_readable_inexact, block_size_types): Remove.
22656         (block_size_opts): New constant.
22657         (human_options): Renamed from human_block_size, with new signature
22658         that allows block sizes up to UINTMAX_MAX.  All callers changed.
22659         * lib/human.h: Add copyright and authorship notice.
22660         Include <limits.h> and <stdbool.h> unconditionally.
22661         (PARAMS): Remove.  All uses removed.
22662         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
22663         (enum human_inexact_style): Remove tag; now a nameless enum.
22664         (human_floor, human_ceiling, human_round_to_even): Now have
22665         values 2, 0, 1 rather than -1, 1, 0.
22666         (human_group_digits, human_suppress_point_zero, human_autoscale,
22667         human_base_1024, human_SI, human_B): New constants.
22668         (human_readable_inexact, human_block_size): Remove.
22669         (human_readable): Size args are now uintmax_t, not int.
22670         (human_options): New decl.
22671
22672         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
22673         unnecessary now that we assume C89 or better.  This change
22674         imported from coreutils.
22675
22676         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
22677         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
22678         in the 2003-05-30 sync from glibc.
22679
22680         .h files should stand alone, but we shouldn't include <sys/types.h>
22681         if we can get away with just <stddef.h>.
22682
22683         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
22684         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
22685         rather than <sys/types.h>, as we merely need size_t.
22686         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
22687         to get size_t.
22688         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
22689         Include <stdio.h>, to get FILE.
22690         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
22691         memcasecmp.h has included <stddef.h> and all we need is size_t.
22692         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
22693         our interface, instead of including <sys/types.h>
22694
22695 2003-06-04  Paul Eggert  <eggert@twinsun.com>
22696
22697         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
22698         now, as glibc mktime is buggy on non-glibc systems.
22699
22700 2003-06-03  Karl Berry  <karl@gnu.org>
22701
22702         * config/config.sub: update from prep.
22703
22704 2003-06-02  Paul Eggert  <eggert@twinsun.com>
22705
22706         [from coreutils]
22707         Fix some minor time-related bugs with POSIX time arguments.
22708         Some valid time stamps were being rejected (notably -1, and
22709         time stamps before 1900 on 64-bit hosts).  And some invalid
22710         time stamps were being accepted, e.g. September 31.
22711
22712         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
22713         that we can return (time_t) -1 successfully.
22714         * lib/posixtm.c: Likewise.
22715         [HAVE_STDBOOL_H]: Include <stdbool.h>.
22716         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
22717         (t): Remove static var.
22718         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
22719         of static var.  All uses changed.
22720         (year): Do not reject years before 1900; they can occur with
22721         64-bit time_t.
22722         (posix_time_parse): Do not check for out-of-range components;
22723         that is now the caller's responsibility, since our checks were
22724         only approximations.
22725         (posixtime): Use mktime to check for out-of-range components,
22726         since it knows them exactly.
22727         If mktime returns (time_t) -1, check whether an error actually occurred
22728         by invoking localtime on -1.
22729         (main) [TEST_POSIXTIME]: Check for input data errors, and report
22730         posixtime failures better.
22731         Improve the test data (in comments only).
22732
22733 2003-06-02  Karl Berry  <karl@gnu.org>
22734
22735         * config/mkinstalldirs (version): new variable.
22736         (--version): new option.
22737         (usage): improve message.
22738
22739 2003-05-30  Karl Berry  <karl@gnu.org>
22740
22741         * lib/mktime.c: update from libc.
22742
22743 2003-05-30  Bruno Haible  <bruno@clisp.org>
22744
22745         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
22746         * config/config.rpath: Upgrade to gettext-0.12.1.
22747
22748 2003-05-30  Bruno Haible  <bruno@clisp.org>
22749
22750         * m4/gettext.m4: Upgrade to gettext-0.12.1.
22751         * m4/nls.m4: New file, from gettext-0.12.1.
22752         * m4/po.m4: New file, from gettext-0.12.1.
22753         * m4/progtest.m4: Upgrade to gettext-0.12.1.
22754
22755 2003-05-30  Bruno Haible  <bruno@clisp.org>
22756
22757         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
22758         * lib/localcharset.h: Likewise.
22759         * lib/localcharset.c: Likewise.
22760
22761 2003-05-29  Karl Berry  <karl@gnu.org>
22762
22763         * config/config.rpath: update from gettext.
22764
22765 2003-05-28  Paul Eggert  <eggert@twinsun.com>
22766
22767         Assume the headers required for C89 freestanding compilers.
22768         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
22769         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
22770         * m4/human.m4 (gl_HUMAN): Likewise.
22771         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
22772         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
22773         * m4/userspec.m4 (gl_USERSPEC): Likewise.
22774         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
22775         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
22776         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
22777
22778 2003-05-28  Paul Eggert  <eggert@twinsun.com>
22779
22780         Assume the headers required for C89 freestanding compilers.
22781         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
22782         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
22783         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
22784         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
22785         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
22786         define, since <limits.h> is guaranteed to do that.
22787         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
22788         * lib/exclude.c: Include <stdbool.h> unconditionally.
22789         * lib/tempname.c: Include <stddef.h> unconditionally.
22790         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
22791         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
22792         <stddef.h> does that.
22793         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
22794         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
22795         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
22796         needed.
22797         * lib/xstrtol.c: Likewise.
22798         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
22799         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
22800
22801         * lib/addext.c (addext): Use assignment rather than cast, to avoid
22802         warnings on some platforms.
22803
22804         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
22805         arbitrarily.
22806
22807 2003-05-26  Jim Meyering  <jim@meyering.net>
22808
22809         Merge in a change from coreutils:
22810         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
22811         that is guaranteed to be `no'.  Use `no_such_member' to indicate
22812         that condition, rather than `-1' which is slightly misleading.
22813         Change the name of the cache variable to have the gl_ prefix.
22814         Prompted by a patch from Richard Dawe for DJGPP.
22815
22816 2003-05-24  Karl Berry  <karl@gnu.org>
22817
22818         * config/config.guess: update from prep.
22819
22820 2003-05-22  Karl Berry  <karl@gnu.org>
22821
22822         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
22823
22824 2003-05-20  Karl Berry  <karl@gnu.org>
22825
22826         * config/config.guess: update from prep.
22827
22828 2003-05-18  Karl Berry  <karl@gnu.org>
22829
22830         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
22831         might actually be set by the user.
22832
22833         * config/depcomp, install-sh, mdate-sh: update from automake.
22834
22835 2003-05-17  Bruno Haible  <bruno@clisp.org>
22836
22837         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
22838         invalid expansion for AC_EGREP_CPP.
22839         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
22840         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
22841         Suggested by Akim Demaille <akim@epita.fr> in
22842         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
22843
22844 2003-05-12  Jim Meyering  <jim@meyering.net>
22845
22846         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
22847         the space-padded-by-default conversion specifiers, %e, %k, %l.
22848
22849 2003-05-12  Bruno Haible  <bruno@clisp.org>
22850
22851         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
22852         the string is longer than 4 KB.
22853
22854 2003-05-11  Karl Berry  <karl@gnu.org>
22855
22856         * config/config.{guess,sub}: update from prep.
22857
22858 2003-05-09  Bruno Haible  <bruno@clisp.org>
22859
22860         * modules/error: Add m4/strerror_r.m4 to file list.
22861
22862 2003-05-03  Bruno Haible  <bruno@clisp.org>
22863
22864         Upgrade to Unicode-4.0.
22865         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
22866         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
22867         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
22868         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
22869         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
22870         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
22871         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
22872         Change width of U+E0100..U+E01EF from 1 to 0.
22873
22874 2003-04-25  Jim Meyering  <jim@meyering.net>
22875
22876         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
22877         of type size_t, not int.
22878
22879 2003-04-25  Bruno Haible  <bruno@clisp.org>
22880
22881         * lib/copy-file.c: Include <stddef.h>, for size_t.
22882
22883 2003-04-21  Paul Eggert  <eggert@twinsun.com>
22884
22885         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
22886         code which expansion is under static control.  Patch imported from
22887         Akim Demaille's patch to Bison; see
22888         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
22889
22890 2003-04-14  Bruno Haible  <bruno@clisp.org>
22891
22892         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
22893
22894 2003-04-11  Jim Meyering  <jim@meyering.net>
22895
22896         Merge changes from Coreutils.
22897
22898         2003-03-22  Jim Meyering  <jim@meyering.net>
22899
22900         * lib/strftime.c (widen): Cast alloca return value to proper type.
22901
22902         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
22903
22904         From GNU libc.
22905         * lib/strftime.c (my_strftime): Handle very large width
22906         specifications for numeric values correctly.  Improve checks for
22907         overflow.
22908
22909         2003-01-19  Jim Meyering  <jim@meyering.net>
22910
22911         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
22912         definitions.
22913         (nl_get_alt_digit) [! defined my_strftime]: Define.
22914         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
22915         _nl_get_alt_digit and _nl_get_walt_digit.
22916
22917         * lib/strftime.c (my_strftime): Merge in locale-related changes from
22918         libc. These changes have no effect outside of _LIBC.
22919
22920 2003-04-10  Bruno Haible  <bruno@clisp.org>
22921
22922         * modules/findprog: New file.
22923         * MODULES.html.sh (func_all_modules): Add it.
22924
22925 2003-04-10  Bruno Haible  <bruno@clisp.org>
22926
22927         * m4/findprog.m4: New file.
22928         * m4/eaccess.m4: New file.
22929
22930 2003-04-10  Bruno Haible  <bruno@clisp.org>
22931
22932         * lib/findprog.h: New file, from GNU gettext.
22933         * lib/findprog.c: New file, from GNU gettext.
22934
22935 2003-04-05  Jim Meyering  <jim@meyering.net>
22936
22937         Merge changes from Coreutils.
22938
22939         * lib/exclude.h (PARAMS): Remove definition and uses.
22940         * lib/exclude.c: Remove uses of `PARAMS'.
22941
22942         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
22943         Add test-cases for DOS filenames. Declare program_name.
22944         (main): Set up program_name.  Patch by Rich Dawe.
22945
22946         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
22947         error from mntctl.
22948         Use mntctl's return value to drive the entry-processing loop, since
22949         we can't rely on the value of the vmt_length member in the last
22950         entry.  On some systems doing so could result in exhausting
22951         virtual memory.  Based in part on a patch from Mike Jetzer.
22952
22953 2003-04-04  Bruno Haible  <bruno@clisp.org>
22954
22955         * modules/linebreak: New file.
22956         * MODULES.html.sh (func_all_modules): Add it.
22957
22958 2003-04-04  Bruno Haible  <bruno@clisp.org>
22959
22960         * m4/linebreak.m4: New file.
22961
22962 2003-04-04  Bruno Haible  <bruno@clisp.org>
22963
22964         * lib/linebreak.h: New file, from GNU gettext.
22965         * lib/linebreak.c: New file, from GNU gettext with slight
22966         modifications.
22967         * lib/lbrkprop.h: New file, from GNU gettext.
22968
22969 2003-04-03  Bruno Haible  <bruno@clisp.org>
22970
22971         * modules/utf8-ucs4: New file.
22972         * modules/utf16-ucs4: New file.
22973         * modules/ucs4-utf8: New file.
22974         * modules/ucs4-utf16: New file.
22975         * MODULES.html.sh (func_all_modules): Add them.
22976
22977 2003-04-03  Bruno Haible  <bruno@clisp.org>
22978
22979         * m4/utf-ucs4.m4: New file.
22980         * m4/ucs4-utf.m4: New file.
22981
22982 2003-04-03  Bruno Haible  <bruno@clisp.org>
22983
22984         * lib/utf8-ucs4.h: New file, from GNU gettext.
22985         * lib/utf16-ucs4.h: New file, from GNU gettext.
22986         * lib/ucs4-utf8.h: New file, from GNU gettext.
22987         * lib/ucs4-utf16.h: New file, from GNU gettext.
22988
22989 2003-04-02  Bruno Haible  <bruno@clisp.org>
22990
22991         * modules/binary-io: New file.
22992         * MODULES.html.sh (func_all_modules): Add it.
22993
22994 2003-04-02  Bruno Haible  <bruno@clisp.org>
22995
22996         * lib/binary-io.h: New file, from GNU gettext.
22997
22998 2003-04-01  Bruno Haible  <bruno@clisp.org>
22999
23000         * modules/pathname: New file.
23001         * MODULES.html.sh (func_all_modules): Add it.
23002
23003 2003-04-01  Bruno Haible  <bruno@clisp.org>
23004
23005         * lib/pathname.h: New file, from GNU gettext.
23006         * lib/concatpath.c: New file, from GNU gettext.
23007
23008 2003-03-30  Bruno Haible  <bruno@clisp.org>
23009
23010         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
23011
23012 2003-03-30  Bruno Haible  <bruno@clisp.org>
23013
23014         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
23015         function chown() doesn't exist.
23016
23017 2003-03-28  Bruno Haible  <bruno@clisp.org>
23018
23019         * modules/copy-file: New file.
23020         * MODULES.html.sh (func_all_modules): Add it.
23021
23022 2003-03-28  Bruno Haible  <bruno@clisp.org>
23023
23024         * m4/copy-file.m4: New file.
23025
23026 2003-03-28  Bruno Haible  <bruno@clisp.org>
23027
23028         * lib/copy-file.h: New file, from GNU gettext.
23029         * lib/copy-file.c: New file, from GNU gettext.
23030
23031 2003-03-18  Jim Meyering  <jim@meyering.net>
23032
23033         * lib/quote.c (quote_n): Fix typo in comment.
23034
23035 2003-03-18  Bruno Haible  <bruno@clisp.org>
23036
23037         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
23038         checking.
23039         * m4/onceonly_2_57.m4: Likewise.
23040
23041 2003-03-17  Bruno Haible  <bruno@clisp.org>
23042
23043         * m4/onceonly.m4: Require autoconf 2.54 or newer.
23044         (m4_quote): Remove macro.
23045         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
23046
23047 2003-03-14  Jim Meyering  <jim@meyering.net>
23048
23049         Merge changes from Coreutils.
23050         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
23051         to be const, in order to avoid warnings.
23052         (obstack_room): Likewise.
23053         (obstack_empty_p): Likewise.
23054
23055 2003-03-14  Bruno Haible  <bruno@clisp.org>
23056
23057         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
23058         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
23059
23060 2003-03-13  Paul Eggert  <eggert@twinsun.com>
23061
23062         Merge changes from Bison.
23063         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
23064         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
23065         when compiling Bison 1.875's `bitset bset = obstack_alloc
23066         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
23067         * lib/hash.c: Include <stdbool.h> unconditionally.
23068
23069 2003-03-13  Paul Eggert  <eggert@twinsun.com>
23070
23071         * m4/onceonly.m4 (m4_quote): New macro.
23072         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
23073         Quote AC_FOREACH variable-expansions properly.
23074
23075 2003-03-13  Paul Eggert  <eggert@twinsun.com>
23076
23077         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
23078
23079 2003-03-09  Paul Eggert  <eggert@twinsun.com>
23080
23081         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
23082         Reported by Bruce Becker; see:
23083         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
23084
23085 2003-03-03  Paul Eggert  <eggert@twinsun.com>
23086             Bruno Haible  <bruno@clisp.org>
23087
23088         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
23089         Reported by John Hughes, see
23090         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
23091
23092 2003-02-20  Bruno Haible  <bruno@clisp.org>
23093
23094         * MODULES.html.sh (func_all_modules): Add poll.
23095
23096 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
23097
23098         * modules/poll: New file.
23099
23100 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
23101
23102         * lib/poll_.h: New file.
23103         * lib/poll.c: New file.
23104
23105 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
23106
23107         * m4/poll.m4: New file.
23108
23109 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
23110
23111         * modules/mathl: New file.
23112
23113 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
23114
23115         * lib/mathl.h: New file.
23116         * lib/acosl.c: New file.
23117         * lib/asinl.c: New file.
23118         * lib/atanl.c: New file.
23119         * lib/ceill.c: New file.
23120         * lib/cosl.c: New file.
23121         * lib/expl.c: New file.
23122         * lib/floorl.c: New file.
23123         * lib/frexpl.c: New file.
23124         * lib/ldexpl.c: New file.
23125         * lib/logl.c: New file.
23126         * lib/sincosl.c: New file.
23127         * lib/sinl.c: New file.
23128         * lib/sqrtl.c: New file.
23129         * lib/tanl.c: New file.
23130         * lib/trigl.c: New file.
23131         * lib/trigl.h: New file.
23132
23133 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
23134
23135         * m4/mathl.m4: New file.
23136
23137 2003-02-18  Bruno Haible  <bruno@clisp.org>
23138
23139         * MODULES.html.sh (func_all_modules): Add mathl.
23140
23141 2003-02-17  Bruno Haible  <bruno@clisp.org>
23142
23143         * modules/mkdtemp: New module.
23144         * MODULES.html.sh (func_all_modules): Add it.
23145
23146 2003-02-17  Bruno Haible  <bruno@clisp.org>
23147
23148         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
23149
23150 2003-02-17  Bruno Haible  <bruno@clisp.org>
23151
23152         * lib/mkdtemp.h: New file, from GNU gettext.
23153         * lib/mkdtemp.c: New file, from GNU gettext.
23154
23155 2003-02-02  Jim Meyering  <jim@meyering.net>
23156
23157         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
23158         e.g. glibc-2.2.93.
23159
23160 2003-01-31  Bruno Haible  <bruno@clisp.org>
23161
23162         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
23163         'rpl_rename'.
23164         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
23165         'rpl_strnlen'.
23166         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
23167         'rpl_strtod'.
23168         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
23169         'rpl_utime'.
23170
23171 2003-01-31  Bruno Haible  <bruno@clisp.org>
23172
23173         * lib/rename.c: #undef rename before defining rpl_rename.
23174         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
23175
23176 2003-01-30  Bruno Haible  <bruno@clisp.org>
23177
23178         * modules/vasnprintf, modules/vasprintf: New modules.
23179         * MODULES.html.sh (func_all_modules): Add them.
23180
23181 2003-01-30  Bruno Haible  <bruno@clisp.org>
23182
23183         * m4/signed.m4: New file, from GNU gettext.
23184         * m4/longdouble.m4: New file, from GNU gettext.
23185         * m4/wchar_t.m4: New file, from GNU gettext.
23186         * m4/wint_t.m4: New file, from GNU gettext.
23187         * m4/vasnprintf.m4: New file.
23188         * m4/vasprintf.m4: New file.
23189
23190 2003-01-30  Bruno Haible  <bruno@clisp.org>
23191
23192         * lib/printf-args.h: New file, from GNU gettext.
23193         * lib/printf-args.c: New file, from GNU gettext.
23194         * lib/printf-parse.h: New file, from GNU gettext.
23195         * lib/printf-parse.c: New file, from GNU gettext.
23196         * lib/vasnprintf.h: New file, from GNU gettext.
23197         * lib/vasnprintf.c: New file, from GNU gettext.
23198         * lib/asnprintf.c: New file, from GNU gettext.
23199         * lib/vasprintf.h: New file, from GNU gettext with modifications.
23200         * lib/vasprintf.c: New file, from GNU gettext.
23201         * lib/asprintf.c: New file, from GNU gettext.
23202
23203 2003-01-29  Bruno Haible  <bruno@clisp.org>
23204
23205         * modules/stpncpy: New module.
23206         * MODULES.html.sh (func_all_modules): Add it.
23207
23208 2003-01-29  Bruno Haible  <bruno@clisp.org>
23209
23210         * m4/stpncpy.m4: New file.
23211
23212 2003-01-29  Bruno Haible  <bruno@clisp.org>
23213
23214         * lib/stpncpy.h: New file, from GNU gettext with modifications.
23215         * lib/stpncpy.c: New file, from GNU gettext with modifications.
23216
23217 2003-01-28  Bruno Haible  <bruno@clisp.org>
23218
23219         * modules/c-ctype: New module.
23220         * MODULES.html.sh (func_all_modules): Add it.
23221
23222 2003-01-28  Bruno Haible  <bruno@clisp.org>
23223
23224         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
23225         Paul Eggert.
23226         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
23227         Paul Eggert.
23228
23229 2003-01-27  Bruno Haible  <bruno@clisp.org>
23230
23231         * modules/xsetenv: New module.
23232         * MODULES.html.sh (func_all_modules): Add it.
23233
23234 2003-01-27  Bruno Haible  <bruno@clisp.org>
23235
23236         * lib/xsetenv.h: New file, from GNU gettext.
23237         * lib/xsetenv.c: New file, from GNU gettext.
23238
23239 2003-01-23  Jim Meyering  <jim@meyering.net>
23240
23241         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
23242         from working on systems without dirfd (at least Irix and OSF1/Tru64).
23243
23244 2003-01-23  Bruno Haible  <bruno@clisp.org>
23245
23246         * modules/minmax: New module.
23247         * MODULES.html.sh (func_all_modules): Add it.
23248
23249 2003-01-23  Bruno Haible  <bruno@clisp.org>
23250
23251         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
23252         Eggert.
23253
23254 2003-01-22  Bruno Haible  <bruno@clisp.org>
23255
23256         * modules/exit: New module.
23257         * MODULES.html.sh (func_all_modules): Add it.
23258
23259 2003-01-22  Bruno Haible  <bruno@clisp.org>
23260
23261         * lib/exit.h: New file, from GNU gettext.
23262
23263 2003-01-19  Bruno Haible  <bruno@clisp.org>
23264
23265         * gnulib-tool: Recognize option --extract-maintainer.
23266         (func_get_maintainer): New function.
23267         * modules/*: Add Maintainer entry.
23268
23269 2003-01-16  Jim Meyering  <jim@meyering.net>
23270
23271         * m4/regex.m4: The `regex' struct is both input and output.
23272         Initialize it before each use.  Patch by Tim Waugh.
23273
23274 2003-01-16  Bruno Haible  <bruno@clisp.org>
23275
23276         * MODULES.html.sh: Add a table of contents. Add the module name as
23277         leftmost column. Add hyperlinks.
23278
23279 2003-01-15  Bruno Haible  <bruno@clisp.org>
23280
23281         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
23282
23283 2003-01-15  Bruno Haible  <bruno@clisp.org>
23284
23285         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
23286         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
23287         suffix.
23288
23289 2003-01-15  Bruno Haible  <bruno@clisp.org>
23290
23291         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
23292
23293 2003-01-15  Bruno Haible  <bruno@clisp.org>
23294
23295         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
23296         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
23297
23298 2003-01-14  Jim Meyering  <jim@meyering.net>
23299
23300         * lib/same.c (same_name): Tweak a comment.
23301
23302 2003-01-14  Bruno Haible  <bruno@clisp.org>
23303
23304         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
23305         when a string comparison is sufficient.
23306
23307 2003-01-14  Bruno Haible  <bruno@clisp.org>
23308
23309         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
23310         'unsigned int'.
23311
23312 2003-01-14  Bruno Haible  <bruno@clisp.org>
23313
23314         * lib/hash-pjw.c: Add comment about low quality of this function.
23315
23316 2003-01-13  Bruno Haible  <bruno@clisp.org>
23317
23318         * modules/stpcpy: Distribute lib/stpcpy.h.
23319         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
23320
23321 2003-01-13  Bruno Haible  <bruno@clisp.org>
23322
23323         * modules/*: Add a description.
23324         * modules/strpbrk: Fix Makefile.am snippet.
23325         * modules/strtoimax: Fix dependencies.
23326         * modules/strtoumax: Likewise.
23327
23328 2003-01-13  Bruno Haible  <bruno@clisp.org>
23329
23330         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
23331         * modules/alloca (Makefile.am): All object files depend on alloca.h.
23332         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
23333
23334 2003-01-13  Bruno Haible  <bruno@clisp.org>
23335
23336         * gnulib-tool (func_create_testdir): Store config/* files in the main
23337         directory.
23338         * config.rpath: Move to ...
23339         * config/config.rpath: ... here.
23340         * modules/gettext: Contains config/config.rpath, not config.rpath.
23341         * modules/iconv: Likewise.
23342
23343 2003-01-12  Paul Eggert  <eggert@twinsun.com>
23344
23345         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
23346         to avoid collisions with libcurses and libreadline.
23347
23348         * m4/getstr.m4: Remove.
23349         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
23350
23351 2003-01-12  Paul Eggert  <eggert@twinsun.com>
23352
23353         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
23354         to avoid collisions with libcurses and libreadline.
23355
23356         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
23357         * lib/getstr.h, getstr.c: Remove.
23358         * lib/getline.c: Include "getline.h", to check interface.
23359         Move body of old getstr.c here: this defines MIN_CHUNK and
23360         declares getdelim2, which is renamed from getstr.
23361         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
23362
23363         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
23364         All uses changed.
23365         * lib/linebuffer.h: Likewise.
23366         (readline): Remove backward-compatibility macro.
23367
23368 2003-01-12  Paul Eggert  <eggert@twinsun.com>
23369
23370         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
23371         to avoid collisions with libcurses and libreadline.
23372         * getstr: Remove.
23373         * MODULES.html.sh: Remove getstr.
23374         * modules/getline: Depend on unlocked-io, not getstr.
23375
23376 2003-01-12  Jim Meyering  <jim@meyering.net>
23377
23378         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
23379
23380 2003-01-10  Bruno Haible  <bruno@clisp.org>
23381
23382         * modules/alloca: Change Makefile.am requirements. Simplify Include
23383         requirements. Add lib/alloca_.h to file list.
23384
23385 2003-01-10  Bruno Haible  <bruno@clisp.org>
23386
23387         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
23388
23389 2003-01-10  Bruno Haible  <bruno@clisp.org>
23390
23391         * lib/alloca_.h: New file.
23392         * lib/getdate.y: Unconditionally include alloca.h.
23393         * lib/makepath.c: Likewise.
23394         * lib/setenv.c: Likewise.
23395         * lib/userspec.c: Likewise.
23396
23397 2003-01-09  Karl Berry  <karl@gnu.org>
23398
23399         * MODULES.html.sh: include `dirname $0` in PATH, to find
23400         gnulib-tool.
23401
23402 2003-01-09  Bruno Haible  <bruno@clisp.org>
23403
23404         * modules/stdbool: Change configure.ac, Makefile.am requirements.
23405         Simplify Include requirements. Add lib/stdbool.h.in to file list.
23406
23407 2003-01-09  Bruno Haible  <bruno@clisp.org>
23408
23409         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
23410
23411 2003-01-09  Bruno Haible  <bruno@clisp.org>
23412
23413         * lib/stdbool.h.in: New file.
23414
23415 2003-01-09  Bruno Haible  <bruno@clisp.org>
23416
23417         * gnulib-tool (func_all_modules): Ignore files ending in ~.
23418         * MODULES.html.sh: Likewise.
23419
23420 2003-01-08  Jim Meyering  <jim@meyering.net>
23421
23422         * lib/full-write.c: Undefine and define-away `const' after inclusion
23423         of errno.h, not before.  Suggestion from Bruno Haible.
23424
23425 2003-01-08  Bruno Haible  <bruno@clisp.org>
23426
23427         * modules/full-read: Depend on full-write.
23428
23429 2003-01-08  Bruno Haible  <bruno@clisp.org>
23430
23431         * lib/safe-read.c: Include specification header first, to ensure its
23432         selfcontainedness.
23433         * lib/full-write.c: Likewise.
23434
23435 2003-01-07  Jim Meyering  <jim@meyering.net>
23436
23437         * lib/full-write.c: Rework so that it may serve to define full_read,
23438         too.
23439         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
23440
23441 2003-01-07  Bruno Haible  <bruno@clisp.org>
23442
23443         * lib/strtoimax.c: Include <stdint.h> as an alternative to
23444         <inttypes.h>.
23445         * lib/xstrtol.h: Likewise.
23446         * lib/xstrtoimax.c: Likewise.
23447         * lib/xstrtoumax.c: Likewise.
23448         * lib/human.h: Likewise.
23449
23450         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
23451         on systems that have <inttypes.h> but not <stdint.h>.
23452
23453 2003-01-07  Bruno Haible  <bruno@clisp.org>
23454
23455         * MODULES.html.sh: Add copyright notice.
23456         (missed_files): Omit CVS directory entries.
23457         (func_module): Make it work with sed-3.02.
23458         * MODULES.txt: Remove file.
23459
23460 2003-01-06  Jim Meyering  <jim@meyering.net>
23461
23462         * lib/version-etc.c: Update year in translatable copyright string.
23463
23464 2003-01-03  Karl Berry  <karl@gnu.org>
23465
23466         * config/config.{guess,sub}: update from prep.
23467
23468 2003-01-02  Karl Berry  <karl@gnu.org>
23469
23470         * doc/COPYING.DOC: belatedly updated to 1.2.
23471
23472 2003-01-01  Karl Berry  <karl@gnu.org>
23473
23474         * gnulib-tool (func_verify_module): report module name $module in
23475         error message, not $1.
23476         * gnulib-tool (create-testdir): don't complain if destdir couldn't
23477         be created, only if it doesn't exist.
23478         * gnulib-tool (last_checkin_date): don't expand the $Date here.
23479
23480 2002-12-31  Paul Eggert  <eggert@twinsun.com>
23481
23482         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
23483
23484 2002-12-31  Paul Eggert  <eggert@twinsun.com>
23485
23486         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
23487         memcmp if strcoll doesn't work.
23488
23489 2002-12-31  Bruno Haible  <bruno@clisp.org>
23490
23491         * lib/utime.c (utime_null): No need to call ftruncate if the file was
23492         nonempty.
23493
23494 2002-12-31  Bruno Haible  <bruno@clisp.org>
23495
23496         * lib/memcoll.c (STRCOLL): New macro.
23497         (memcoll): Use it.
23498
23499 2002-12-31  Bruno Haible  <bruno@clisp.org>
23500
23501         * lib/localcharset.h: New file.
23502         * lib/localcharset.c: Include it.
23503         * lib/unicodeio.c: Likewise.
23504
23505 2002-12-31  Bruno Haible  <bruno@clisp.org>
23506
23507         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
23508         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
23509
23510 2002-12-31  Bruno Haible  <bruno@clisp.org>
23511
23512         * lib/getline.h: Include <stddef.h>, for size_t.
23513
23514         * lib/unicodeio.h: Include <stddef.h>, for size_t.
23515         * lib/unicodeio.c: Don't include <stddef.h>.
23516
23517 2002-12-31  Bruno Haible  <bruno@clisp.org>
23518
23519         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
23520         HAVE_TM_ZONE.
23521
23522 2002-12-24  Karl Berry  <karl@gnu.org>
23523
23524         * config/config.guess: update from prep.
23525
23526 2002-12-24  Bruno Haible  <bruno@clisp.org>
23527
23528         General infrasructure.
23529         * m4/README: Rewritten.
23530         * m4/onceonly.m4: New file.
23531         * m4/onceonly_2_57.m4: New file.
23532
23533         Module atexit.
23534         * m4/atexit.m4: New file.
23535
23536         Module strtod.
23537         * m4/strtod.m4: New file.
23538
23539         Module strtol.
23540         * m4/strtol.m4: New file.
23541
23542         Module strtoul.
23543         * m4/strtoul.m4: New file.
23544
23545         Module memchr.
23546         * m4/memchr.m4: New file.
23547
23548         Module memcmp.
23549         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
23550         (jm_FUNC_MEMCMP): Invoke it.
23551
23552         Module memcpy.
23553         * m4/memcpy.m4: New file.
23554
23555         Module memmove.
23556         * m4/memmove.m4: New file.
23557
23558         Module memset.
23559         * m4/memset.m4: New file.
23560
23561         Module strcspn.
23562         * m4/strcspn.m4: New file.
23563
23564         Module strpbrk.
23565         * m4/strpbrk.m4: New file.
23566
23567         Module strstr.
23568         * m4/strstr.m4: New file.
23569
23570         Module strerror.
23571         * m4/strerror.m4: New file.
23572
23573         Module mktime.
23574         * m4/mktime.m4: Renamed from jm-mktime.m4.
23575         (gl_PREREQ_MKTIME): New macro.
23576         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
23577
23578         Module malloc.
23579         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
23580         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
23581         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
23582
23583         Module realloc.
23584         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
23585         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
23586         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
23587
23588         Module strftime.
23589         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
23590         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
23591         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
23592         gl_TM_GMTOFF.
23593         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
23594
23595         Module xalloc.
23596         * m4/xalloc.m4: New file.
23597
23598         Module alloca.
23599         * m4/alloca.m4: New file.
23600
23601         Module putenv.
23602         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
23603         (jm_FUNC_PUTENV): Invoke it.
23604
23605         Module setenv.
23606         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
23607         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
23608         when invoked twice.
23609         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
23610         gt_FUNC_SETENV.
23611
23612         Module memrchr.
23613         * m4/memrchr.m4: New file.
23614
23615         Module stpcpy.
23616         * m4/stpcpy.m4: New file.
23617
23618         Module strcase.
23619         * m4/strcase.m4: New file.
23620
23621         Module strdup.
23622         * m4/strdup.m4: New file.
23623
23624         Module strnlen.
23625         * m4/strnlen.m4: New file.
23626
23627         Module strndup.
23628         * m4/strndup.m4: New file.
23629
23630         Module xstrtod.
23631         * m4/xstrtod.m4: New file.
23632
23633         Module xstrtol.
23634         * m4/xstrtol.m4: New file.
23635
23636         Module getdate.
23637         * m4/getdate.m4: New file.
23638
23639         Module unlocked-io.
23640         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
23641         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
23642         * m4/jm-glibc-io.m4n: Remove file.
23643
23644         Module long-options.
23645         * m4/long-options.m4: New file.
23646
23647         Module md5.
23648         * m4/md5.m4: New file.
23649
23650         Module sha.
23651         * m4/sha.m4: New file.
23652
23653         Module getstr.
23654         * m4/getstr.m4: New file.
23655
23656         Module getline.
23657         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
23658         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
23659         <sys/types.h>, for size_t. Use the function name gnu_getline, not
23660         simply getline. Infoke gl_PREREQ_GETLINE.
23661
23662         Module obstack.
23663         * m4/obstack.m4: New file.
23664
23665         Module hash.
23666         * m4/hash.m4: New file.
23667
23668         Module readtokens.
23669         * m4/readtokens.m4: New file.
23670
23671         Module strverscmp.
23672         * m4/strverscmp.m4: New file.
23673
23674         Module stdbool.
23675         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
23676         OSF/1.
23677
23678         Module strtoll.
23679         * m4/strtoll.m4: New file.
23680
23681         Module strtoull.
23682         * m4/strtoull.m4: New file.
23683
23684         Module strtoimax.
23685         * m4/strtoimax.m4: New file.
23686
23687         Module strtoumax.
23688         * m4/strtoumax.m4: New file.
23689
23690         Module xstrtoimax.
23691         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
23692         jm_AC_PREREQ_XSTRTOIMAX.
23693         Moved the strtol prerequisites to strtol.m4.
23694         Moved the strtoll prerequisites to strtoll.m4.
23695         Moved the strtoimax prerequisites to strtoimax.m4.
23696
23697         Module xstrtoumax.
23698         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
23699         jm_AC_PREREQ_XSTRTOUMAX.
23700         Moved the strtoul prerequisites to strtoul.m4.
23701         Moved the strtoull prerequisites to strtoull.m4.
23702         Moved the strtoumax prerequisites to strtoumax.m4.
23703
23704         Module chown.
23705         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
23706         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
23707
23708         Module dup2.
23709         * m4/dup2.m4: New file.
23710
23711         Module ftruncate.
23712         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
23713         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
23714
23715         Module getgroups.
23716         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
23717         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
23718
23719         Module gettimeofday.
23720         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
23721         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
23722         gl_PREREQ_GETTIMEOFDAY.
23723
23724         Module mkdir.
23725         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
23726         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
23727
23728         Module mkstemp.
23729         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
23730         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
23731         jm_AC_TYPE_UINTMAX_T.
23732         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
23733
23734         Module stat.
23735         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
23736         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
23737
23738         Module lstat.
23739         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
23740         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
23741
23742         Module timespec.
23743         * m4/timespec.m4 (gl_TIMESPEC): New macro.
23744         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
23745         * m4/st_mtim.m4: Indentation.
23746
23747         Module nanosleep.
23748         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
23749         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
23750         gl_PREREQ_NANOSLEEP.
23751
23752         Module regex.
23753         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
23754         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
23755         (gl_REGEX): New macro.
23756
23757         Module rename.
23758         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
23759         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
23760
23761         Module rmdir.
23762         * m4/rmdir.m4: New file.
23763
23764         Module utime.
23765         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
23766         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
23767         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
23768
23769         Module dirname.
23770         * m4/dirname.m4: New file.
23771
23772         Module getopt.
23773         * m4/getopt.m4: New file.
23774
23775         Module unistd-safer.
23776         * m4/unistd-safer.m4: New file.
23777
23778         Module fnmatch.
23779         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
23780         declaration.
23781         (gl_PREREQ_FNMATCH_EXTRA): New macro.
23782         (gl_FUNC_FNMATCH_POSIX): New macro.
23783         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
23784         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
23785         simply fnmatch.
23786
23787         Module exclude.
23788         * m4/exclude.m4: New file.
23789
23790         Module human.
23791         * m4/human.m4: New file.
23792
23793         Module acl.
23794         * m4/acl.m4: Nop.
23795
23796         Module backupfile.
23797         * m4/backupfile.m4: New file.
23798         * m4/d-ino.m4: Indentation.
23799
23800         Module fsusage.
23801         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
23802         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
23803         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
23804
23805         Module dirfd.
23806         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
23807         requirements.
23808
23809         Module euidaccess.
23810         * m4/euidaccess.m4: New file.
23811
23812         Module file-type.
23813         * m4/file-type.m4: New file.
23814
23815         Module fileblocks.
23816         * m4/fileblocks.m4: New file.
23817
23818         Module filemode.
23819         * m4/filemode.m4: New file.
23820
23821         Module isdir.
23822         * m4/isdir.m4: New file.
23823
23824         Module lchown.
23825         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
23826         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
23827
23828         Module makepath.
23829         * m4/makepath.m4: New file.
23830
23831         Module modechange.
23832         * m4/modechange.m4: New file.
23833
23834         Module mountlist.
23835         * m4/mountlist.m4: New file.
23836         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
23837         Indentation.
23838
23839         Module path-concat.
23840         * m4/path-concat.m4: New file.
23841
23842         Module pathmax.
23843         * m4/pathmax.m4: New file.
23844
23845         Module same.
23846         * m4/same.m4: New file.
23847
23848         Module save-cwd.
23849         * m4/save-cwd.m4: New file.
23850
23851         Module savedir.
23852         * m4/savedir.m4: New file.
23853
23854         Module xgetcwd.
23855         * m4/xgetcwd.m4: New file.
23856         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
23857
23858         Module xreadlink.
23859         * m4/xreadlink.m4: New file.
23860
23861         Module safe-read.
23862         * m4/safe-read.m4: New file.
23863
23864         Module safe-write.
23865         * m4/safe-write.m4: New file.
23866
23867         Module closeout.
23868         * m4/closeout.m4: New file.
23869
23870         Module stdio-safer.
23871         * m4/stdio-safer.m4: New file.
23872
23873         Module getpass.
23874         * m4/getpass.m4: New file.
23875
23876         Module getugroups.
23877         * m4/getugroups.m4: New file.
23878
23879         Module group-member.
23880         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
23881         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
23882
23883         Module idcache.
23884         * m4/idcache.m4: New file.
23885
23886         Module userspec.
23887         * m4/userspec.m4: New file.
23888
23889         Module gettime.
23890         * m4/clock_time.m4: New file.
23891         * m4/gettime.m4: New file.
23892
23893         Module settime.
23894         * m4/settime.m4: New file.
23895
23896         Module posixtm.
23897         * m4/posixtm.m4: New file.
23898
23899         Module gethostname.
23900         * m4/gethostname.m4: New file.
23901
23902         Module canon-host.
23903         * m4/canon-host.m4: New file.
23904
23905         Module gettext.
23906         * m4/codeset.m4: New file, from gettext-0.11.5.
23907         * m4/gettext.m4: New file, from gettext-0.11.5.
23908         * m4/glibc21.m4: New file, from gettext-0.11.5.
23909         * m4/iconv.m4: New file, from gettext-0.11.5.
23910         * m4/intdiv0.m4: New file, from gettext-0.11.5.
23911         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
23912         * m4/inttypes.m4: New file, from gettext-0.11.5.
23913         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
23914         * m4/isc-posix.m4: New file, from gettext-0.11.5.
23915         * m4/lcmessage.m4: New file, from gettext-0.11.5.
23916         * m4/lib-ld.m4: New file, from gettext-0.11.5.
23917         * m4/lib-link.m4: New file, from gettext-0.11.5.
23918         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
23919         * m4/progtest.m4: New file, from gettext-0.11.5.
23920         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
23921         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
23922         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
23923
23924         Module localcharset.
23925         * m4/localcharset.m4: New file.
23926
23927         Module hard-locale.
23928         * m4/hard-locale.m4: New file.
23929
23930         Module mbswidth.
23931         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
23932         onceonly macros.
23933         * m4/mbrtowc.m4: Add comment.
23934
23935         Module memcasecmp.
23936         * m4/memcasecmp.m4: New file.
23937
23938         Module memcoll.
23939         * m4/memcoll.m4: New file.
23940
23941         Module unicodeio.
23942         * m4/unicodeio.m4: New file.
23943
23944         Module rpmatch.
23945         * m4/rpmatch.m4: New file.
23946
23947         Module yesno.
23948         * m4/yesno.m4: New file.
23949
23950         Module exitfail.
23951         * m4/exitfail.m4: New file.
23952
23953         Module c-stack.
23954         * m4/c-stack.m4 (gl_C_STACK): New macro.
23955         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
23956
23957         Module error.
23958         * m4/error.m4 (gl_ERROR): New macro.
23959         (jm_PREREQ_ERROR): Use onceonly macros.
23960
23961         Module fatal.
23962         * m4/fatal.m4: New file.
23963
23964         Module getloadavg.
23965         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
23966         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
23967
23968         Module getpagesize.
23969         * m4/getpagesize.m4: New file.
23970
23971         Module getusershell.
23972         * m4/getusershell.m4: New file.
23973
23974         Module physmem.
23975         * m4/physmem.m4: New file.
23976
23977         Module posixver.
23978         * m4/posixver.m4: New file.
23979
23980         Module quotearg.
23981         * m4/quotearg.m4: New file.
23982
23983         Module quote.
23984         * m4/quote.m4: New file.
23985
23986         Module readutmp.
23987         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
23988
23989         Module sig2str.
23990         * m4/sig2str.m4: New file.
23991
23992         Other.
23993         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
23994         ulonglong.m4.
23995         * m4/intmax_t.m4: New file.
23996         * m4/d-type.m4: Indentation.
23997         * m4/jm-macros.m4: Update.
23998         * m4/prereq.m4 (jm_PREREQ): Update.
23999         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
24000         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
24001         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
24002         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
24003         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
24004         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
24005         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
24006         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
24007         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
24008         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
24009         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
24010         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
24011         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
24012         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
24013         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
24014         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
24015         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
24016         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
24017         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
24018
24019 2002-12-24  Bruno Haible  <bruno@clisp.org>
24020
24021         * MODULES.txt: Update according to m4/ changes.
24022
24023         Module gettext.
24024         * config.rpath: New file, from gettext-0.11.5.
24025
24026         * modules/*: New module descriptions.
24027         * gnulib-tool: New file.
24028         * MODULES.html.sh: New file.
24029
24030 2002-12-21  Karl Berry  <karl@gnu.org>
24031
24032         * doc/fdl.texi: update to version 1.2.
24033
24034 2002-12-19  Karl Berry  <karl@gnu.org>
24035
24036         * config/config.guess: update from prep.
24037
24038 2002-12-18  Bruno Haible  <bruno@clisp.org>
24039
24040         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
24041         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
24042
24043 2002-12-17  Bruno Haible  <bruno@clisp.org>
24044
24045         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
24046         stdlib.h, string.h.
24047
24048 2002-12-17  Bruno Haible  <bruno@clisp.org>
24049
24050         * lib/canon-host.c (strdup): Remove unused declaration.
24051
24052         * lib/fsusage.c: Include full_read.h.
24053         (get_fs_usage): Use full_read instead of safe_read.
24054
24055         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
24056
24057 2002-12-12  Karl Berry  <karl@gnu.org>
24058
24059         * config/config.guess: update from prep.
24060
24061 2002-12-11  Bruno Haible  <bruno@clisp.org>
24062
24063         * m4/setenv.m4: New file, from gettext-0.11.5.
24064
24065 2002-12-11  Bruno Haible  <bruno@clisp.org>
24066
24067         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
24068         not unsetenv().
24069         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
24070         modifications:
24071
24072         2002-12-11  Bruno Haible  <bruno@clisp.org>
24073
24074                 * setenv.c (alloca): Fall back to malloc.
24075                 (freea): New macro.
24076                 (setenv): Use freea() to free memory allocated with alloca().
24077
24078         2002-11-13  Bruno Haible  <bruno@clisp.org>
24079
24080                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
24081                 function declarations.
24082                 * unsetenv.c (unsetenv): Likewise.
24083
24084         2002-03-04  Bruno Haible  <bruno@clisp.org>
24085
24086                 Portability to AIX 4.3.3.
24087                 * unsetenv.c: New file, extracted from setenv.c.
24088                 * setenv.c: Move the unsetenv() function to unsetenv.c.
24089
24090         2001-12-20  Bruno Haible  <bruno@clisp.org>
24091
24092                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
24093                 use malloc instead. For SunOS 4.
24094
24095         2001-12-11  Bruno Haible  <bruno@clisp.org>
24096
24097                 * setenv.c: Declare alloca.
24098                 (compar_fn_t): New typedef.
24099                 (KNOWN_VALUE, STORE_VALUE): Use it.
24100
24101         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
24102         setenv.h.
24103
24104 2002-12-10  Paul Eggert  <eggert@twinsun.com>
24105
24106         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
24107         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
24108         Choose values that are less likely to collide with system fnmatch
24109         options.
24110         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
24111         defined (e.g., a pure POSIX system).
24112         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
24113         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
24114
24115 2002-12-06  Paul Eggert  <eggert@twinsun.com>
24116
24117         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
24118         a pain in practice to deal with generated m4 files.  This change
24119         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
24120
24121         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
24122         and jm-glibc-io.m4, as they are no longer a special case.
24123         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
24124         kludge and the auto-generation stuff.  Check only whether the
24125         functions are declared, not whether they exist, since older hosts
24126         that don't declare the functions can't use the optimization anyway.
24127
24128 2002-12-06  Jim Meyering  <jim@meyering.net>
24129
24130         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
24131
24132         Merge in changes from libc's misc/error.c, in preparation
24133         for the merge of gnulib's changes back into libc.
24134
24135         * lib/error.c (_): Define only if not already defined.
24136         Move definition to follow all #include directives.
24137         Include unlocked-io.h only if !_LIBC.
24138         [_LIBC]: Include <libio/libioP.h>.
24139         [USE_IN_LIBIO]: Include <libio/iolibio.h>
24140         (fflush): Tweak definition to use INTUSE.
24141         (putc): Define.
24142
24143 2002-12-05  Paul Eggert  <eggert@twinsun.com>
24144
24145         * lib/alloca.c [defined emacs]: Include "lisp.h".
24146         (xalloc_die) [defined emacs]: New macro.
24147         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
24148         [! defined emacs]: Include <xalloc.h>.
24149         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
24150         (pointer): Typedef to POINTER_TYPE *.
24151         (malloc): Remove decl; we now always use xmalloc.
24152         (alloca): Use old-style definition, since Emacs needs this.
24153         Check for arithmetic overflow when computing combined size.
24154
24155 2002-12-04  Paul Eggert  <eggert@twinsun.com>
24156
24157         Do not generate unlocked-io.h automatically, since it's easier to
24158         maintain it by hand.
24159
24160         * lib/unlocked-io.h: New file, from GNU diffutils,
24161         but with proper copyright notice and attribution.
24162         * lib/gen-uio: Remove.
24163         * lib/Makefile.am: Add copyright notice.
24164         (libfetish_a_SOURCES): Add unlocked-io.h.
24165         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
24166         (DISTCLEANFILES, io_functions): Remove macros.
24167         (EXTRA_DIST): Remove gen_uio.
24168         (unlocked-io.h): Remove rule.
24169
24170 2002-12-04  Jim Meyering  <jim@meyering.net>
24171
24172         Reflect the fact that stat.c and lstat.c are no longer generated.
24173         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
24174         (DISTCLEANFILES): Likewise.
24175         (EXTRA_DIST): Likewise.
24176         (all_local): Don't depend on stat.c or lstat.c.
24177         (stat.c, lstat.c): Remove rules.
24178         (EXTRA_DIST): Remove xstat.in.
24179
24180         * lib/xstat.in: Remove file.  Contents moved into stat.c.
24181         * lib/stat.c: New file.  Contents mostly from xstat.in.
24182         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
24183         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
24184
24185         * lib/safe-read.c: Rework so that it may serve to define safe_write,
24186         too.
24187         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
24188
24189 2002-12-03  Jim Meyering  <jim@meyering.net>
24190
24191         * lib/safe-read.c, safe-write.c: Change variable names and comments,
24192         but not semantics, to minimize the differences between these two files.
24193         (safe_read): Change comment to mention SAFE_READ_ERROR.
24194
24195         * lib/safe-read.c (IS_EINTR): Define.
24196         (safe_read): Use IS_EINTR in place of in-function cpp directives.
24197
24198 2002-12-02  Jim Meyering  <jim@meyering.net>
24199
24200         * lib/safe-read.c (EINTR): Define.
24201         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
24202         (INT_MAX): Provide fallback.
24203         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
24204
24205         * lib/safe-read.h (SAFE_READ_ERROR): Define.
24206
24207 2002-12-02  Bruno Haible  <bruno@clisp.org>
24208
24209         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
24210         Define, taken from safe-read.c.
24211         (INT_MAX): Provide fallback.
24212         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
24213         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
24214
24215         * lib/safe-read.c (EINTR): Remove definition.
24216         (safe_read): Don't use EINTR if it is absent.
24217
24218 2002-12-01  Jim Meyering  <jim@meyering.net>
24219
24220         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
24221         zero.
24222         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
24223
24224 2002-11-27  Paul Eggert  <eggert@twinsun.com>
24225
24226         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
24227         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
24228         with `if (! (value < limit)) abort ();', for readability.
24229
24230 2002-11-26  Karl Berry  <karl@gnu.org>
24231
24232         * lib/strdup.c: copy from libc again, with jim's ok.
24233         * lib/.cppi-disable: re-add strdup.c
24234
24235 2002-11-25  Karl Berry  <karl@gnu.org>
24236
24237         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
24238         instead of "strtol.c".
24239
24240 2002-11-25  Karl Berry  <karl@gnu.org>
24241
24242         * config/install-sh: update from automake for variable quoting, $0 in
24243         error msgs, etc.
24244
24245         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
24246         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
24247         entry.
24248
24249 2002-11-25  Jim Meyering  <jim@meyering.net>
24250
24251         * lib/mktime.c: Sync from libc, now that it has the latest fix.
24252
24253 2002-11-24  Karl Berry  <karl@gnu.org>
24254
24255         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
24256         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
24257
24258 2002-11-24  Jim Meyering  <jim@meyering.net>
24259
24260         Update from coreutils:
24261
24262         * lib/mktime.c: Merge in changes from libc.
24263
24264         Avoid a link-time failure on some Linux systems.
24265         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
24266         (otherwise).
24267         (__mon_yday): Declare with the STATIC attribute.
24268         (__mktime_internal): Likewise.
24269         Based on a report from Greg Schafer.
24270
24271 2002-11-23  Jim Meyering  <jim@meyering.net>
24272
24273         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
24274         Use `unsigned', not `int', as type of index.
24275
24276         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
24277
24278         * lib/fsusage.c: Remove unneeded parentheses around operands of
24279         `defined'.
24280
24281 2002-11-22  Paul Eggert  <eggert@twinsun.com>
24282
24283         * lib/quotearg.h: Allow multiple inclusion by surrounding with
24284         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
24285         so that we can be included first.
24286         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
24287         * lib/quotearg.c: Include quotearg.h immediately after config.h.
24288         No need to include stddef.h or sys/types.h any more.
24289         Surround local include files with "", not "<>".
24290         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
24291         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
24292         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
24293         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
24294         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
24295         (ISPRINT): Remove; no longer needed now that we assume C89.
24296
24297         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
24298         Preserve errno.
24299
24300         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
24301         quotearg_char): Use SIZE_MAX rather than
24302         (size_t) -1 when we are talking about "infinity".
24303
24304         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
24305
24306 2002-11-22  Paul Eggert  <eggert@twinsun.com>
24307
24308         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
24309         hint that one should use `if (! x) abort ();' rather than `assert
24310         (x);', and anyway it's one less thing to worry about configuring.
24311         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
24312         hash_rehash, hash_insert): Use abort rather than assert.
24313
24314 2002-11-22  Bruno Haible  <bruno@clisp.org>
24315
24316         * lib/safe-read.h: Assume C89. Add comments.
24317         (safe_read): Change return type to size_t.
24318         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
24319         byte counts > SSIZE_MAX correctly.
24320         * lib/safe-write.h: New file.
24321         * lib/safe-write.c: New file.
24322         * lib/full-read.h: New file.
24323         * lib/full-read.c: New file.
24324         * lib/full-write.h: Assume C89. Add comments.
24325         * lib/full-write.c: Include safe-write.h.
24326         (full_write): Rewritten to use safe_write.
24327         Suggested by Jim Meyering and Paul Eggert.
24328
24329 2002-11-21  Jim Meyering  <jim@meyering.net>
24330
24331         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
24332
24333         Merge in changes from the coreutils.
24334
24335         2002-09-25  Paul Eggert  <eggert@twinsun.com>
24336         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
24337         <stdint.h>.
24338         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
24339         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
24340         int.  Work more efficiently if X is the same width as uintmax_t.
24341         Do not compare X to -1, to avoid bogus compiler warning.
24342         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
24343         Don't assume that f_frsize and f_bsize are the same type.
24344
24345         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
24346         warning on FreeBSD.
24347
24348         * lib/makepath.c (make_path): Restore umask *before* creating the final
24349         component.
24350         (make_path): Minor reformatting.
24351
24352         * lib/xmalloc.c: Adjust to work with new autoconf macros,
24353         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
24354         HAVE_MALLOC/HAVE_REALLOC.
24355
24356         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
24357         dummy ones.  At least on GNU/Linux systems, `auto' means something
24358         else.
24359         From Michael Stone.
24360
24361 2002-11-21  Bruno Haible  <bruno@clisp.org>
24362
24363         Remove case insensitive option matching.
24364         * lib/argmatch.h (argcasematch): Remove declaration.
24365         (ARGCASEMATCH): Remove macro.
24366         (__xargmatch_internal): Remove case_sensitive argument.
24367         (XARGMATCH): Update.
24368         (XARGCASEMATCH): Remove macro.
24369         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
24370         case_sensitive argument.
24371         (argcasematch): Remove function.
24372         (__xargmatch_internal): Remove case_sensitive argument.
24373         (main): Use XARGMATCH instead of XARGCASEMATCH.
24374
24375         * lib/xmalloc.c: Change compile-time error message. Add comment about
24376         required autoconf version.
24377
24378 2002-11-20  Paul Eggert  <eggert@twinsun.com>
24379
24380         Merge argmatch cleanups from Bison.  Assume C89.
24381
24382         * lib/argmatch.c: Include config.h here, not in argmatch.h.
24383         Include stdlib.h, for EXIT_FAILURE.
24384         Always include <string.h>, since we assume C89.
24385         (EXIT_FAILURE): Remove pre-C89 bug workaround.
24386         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
24387         Include <stddef.h> instead, since it's all we need for size_t.
24388         (PARAMS): Remove.  All uses removed.
24389         (ARRAY_CARDINALITY): Do not bother to #undef.
24390         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
24391         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
24392         Remove unnecessary parentheses.
24393         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
24394         Insert necessary parentheses.
24395         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
24396         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
24397
24398 2002-11-19  Bruno Haible  <bruno@clisp.org>
24399
24400         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
24401         * lib/mbswidth.h: Include <stddef.h>, for size_t.
24402
24403         * lib/mbswidth.h (PARAMS): Remove macro.
24404         (mbswidth, mbsnwidth): Use ANSI C function declarations.
24405         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
24406
24407         * lib/gcd.h (PARAMS): Remove macro.
24408         (gcd): Use ANSI C function declarations.
24409         * lib/gcd.c (gcd): Likewise.
24410
24411 2002-11-15  Bruno Haible  <bruno@clisp.org>
24412
24413         * lib/strcspn.c: Include <stddef.h>.
24414         (strcspn): Use ANSI C function declaration. Change return type to
24415         size_t. Use NULL.
24416         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
24417         (strpbrk): Use NULL.
24418         * lib/strpbrk.h (PARAMS): Remove macro.
24419         (strpbrk): Use ANSI C function declaration.
24420         * lib/strstr.c: Don't include <sys/types.h>.
24421         * lib/strstr.h (PARAMS): Remove macro.
24422         (strstr): Use ANSI C function declarations.
24423
24424 2002-11-14  Karl Berry  <karl@gnu.org>
24425
24426         * config/mkinstalldirs: `do' on separate line, instead of
24427         `for var; do'.
24428
24429 2002-11-06  Bruno Haible  <bruno@clisp.org>
24430
24431         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
24432         * lib/gcd.c (gcd): Likewise.
24433
24434 2002-11-05  Bruno Haible  <bruno@clisp.org>
24435
24436         * lib/gcd.h: New file, from gettext-0.11.5.
24437         * lib/gcd.c: New file, from gettext-0.11.5.
24438
24439 2002-11-05  Bruno Haible  <bruno@clisp.org>
24440
24441         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
24442         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
24443         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
24444         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
24445
24446         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
24447         <libintl.h>.
24448         * lib/makepath.c: Include gettext.h instead of <locale.h> and
24449         <libintl.h>.
24450
24451         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
24452         * lib/human.c: Include gettext.h instead of <libintl.h>.
24453         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
24454         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
24455         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
24456         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
24457         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
24458         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
24459         (textdomain): Remove definition.
24460         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
24461
24462         * lib/long-options.c: Remove include of <libintl.h> and definition of
24463         _.
24464         * lib/same.c: Remove include of <libintl.h> and definition of _.
24465
24466 2002-11-04  Owen Taylor  <otaylor@redhat.com>
24467
24468         * lib/config.charset: A few additions for Solaris.
24469
24470 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
24471
24472         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
24473         * lib/localcharset.c (locale_charset): Declare as extern "C".
24474
24475 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
24476
24477         * lib/config.charset: msdos in uk_UA uses CP1125.
24478
24479 2002-11-04  Bruno Haible  <bruno@clisp.org>
24480
24481         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
24482         * lib/strcase.h: New file, from GNU gettext-0.11.5.
24483         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
24484         * lib/strstr.h: New file, from GNU gettext-0.11.5.
24485         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
24486
24487 2002-11-04  Bruno Haible  <bruno@clisp.org>
24488
24489         * lib/localcharset.c (locale_charset): Don't return an empty string.
24490
24491 2002-11-04  Bruno Haible  <bruno@clisp.org>
24492
24493         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
24494         aliases.
24495
24496 2002-11-04  Bruno Haible  <bruno@clisp.org>
24497
24498         * lib/config.charset: Update for newest glibc. Add canonical names
24499         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
24500
24501 2002-11-04  Bruno Haible  <bruno@clisp.org>
24502
24503         * lib/config.charset: Add support for NetBSD.
24504
24505 2002-11-04  Bruno Haible  <bruno@clisp.org>
24506
24507         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
24508
24509 2002-11-01  Bruno Haible  <bruno@clisp.org>
24510
24511         * configure.in: Add AC_CONFIG_AUX_DIR call.
24512         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
24513         test/Makefile.
24514         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
24515
24516 2002-09-28  Karl Berry  <karl@gnu.org>
24517
24518         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
24519         installed automake until the next release, since changes have been
24520         made.
24521
24522 2002-09-25  Karl Berry  <karl@gnu.org>
24523
24524         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
24525         * lib/getopt*: copy from libc/posix.
24526         * lib/gettext.h: copy from gettext.
24527         * lib/.cppi-disable: add strdup.c, gettext.h.
24528
24529 2002-09-25  Karl Berry  <karl@gnu.org>
24530
24531         * config/srclist.txt: enable gettext.h check.
24532         * config/config.{guess,sub}: update from prep.
24533         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
24534                 from automake 1.6.3.
24535         See srclist*.
24536
24537 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
24538
24539         * regex.c (PATFETCH): Remove the translating fetch.
24540         (PATFETCH_RAW): Rename to PATFETCH.
24541         (set_image_of_range): New fun.
24542         (SET_RANGE_TABLE_WORK_AREA): Use it.
24543         (regex_compile): Don't translate the pattern chars so eagerly.
24544         Only do it when inserting an `exactn' bytecode or when handling
24545         a char-range.
24546         (mutually_exclusive_p): Avoid empty statement.
24547
24548 2002-07-06  Jim Meyering  <meyering@lucent.com>
24549
24550         * m4/README: Don't mention Makefile.am.in.
24551         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
24552
24553 2002-07-01  Jim Meyering  <meyering@lucent.com>
24554
24555         * lib/c-stack.c: Include sys/time.h.
24556         From Volker Borchert.
24557
24558 2002-06-26  Paul Eggert  <eggert@twinsun.com>
24559
24560         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
24561
24562 2002-06-26  Paul Eggert  <eggert@twinsun.com>
24563
24564         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
24565         New macro.  Use it uniformly instead of
24566         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
24567         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
24568         reported by Vin Shelton.
24569
24570 2002-06-22  Paul Eggert  <eggert@twinsun.com>
24571
24572         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
24573         Do not assume SA_SIGINFO behavior.
24574         Bug reported by Jim Meyering on NetBSD 1.5.2.
24575
24576 2002-06-22  Jim Meyering  <meyering@lucent.com>
24577
24578         * m4/c-stack.m4: New file, from diffutils-2.8.2.
24579         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
24580
24581         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
24582         now that configure.ac uses AC_GNU_SOURCE.
24583         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
24584         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
24585
24586         Update to latest tools.  Suggestions from Paul Eggert.
24587         * m4/stdbool.m4: New file, from diffutils-2.8.2.
24588         * m4/gnu-source.m4: Update from diffutils-2.8.2.
24589         * m4/fnmatch.m4: Likewise.
24590         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
24591         to AC_HEADER_STDBOOL
24592
24593 2002-06-22  Jim Meyering  <meyering@lucent.com>
24594
24595         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
24596         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
24597
24598 2002-06-22  Jim Meyering  <meyering@lucent.com>
24599
24600         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
24601
24602         * lib/exitfail.c, exitfail.h: Likewise.
24603         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
24604
24605         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
24606         of fnmatch.h.
24607         (EXTRA_DIST): Add fnmatch_loop.c.
24608         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
24609
24610         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
24611         * lib/fnmatch.c: Update from diffutils-2.8.2.
24612         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
24613         * lib/fnmatch.h: Remove file.
24614
24615 2002-06-21  Jim Meyering  <meyering@lucent.com>
24616
24617         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
24618         * m4/mbrtowc.m4: Likewise.
24619
24620         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
24621         * m4/mbswidth.m4: Reflect name change:
24622         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
24623         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
24624
24625         * m4/lib-link.m4: Update from gettext-0.11.2.
24626         * m4/gettext.m4: Likewise.
24627
24628         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
24629         From Alfred M. Szmidt.
24630
24631 2002-06-18  Paul Eggert  <eggert@twinsun.com>
24632
24633         * lib/file-type.h: Report an error if neither S_ISREG nor
24634         S_IFREG is defined, instead of using a test specific to glibc
24635         2.2.  This should be safe, since POSIX requires S_ISREG and
24636         Unix Version 7 had S_IFREG.  We don't need to check for
24637         <sys/types.h> since we don't use any symbols that it defines.
24638
24639 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
24640
24641         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
24642         $@-t, so that each temporary file name is unique and valid in the first
24643         8 characters, for operation under DOS.
24644
24645 2002-06-15  Paul Eggert  <eggert@twinsun.com>
24646
24647         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
24648
24649 2002-06-15  Jim Meyering  <meyering@lucent.com>
24650
24651         Work even with DJGPP 2.03, which lacks support for symlinks.
24652         From Richard Dawe.
24653         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
24654         is defined.
24655         * lib/lchown.c (S_ISLNK): Likewise.
24656
24657 2002-06-15  Jim Meyering  <meyering@lucent.com>
24658
24659         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
24660         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
24661         have been included before this file.
24662
24663 2002-06-14  Jim Meyering  <meyering@lucent.com>
24664
24665         * lib/file-type.h: Use the version from diffutils-2.8.2.
24666         * lib/file-type.c: Likewise.
24667
24668 2002-06-07  Jim Meyering  <meyering@lucent.com>
24669
24670         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
24671         They're needed at least for NetBSD 1.5.2.
24672         ($statxfs_includes): Include those same headers.
24673         ($statxfs_includes): Include sys/vfs.h if available.
24674         ($statxfs_includes): Likewise for sys/statvfs.h.
24675         Check for the following members in both structs statfs and statvfs:
24676         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
24677
24678 2002-06-01  Jim Meyering  <meyering@lucent.com>
24679
24680         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
24681         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
24682
24683 2002-05-28  Jim Meyering  <meyering@lucent.com>
24684
24685         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
24686         Reported by Volker Borchert.
24687
24688 2002-05-27  Jim Meyering  <meyering@lucent.com>
24689
24690         Fix a problem seen only on nonconforming systems whereby ls.c's
24691         use of localtime, and then of gettimeofday would cause trouble:
24692         the localtime call used to initialize rpl_gettimeofday's save
24693         mechanism would clobber ls's current local time information so
24694         that in any long listing the first file would always be listed
24695         with date 1970-01-01.  Analysis by Volker Borchert.
24696
24697         * lib/gettimeofday.c (localtime): Undefine.
24698         (rpl_localtime): New function.
24699
24700 2002-05-27  Jim Meyering  <meyering@lucent.com>
24701
24702         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
24703         localtime.
24704
24705         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
24706         use the replacement function; it wouldn't resolve at link time.
24707         Reported by Volker Borchert.
24708
24709 2002-05-22  Jim Meyering  <meyering@lucent.com>
24710
24711         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
24712         file-type.h.
24713         * lib/file-type.h: New file.
24714         * lib/file-type.c (file_type): New file/function.  Extracted from
24715         diffutils.
24716
24717 2002-04-30  Jim Meyering  <meyering@lucent.com>
24718
24719         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
24720
24721 2002-04-29  Paul Eggert  <eggert@twinsun.com>
24722
24723         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
24724
24725 2002-04-29  Paul Eggert  <eggert@twinsun.com>
24726
24727         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
24728         Do not check for alloca.h (no longer used) or stdbool.h (was never
24729         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
24730
24731 2002-04-29  Paul Eggert  <eggert@twinsun.com>
24732
24733         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
24734
24735 2002-04-29  Jim Meyering  <meyering@lucent.com>
24736
24737         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
24738         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
24739         Use AC_FUNC_STRNLEN here instead.
24740
24741         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
24742         With autoconf-2.53a, it's part of AC_PROG_CC.
24743
24744 2002-04-28  Paul Eggert  <eggert@twinsun.com>
24745
24746         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
24747         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
24748
24749 2002-04-28  Paul Eggert  <eggert@twinsun.com>
24750
24751         * lib/sig2str.h, lib/sig2str.c: New files.
24752         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
24753
24754 2002-04-28  Paul Eggert  <eggert@twinsun.com>
24755
24756         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
24757         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
24758         of 127, since 64 is the largest conceivable number for ancient
24759         nonstandard hosts.
24760         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
24761
24762 2002-04-28  Jim Meyering  <meyering@lucent.com>
24763
24764         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
24765
24766 2002-04-24  Jim Meyering  <meyering@lucent.com>
24767
24768         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
24769         (jm_PREREQ): Use it.
24770
24771         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
24772         mach/mach.h fcntl.h.
24773         Check for this function: setlocale.
24774
24775 2002-04-24  Jim Meyering  <meyering@lucent.com>
24776
24777         * lib/gettext.h: New file, from Gettext.
24778         * lib/Makefile.am (INCLUDES): Remove -I../intl.
24779         (libfetish_a_SOURCES): Add gettext.h.
24780
24781 2002-04-16  Jim Meyering  <meyering@lucent.com>
24782
24783         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
24784         ut_pid, ut_id, ut_exit.
24785
24786 2002-04-16  Jim Meyering  <meyering@lucent.com>
24787
24788         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
24789         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
24790         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
24791
24792 2002-04-12  Jim Meyering  <meyering@lucent.com>
24793
24794         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
24795         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
24796         existence of the getmntinfo function.  Needed for Darwin 5.3.
24797
24798         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
24799         This is necessary at least on Darwin 5.3.
24800
24801         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
24802         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
24803         strnlen.o in the library, and that makes some versions of ranlib
24804         object.
24805
24806 2002-04-12  Jim Meyering  <meyering@lucent.com>
24807
24808         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
24809
24810 2002-04-09  Jim Meyering  <meyering@lucent.com>
24811
24812         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
24813         to be more precise.  Rather than saying we're checking whether the
24814         function `works', say what we're testing.
24815         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
24816         Reported by Bruno Haible.
24817
24818 2002-03-10  Jim Meyering  <meyering@lucent.com>
24819
24820         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
24821         Suggestion from Santiago Vila.
24822
24823 2002-03-08  Jim Meyering  <meyering@lucent.com>
24824
24825         * lib/rename.c: Mention that this wrapper is needed also on
24826         mips-dec-ultrix4.4 systems.
24827
24828 2002-03-02  Jim Meyering  <meyering@lucent.com>
24829
24830         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
24831         not HAVE_CLOCK_SETTIME.
24832
24833 2002-02-27  Paul Eggert  <eggert@twinsun.com>
24834
24835         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
24836         Check for clock_settime.
24837
24838 2002-02-27  Paul Eggert  <eggert@twinsun.com>
24839
24840         * lib/nanosleep.h: Rename to....
24841         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
24842
24843         * lib/gettime.c: New file.
24844         * lib/settime.c: New file.
24845         * lib/stime.c: Remove.
24846
24847         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
24848         timespec.h.  Remove nanosleep.h.
24849
24850 2002-02-25  Paul Eggert  <eggert@twinsun.com>
24851
24852         * m4/acl.m4: New file.
24853         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
24854         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
24855
24856 2002-02-25  Paul Eggert  <eggert@twinsun.com>
24857
24858         * lib/acl.c, lib/acl.h: New files.
24859         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
24860
24861 2002-02-24  Jim Meyering  <meyering@lucent.com>
24862
24863         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
24864         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
24865         cause trouble.  Reported by Nelson Beebe.
24866
24867 2002-02-23  Paul Eggert  <eggert@twinsun.com>
24868
24869         * lib/path-concat.c (xpath_concat): Reorder code to pacify
24870         compilers that don't know that xalloc_die never returns.
24871
24872 2002-02-20  Jim Meyering  <meyering@lucent.com>
24873
24874         * lib/getdate.c: Regenerate using bison-1.33.
24875
24876 2002-02-17  Jim Meyering  <meyering@lucent.com>
24877
24878         * config/config.guess (main): Don't use `head -1'; it's no longer
24879         portable. Use `sed 1q' instead.
24880
24881 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
24882
24883         * m4/codeset.m4: Upgrade to gettext-0.11.
24884         * m4/gettext.m4: Upgrade to gettext-0.11.
24885         * m4/glibc21.m4: Upgrade to gettext-0.11.
24886         * m4/iconv.m4: Upgrade to gettext-0.11.
24887         * m4/isc-posix.m4: Upgrade to gettext-0.11.
24888         * m4/lcmessage.m4: Upgrade to gettext-0.11.
24889         * m4/lib-ld.m4: New file, from gettext-0.11.
24890         * m4/lib-link.m4: New file, from gettext-0.11.
24891         * m4/lib-prefix.m4: New file, from gettext-0.11.
24892         * m4/progtest.m4: Upgrade to gettext-0.11.
24893
24894 2002-02-15  Paul Eggert  <eggert@twinsun.com>
24895
24896         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
24897         (jm_PREREQ): Use it.
24898
24899 2002-02-15  Paul Eggert  <eggert@twinsun.com>
24900
24901         * lib/posixver.c, lib/posixver.h: New files.
24902         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
24903
24904 2002-02-02  Paul Eggert  <eggert@twinsun.com>
24905             Bruno Haible  <bruno@clisp.org>
24906
24907         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
24908         (fwrite_success_callback): New declaration.
24909         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
24910         print_unicode_char. Call failure callback instead of error.
24911         (fwrite_success_callback): New function.
24912         (exit_failure_callback): New function.
24913         (fallback_failure_callback): New function.
24914         (print_unicode_char): Call unicode_to_mb.
24915
24916 2002-01-26  Jim Meyering  <meyering@lucent.com>
24917
24918         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
24919         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
24920
24921 2002-01-26  Jim Meyering  <meyering@lucent.com>
24922
24923         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
24924
24925 2002-01-22  Paul Eggert  <eggert@twinsun.com>
24926
24927         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
24928
24929 2002-01-22  Jim Meyering  <meyering@lucent.com>
24930
24931         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
24932         Otherwise, some versions of automake would omit the rule that makes
24933         Makefile from Makefile.in.
24934
24935 2002-01-21  Paul Eggert  <eggert@twinsun.com>
24936
24937         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
24938         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
24939         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
24940         (memcoll): Set errno to zero if there is no error.
24941
24942         * lib/quotearg.c (quotearg_buffer_restyled):
24943         Fix bug with quoting buffers containing NUL when backslashing escapes.
24944         This bug was exposed by the other changes in this patch.
24945         (quotearg_n_options): New arg ARGSIZE.
24946         All callers changed.
24947         (quoting_options_from_style): New function.
24948         (quotearg_n_style): Use it.
24949         (quotearg_n_style_mem): New function.
24950
24951         * lib/quotearg.h (quotearg_n_style_mem): New function.
24952
24953 2002-01-19  Jim Meyering  <meyering@lucent.com>
24954
24955         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
24956         Remove useless quotes: DF_PROG="df".
24957         * m4/strnlen.m4: New file.
24958
24959 2002-01-16  Paul Eggert  <eggert@twinsun.com>
24960
24961         * lib/backupfile.c (ISDIGIT): Comment fix.
24962         * lib/getdate.y (ISDIGIT): Likewise.
24963         * lib/posixtm.c (ISDIGIT, year): Likewise.
24964         * lib/strverscmp.c (ISDIGIT): Likewise.
24965         * lib/userspec.c (ISDIGIT): Likewise.
24966
24967 2002-01-16  Jim Meyering  <meyering@lucent.com>
24968
24969         * lib/getdate.y: Add three semicolons, each just before a closing
24970         brace. Bison (as of version 1.31) no longer papers over that mistake.
24971
24972 2002-01-05  Jim Meyering  <meyering@lucent.com>
24973
24974         * lib/version-etc.c (version_etc_copyright): Update copyright year.
24975
24976 2001-12-19  Paul Eggert  <eggert@twinsun.com>
24977
24978         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
24979         not silently exit merely because the output buffer happens to
24980         have nothing pending.
24981
24982 2001-12-18  Paul Eggert  <eggert@twinsun.com>
24983
24984         See the big note in ../ChangeLog.
24985         * lib/human.c (suffixes): Prefer K to k for 1024.
24986         (generate_suffix_backwards): New function.
24987         (human_readable_inexact): Use it.
24988         * lib/xstrtol.c (__xstrtol): If there is no number but there
24989         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
24990         Accept 'K' as well as 'k'.
24991
24992 2001-12-15  Jim Meyering  <meyering@lucent.com>
24993
24994         * lib/regex.h (__restrict_arr): Update from libc.
24995
24996         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
24997         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
24998         (STREQ): Define.
24999
25000 2001-12-14  Jim Meyering  <meyering@lucent.com>
25001
25002         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
25003         Suggestion from Bruno Haible.
25004
25005 2001-12-10  Jim Meyering  <meyering@lucent.com>
25006
25007         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
25008         xrealloc, Instead, include "xalloc.h".
25009         (initbuffer): Don't cast xmalloc return value to char*.
25010         (readline): Reword comment.
25011         Don't cast xrealloc return value to char*
25012         Return NULL, not 0.
25013
25014 2001-12-09  Jim Meyering  <meyering@lucent.com>
25015
25016         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
25017         about `signed and unsigned type in conditional expression'.
25018         * lib/posixtm.c (posix_time_parse): Likewise.
25019
25020         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
25021
25022         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
25023         to avoid a pedantic warning.
25024
25025         * lib/getstr.c: Don't include assert.h.
25026         (getstr): Remove warning-evoking assertions.
25027         Return -1 if offset parameter is out of bounds.
25028         Change the type of a local from int to size_t.
25029
25030         * lib/strftime.c (my_strftime_localtime_r): Include this function
25031         definition in the `#if ! HAVE_TM_GMTOFF' block.
25032
25033         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
25034         Include xalloc.h instead.
25035
25036 2001-12-02  Jim Meyering  <meyering@lucent.com>
25037
25038         * lib/tempname.c: Don't declare getenv, thus reverting the change of
25039         2001-11-18.  It's no longer necessary, now that stdlib.h is always
25040         included.
25041
25042         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
25043         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
25044
25045 2001-11-30  Akim Demaille  <akim@epita.fr>
25046
25047         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
25048         before being defined.
25049
25050 2001-11-27  Paul Eggert  <eggert@twinsun.com>
25051
25052         * lib/quotearg.h (quotearg_n, quotearg_n_style):
25053         First arg is int, not unsigned.
25054         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
25055         (SIZE_MAX, UINT_MAX): New macros.
25056         (quotearg_n_options): Abort if N is negative.
25057         Avoid overflow check on hosts where size_t is 64 bits and int
25058         is 32 bits, as overflow is impossible there.
25059         Fix off-by-one typo that caused unnecessary reallocation.
25060
25061 2001-11-27  Jim Meyering  <meyering@lucent.com>
25062
25063         * lib/tempname.c: Merge with version from libc.
25064         * lib/regex.c: Likewise.
25065
25066         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
25067         systems for which STDC_HEADERS is 0, it was not included, resulting in
25068         a warning about an integer-to-pointer conversion problem with getenv.
25069         Reported by Volker Borchert.
25070
25071 2001-11-26  Jim Meyering  <meyering@lucent.com>
25072
25073         * lib/gtod.h: Remove file.
25074         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
25075         * lib/gettimeofday.c: Don't include gtod.h.
25076         (GTOD_init): Remove function.
25077         (rpl_gettimeofday): Do its job here instead, rather than aborting.
25078         Suggestion from Volker Borchert.
25079
25080 2001-11-23  Jim Meyering  <meyering@lucent.com>
25081
25082         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
25083         it.
25084         * lib/hash.c (struct hash_table): Define it here instead.
25085
25086 2001-11-22  Jim Meyering  <meyering@lucent.com>
25087
25088         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
25089
25090 2001-11-20  Jim Meyering  <meyering@lucent.com>
25091
25092         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
25093         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
25094
25095 2001-11-19  Jim Meyering  <meyering@lucent.com>
25096
25097         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
25098         directory.  Use "conftestXXXXXX" as the template.
25099         Suggestion from Paul Eggert.
25100
25101         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
25102         immediately, so the test doesn't mistakenly hit the max-open-files
25103         limit.
25104
25105 2001-11-18  Paul Eggert  <eggert@twinsun.com>
25106
25107         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
25108         (TEMPORARIES): New macro.
25109         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
25110         removes an artificial limitation (e.g. HP-UX 10.20, where
25111         TMP_MAX is 17576).
25112
25113 2001-11-18  Jim Meyering  <meyering@lucent.com>
25114
25115         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
25116
25117 2001-11-18  Jim Meyering  <meyering@lucent.com>
25118
25119         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
25120         on SunOS 4.
25121
25122         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
25123         files will be created before anything else.
25124
25125 2001-11-17  Paul Eggert  <eggert@twinsun.com>
25126
25127         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
25128         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
25129
25130 2001-11-17  Jim Meyering  <meyering@lucent.com>
25131
25132         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
25133         Prompted by a report from Bob Proulx.
25134
25135         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
25136         Instead, require UTILS_FUNC_MKSTEMP.
25137
25138 2001-11-17  Jim Meyering  <meyering@lucent.com>
25139
25140         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
25141         Now, that's done as part of AC_FUNC_STRTOD.
25142
25143 2001-11-17  Jim Meyering  <meyering@lucent.com>
25144
25145         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
25146         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
25147         rather than group writable.  Patch by Juan F. Codagnone.
25148
25149         * lib/readtokens.c: Remove explicit declarations of xmalloc and
25150         xrealloc, Instead, include "xalloc.h".
25151
25152         * lib/mountlist.c: Include unlocked-io.h after all system headers.
25153         Remove explicit declarations of xmalloc, xrealloc,
25154         and xstrdup.  Instead, include "xalloc.h".
25155
25156         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
25157         unlocked-io.h.
25158         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
25159         Likewise.
25160         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
25161
25162         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
25163         Reported by Padraig Brady.
25164
25165         * lib/mkstemp.c: #undef mkstemp.
25166         Include config.h.
25167         (rpl_mkstemp): Rename from mkstemp.
25168         Protoize.
25169
25170 2001-11-16  Jim Meyering  <meyering@lucent.com>
25171
25172         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
25173         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
25174         determine the amount of total physical memory, use pstat_getstatic.
25175         HPUX-11 doesn't define _SC_PHYS_PAGES.
25176         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
25177         If sysconf couldn't be used to determine the amount of available
25178         physical memory, use both pstat_getstatic and pstat_getdynamic.
25179         Based on a patch from Bob Proulx.
25180
25181 2001-11-10  Jim Meyering  <meyering@lucent.com>
25182
25183         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
25184         (jm_PREREQ): Use it.
25185
25186 2001-11-09  Jim Meyering  <meyering@lucent.com>
25187
25188         * m4/jm-macros.m4: Require autoconf-2.52f.
25189         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
25190         Use these AC_-prefixed names, not the AM_-prefixed ones.
25191
25192         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
25193
25194 2001-11-05  Jim Meyering  <meyering@lucent.com>
25195
25196         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
25197
25198 2001-11-04  Jim Meyering  <meyering@lucent.com>
25199
25200         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
25201         $DEFS.
25202
25203 2001-11-03  Jim Meyering  <meyering@lucent.com>
25204
25205         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
25206         of AC_DEFUN.
25207
25208         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
25209         know the name of the variable in the macro definition.
25210
25211 2001-11-03  Jim Meyering  <meyering@lucent.com>
25212
25213         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
25214         in argmatch_to_argument call.
25215
25216         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
25217         argument.
25218
25219         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
25220         e.g., a fault due to an attempt to free a NULL pointer.
25221
25222 2001-11-01  Jim Meyering  <meyering@lucent.com>
25223
25224         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
25225         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
25226
25227 2001-11-01  Jim Meyering  <meyering@lucent.com>
25228
25229         * lib/dirfd.c, lib/dirfd.h: New files.
25230         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
25231
25232         * lib/hash.c (hash_print) [TESTING]: Clean up.
25233
25234 2001-10-22  Paul Eggert  <eggert@twinsun.com>
25235
25236         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
25237         to avoid a warning if -Wall.
25238
25239 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
25240
25241         * README: New file
25242         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
25243         (per RMS's instructions, this is now the canonical source)
25244         * lgpl/, gpl/: New directories.
25245
25246 2001-10-21  Paul Eggert  <eggert@twinsun.com>
25247
25248         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
25249
25250 2001-10-21  Jim Meyering  <meyering@lucent.com>
25251
25252         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
25253         this code would end up calling gettext even in packages built
25254         with --disable-nls.
25255         * lib/getopt.c (_): Likewise.
25256         * lib/regex.c (_): Likewise.
25257
25258 2001-10-20  Paul Eggert  <eggert@twinsun.com>
25259
25260         * m4/error.m4 (jm_PREREQ_ERROR):
25261         Do not invoke AC_CHECK_FUNCS with strerror_r, as
25262         AC_FUNC_STRERROR_R does that.
25263         Check for strerror declaration.
25264
25265         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
25266         are supposed to have them these days.
25267         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
25268         Merge changes from latest Autoconf CVS.
25269         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
25270         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
25271         POSIX decided to standardize on the int flavor of strerror_r.
25272
25273 2001-10-20  Paul Eggert  <eggert@twinsun.com>
25274
25275         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
25276         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
25277         Use strerror_r that is only a macro, even if it is not a function.
25278         (strerror): Check for HAVE_DECL_STRERROR before declaring.
25279         (private_strerror): Use prototypes, not old-style function definition.
25280         (print_errno_message): New function.
25281         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
25282         char*-flavored one.
25283         (error_tail, error, error_at_line): Use it.
25284
25285 2001-10-11  Jim Meyering  <meyering@lucent.com>
25286
25287         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
25288         and quote_n (1, ... to avoid clobbering a buffer.
25289
25290 2001-10-05  Jim Meyering  <meyering@lucent.com>
25291
25292         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
25293         hash-pjw.h.
25294         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
25295         * lib/hash-pjw.h: New file.
25296
25297 2001-09-30  Jim Meyering  <meyering@lucent.com>
25298
25299         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
25300         `struct fsstat' has the `f_fstypename' member.
25301         Use that to define FS_TYPE, which is now used to make
25302         the getfsstat link test tighter.
25303
25304 2001-09-30  Jim Meyering  <meyering@lucent.com>
25305
25306         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
25307         Include <sys/ucred.h>, for Apple Darwin.
25308         Include sys/mount.h and sys/fs_types.h only if available.
25309         (FS_TYPE): Define.
25310         (read_filesystem_list): Use FS_TYPE.
25311
25312 2001-09-29  Paul Eggert  <eggert@twinsun.com>
25313
25314         * lib/exclude.c (excluded_filename): 0 -> false, since it's
25315         a boolean context.
25316
25317 2001-09-29  Jim Meyering  <meyering@lucent.com>
25318
25319         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
25320         [one-argument getmntent function]): Include stdio.h before mntent.h.
25321         SunOS 4.1.x needs it for the declaration of `FILE'.
25322         Patch by Volker Borchert.
25323
25324         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
25325         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
25326         sys/fs_types.h, and make the link-test for getfsstat guard #include
25327         directives with appropriate #if HAVE_*_H tests so that we can
25328         detect getfsstat on Apple Darwin1.3.7 systems.
25329         Reported by Nelson Beebe.
25330         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
25331
25332 2001-09-28  Paul Eggert  <eggert@twinsun.com>
25333
25334         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
25335         #defines strtoimax.  Also treat the other strto* functions
25336         like strtoimax.
25337
25338         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
25339         Check for strtoul and strtoumax,
25340         as those declarations are made even in the signed case.
25341         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
25342         Likewise, for strtol and strtoimax.
25343
25344 2001-09-28  Paul Eggert  <eggert@twinsun.com>
25345
25346         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
25347         #defines strtoimax.  Also treat the other strto* functions
25348         like strtoimax.
25349
25350         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
25351         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
25352         (strtoimax, strtoumax): Do not declare if already defined as a macro.
25353
25354 2001-09-26  Jim Meyering  <meyering@lucent.com>
25355
25356         Most macros in unlocked-io.h had the wrong number of arguments.
25357         * lib/gen-uio: New script.
25358         (USE_UNLOCKED_IO): Define to 1 if not already defined.
25359         * lib/unlocked-io.hin: Remove file.
25360         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
25361         rather than trying to embed it here.
25362         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
25363         Reported by Padraig Brady.
25364
25365 2001-09-25  Volker Borchert  <bt@teknon.de>
25366
25367         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
25368         `result'.
25369
25370 2001-09-24  Jim Meyering  <meyering@lucent.com>
25371
25372         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
25373
25374 2001-09-23  Jim Meyering  <meyering@lucent.com>
25375
25376         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
25377         instead of the mere test for existence of mntent.h.  The latter
25378         would get a false-positive on AIX 3.4 systems.
25379         In the outer getmntent if-block, don't die if neither of the getmntent
25380         tests succeeds.  Instead, just fall through and continue with the
25381         remaining tests.
25382
25383 2001-09-23  Jim Meyering  <meyering@lucent.com>
25384
25385         * lib/mountlist.c: Remove useless parentheses in #if directives.
25386         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
25387         the deprecated MOUNTED symbol is no longer defined in mntent.h.
25388
25389 2001-09-22  Jim Meyering  <meyering@lucent.com>
25390
25391         * m4/gettext.m4: New file.  From gettext.
25392         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
25393         * m4/progtest.m4: Likewise
25394         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
25395         * m4/glibc21.m4: Likewise.
25396
25397         * m4/libintl.m4: Remove.  No longer used.
25398
25399 2001-09-22  Jim Meyering  <meyering@lucent.com>
25400
25401         * lib/localcharset.c: Update from latest gettext.
25402         * lib/config.charset: Likewise.
25403
25404 2001-09-20  Jim Meyering  <meyering@lucent.com>
25405
25406         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
25407         strtoimax.
25408         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
25409         strtoumax.
25410
25411 2001-09-20  Jim Meyering  <meyering@lucent.com>
25412
25413         * lib/xstrtol.c (strtoimax): Guard declaration with
25414         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
25415         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
25416         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
25417         (strtoumax): Likewise, for completeness (it wasn't necessary).
25418
25419 2001-09-17  Paul Eggert  <eggert@twinsun.com>
25420
25421         * lib/strtoimax.c (HAVE_LONG_LONG):
25422         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
25423         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
25424         to work around bug in IBM C compiler.
25425
25426 2001-09-17  Jim Meyering  <meyering@lucent.com>
25427
25428         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
25429         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
25430         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
25431         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
25432         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
25433         whenever the right hand side need not be expanded by the shell.
25434
25435 2001-09-16  Paul Eggert  <eggert@twinsun.com>
25436
25437         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
25438         library.  It's not correct, as some older glibcs are buggy.
25439         fnmatch wasn't fixed until glibc 2.2.
25440
25441         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
25442         special shell magic here.
25443
25444 2001-09-16  Jim Meyering  <meyering@lucent.com>
25445
25446         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
25447         * m4/jm-macros.m4: Require it.
25448
25449 2001-09-16  Jim Meyering  <meyering@lucent.com>
25450
25451         * lib/mkdir.c: New file.
25452
25453 2001-09-15  Jim Meyering  <meyering@lucent.com>
25454
25455         * m4/jm-macros.m4: Check for help2man.
25456
25457 2001-09-11  Jim Meyering  <meyering@lucent.com>
25458
25459         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
25460         The body, by Paul Eggert, was moved here from configure.in.
25461         * m4/jm-macros.m4: Require UTILS_HOST_OS.
25462
25463 2001-09-04  Paul Eggert  <eggert@twinsun.com>
25464
25465         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
25466         (jm_PREREQ): Use it.
25467
25468 2001-09-04  Paul Eggert  <eggert@twinsun.com>
25469
25470         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
25471         Use ssize_t, not int, to store result of readlink.
25472         Check for ssize_t overflow as well as size_t overflow,
25473         as POSIX says the result of readlink is implementation-defined
25474         when ssize_t overflows.
25475         Remove unnecessary cast to char*.
25476         Use free+malloc instead of realloc, as the storage doesn't need
25477         to be preserved and it's clearer and can be more efficient that way.
25478         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
25479         * lib/xreadlink.h (xreadlink): Update prototype.
25480
25481 2001-09-04  Paul Eggert  <eggert@twinsun.com>
25482
25483         * lib/xgetcwd.c: Revert some of the previous change; intead,
25484         fix the HAVE_GETCWD_NULL code to behave more like the
25485         !HAVE_GETCWD_NULL code used to.
25486
25487         Include "xalloc.h".
25488         (xgetcwd): Do not return NULL when memory is exhausted; instead,
25489         invoke xalloc_die.
25490
25491 2001-09-03  Paul Eggert  <eggert@twinsun.com>
25492
25493         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
25494         sys/param.h, as pathmax.h includes them.
25495
25496 2001-09-03  Paul Eggert  <eggert@twinsun.com>
25497
25498         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
25499         (jm_PREREQ_XGETCWD): New macro.
25500
25501         * m4/getcwd.m4: New file.
25502
25503 2001-09-03  Paul Eggert  <eggert@twinsun.com>
25504
25505         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
25506         like the HAVE_GETCWD_NULL code.
25507         Include pathmax.h if not HAVE_GETCWD.
25508         Do not include xalloc.h.
25509         (INITIAL_BUFFER_SIZE): New symbol.
25510         Do not use xmalloc / xrealloc, since the caller is responsible for
25511         handling errors.  Preserve errno around `free' during failure.
25512         Do not overrun buffer when using getwd.
25513
25514 2001-09-03  Paul Eggert  <eggert@twinsun.com>
25515
25516         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
25517         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
25518         getcwd (NULL, 0).
25519
25520 2001-09-03  Paul Eggert  <eggert@twinsun.com>
25521
25522         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
25523         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
25524         spotted by Jim Meyering.
25525
25526 2001-09-03  Jim Meyering  <meyering@lucent.com>
25527
25528         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
25529         failure.
25530
25531 2001-09-02  Jim Meyering  <meyering@lucent.com>
25532
25533         * lib/error.c: Update from GNU libc.
25534
25535 2001-09-01  Jim Meyering  <meyering@lucent.com>
25536
25537         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
25538         Used by df.
25539
25540 2001-09-01  Jim Meyering  <meyering@lucent.com>
25541
25542         * lib/xreadlink.c: New file.
25543         * lib/xreadlink.h: New file.
25544         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
25545         xreadlink.h.
25546
25547         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
25548         doesn't conflict with sparc Solaris 7's definition in
25549         /usr/include/sys/int_types.h.
25550
25551         * lib/exclude.c: Use `""', not `<>' to #include non-system header
25552         files.
25553         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
25554         and strncasecmp as r-values.  Unixware didn't have declarations.
25555
25556 2001-08-31  Paul Eggert  <eggert@twinsun.com>
25557
25558         * lib/xstrtol.h: Add copyright notice.
25559         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
25560         LONGINT_INVALID_SUFFIX_CHAR.
25561
25562 2001-08-31  Paul Eggert  <eggert@twinsun.com>
25563
25564         * lib/xstrtol.c (strtoimax): New decl.
25565
25566 2001-08-31  Paul Eggert  <eggert@twinsun.com>
25567
25568         * lib/xgetcwd.c: Don't include pathmax.h.
25569         Include stdlib.h and unistd.h if available.
25570         Include xalloc.h.
25571         (xmalloc, xstrdup, free): Remove decls.
25572         (xgetcwd): Don't assume sizes fit in unsigned.
25573         Check for overflow when computing sizes.
25574         Simplify reallocation code.
25575
25576 2001-08-31  Paul Eggert  <eggert@twinsun.com>
25577
25578         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
25579         a directory's st_size can have an arbitrary value, so the old
25580         usage could waste an arbitrary amount of memory.  All uses
25581         changed.
25582         * lib/savedir.h: Update prototype.
25583
25584 2001-08-31  Paul Eggert  <eggert@twinsun.com>
25585
25586         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
25587
25588         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
25589         old strtoimax.c.
25590
25591         Also, make the following further changes to make this file's
25592         configuration more similar to that of strtol.c:
25593         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
25594         (strtoumax, uintmax_t, strtoull, strtol): Remove.
25595         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
25596         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
25597         changed to signed values.
25598
25599         And make the following changes as well:
25600         Fix copyright notice, as 1999 was missing.
25601         (verify): New macro.
25602         (strtoimax): Check sizes at compile-time, not run-time.
25603         Prefer strtol to strtoll if both work.
25604         (main): Remove; it was not that useful and was a pain to maintain.
25605
25606         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
25607
25608 2001-08-31  Jim Meyering  <meyering@lucent.com>
25609
25610         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
25611         Use an initial, malloc'd, buffer of length 128 rather than
25612         a statically allocated one of length 1024.
25613
25614 2001-08-30  Paul Eggert  <eggert@twinsun.com>
25615
25616         Simplify code, partly by assuming autoconf 2.52 semantics.
25617
25618         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
25619
25620         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
25621         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
25622         All uses removed.
25623         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
25624         Move AC_REQUIRE to next-to-top level, to avoid confusion.
25625         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
25626         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
25627         jm_AC_HEADER_INTTYPES_H.
25628         * m4/jm-macros.m4 (jm_MACROS): Likewise.
25629
25630         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
25631
25632         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
25633         Quote first arg of AC_DEFUN.
25634         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
25635         since they are needed to parse the include file even if we need
25636         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
25637         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
25638         but with opposite signedness.
25639
25640 2001-08-30  Paul Eggert  <eggert@twinsun.com>
25641
25642         Merge 'exclude' changes from tar 1.13.22.
25643         This fixes one or two unlikely storage allocation overflow bugs,
25644         but doesn't change user-visible behavior otherwise.
25645
25646 2001-08-30  Paul Eggert  <eggert@twinsun.com>
25647
25648         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
25649         (jm_PREREQ_EXCLUDE): New macro.
25650
25651 2001-08-30  Paul Eggert  <eggert@twinsun.com>
25652
25653         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
25654         tm to be declared.
25655
25656 2001-08-30  Paul Eggert  <eggert@twinsun.com>
25657
25658         * lib/hash.c: Remove '2001' from copyright notice.
25659
25660 2001-08-30  Paul Eggert  <eggert@twinsun.com>
25661
25662         * lib/full-write.h: New file.
25663         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
25664         * lib/full-write.c: Correct credits, as cccp.c no longer
25665         exists and anyway it was so heavily changed from the old cccp
25666         code as to be unrecognizable.  Include full-write.h.
25667         (full_write) Return size_t, with short writes meaning failure.
25668         All callers changed.  This fixes a bug with large buffers
25669         on 64-bit hosts.
25670         * lib/utime.c: Include full-write.h.
25671
25672 2001-08-30  Paul Eggert  <eggert@twinsun.com>
25673
25674         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
25675         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
25676         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
25677         Include if available.
25678         (<xalloc.h>): Include
25679         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
25680         (verify): New macro.  Use it to verify that EXCLUDE macros do not
25681         collide with FNM macros.
25682         (struct patopts): New struct.
25683         (struct exclude): Use it, as exclude patterns now come with options.
25684         (new_exclude): Support above changes.
25685         (new_exclude, add_exclude_file):
25686         Initial size must now be a power of two to simplify overflow checking.
25687         (free_exclude, fnmatch_no_wildcards): New function.
25688         (excluded_filename): No longer requires options arg, as the options
25689         are determined by add_exclude.  Now returns bool, not int.
25690         (excluded_filename, add_exclude):
25691         Add support for the fancy new exclusion options.
25692         (add_exclude, add_exclude_file): Now takes int options arg.
25693         Check for arithmetic overflow when computing sizes.
25694         (add_exclude_file): xrealloc might modify errno, so don't
25695         realloc until after errno might be used.
25696
25697         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
25698         New macros.
25699         (free_exclude): New decl.
25700         (add_exclude, add_exclude_file): Now takes int options arg.
25701         (excluded_filename): No longer requires options arg, as the options
25702         are determined by add_exclude.  Now returns bool, not int.
25703
25704 2001-08-30  Paul Eggert  <eggert@twinsun.com>
25705
25706         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
25707
25708 2001-08-27  Jim Meyering  <meyering@lucent.com>
25709
25710         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
25711
25712         * lib/version-etc.c (N_): Remove definition.
25713         Revert most of last change.
25714         Instead, simply don't mark the `Copyright...' string for translation.
25715         Based on advice from Paul Eggert.
25716
25717         * lib/strtoxmax.c: Tweak comment.
25718
25719 2001-08-26  Jim Meyering  <meyering@lucent.com>
25720
25721         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
25722
25723         * m4/xstrtoimax.m4: New file.
25724         * m4/xstrtoumax.m4: Add comments explaining why we
25725         AC_REPLACE_FUNCS(strtol).
25726
25727 2001-08-26  Jim Meyering  <meyering@lucent.com>
25728
25729         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
25730         of copyright with `%s' so translators don't get an untranslated
25731         message in 2002.
25732         (COPYRIGHT_YEAR): Define.
25733         (version_etc): Use fprintf rather than fputs.
25734         Suggestion from Ulrich Drepper.
25735
25736         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
25737
25738         * lib/strtoll.c: New file, from GNU libc.
25739         * lib/xstrtoimax.c: New file.
25740
25741         * lib/xstrtol.h: Add xstrtoimax.
25742         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
25743         * lib/strtoimax.c: New file.  Likewise, but first define
25744         STRTOUXMAX_SIGNED.
25745
25746         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
25747         ...
25748         * lib/strtoxmax.c: ... then renamed to this.
25749
25750 2001-08-18  Paul Eggert  <eggert@twinsun.com>
25751
25752         * m4/inttypes.m4: Add AC_PREREQ(2.13).
25753         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
25754         (jm_AC_TYPE_INTMAX_T): New macro.
25755         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
25756
25757         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
25758
25759         * m4/longlong.m4: Renamed from ulonglong.m4.
25760         * m4/inttypes.m4: Renamed from inttypes_h.m4.
25761         * m4/uintmax_t.m4: Removed.
25762
25763 2001-08-13  Paul Eggert  <eggert@twinsun.com>
25764
25765         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
25766         Port to Solaris 8, where 'sed' requires a space after the 'r'
25767         command, and where sh dislikes "$/".  Clean up the spacing a bit.
25768         Redirect output to $tmp just once.
25769
25770 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
25771
25772         * lib/addext.c (<errno.h>): Include.
25773         (errno): Declare if not defined.
25774         (addext): Work correctly when pathconf returns -1 and leaves
25775         errno alone because there is no limit.  Also, work even if
25776         pathconf returns a value greater than SIZE_MAX.
25777
25778 2001-08-12  Jim Meyering  <meyering@lucent.com>
25779
25780         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
25781         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
25782         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
25783         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
25784         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
25785         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
25786         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
25787         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
25788         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
25789         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
25790         utime.m4, utimes.m4, xstrtoumax.m4:
25791         Quote the first argument in each use of AC_DEFUN.
25792
25793 2001-08-12  Jim Meyering  <meyering@lucent.com>
25794
25795         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
25796         Simply `return getcwd (NULL, 0);'.
25797         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
25798         Use 1300 as initial value for length, not PATH_MAX.
25799
25800         * lib/pathmax.h: Clean up cpp syntax.
25801
25802 2001-08-12  Jim Meyering  <meyering@lucent.com>
25803
25804         * lib/gettimeofday.c: New file.
25805         * lib/gtod.h: New file.
25806         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
25807
25808 2001-08-05  Jim Meyering  <meyering@lucent.com>
25809
25810         * m4/jm-macros.m4: Require autoconf-2.52.
25811
25812 2001-08-04  Jim Meyering  <meyering@lucent.com>
25813
25814         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
25815         stmt, to get in sync with glibc.
25816
25817 2001-08-03  Paul Eggert  <eggert@twinsun.com>
25818
25819         The following changes are from gettext 0.10.39 as maintained by
25820         Bruno Haible.
25821
25822         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
25823         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
25824         with inverted sense.  All uses changed.
25825
25826         * lib/mbswidth.c: Don't include <limits.h>.
25827         Include <stdlib.h> and <string.h> unconditionally.
25828         (iswcntrl, mbsinit, ISCNTRL): New macros.
25829         (mbsnwidth): Use K&R style function declarations.
25830         Don't bother checking for MB_LEN_MAX == 1, since the compiler
25831         can optimize it when MB_CUR_MAX == 1.
25832         The width of control characters is zero, not 1.
25833
25834 2001-08-03  Paul Eggert  <eggert@twinsun.com>
25835
25836         The following changes are from gettext 0.10.39 as maintained by
25837         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
25838
25839         * m4/codeset.m4: Upgrade to serial AM1.
25840         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
25841         all uses changed.  Quote first arg of AC_DEFUN.
25842         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
25843
25844         * m4/iconv.m4: Upgrade to serial AM2.
25845         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
25846         Add --with-libconv-prefix.
25847         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
25848         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
25849         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
25850         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
25851         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
25852
25853         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
25854         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
25855         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
25856         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
25857         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
25858         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
25859         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
25860         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
25861         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
25862
25863         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
25864         string.h any more.
25865
25866         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
25867         not the default value.
25868
25869         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
25870         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
25871         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
25872         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
25873         Also check for iswcntrl, used for wcwidth fallback.
25874         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
25875         to Autoconf 2.13.
25876
25877 2001-08-03  Jim Meyering  <meyering@lucent.com>
25878
25879         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
25880         as it was in the original.  Reported by Paul Eggert.
25881
25882 2001-07-16  Jim Meyering  <meyering@lucent.com>
25883
25884         * m4/gettimeofday.m4: New file.
25885         Prompted by a report from Bernhard Baehr.
25886
25887 2001-07-15  Jim Meyering  <meyering@lucent.com>
25888
25889         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
25890         stuff. Now it's in ../Makefile.cfg.
25891
25892 2001-07-15  Jim Meyering  <meyering@lucent.com>
25893
25894         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
25895         (BUILT_SOURCES): Add unlocked-io.h.
25896         (io_functions): Define.
25897         (unlocked-io.h): New rule.
25898         (DISTCLEANFILES): Add unlocked-io.h.
25899         (all-local): Depend on unlocked-io.h, to ensure it is created.
25900
25901         * lib/unlocked-io.hin: New file
25902
25903         * lib/regex.c: Update from glibc.
25904
25905 2001-07-05  Jim Meyering  <meyering@lucent.com>
25906
25907         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
25908         recommendation.
25909         (libfetish_a_SOURCES): Put all .h files here instead.
25910         Remove a thus-exposed (better checks in automake) duplicate and
25911         two unnecessary .h files.
25912
25913 2001-07-04  Jim Meyering  <meyering@lucent.com>
25914
25915         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
25916         that generates jm-glibc-io.m4 so that it doesn't trigger any make
25917         distcheck failure.
25918
25919 2001-07-02  Jim Meyering  <meyering@lucent.com>
25920
25921         The following changes were prompted by suggestions from Bruno Haible.
25922
25923         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
25924         is now generated.
25925         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
25926         definition of EXTRA_DIST.
25927         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
25928         ensure that the generated file is created/updated whenever the list
25929         of $(unlocked_functions) is changed.
25930         (jm-glibc-io.m4): New rule.
25931         (unlocked-io.h): New rule -- currently unused.
25932
25933 2001-06-24  Jim Meyering  <meyering@lucent.com>
25934
25935         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
25936         unmatched right bracket, rather than kludging it with an extra,
25937         falsely-matching quote in a comment.  Patch by Akim Demaille.
25938
25939 2001-06-11  Jim Meyering  <meyering@lucent.com>
25940
25941         * lib/regex.c: Update from GNU libc.
25942
25943 2001-05-27  Jim Meyering  <meyering@lucent.com>
25944
25945         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
25946         Check for ut_type in struct utmp.
25947
25948 2001-05-27  Jim Meyering  <meyering@lucent.com>
25949
25950         * lib/readutmp.h (UT_TYPE): Define.
25951
25952 2001-05-24  Jim Meyering  <meyering@lucent.com>
25953
25954         * lib/argmatch.c: Include "quote.h".
25955         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
25956         quote function.  Reported by Göran Uddeborg.
25957
25958 2001-05-22  Jim Meyering  <meyering@lucent.com>
25959
25960         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
25961         now that we use the package-supplied version unconditionally.
25962         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
25963
25964 2001-05-21  Jim Meyering  <meyering@lucent.com>
25965
25966         * m4/regex.m4: Change a couple backticks to single quotes to avoid
25967         shell syntax errors.
25968
25969 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
25970
25971         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
25972
25973 2001-05-20  Paul Eggert  <eggert@twinsun.com>
25974
25975         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
25976         Don't bother to check library strftime, since
25977         we'll be using our own my_strftime function anyway.
25978         Define my_strftime instead of strftime.
25979
25980 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
25981
25982         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
25983         which is not yet declared.
25984
25985 2001-05-15  Jim Meyering  <meyering@lucent.com>
25986
25987         * m4/regex.m4: Use proper quoting so brackets appear in the test
25988         program.
25989         Reported by, and with help from, Bruno Haible.
25990
25991 2001-05-13  Jim Meyering  <meyering@lucent.com>
25992
25993         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
25994         undefined.
25995
25996 2001-05-11  Paul Eggert  <eggert@twinsun.com>
25997
25998         dirname code cleanup.  base_name now behaves more compatibly
25999         with POSIX basename when given file names that have trailing
26000         slashes, and similarly for dir_name.  Add new primitives
26001         base_len and dir_len.  Put the directory-name-related decls
26002         into dirname.h.
26003
26004         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
26005         * lib/backupfile.c (base_name): Likewise.
26006         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
26007         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
26008         * lib/makepath.c (strip_trailing_slashes): Likewise.
26009         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
26010         ISSLASH): Likewise.
26011         * lib/rename.c (strip_trailing_slashes): Likewise.
26012         * lib/same.c (base_name): Likewise.
26013         * lib/stripslash.c (ISSLASH): Likewise.
26014
26015         * lib/addext.c: Include <dirname.h> after size_t is defined.
26016         * lib/backupfile.c: Likewise.
26017
26018         * lib/addext.c (addext): Use base_len to trim redundant
26019         trailing slashes instead of doing it ourselves.
26020         But do not trim the last slash if it is not redundant.
26021
26022         * lib/backupfile.c (find_backup_file_name,
26023         max_backup_version): Use base_len instead of rolling it ourselves.
26024         Handle the case of "" and (on DOS) "C:" correctly.
26025
26026         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
26027         needed. Include <string.h>, <dirname.h>.
26028         (base_name): Allow file names ending in slashes, other than names
26029         that are all slashes.  In this case, return the basename followed
26030         by the slashes.  This is more general, and can be used in places
26031         where the original base_name purposely had an assertion failure.
26032         (base_len): New function.
26033
26034         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
26035         Do not include <assert.h>; no longer needed.
26036         Include xalloc.h.
26037         (memrchr): Remove decl.
26038         (dir_name_r): Remove.
26039         (dir_len): Renamed from dirlen.  All callers changed.
26040         Rewrite in terms of base_name, for simplicity and consistency.
26041         (dir_name): Never return NULL.  All callers changed.
26042         Do not include <stdlib.h> in test program; no longer needed.
26043         return 0; is fine for test program.
26044
26045         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
26046         New macros.
26047         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
26048
26049         * lib/path-concat.c (path_concat): Use base_len to compute
26050         base length, not strlen; this means we cannot rely on memcpy
26051         to null-terminate.
26052
26053         * lib/same.c (STREQ): Remove.
26054         (same_name): Handle the case where the basename ends in trailing '/'.
26055
26056         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
26057         a slash was stripped.  Do not strip the last slash after a
26058         file system prefix.
26059
26060 2001-05-11  Paul Eggert  <eggert@twinsun.com>
26061
26062         * lib/Makefile.am (libfetish_a_SOURCES):
26063         Add strftime.c, since we now compile it on all hosts.
26064
26065         * lib/strftime.c (my_strftime):
26066         Define to nstrftime if emacs, but only if my_strftime is not defined.
26067         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
26068         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
26069         Add one more extra argument: a nanoseconds value.
26070         All uses changed.
26071         (ns): New macro.
26072         (my_strftime function): Add %N format.
26073         (emacs_strftimeu): Renamed from emacs_strftime,
26074         with extra ut argument.
26075
26076 2001-05-09  Paul Eggert  <eggert@twinsun.com>
26077
26078         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
26079
26080 2001-04-21  Jim Meyering  <meyering@lucent.com>
26081
26082         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
26083         doesn't interfere.
26084
26085 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
26086
26087         * m4/ftruncate.m4: Check for chsize.
26088         Link with ftruncate.o unconditionally if ftruncate is missing.
26089         This was required when cross-compiling to i586-mingw32msvc.
26090
26091 2001-04-08  Jim Meyering  <meyering@lucent.com>
26092
26093         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
26094         recomputed; that's necessary when the offset spans a DST transition.
26095         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
26096
26097 2001-04-02  Jim Meyering  <meyering@lucent.com>
26098
26099         * lib/regex.h, regex.c: Update from GNU libc.
26100
26101 2001-03-24  Jim Meyering  <meyering@lucent.com>
26102
26103         * m4/jm-macros.m4: Require autoconf-2.49d.
26104
26105 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
26106
26107         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
26108
26109 2001-03-19  Paul Eggert  <eggert@twinsun.com>
26110
26111         * lib/version-etc.c (version_etc_copyright): Update to 2001.
26112
26113 2001-03-17  Jim Meyering  <meyering@lucent.com>
26114
26115         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
26116         now that the version in autoconf is equivalent.
26117         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
26118
26119         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
26120         Suggestion from Akim Demaille.
26121
26122         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
26123         (jm_PREREQ_TEMPNAME): New function.
26124
26125 2001-03-16  Paul Eggert  <eggert@twinsun.com>
26126
26127         * lib/tempname.c (uint64_t): Define to uintmax_t if
26128         not defined, and if UINT64_MAX is not defined.
26129         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
26130         Reported by John David Anglin.
26131
26132 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
26133
26134         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
26135         resolve alias if codeset is empty.
26136         * lib/config.charset (BeOS): Use wildcard syntax.
26137
26138 2001-03-13  Jim Meyering  <meyering@lucent.com>
26139
26140         * lib/path-concat.c (path_concat)
26141         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
26142         concatenating e.g., `C:' and `foo'.
26143         From Bruno Haible.
26144
26145 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
26146
26147         * lib/localcharset.c (locale_charset): Don't use
26148         setlocale(LC_CTYPE,NULL). Don't return NULL.
26149         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
26150
26151 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
26152
26153         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
26154         support for DOS/DJGPP.
26155
26156 2001-03-01  Paul Eggert  <eggert@twinsun.com>
26157
26158         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
26159         lacks mkstemp.  Compile our own tempname.c if we compile our own
26160         mkstemp.c, as mkstemp relies on tempname.
26161
26162 2001-03-01  Jim Meyering  <meyering@lucent.com>
26163
26164         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
26165         AH_VERBATIM really does output its argument verbatim.
26166
26167 2001-02-28  Paul Eggert  <eggert@twinsun.com>
26168
26169         * lib/Makefile.am (libfetish_a_SOURCES):
26170         Add dup-safer.c, fopen-safer.c.
26171         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
26172
26173         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
26174         * lib/unistd-safer.h: New files.
26175
26176 2001-02-25  Paul Eggert  <eggert@twinsun.com>
26177
26178         The mkstemp replacement is taken from glibc 2.2.2, with some
26179         portability fixes for use outside glibc, as follows:
26180
26181         * lib/tempname.c (struct_stat64): New macro.
26182         (direxists, __gen_tempname): Use it.
26183         This avoids a portability problem with Solaris 8.
26184
26185         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
26186         (<stddef.h>, <stdint.h>, <string.h>):
26187         Include only if STDC_HEADERS || _LIBC.
26188         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
26189         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
26190         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
26191         (__set_errno): Define this macro if <errno.h> doesn't.
26192         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
26193         Define these macros if <stdio.h> doesn't.
26194         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
26195         Define these macros if <sys/stat.h>
26196         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
26197         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
26198         __xstat64): Define if not _LIBC.
26199         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
26200         (__gen_tempname): Invoke gettimeofday only if
26201         HAVE_GETTIMEOFDAY || _LIBC;
26202         otherwise, fall back on plain "time".
26203         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
26204
26205         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
26206
26207         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
26208
26209 2001-02-18  Paul Eggert  <eggert@twinsun.com>
26210
26211         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
26212
26213 2001-02-17  Paul Eggert  <eggert@twinsun.com>
26214
26215         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
26216         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
26217         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
26218         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
26219
26220 2001-02-17  Paul Eggert  <eggert@twinsun.com>
26221
26222         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
26223         Remove workaround macros for hosts that have mbrtowc but not
26224         mbstate_t, as we now insist on proper declarations for both
26225         before using mbrtowc.
26226
26227 2001-02-17  Jim Meyering  <meyering@lucent.com>
26228
26229         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
26230         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
26231         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
26232         UnixWare 7.1.1.
26233
26234         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
26235         rather than AC_CACHE_VAL.
26236
26237 2001-02-17  Jim Meyering  <meyering@lucent.com>
26238
26239         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
26240         around included file name.
26241
26242         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
26243
26244         * lib/strftime.c: Update from GNU libc (the only changes were to
26245         comments).
26246
26247 2001-02-17  Jim Meyering  <meyering@lucent.com>
26248
26249         * lib/regex.c: Update from libc.
26250
26251 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
26252
26253         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
26254         clash.
26255
26256 2001-02-16  Paul Eggert  <eggert@twinsun.com>
26257
26258         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
26259         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
26260         Reported by Mark Hounschell via Paul Eggert.
26261
26262 2001-02-07  Jim Meyering  <meyering@lucent.com>
26263
26264         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
26265
26266 2001-02-05  Jim Meyering  <meyering@lucent.com>
26267
26268         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
26269         it includes the patch required for `large file' support with at least
26270         HP-UX's 10.20 /bin/cc.
26271
26272 2001-02-03  Jim Meyering  <meyering@lucent.com>
26273
26274         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
26275         AS_IF, now that it works once again (mysteriously).
26276         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
26277
26278 2001-01-30  Jim Meyering  <meyering@lucent.com>
26279
26280         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
26281         * m4/chown.m4: Rename conftestchown to conftest.chown.
26282         * m4/rename.m4: s/conftestdir/conftest.d1/ and
26283         s/conftestdir2/conftest.d2/.
26284         * m4/utimes.m4: s/conftestdata/conftest.data/
26285         Inspired by Pavel Roskin's change in autoconf.
26286
26287 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
26288
26289         * lib/config.charset: Update for FreeBSD 4.2.
26290
26291 2001-01-27  Jim Meyering  <meyering@lucent.com>
26292
26293         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
26294         a use of AS_IF.
26295         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
26296
26297 2001-01-26  Jim Meyering  <meyering@lucent.com>
26298
26299         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
26300         quotearg.c includes it.
26301
26302 2001-01-26  Jim Meyering  <meyering@lucent.com>
26303
26304         * lib/quotearg.c: Include stddef.h.
26305         * lib/quote.c: Include stddef.h.
26306         Reported by Axel Kittenberger.
26307
26308         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
26309         line in double quotes so that it evokes a better diagnostic.
26310         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
26311         Reported by Axel Kittenberger.
26312
26313 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
26314
26315         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
26316         as if it was a `charset'.
26317
26318 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
26319
26320         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
26321         has const.
26322
26323 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
26324
26325         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
26326         to avoid a warning.  Add back 'const' to inptr.
26327
26328 2001-01-20  Jim Meyering  <meyering@lucent.com>
26329
26330         Be sure that headers are checked before used in code compiled
26331         for the type checks.
26332         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
26333         In place of that, invoke jm_CHECK_ALL_TYPES.
26334         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
26335         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
26336         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
26337         The check for ssize_t was mistakenly run before the test for unistd.h.
26338
26339         The configure-time check for stdbool.h was missing.
26340         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
26341         (jm_PREREQ_HASH): New function.
26342
26343 2001-01-17  Jim Meyering  <meyering@lucent.com>
26344
26345         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
26346         for autoconf-2.49c.
26347         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
26348
26349 2001-01-16  Jim Meyering  <meyering@lucent.com>
26350
26351         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
26352         From Bruno Haible.
26353
26354 2001-01-14  Jim Meyering  <meyering@lucent.com>
26355
26356         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
26357         foo and bar.  Create conftestdir/ in the script, not in the C code.
26358         Remove directories in the script, not in the C code.
26359         Remove conftestdir{,2} before trying to create the directory.
26360         Make the entire configure script fail if the mkdir fails.
26361
26362 2001-01-14  Jim Meyering  <meyering@lucent.com>
26363
26364         * lib/rename.c: New file.  From Volker Borchert.
26365         Include stdlib.h, string.h or strings.h, and xalloc.h.
26366         Use strip_trailing_slashes rather than open-coding it.
26367
26368 2001-01-03  Paul Eggert  <eggert@twinsun.com>
26369
26370         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
26371
26372 2001-01-03  Jim Meyering  <meyering@lucent.com>
26373
26374         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
26375         of local `inptr' to avoid warning with some system declarations of
26376         iconv.
26377
26378 2001-01-02  Volker Borchert  <bt@teknon.de>
26379
26380         * m4/rename.m4: New file.
26381         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
26382
26383 2001-01-01  Jim Meyering  <meyering@lucent.com>
26384
26385         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
26386         even on systems with utmpx.h.  It's necessary for the declaration of
26387         utmp's ut_user member.  Reported by Andreas Jaeger.
26388
26389         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
26390         available. They are required for the declarations of getgrgid and
26391         getpwuid resp.
26392         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
26393         Reported by Andreas Jaeger.
26394
26395 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
26396
26397         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
26398         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
26399         so `make install' also works in VPATH builds.
26400
26401 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
26402
26403         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
26404         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
26405         can be used in subdirectories.
26406
26407 2000-12-29  Paul Eggert  <eggert@twinsun.com>
26408
26409         * lib/modechange.c: Do not assume that mode_t uses the
26410         traditional octal encoding.  E.g. "chmod 1 FOO" should set
26411         the other-execute bit of FOO even if S_IXOTH != 1.
26412
26413         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
26414         WOTH, XOTH, ALLM): New macros.
26415         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
26416          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
26417         Use them.
26418         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
26419         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
26420         (mode_compile):
26421         No need to use uintmax_t; unsigned long is long enough.
26422         Don't bother to get suffix since we don't use it.
26423
26424 2000-12-26  Jim Meyering  <meyering@lucent.com>
26425
26426         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
26427         better with autoheader.
26428
26429 2000-12-24  Jim Meyering  <meyering@lucent.com>
26430
26431         * lib/hash.c (is_prime): Return explicit boolean values.
26432         (hash_get_first): Return NULL to appease Irix5.6's 89.
26433         Reported by Nelson Beebe.
26434
26435 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
26436
26437         * lib/localcharset.c (locale_charset): Add support for Win32.
26438
26439 2000-12-18  Paul Eggert  <eggert@twinsun.com>
26440
26441         * lib/physmem.h, lib/physmem.c: New files.
26442
26443         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
26444         (noinst_HEADERS): Add physmem.h.
26445
26446         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
26447         't' for compatibility with Solaris 8 sort.
26448
26449 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
26450
26451         * lib/config.charset: Add support for BeOS.
26452
26453 2000-12-17  Jim Meyering  <meyering@lucent.com>
26454
26455         * m4/dos.m4 (jm_AC_DOS): New file and macro.
26456         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
26457
26458 2000-12-16  Jim Meyering  <meyering@lucent.com>
26459
26460         This bug had a serious impact on chown: `chown N:M FILE' (for integer
26461         N and M) would have treated it like `chown N:N FILE'.
26462
26463         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
26464
26465 2000-12-16  Jim Meyering  <meyering@lucent.com>
26466
26467         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
26468         SHELLS_FILE to a file name that's useful on djgpp systems.
26469         Include stdlib.h.
26470         (ADDITIONAL_DEFAULT_SHELLS): Define.
26471         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
26472         Based mostly on a patch from Prashant TR.
26473
26474 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
26475
26476         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
26477         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
26478         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
26479
26480 2000-12-08  Andreas Schwab  <schwab@suse.de>
26481
26482         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
26483         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
26484
26485 2000-12-07  Jim Meyering  <meyering@lucent.com>
26486
26487         * lib/stripslash.c (ISSLASH): Define.
26488         (strip_trailing_slashes): Use ISSLASH rather than comparing against
26489         `/'.
26490         From Prashant TR.
26491
26492         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
26493         (dir_name_r): Declare this function as static.
26494         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
26495         manifest itself on a name containing a mix of slashes and
26496         backslashes.
26497         Make this function work with names starting with a DOS-style
26498         drive letter and colon prefix.
26499         (dir_name): Append `.' if necessary.
26500         Based mostly on patches from Prashant TR and Eli Zaretskii.
26501
26502         * lib/dirname.h (dir_name_r): Remove prototype.
26503
26504 2000-12-06  Paul Eggert  <eggert@twinsun.com>
26505
26506         * m4/off_t-format.m4: Remove this file.
26507         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
26508
26509 2000-12-06  Jim Meyering  <meyering@lucent.com>
26510
26511         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
26512         replacement strtoull, we may well need the replacement strtoul, too.
26513         Check for declarations of strtoul and strtoull.
26514         Check for strtol.  Mainly as a cue to cause automake to include
26515         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
26516         Check for limits.h -- strtol.c needs it.
26517
26518 2000-12-05  Jim Meyering  <meyering@lucent.com>
26519
26520         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
26521
26522 2000-12-04  Jim Meyering  <meyering@lucent.com>
26523
26524         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
26525         Also include memory.h, stdlib.h, unistd.h if appropriate.
26526         Reported by Andreas Jaeger (conflicting declaration of malloc).
26527
26528 2000-12-02  Jim Meyering  <meyering@lucent.com>
26529
26530         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
26531         * m4/jm-macros.m4 (jm_MACROS): require it.
26532
26533 2000-12-02  Jim Meyering  <meyering@lucent.com>
26534
26535         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
26536
26537 2000-12-01  Paul Eggert  <eggert@twinsun.com>
26538
26539         * lib/memrchr.c: Include <config.h> before any system include file.
26540
26541 2000-11-30  Jim Meyering  <meyering@lucent.com>
26542
26543         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
26544
26545 2000-11-30  Jim Meyering  <meyering@lucent.com>
26546
26547         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
26548
26549 2000-11-29  Paul Eggert  <eggert@twinsun.com>
26550
26551         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
26552
26553 2000-11-26  Jim Meyering  <meyering@lucent.com>
26554
26555         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
26556
26557 2000-11-22  Paul Eggert  <eggert@twinsun.com>
26558
26559         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
26560         size of (size_t) -1; it's not portable.
26561
26562 2000-11-17  Jim Meyering  <meyering@lucent.com>
26563
26564         * lib/strstr.c: Update from GNU libc.
26565
26566 2000-11-17  Akim Demaille  <akim@epita.fr>
26567
26568         * lib/obstack.h: Formatting changes.
26569         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
26570         prevent type checking.
26571         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
26572         cast the value to (void *): assigning a `foo *' to a `void *'
26573         variable is valid.
26574         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
26575
26576 2000-11-16  Jim Meyering  <meyering@lucent.com>
26577
26578         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
26579
26580 2000-11-11  Jim Meyering  <meyering@lucent.com>
26581
26582         * lib/error.c: Add a couple #includes, merging from GNU libc version.
26583
26584 2000-11-10  Jim Meyering  <meyering@lucent.com>
26585
26586         * lib/obstack.h: Update from GNU libc.
26587         * lib/obstack.c: Likewise.
26588
26589 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
26590
26591         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
26592
26593 2000-11-06  Paul Eggert  <eggert@twinsun.com>
26594
26595         * lib/getusershell.c (setusershell): Use rewind rather than
26596         fseek/fseeko, to avoid configuration hassles with fseeko.
26597         Don't bother opening SHELLS_FILE if shellstream is NULL;
26598         it's not necessary.
26599
26600 2000-11-05  Jim Meyering  <meyering@lucent.com>
26601
26602         * lib/makepath.h (make_dir): Declare.
26603         * lib/makepath.c (make_dir): Remove `static' attribute.
26604         Tweak a comment.
26605
26606 2000-11-04  Jim Meyering  <meyering@lucent.com>
26607
26608         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
26609
26610 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
26611
26612         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
26613         last one in a bucket, advance to the next bucket.
26614
26615 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
26616
26617         * lib/fnmatch.c: Do not comment out all the code if we are using
26618         the GNU C library, because in some cases we are replacing buggy
26619         code in the GNU C library itself.
26620
26621 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
26622
26623         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
26624         (regex_compile): Catch bogus \(\1\).
26625
26626 2000-10-30  Paul Eggert  <eggert@twinsun.com>
26627
26628         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
26629         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
26630         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
26631
26632 2000-10-30  Paul Eggert  <eggert@twinsun.com>
26633
26634         * lib/error.h, getline.h, modechange.h:
26635         Remove "2000" from Copyright line, as the file hasn't been
26636         changed this year other than in the copyright notice.
26637
26638         * lib/xalloc.h: Add "2000" to Copyright line, as this file
26639         was changed this year.
26640
26641 2000-10-29  Jim Meyering  <meyering@lucent.com>
26642
26643         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
26644         renaming.
26645         * m4/ls-mntd-fs.m4: Likewise
26646
26647 2000-10-29  Jim Meyering  <meyering@lucent.com>
26648
26649         * lib/xstat.in: Fix grammar in comment.
26650
26651 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
26652
26653         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
26654         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
26655         doesn't define __restrict_arr.
26656
26657 2000-10-28  Jim Meyering  <meyering@lucent.com>
26658
26659         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
26660         (jm_PREREQ_MEMCHR): New function.
26661
26662 2000-10-28  Jim Meyering  <meyering@lucent.com>
26663
26664         * lib/memchr.c: Update from libc.
26665         Adjust for portability:
26666         [HAVE_STDLIB_H]: Include stdlib.h.
26667         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
26668         Undef __memchr, too.
26669         [!weak_alias]: Define __memchr to memchr.
26670
26671         * lib/regex.c: Update from libc.
26672         * lib/regex.h: Likewise.
26673         * lib/getopt1.c: Likewise.
26674         * lib/memcmp.c: Likewise.
26675
26676         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
26677         Avoid using fseek, when possible -- it's broken by design.
26678         Patch by Ulrich Drepper.
26679
26680 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
26681
26682         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
26683         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
26684         Giving in to popular pressure to shut up the compiler with casts.
26685
26686 2000-10-26  Jim Meyering  <meyering@lucent.com>
26687
26688         * lib/strftime.c: Update from libc.
26689
26690 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
26691
26692         * regex.c: More `unsigned char' -> `re_char' changes.
26693         Also change several `int' into `re_wchar_t'.
26694         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
26695         (PUSH_FAILURE_POINTER): Don't cast any more.
26696         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
26697         We want GCC to complain, since this piece of code makes
26698         re_match non-reentrant, which *should* be fixed.
26699         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
26700         (EXTEND_BUFFER): Use RETALLOC.
26701         (SET_LIST_BIT): Don't cast.
26702         (re_wchar_t): New type.
26703         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
26704         that those two functions will always properly return.
26705         (IMMEDIATE_QUIT_CHECK): Cast to void.
26706         (analyse_first): Use recursion rather than an explicit stack.
26707         (re_compile_fastmap): Can't fail anymore.
26708         (re_search_2): Don't check re_compile_fastmap for failure.
26709         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
26710         Now also sets the new value (passed in a new argument).
26711         (re_match_2_internal): Use it.
26712         Also, use a new var `reg' of type size_t when looping through regs
26713         rather than reuse the inappropriate `mcnt'.
26714
26715 2000-10-25  Jim Meyering  <meyering@lucent.com>
26716
26717         * lib/obstack.c: Update from libc.
26718
26719 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
26720
26721         * regex.c (regex_compile): Change the way of handling a range from
26722         a char less than 256 to a char not less than 256.
26723
26724 2000-10-24  Andrew Innes  <andrewi@gnu.org>
26725
26726         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
26727         NT-Emacs only.
26728         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
26729         so that re_search functions only quit when callers expect them to.
26730
26731 2000-10-23  Jim Meyering  <meyering@lucent.com>
26732
26733         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
26734         wrong.  That set_locale call must not have any side effects.
26735         From Paul Eggert.
26736
26737 2000-10-22  Jim Meyering  <meyering@lucent.com>
26738
26739         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
26740         [CYCLIC]: Remove now-unused definition.
26741
26742         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
26743         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
26744         Suggestion from Ulrich Drepper.
26745
26746 2000-10-21  Jim Meyering  <meyering@lucent.com>
26747
26748         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
26749         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
26750         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
26751
26752 2000-10-21  Jim Meyering  <meyering@lucent.com>
26753
26754         * lib/dirname.c (memrchr): Declare if necessary.
26755         (dir_name): Remove the restriction that there be no
26756         trailing slashes.  Now, this code skips past them, effectively
26757         ignoring them.
26758         [TEST_DIRNAME] (main): New unit tests.
26759
26760         * lib/memrchr.c: New file from GNU libc.
26761         Undef __memrchr, too.
26762         [!weak_alias]: Define __memrchr to memrchr.
26763         Guard weak_alias use with `#ifdef weak_alias'.
26764
26765 2000-10-21  Jim Meyering  <meyering@lucent.com>
26766
26767         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
26768         (dir_name): Use dir_name_r.
26769         * lib/dirname.h (dir_name_r): Declare it.
26770
26771 2000-10-17  Jim Meyering  <meyering@lucent.com>
26772
26773         * lib/quote.h (PARAMS): Define and use.
26774         Reported by Akim Demaille.
26775
26776         * lib/getopt.c: Update from libc.
26777
26778 2000-10-16  Jim Meyering  <meyering@lucent.com>
26779
26780         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
26781         setlocale.
26782         From Jan Fedak.
26783
26784 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
26785
26786         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
26787
26788 2000-09-25  Jim Meyering  <meyering@lucent.com>
26789
26790         * lib/md5.h (rol): Define (from GnuPG).
26791
26792         * lib/sha.c: Give credit (GnuPG) where due.
26793         (M): Use rol rather than open-coding it.
26794         Add a FIXME comment.
26795
26796 2000-09-21  Jim Meyering  <meyering@lucent.com>
26797
26798         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
26799         Reported by Michael Stone.
26800
26801 2000-09-20  Jim Meyering  <meyering@lucent.com>
26802
26803         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
26804         (noinst_HEADERS): Add sha.h.
26805         Based on code from Scott G. Miller and from GnuPG.
26806
26807 2000-09-18  Jim Meyering  <meyering@lucent.com>
26808
26809         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
26810         LIBS. Otherwise, everyone ends up linking with -lelf for some
26811         configurations.
26812         Reported by Mike Stone.
26813
26814 2000-09-15  Jim Meyering  <meyering@lucent.com>
26815
26816         * lib/regex.c: Update from libc.
26817
26818 2000-09-10  Jim Meyering  <meyering@lucent.com>
26819
26820         * lib/getopt.c (_getopt_internal): Update from glibc.
26821
26822 2000-09-09  Jim Meyering  <meyering@lucent.com>
26823
26824         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
26825         think it should be used as a general replacement for isascii.
26826         * lib/fnmatch.c: Likewise.
26827         * lib/mbswidth.c: Likewise
26828         * lib/regex.c: Likewise.
26829
26830         Don't use atoi.
26831         * lib/userspec.c: Include sys/param.h and limits.h.
26832         Include xstrtol.h.
26833         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
26834         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
26835         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
26836         UID, GID.  Check range.
26837
26838 2000-09-06  Jim Meyering  <meyering@lucent.com>
26839
26840         * lib/getopt.c (_getopt_internal): Update from glibc.
26841
26842 2000-08-30  Jim Meyering  <meyering@lucent.com>
26843
26844         * lib/strftime.c: Merge in changes from GNU libc.
26845
26846 2000-08-26  Jim Meyering  <meyering@lucent.com>
26847
26848         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
26849         * m4/fpending.m4: New file.
26850
26851 2000-08-26  Jim Meyering  <meyering@lucent.com>
26852
26853         * lib/closeout.c: Include "__fpending.h".
26854         (close_stdout_status): Return right away if there's nothing to flush.
26855
26856         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
26857         * lib/__fpending.c: New file.
26858         * lib/__fpending.h: New file.
26859
26860 2000-08-20  Jim Meyering  <meyering@lucent.com>
26861
26862         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
26863         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
26864         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
26865
26866 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
26867
26868         Improve fileutils installation on systems where running
26869         programs (like install) can't be unlinked.
26870         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
26871         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
26872
26873 2000-08-07  Paul Eggert  <eggert@twinsun.com>
26874
26875         Standardize on "memory exhausted" instead of "Memory exhausted"
26876         or "virtual memory exhausted".
26877         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
26878         "virtual memory exhausted".
26879         * lib/same.c (same_name): Invoke xalloc_die instead of printing
26880         our own message.
26881         * lib/userspec.c (parse_user_spec): Likewise.
26882         * lib/bumpalloc.h: comment fix
26883         * lib/same.c, userspec.c: Include xalloc.h.
26884
26885         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
26886         not char *const and pointing to a constant array.
26887         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
26888         (xrealloc): Comment fix.
26889
26890         * lib/userspec.c (parse_user_spec):
26891         Don't translate a message until just before returning,
26892         to avoid unnecessary translation.
26893
26894 2000-08-07  Jim Meyering  <meyering@lucent.com>
26895
26896         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
26897         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
26898         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
26899         getgroups.c, gethostname.c, getopt.h, group-member.c,
26900         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
26901         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
26902         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
26903         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
26904         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
26905         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
26906         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
26907         yesno.c: Back out Copyright date changes for each file with no change
26908         this year.  This eases coordination with other programs using the same
26909         source code modules.  From Paul Eggert.
26910
26911 2000-08-06  Paul Eggert  <eggert@twinsun.com>
26912
26913         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
26914         not char, for compatibility with glibc 2.1.3 strftime.c.
26915
26916 2000-08-03  Greg McGary  <greg@mcgary.org>
26917
26918         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
26919         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
26920         (EXTEND_BUFFER): Use them.
26921
26922 2000-08-01  Jim Meyering  <meyering@lucent.com>
26923
26924         * lib/dirname.c (ISSLASH): Define.
26925         (BACKSLASH_IS_PATH_SEPARATOR): Define.
26926         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
26927         both `\' and `/' may be use as path separators.
26928         Based on a patch from Prashant TR.
26929
26930 2000-07-31  Paul Eggert  <eggert@twinsun.com>
26931
26932         * lib/quotearg.c (quotearg_n_options): Don't make the initial
26933         slot vector a constant, since it might get modified.
26934
26935 2000-07-31  Jim Meyering  <meyering@lucent.com>
26936
26937         * lib/xmalloc.c: Use `virtual memory exhausted', not
26938         `Memory exhausted'.
26939         * lib/obstack.c (print_and_abort): Likewise.
26940
26941 2000-07-30  Paul Eggert  <eggert@twinsun.com>
26942
26943         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
26944         buffer, so that the caller can always quote one small
26945         component of a "memory exhausted" message in slot 0.
26946         From a suggestion by Jim Meyering.
26947
26948 2000-07-30  Jim Meyering  <meyering@lucent.com>
26949
26950         * lib/makepath.c (make_path): Quote the other instance, too.
26951
26952         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
26953         (STATIC_BUF_SIZE): Define.
26954         (quotearg_n_options): Use only statically allocated storage when
26955         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
26956         than STATIC_BUF_SIZE.
26957
26958 2000-07-29  Jim Meyering  <meyering@lucent.com>
26959
26960         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
26961         * lib/dirname.c (dir_name): Likewise.
26962
26963         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
26964         `/'.
26965
26966         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
26967         (dir_name): Assert that there are no trailing slashes.
26968
26969 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
26970
26971         * lib/mbswidth.h (mbswidth): Add a flags argument.
26972         (mbswidth): New declaration.
26973         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
26974         * lib/mbswidth.c (mbswidth): Add a flags argument.
26975         (mbsnwidth): New function.
26976
26977 2000-07-24  Jim Meyering  <meyering@lucent.com>
26978
26979         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
26980
26981 2000-07-23  Paul Eggert  <eggert@twinsun.com>
26982
26983         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
26984
26985 2000-07-23  Paul Eggert  <eggert@twinsun.com>
26986
26987         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
26988         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
26989         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
26990         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
26991         invoke multibyte primitives.
26992
26993 2000-07-23  Paul Eggert  <eggert@twinsun.com>
26994
26995         * lib/quotearg.c:
26996         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
26997         so that mbstate_t is always defined.
26998
26999         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
27000         be 1 in at least one GCC installation, and this configuration
27001         error is likely to be common.  Ignoring MB_LEN_MAX hurts
27002         performance on hosts that have mbrtowc but have only unibyte
27003         locales, but I assume these hosts are rare.
27004
27005 2000-07-23  Paul Eggert  <eggert@twinsun.com>
27006
27007         * lib/mbswidth.c (_XOPEN_SOURCE):
27008         Don't define; this causes problems on Solaris 7.
27009         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
27010
27011 2000-07-23  Jim Meyering  <meyering@lucent.com>
27012
27013         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
27014         too: getgrgid, getpwuid, getuid.
27015
27016 2000-07-23  Jim Meyering  <meyering@lucent.com>
27017
27018         * lib/basename.c (base_name): Add an assertion.
27019
27020 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
27021
27022         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
27023         shadow its mbsinit function.
27024
27025 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
27026
27027         * lib/mbswidth.h: New file.
27028         * lib/mbswidth.c: New file.
27029         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
27030         (noinst_HEADERS): Add mbswidth.h.
27031
27032 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
27033
27034         * lib/config.charset: Add support for FreeBSD. Improve support for
27035         HP-UX and IRIX 6.
27036
27037 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
27038
27039         * m4/mbswidth.m4: New file.
27040         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
27041
27042 2000-07-15  Jim Meyering  <meyering@lucent.com>
27043
27044         * lib/makepath.c: Include quote.h.
27045         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
27046         corresponding argument in a `quote (...)' call.
27047         Give better diagnostics.
27048
27049         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
27050         (noinst_HEADERS): Add quote.h.
27051
27052         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
27053         from tar's src/misc.c.
27054         * lib/quote.h: New file.  Prototypes for same.
27055
27056 2000-07-14  Paul Eggert  <eggert@twinsun.com>
27057
27058         From a suggestion by Bruno Haible.
27059         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
27060         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
27061         to decide whether to define the BeOS workaround macro;
27062         this adjusts to the change to AC_MBSTATE_T.
27063
27064 2000-07-14  Jim Meyering  <meyering@lucent.com>
27065
27066         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
27067         jm_AC_TYPE_UINTMAX_T.
27068
27069 2000-07-13  Paul Eggert  <eggert@twinsun.com>
27070
27071         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
27072
27073         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
27074         quotearg_buffer_restyled): Add support for
27075         clocale_quoting_style.  Undo previous change to
27076         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
27077         and "{RIGHT QUOTATION MARK}" msgids.
27078
27079 2000-07-10  Paul Eggert  <eggert@twinsun.com>
27080
27081         From a suggestion by Bruno Haible.
27082         * m4/mbstate_t.m4 (AC_MBSTATE_T):
27083         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
27084         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
27085         and mbstate_t, to a single-part test that simply defines mbstate_t.
27086         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
27087         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
27088
27089 2000-07-10  Jim Meyering  <meyering@lucent.com>
27090
27091         * m4/strerror_r.m4: Mirror the correction made in autoconf.
27092
27093         * m4/gnu-source.m4: Output to confdefs.h directly.
27094         Suggestion from Akim Demaille.
27095
27096 2000-07-09  Paul Eggert  <eggert@twinsun.com>
27097
27098         The old behavior of quoting `like this' doesn't look good with
27099         newer, ISO-style fonts.  See:
27100         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
27101
27102         Instead, quote "like this" by default.  Let the translator
27103         tailor the locale-specific quoting behavior by providing
27104         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
27105
27106         * lib/quotearg.c (N_): New macro.
27107         (gettext_default): New function.
27108         (quotearg_buffer_restyled): Use
27109         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
27110         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
27111
27112 2000-07-09  Jim Meyering  <meyering@lucent.com>
27113
27114         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
27115         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
27116
27117         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
27118         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
27119
27120 2000-07-09  Jim Meyering  <meyering@lucent.com>
27121
27122         * lib/Most files: Update copyright dates to include 2000.
27123
27124 2000-07-08  Jim Meyering  <meyering@lucent.com>
27125
27126         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
27127         if not defined.
27128         (xgethostname): Remove now-unnecessary #ifdef.
27129         Move declaration of `err' into loop where it's used.
27130
27131 2000-07-05  Paul Eggert  <eggert@twinsun.com>
27132         and Bruno Haible  <haible@clisp.cons.org>
27133
27134         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
27135         only if the test for an object-type mbstate_t fails.  This
27136         prevents us from mistakenly reporting that mbstate_t is a
27137         system object type after we "#define mbstate_t int" to work
27138         around its lack.
27139
27140 2000-07-05  Paul Eggert  <eggert@twinsun.com>
27141         and Bruno Haible  <haible@clisp.cons.org>
27142
27143         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
27144
27145 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
27146
27147         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
27148         to strerror_r.
27149         Include <ctype.h> for use of isalpha.
27150
27151 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
27152
27153         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
27154         by allocating a larger buffer. Test the gethostname return value for
27155         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
27156         returns an error and ENAMETOOLONG isn't defined.
27157
27158 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
27159
27160         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
27161         dimension.
27162
27163 2000-07-04  Jim Meyering  <meyering@lucent.com>
27164
27165         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
27166         of the deprecated AC_CHECKING.
27167
27168 2000-07-04  Jim Meyering  <meyering@lucent.com>
27169
27170         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
27171         Reported by Bruno Haible.
27172
27173 2000-07-04  Jim Meyering  <meyering@lucent.com>
27174
27175         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
27176         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
27177         lacks mbrtowc.
27178
27179 2000-07-03  Paul Eggert  <eggert@twinsun.com>
27180
27181         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
27182         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
27183
27184 2000-07-03  Paul Eggert  <eggert@twinsun.com>
27185         and Bruno Haible  <haible@clisp.cons.org>
27186
27187         * lib/quotearg.c (mbrtowc):
27188         Assign to *pwc, and return 1 only if result is nonzero.
27189         (iswprint): Use ISPRINT when substituting our own mbrtowc.
27190
27191 2000-07-03  Jim Meyering  <meyering@lucent.com>
27192
27193         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
27194
27195 2000-07-03  Jim Meyering  <meyering@lucent.com>
27196
27197         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
27198         This is necessary to get a definition of e.g., UTMP_FILE on
27199         HP-UX 10.20.
27200         From Bob Proulx.
27201
27202 2000-07-02  Jim Meyering  <meyering@lucent.com>
27203
27204         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
27205
27206         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
27207         AC_LIBOBJ(function_name).
27208         * m4/chown.m4: Likewise.
27209         * m4/fnmatch.m4: Likewise.
27210         * m4/ftruncate.m4: Likewise.
27211         * m4/getgroups.m4: Likewise.
27212         * m4/getline.m4: Likewise.
27213         * m4/group-member.m4: Likewise.
27214         * m4/jm-macros.m4: Likewise.
27215         * m4/lstat.m4: Likewise.
27216         * m4/malloc.m4: Likewise.
27217         * m4/memcmp.m4: Likewise.
27218         * m4/nanosleep.m4: Likewise.
27219         * m4/putenv.m4: Likewise.
27220         * m4/realloc.m4: Likewise.
27221         * m4/regex.m4: Likewise.
27222         * m4/stat.m4: Likewise.
27223         * m4/strftime.m4: Likewise.
27224
27225 2000-07-02  Jim Meyering  <meyering@lucent.com>
27226
27227         * lib/quotearg.c (mbstate_t): Don't define here.
27228
27229 2000-07-02  Jim Meyering  <meyering@lucent.com>
27230
27231         * lib/nanosleep.c (SIGCONT): Define if not already defined.
27232
27233 2000-07-01  Jim Meyering  <meyering@lucent.com>
27234
27235         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
27236
27237 2000-07-01  Jim Meyering  <meyering@lucent.com>
27238
27239         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
27240         problem.
27241
27242 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
27243
27244         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
27245         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
27246
27247 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
27248
27249         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
27250         per change in ../m4/ls-mntd-fs.m4.
27251         (read_filesystem_list): Ignore symbolic links.
27252
27253 2000-06-29  Jim Meyering  <meyering@lucent.com>
27254
27255         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
27256         for declaration of strcmp.
27257
27258         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
27259
27260         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
27261         Avoid warning by casting result to `char *' to remove `const'.
27262
27263 2000-06-28  Jim Meyering  <meyering@lucent.com>
27264
27265         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
27266         included by quotearg.c, for which we perform this test.  From
27267         Bruno Haible.
27268
27269 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
27270
27271         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
27272         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
27273         <utmpx.h> exists, put readutmp.o into LIBOBJS.
27274
27275 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
27276
27277         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
27278
27279 2000-06-26  Paul Eggert  <eggert@twinsun.com>
27280
27281         savedir now sets errno on failure and invokes xmalloc to get memory.
27282         Fix a couple of other minor bugs while we're at it.
27283
27284         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
27285         (NAMLEN): Remove macro.
27286         (malloc, realloc): Remove decls.
27287         (stpcpy): Likewise.
27288         ("xalloc.h"): Include.
27289         (NAME_SIZE_DEFAULT): New macro.
27290         (savedir): Use xmalloc / xrealloc to allocate memory.
27291         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
27292         Skip "" directory entries.
27293         Use strlen to calculate directory entry length, since the old method
27294         is rarely used these days and isn't worth supporting.
27295         Don't use a pointer after freeing it.
27296         Check for integer overflow when calculating allocation size.
27297         Use memcpy to copy entries, instead of stpcpy.
27298         Set errno properly when returning NULL.
27299         Check for readdir error.
27300
27301 2000-06-26  Jim Meyering  <meyering@lucent.com>
27302
27303         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
27304
27305 2000-06-25  Jim Meyering  <meyering@lucent.com>
27306
27307         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
27308         Linux header bug when _XOPEN_SOURCE is defined to 500.
27309
27310 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
27311
27312         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
27313         deficiency.
27314
27315 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
27316
27317         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
27318         Include xalloc.h.
27319         Don't include <stdlib.h>.  Don't declare malloc, realloc.
27320
27321 2000-06-24  Jim Meyering  <meyering@lucent.com>
27322
27323         * m4/strerror_r.m4: Revive this file -- to try out an experimental
27324         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
27325         for which strerror does return char*, but which lacks a conveniently
27326         accessible declaration of the function.  If the compile-test says
27327         strerror_r doesn't work, then resort to a `run'-test that works on
27328         BeOS and segfaults on DEC Unix.
27329
27330 2000-06-24  Jim Meyering  <meyering@lucent.com>
27331
27332         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
27333
27334 2000-06-23  Paul Eggert  <eggert@twinsun.com>
27335
27336         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
27337         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
27338
27339 2000-06-23  Paul Eggert  <eggert@twinsun.com>
27340
27341         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
27342         (mbrtowc, mbstate_t): Define substitutes if
27343         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
27344         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
27345         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
27346
27347 2000-06-23  Jim Meyering  <meyering@lucent.com>
27348
27349         * m4/afs.m4: Add missing AC_MSG_RESULT.
27350         Reported by Bruno Haible.
27351
27352         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
27353         Suggestion from Bruno Haible.
27354
27355 2000-06-23  Jim Meyering  <meyering@lucent.com>
27356
27357         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
27358
27359 2000-06-21  Jim Meyering  <meyering@lucent.com>
27360
27361         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
27362
27363 2000-06-21  Jim Meyering  <meyering@lucent.com>
27364
27365         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
27366         (noinst_HEADERS): Add getstr.h.
27367
27368         * lib/getline.c (getstr): Move into a separate file.
27369         * lib/getstr.c (getstr): New file, extracted from getline.c, with
27370         the following changes: new parameter, delim2; both delim[12]
27371         parameters have type `int', not `char'.  The latter would lose
27372         with 8-bit delimiters.
27373         * lib/getstr.h: New file.
27374
27375 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
27376
27377         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
27378         than 1024, return a memory chunk of least possible size, instead
27379         of size PATH_MAX + 2. In the loop, increment the size proportionally.
27380         Use free/xmalloc instead of xrealloc to avoid copying for very long
27381         paths.
27382
27383 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
27384
27385         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
27386         the empty string.
27387
27388 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
27389
27390         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
27391         address, not strdup.  Include <stdlib.h> and don't declare free().
27392
27393 2000-06-19  Jim Meyering  <meyering@lucent.com>
27394
27395         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
27396
27397 2000-06-18  Jim Meyering  <meyering@lucent.com>
27398
27399         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
27400
27401         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
27402         `checking whether...' message to be consistent with that of the
27403         lstat test.
27404
27405 2000-06-18  Jim Meyering  <meyering@lucent.com>
27406
27407         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
27408         Besides, these days every porting target provides a mkdir function.
27409
27410         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
27411         needed. (this snippet comes from src/system.h).
27412
27413 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
27414
27415         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
27416
27417 2000-06-15  Paul Eggert  <eggert@twinsun.com>
27418
27419         * lib/human.c (adjust_value): New function.
27420         (human_readable_inexact): Apply rounding style even when
27421         printing approximate values.
27422
27423 2000-06-14  Paul Eggert  <eggert@twinsun.com>
27424
27425         * lib/human.c (human_readable_inexact): Allow an input block
27426         size that is not a multiple of the output block size, and vice versa.
27427         Reported by Piergiorgio Sartor.
27428
27429 2000-06-14  Paul Eggert  <eggert@twinsun.com>
27430
27431         * lib/getdate.y (get_date): Apply relative times after time
27432         zone indicator, not before.  Reported by Todd A. Jacobs.
27433
27434 2000-06-13  Jim Meyering  <meyering@lucent.com>
27435
27436         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
27437
27438         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
27439
27440 2000-06-12  Paul Eggert  <eggert@twinsun.com>
27441
27442         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
27443
27444 2000-06-12  Jim Meyering  <meyering@lucent.com>
27445
27446         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
27447         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
27448         optional argument.
27449         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
27450         the optional argument, `lib'.
27451
27452 2000-06-08  Jim Meyering  <meyering@lucent.com>
27453
27454         * m4/largefile.m4: Remove file (now that it's part of autoconf).
27455
27456 2000-06-04  Paul Eggert  <eggert@twinsun.com>
27457
27458         Rewrite largefile configuration so that we don't need to run
27459         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
27460         AC_CANONICAL_HOST in configure.in -- jmm]
27461
27462         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
27463         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
27464         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
27465         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
27466         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
27467         All uses changed.
27468         Instead of inspecting the output of getconf, try to compile the
27469         test program without and with the macro definition.
27470         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
27471         for getconf.  Instead, check for the needed flags by compiling
27472         test programs.
27473
27474 2000-06-04  Paul Eggert  <eggert@twinsun.com>
27475
27476         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
27477
27478 2000-06-04  Jim Meyering  <meyering@lucent.com>
27479
27480         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
27481         SunOS 4.1.4 for which gid_t is an unsigned type.
27482
27483 2000-06-03  Jim Meyering  <meyering@lucent.com>
27484
27485         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
27486         now that autoconf requires that.
27487
27488         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
27489         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
27490         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
27491
27492 2000-06-03  Jim Meyering  <meyering@lucent.com>
27493
27494         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
27495
27496 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
27497
27498         * m4/glibc21.m4: New file.
27499         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
27500
27501 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
27502
27503         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
27504         newer, don't install charset.alias.
27505         * lib/config.charset: Change the Linux/glibc rules so they become empty
27506         on glibc-2.1 or newer.
27507
27508 2000-06-02  Jim Meyering  <meyering@lucent.com>
27509
27510         * lib/mountlist.c: Back out last change.  Instead, do this...
27511         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
27512         me_dummy member using the same `ignore'-testing code.
27513         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
27514         fs_type strings.
27515         From Mark D. Roth.
27516
27517 2000-05-29  Jim Meyering  <meyering@lucent.com>
27518
27519         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
27520         mounts with the `ignore' attribute.  Based on a patch from
27521         Mark D. Roth.
27522
27523 2000-05-28  Jim Meyering  <meyering@lucent.com>
27524
27525         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
27526         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
27527         * m4/stat.m4: Likewise.
27528         * m4/lstat.m4: Likewise.
27529         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
27530
27531         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
27532         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
27533
27534 2000-05-26  Jim Meyering  <meyering@lucent.com>
27535
27536         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
27537
27538 2000-05-24  Jim Meyering  <meyering@lucent.com>
27539
27540         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
27541         autoconf requires that.
27542         * m4/lib-check.m4: Likewise.
27543         * m4/jm-macros.m4: Likewise.
27544         * m4/strftime.m4: Likewise.
27545
27546         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
27547         AC_CHECK_DECLS, now that autoconf requires that.
27548
27549 2000-05-22  Jim Meyering  <meyering@lucent.com>
27550
27551         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
27552         * m4/lstat.m4: Likewise.
27553
27554 2000-05-22  Jim Meyering  <meyering@lucent.com>
27555
27556         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
27557
27558 2000-05-20  Jim Meyering  <meyering@lucent.com>
27559
27560         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
27561         (jm_PREREQ): Use it.
27562
27563 2000-05-18  Jim Meyering  <meyering@lucent.com>
27564
27565         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
27566         back, too, since it may have been modified by allocate_entry.
27567         (hash_delete): Rewrite to use neither the assignment operator
27568         nor the comma operator in an if-expression.
27569
27570 2000-05-15  Paul Eggert  <eggert@twinsun.com>
27571
27572         * lib/closeout.c:
27573         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
27574         Remove; no longer needed.
27575         "quotearg.h": Add include.
27576         (file_name): Do not bother to explicitly initialize to NULL; it's less
27577         efficient on some hosts.
27578         (close_stdout_status): Remove test as to whether stdout was already
27579         closed; it breaks for the case "echo x | sort >&-".
27580         Quote file name colons.
27581         Do not assume that _("write error") lacks format strings.
27582
27583 2000-05-15  Jim Meyering  <meyering@lucent.com>
27584
27585         * lib/version-etc.c (version_etc_copyright): Update the copyright
27586         string used in all --version output.
27587
27588 2000-05-14  Jim Meyering  <meyering@lucent.com>
27589
27590         * lib/closeout.c (close_stdout_set_file_name): New function.
27591         (close_stdout_status): Use new file-scoped global.
27592         Return right away if fstat says the stdout file descriptor is invalid.
27593         * lib/closeout.h (close_stdout_set_file_name): Declare.
27594
27595 2000-05-10  Jim Meyering  <meyering@lucent.com>
27596
27597         * lib/closeout.c [default_exit_status]: New file-scoped variable.
27598         (close_stdout_set_status): New function.
27599         * lib/closeout.h (close_stdout_set_status): Declare.
27600
27601 2000-05-09  Jim Meyering  <meyering@lucent.com>
27602
27603         * m4/gettext.m4: Rename this...
27604         * m4/libintl.m4: ...to this.
27605
27606 2000-05-08  Jim Meyering  <meyering@lucent.com>
27607
27608         * lib/long-options.c: Don't include closeout.h.
27609         (parse_long_options): Don't call close_stdout for --version.
27610
27611 2000-05-06  Paul Eggert  <eggert@twinsun.com>
27612
27613         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
27614         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
27615         2.1.3 bug.  This avoids a clash when files like regex.c define
27616         _GNU_SOURCE.
27617
27618 2000-05-06  Jim Meyering  <meyering@lucent.com>
27619
27620         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
27621         (AC_REPLACE_FUNCS): Add strnlen.
27622
27623         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
27624         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
27625
27626         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
27627         AC_SEARCH_LIBS call for nanosleep.
27628         (LIB_NANOSLEEP): Set and AC_SUBST.
27629
27630 2000-05-06  Jim Meyering  <meyering@lucent.com>
27631
27632         * lib/strnlen.c: Undefine __strnlen and strnlen.
27633         [!weak_alias]: Define __strnlen to strnlen.
27634
27635         * lib/atexit.c: New file, from libiberty.
27636
27637 2000-05-06  Jim Meyering  <meyering@lucent.com>
27638
27639         * lib/closeout.c (close_stdout_status): Also check for errors on the
27640         stderr stream.
27641
27642 2000-05-05  Jim Meyering  <meyering@lucent.com>
27643
27644         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
27645         AC_SEARCH_LIBS call for clock_gettime.
27646         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
27647
27648         * m4/search-libs.m4: Update from autoconf.
27649
27650         su doesn't work on Solaris 2.6.
27651         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
27652         <shadow.h>.  Reported by Dragos Harabor.
27653
27654 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
27655
27656         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
27657         memcpy instead of xmalloc, xrealloc, path_concat.
27658         (locale_charset): Treat empty environment variables as absent.
27659         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
27660
27661 2000-05-04  Jim Meyering  <meyering@lucent.com>
27662
27663         * lib/getopt.c: Update from glibc.
27664         * lib/obstack.c: Likewise.
27665         * lib/obstack.h: Likewise.
27666         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
27667         file
27668
27669         * lib/regex.h: Likewise.
27670         * lib/strndup.c: Likewise.
27671         * lib/strnlen.c: New file, from glibc.
27672
27673 2000-05-03  Jim Meyering  <meyering@lucent.com>
27674
27675         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
27676
27677 2000-05-02  Paul Eggert  <eggert@twinsun.com>
27678
27679         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
27680         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
27681         compile-time test, rather than inspecting host and OS, to
27682         decide whether to define _LARGEFILE_SOURCE.
27683
27684 2000-05-01  Jim Meyering  <meyering@lucent.com>
27685
27686         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
27687
27688         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
27689         Based on a patch from Bruno Haible.
27690
27691 2000-05-01  Jim Meyering  <meyering@lucent.com>
27692
27693         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
27694
27695 2000-04-29  Jim Meyering  <meyering@lucent.com>
27696
27697         * lib/path-concat.c: Declare strdup only if it's not defined.
27698         * lib/canon-host.c: Likewise.
27699
27700 2000-04-28  Jim Meyering  <meyering@lucent.com>
27701
27702         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
27703         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
27704         is included first, then limits.h is included by locale.h by libintl.h.
27705         From John David Anglin.
27706
27707 2000-04-25  Jim Meyering  <meyering@lucent.com>
27708
27709         * lib/makepath.c (S_IRWXUGO): Define.
27710         (make_path): Always perform explicit chmod if MODE specifies any
27711         of the `special' permission bits.  Prompted by a bug report against
27712         install from Mate Wierdl and Joost van Baal.
27713
27714 2000-04-18  Jim Meyering  <meyering@lucent.com>
27715
27716         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
27717         (jm_PREREQ): Use it.
27718
27719 2000-04-18  Jim Meyering  <meyering@lucent.com>
27720
27721         * lib/README: New file.
27722
27723         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
27724         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
27725
27726 2000-04-17  Jim Meyering  <meyering@lucent.com>
27727
27728         Get it right :-)
27729         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
27730         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
27731         Suggestion from Akim Demaille.
27732
27733 2000-04-17  Jim Meyering  <meyering@lucent.com>
27734
27735         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
27736         the definition of it to rpl_strftime also defined-away the system's
27737         declaration.
27738
27739 2000-04-15  Jim Meyering  <meyering@lucent.com>
27740
27741         Use `C' to denote so-called `contiguous' files, the same way
27742         that tar does.
27743         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
27744         (ftypelet): Use S_ISCTG.
27745         From Michael Deutschmann.
27746
27747 2000-04-14  Jim Meyering  <meyering@lucent.com>
27748
27749         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
27750         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
27751         clobbered.
27752
27753 2000-04-14  Jim Meyering  <meyering@lucent.com>
27754
27755         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
27756
27757 2000-04-13  Jim Meyering  <meyering@lucent.com>
27758
27759         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
27760         AH_VERBATIM to insert required #ifndef into config.h.in.
27761         Suggestion from Akim Demaille.
27762
27763 2000-04-12  Jim Meyering  <meyering@lucent.com>
27764
27765         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
27766         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
27767         Christian Krackowizer.
27768
27769         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
27770         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
27771         (AC_SYS_LARGEFILE): Require.
27772         (AM_C_PROTOTYPES): Require.
27773
27774 2000-04-08  Jim Meyering  <meyering@lucent.com>
27775
27776         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
27777         names don't conflict.  Reported by Eli Zaretskii.
27778
27779 2000-04-07  Jim Meyering  <meyering@lucent.com>
27780
27781         * lib/putenv.c: Move inclusion of errno.h so it follows that of
27782         sys/types.h, to work around system header problems on AIX 3.2.5.
27783         From Bruno Haible.
27784
27785 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
27786
27787         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
27788         bug.  Deal with the different error behavior of Irix iconv.
27789
27790 2000-04-05  Paul Eggert  <eggert@twinsun.com>
27791
27792         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
27793         IRIX if the installer said otherwise.
27794
27795 2000-04-05  Jim Meyering  <meyering@lucent.com>
27796
27797         Portability tweaks required for ultrix4.3.
27798         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
27799         (jm_CHECK_DECLS): Add getutent to the list of functions.
27800         (_jm_DECL_HEADERS): Add utmpx.h.
27801         From John David Anglin.
27802
27803         * m4/strftime.m4: Back out the 2000-04-02 change.
27804         Instead of that change, simply undefine putenv in the test program.
27805
27806 2000-04-05  Jim Meyering  <meyering@lucent.com>
27807
27808         Portability tweaks required for ultrix4.3.
27809         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
27810         getutent.
27811         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
27812         * lib/canon-host.c: Declare strdup.
27813         * lib/path-concat.c: Likewise.
27814         From John David Anglin.
27815
27816 2000-04-04  Jim Meyering  <meyering@lucent.com>
27817
27818         Be more DOS 8.3-friendly.
27819         * lib/ref-add.sin: Renamed from ref-add.sed.in.
27820         * lib/ref-del.sin: Renamed from ref-del.sed.in.
27821         * lib/Makefile.am: Reflect renaming.
27822         Reported by Eli Zaretskii.
27823
27824         Use a temporary file name that won't clash with `charset.alias'
27825         in the DOS 8.3 name space.
27826         * lib/Makefile.am (charset_tmp): Define.
27827         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
27828         (uninstall-local): Likewise.
27829         Reported by Eli Zaretskii.
27830
27831 2000-04-03  Jim Meyering  <meyering@lucent.com>
27832
27833         * m4/gettext.m4: Fix typo in comment.
27834
27835         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
27836         textutils/configure.in).  Suggestion from Paul Eggert.
27837         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
27838
27839 2000-04-02  Paul Eggert  <eggert@twinsun.com>
27840
27841         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
27842         variable in the shell rather than using putenv, which isn't
27843         portable.  This avoids the configure-time inter-test dependency
27844         on the potentially-renamed putenv function.
27845
27846 2000-03-30  Paul Eggert  <eggert@twinsun.com>
27847
27848         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
27849         before checking struct stat.st_blksize, so that
27850         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
27851
27852 2000-03-29  Paul Eggert  <eggert@twinsun.com>
27853
27854         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
27855         since strftime.c uses HAVE_STRFTIME to decide whether to use
27856         the underlying strftime.
27857
27858 2000-03-29  Paul Eggert  <eggert@twinsun.com>
27859
27860         * lib/time/strftime.c (my_strftime): Make sure we call the system
27861         strftime, not ourselves, when invoking the underlying strftime.
27862
27863 2000-03-24  Jim Meyering  <meyering@lucent.com>
27864
27865         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
27866         (charset_alias): Define.
27867         (install-exec-local): Factor out common code.
27868         (uninstall-local): Split lines longer than 80.
27869         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
27870         (SUFFIXES): Define.
27871         (.sed.in.sed): New rule.  Don't redirect directly to $@.
27872         (CLEANFILES): Add ref-add.sed and ref-del.sed.
27873
27874 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
27875
27876         * lib/config.charset: Output a line containing "Packages using this
27877         file".
27878         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
27879         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
27880         ref-del.sed): New rules.
27881
27882 2000-03-17  Jim Meyering  <meyering@lucent.com>
27883
27884         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
27885         Otherwise, include <strings.h>
27886
27887 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
27888
27889         * lib/unicodeio.c (utf8_wctomb): New function.
27890         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
27891         format instead of in UCS-4 with platform dependent endianness.
27892
27893 2000-03-10  Jim Meyering  <meyering@lucent.com>
27894
27895         * m4/lib-check.m4: Look for getspnam in -lgen, too.
27896         From Marco Franzen.
27897
27898 2000-03-07  Paul Eggert  <eggert@twinsun.com>
27899
27900         * lib/savedir.c (savedir): Work even if directory size is
27901         negative; this can happen with some screwy NFS configurations.
27902
27903 2000-03-06  Jim Meyering  <meyering@lucent.com>
27904
27905         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
27906         if it's NULL (because we ran out of memory).  From Bruno Haible.
27907
27908 2000-03-05  Jim Meyering  <meyering@lucent.com>
27909
27910         * lib/localcharset.c ("path-concat.h"): Include.
27911         (get_charset_aliases): Use path_concat instead of ANSI string
27912         concatenation.
27913
27914         * lib/unicodeio.h (PARAMS): Define.
27915         Use it to guard prototype.
27916
27917 2000-03-04  Jim Meyering  <meyering@lucent.com>
27918
27919         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
27920         for lib/localcharset.c.
27921
27922 2000-03-04  Jim Meyering  <meyering@lucent.com>
27923
27924         * lib/Makefile.am (install-exec-local): Create $(libdir) before
27925         installing into it.
27926         (uninstall-local): Uncomment this rule so `make distcheck' works
27927         once again.
27928
27929         * lib/unicodeio.c (<errno.h>): Include it.
27930         (errno): Declare if not defined.
27931
27932         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
27933
27934         * lib/config.charset: New version, incorporating remarks from a linux
27935         i18n mailing list.  From Bruno Haible.
27936
27937 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
27938
27939         * m4/codeset.m4: New file.
27940         * m4/iconv.m4: New file.
27941         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
27942
27943 2000-03-03  Jim Meyering  <meyering@lucent.com>
27944
27945         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
27946
27947 2000-03-02  Jim Meyering  <meyering@lucent.com>
27948
27949         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
27950         the messages come out on separate lines.
27951
27952         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
27953         rather than jm_CHECK_DECLARATIONS.
27954         * m4/decl.m4: Remove now-unused file.
27955
27956         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
27957         geteuid.
27958
27959 2000-03-02  Jim Meyering  <meyering@lucent.com>
27960
27961         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
27962
27963 2000-03-01  Jim Meyering  <meyering@lucent.com>
27964
27965         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
27966         * lib/unicodeio.c: Likewise.
27967
27968 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
27969
27970         * lib/config.charset: New file.
27971         * lib/localcharset.c: New file.
27972         * lib/unicodeio.h, lib/unicodeio.c: New files.
27973         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
27974         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
27975         (noinst_HEADERS): Add unicodeio.h.
27976         (all-local, install-exec-local, charset.alias): New targets.
27977
27978 2000-02-28  Paul Eggert  <eggert@twinsun.com>
27979
27980         * lib/quotearg.c (ALERT_CHAR): New macro.
27981         (quotearg_buffer_restyled): Use it.
27982
27983 2000-02-27  Jim Meyering  <meyering@lucent.com>
27984
27985         * m4/check-decl.m4: Add getenv to the list.
27986
27987 2000-02-27  Jim Meyering  <meyering@lucent.com>
27988
27989         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
27990         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
27991
27992         * lib/backupfile.c: Guard inclusion of stdlib.h with
27993         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
27994         Declare malloc if needed.
27995
27996         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
27997         `#ifndef HAVE_DECL..'
27998         now that autoconf always defines the HAVE_DECL_ symbols.
27999         * lib/human.c: Likewise.
28000         * lib/same.c: Likewise.
28001         * lib/strtoumax.c: Likewise.
28002
28003         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
28004         declaration check was not run.
28005         * lib/hash.c: Likewise.
28006         * lib/human.c: Likewise.
28007         * lib/same.c: Likewise.
28008         * lib/strtoumax.c: Likewise.
28009
28010         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
28011         `.', then first look up the entire `.'-containing string as a login
28012         name.
28013
28014 2000-02-23  Jim Meyering  <meyering@lucent.com>
28015
28016         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
28017         in place of my hack.
28018
28019 2000-02-18  Paul Eggert  <eggert@twinsun.com>
28020
28021         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
28022         (textint): New typedef.
28023         (parser_control): Member year changed from int to textint.
28024         All uses changed.
28025         (YYSTYPE): Removed; replaced by %union with int and textint members.
28026         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
28027         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
28028         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
28029         (tSNUMBER, tUNUMBER): Now of type <textintval>.
28030         (date, number, to_year): Use width of number in digits, not its value,
28031         to determine whether it's a 2-digit year, or a 2-digit time.
28032         (yylex): Store number of digits of numeric tokens.
28033         Reported by John Kendall.
28034
28035         (parser_control): Changed from struct parser_control to typedef (for
28036         consistency).  All uses changed.
28037
28038         (tID): Removed; not used.
28039         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
28040
28041 2000-02-14  Paul Eggert  <eggert@twinsun.com>
28042
28043         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
28044         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
28045
28046 2000-02-12  Jim Meyering  <meyering@lucent.com>
28047
28048         * lib/userspec.c (ISDIGIT): Define it.
28049         (isdigit): Remove definition.
28050         (is_number): Use ISDIGIT, not isdigit.
28051         <libintl.h>: Include.
28052         (_ and N_): Define.
28053         (parse_user_spec): Mark translatable strings.
28054
28055 2000-02-10  Jim Meyering  <meyering@lucent.com>
28056
28057         With these changes, nanosleep.[ch] are finally enough like the other
28058         lib/* replacement files to compile on a few more losing systems.
28059
28060         * lib/nanosleep.h: Don't include config.h.
28061         Remove prototype from declaration of nanosleep.
28062         (PARAMS): Remove now-unneeded definition.
28063         * lib/nanosleep.c: #undef nanosleep.
28064         (rpl_nanosleep): Rename from nanosleep.
28065
28066 2000-02-10  Jim Meyering  <meyering@lucent.com>
28067
28068         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
28069         gnu_nanosleep to rpl_nanosleep.
28070
28071 2000-02-09  Jim Meyering  <meyering@lucent.com>
28072
28073         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
28074         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
28075
28076 2000-02-08  Akim Demaille  <akim@epita.fr>
28077
28078         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
28079         `[' and `]' and remove uses of `changequote'.
28080         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
28081         (AC_SYS_LARGEFILE): Likewise.
28082         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
28083         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
28084         of changequote.
28085         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
28086         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
28087         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
28088         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
28089
28090 2000-02-05  Jim Meyering  <meyering@lucent.com>
28091
28092         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
28093         Remove explicit use of AC_HEADER_TIME.  It is required by
28094         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
28095         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
28096         in autoconf whereby the expansion of the latter ended up preceding
28097         the expansion of its prerequisite, AC_HEADER_TIME.
28098         Reported by Volker Borchert.
28099
28100 2000-02-03  Jim Meyering  <meyering@lucent.com>
28101
28102         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
28103
28104 2000-02-03  Jim Meyering  <meyering@lucent.com>
28105
28106         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
28107         rather than with `#if HAVE_UTMPNAME'.
28108
28109 2000-02-02  Jim Meyering  <meyering@lucent.com>
28110
28111         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
28112         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
28113         Reported by Eli Zaretskii.
28114
28115 2000-02-01  Jim Meyering  <meyering@lucent.com>
28116
28117         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
28118
28119 2000-01-31  Jim Meyering  <meyering@lucent.com>
28120
28121         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
28122         functions.  Add the time.h and sys/time.h headers along with the
28123         AC_REQUIRE'ment of AC_HEADER_TIME.
28124
28125 2000-01-31  Jim Meyering  <meyering@lucent.com>
28126
28127         * lib/nanosleep.h (nanosleep): Guard declaration with
28128         `#if ! HAVE_DECL_NANOSLEEP'.
28129         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
28130         the declaration in that vendor's sys/timers.h.
28131         Reported by Christian Krackowizer.
28132
28133         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
28134         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
28135         (ISPRINT): Likewise.
28136         Reported by Tom Tromey.
28137
28138 2000-01-30  Jim Meyering  <meyering@lucent.com>
28139
28140         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
28141
28142         * m4/prereq.m4 (utmp_includes): Define.
28143         Check for ut_user and ut_name members in both struct utmpx
28144         and struct utmp.
28145
28146 2000-01-30  Jim Meyering  <meyering@lucent.com>
28147
28148         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
28149         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
28150         header files where only utmpx.ut_user is declared.
28151
28152         * lib/readutmp.h (UT_USER): Define.
28153
28154 2000-01-29  Jim Meyering  <meyering@lucent.com>
28155
28156         * m4/lib-check.m4: New file containing library-related checks from
28157         fileutils and sh-utils (textutils had none).
28158
28159 2000-01-28  Jim Meyering  <meyering@lucent.com>
28160
28161         * m4/perl.m4: Change format of warning message to look more like that
28162         from the missing script.  Suggestion from François Pinard.
28163
28164 2000-01-25  Jim Meyering  <meyering@lucent.com>
28165
28166         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
28167         well as time.h in the compile check.
28168         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
28169         Fix typo in cross-compiling case: s/yes/no/.
28170
28171 2000-01-23  Jim Meyering  <meyering@lucent.com>
28172
28173         * m4/jm-macros.m4: Move df-related tests here from
28174         fileutils/configure.in
28175
28176         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
28177         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
28178
28179         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
28180         s/space/ac_fsusage_space/.
28181         (jm_FILE_SYSTEM_USAGE): Take two parameters.
28182
28183         * m4/ftruncate.m4: New file (derived from part of
28184         fileutils/configure.in).
28185         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
28186         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
28187
28188         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
28189         AC_SUBST these here, rather than just in sh-util/configure.in, so
28190         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
28191         all the same.
28192         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
28193         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
28194         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
28195         (AC_SUBST(POW_LIBM)): Likewise.
28196         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
28197
28198 2000-01-23  Jim Meyering  <meyering@lucent.com>
28199
28200         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
28201         obstack.c.
28202
28203 2000-01-22  Jim Meyering  <meyering@lucent.com>
28204
28205         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
28206
28207         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
28208
28209         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
28210         configure.in
28211         (AC_CHECK_HEADERS): Likewise for sh-utils.
28212         (AC_CHECK_HEADERS): Likewise for textutils.
28213         Merge the three lists of headers.
28214
28215         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
28216         from fileutils' configure.in.
28217
28218         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
28219         code. Moved tests into their own function (_jm_DECL_HEADERS) in
28220         check-decl.m4.
28221
28222         * m4/check-decl.m4: Use #if rather than #ifdef.
28223         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
28224         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
28225         (_jm_DECL_HEADERS): Define new function.
28226         (jm_CHECK_DECLARATIONS): Require it.
28227
28228 2000-01-22  Jim Meyering  <meyering@lucent.com>
28229
28230         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
28231         [! HAVE_DECL_STRTOULL]: Declare strtoull.
28232         Required for some AIX systems.  Reported by Christian Krackowizer.
28233         [TESTING] (main): New function.
28234
28235         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
28236         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
28237         letters.
28238
28239         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
28240         iswprint.
28241
28242         * lib/strverscmp.c (ISDIGIT): Define.
28243         (strverscmp): Use ISDIGIT, not isdigit.
28244
28245 2000-01-19  Jim Meyering  <meyering@lucent.com>
28246
28247         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
28248         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
28249         defines `struct timespec' in <sys/time.h>
28250
28251         * m4/c-bs-a.m4: Remove uses of changequote altogether.
28252         Thanks to Akim for explaining.
28253
28254 2000-01-17  Paul Eggert  <eggert@twinsun.com>
28255
28256         * lib/nanosleep.c (nanosleep):
28257         Don't use SA_INTERRUPT to decide whether to call sigaction, as
28258         POSIX.1 doesn't require SA_INTERRUPT and some systems
28259         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
28260         it's been part of POSIX.1 since day 1 (in 1988).
28261
28262 2000-01-17  Jim Meyering  <meyering@lucent.com>
28263
28264         * lib/interlock: Remove unused file.  Reported by François Pinard.
28265
28266 2000-01-16  Paul Eggert  <eggert@twinsun.com>
28267
28268         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
28269         alert, backslash, formfeed, and vertical tab unnecessarily in
28270         shell quoting style.
28271
28272 2000-01-16  Jim Meyering  <meyering@lucent.com>
28273
28274         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
28275         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
28276         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
28277         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
28278
28279 2000-01-16  Jim Meyering  <meyering@lucent.com>
28280
28281         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
28282         because the latter didn't work.
28283
28284 2000-01-15  Jim Meyering  <meyering@lucent.com>
28285
28286         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
28287         (AC_REPLACE_FUNCS): Add memcpy and memset.
28288         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
28289         Add strpbrk.
28290         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
28291
28292 2000-01-12  Jim Meyering  <meyering@lucent.com>
28293
28294         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
28295         (jm_PREREQ): Use it.
28296         (jm_PREREQ_READUTMP): New macro.
28297         (jm_PREREQ): Use it.
28298
28299 2000-01-11  Paul Eggert  <eggert@twinsun.com>
28300
28301         Quote multibyte characters correctly.
28302         * m4/c-bs-a.m4: New file.
28303         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
28304         (jm_PREREQ): Use it.
28305
28306 2000-01-11  Paul Eggert  <eggert@twinsun.com>
28307
28308         * m4/uintmax_t.m4: Port to autoconf 2.13.
28309
28310 2000-01-08  Jim Meyering  <meyering@ascend.com>
28311
28312         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
28313         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
28314
28315 2000-01-04  Jim Meyering  <meyering@ascend.com>
28316
28317         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
28318         jm_STRUCT_DIRENT_D_TYPE.
28319         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
28320         jm_STRUCT_DIRENT_D_INO.
28321         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
28322         jm_STRUCT_UTIMBUF.
28323         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
28324         renamings.
28325         * m4/utime.m4: Likewise.
28326
28327         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
28328         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
28329
28330 2000-01-03  Paul Eggert  <eggert@twinsun.com>
28331
28332         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
28333         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
28334
28335 2000-01-02  Jim Meyering  <meyering@ascend.com>
28336
28337         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
28338         remember if this is necessary.
28339
28340 1999-12-26  Jim Meyering  <meyering@ascend.com>
28341
28342         * m4/jm-macros.m4: Use it here.
28343         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
28344
28345 1999-12-23  Jim Meyering  <meyering@ascend.com>
28346
28347         * m4/jm-macros.m4: Check for clock_gettime (moved from
28348         fileutils/configure.in)
28349         Check for gettimeofday.
28350
28351 1999-12-20  Jim Meyering  <meyering@ascend.com>
28352
28353         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
28354         autoconf-2.14a-1999-12-20.
28355
28356 1999-12-19  Jim Meyering  <meyering@ascend.com>
28357
28358         * m4/lstat-slash.m4: New file.
28359         * m4/jm-macros.m4: Use the new macro:
28360         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
28361
28362 1999-12-07  Jim Meyering  <meyering@ascend.com>
28363
28364         * m4/perl.m4: Require that File::Compare be available, too.
28365         Too many systems seem to lack it.
28366
28367         * m4/strftime.m4: Add checks for most of the cpp macros tested in
28368         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
28369
28370 1999-11-18  Paul Eggert  <eggert@twinsun.com>
28371
28372         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
28373         problem with the QNX 4.25 shell, which doesn't propagate exit
28374         status of failed commands inside shell assignments.
28375
28376 1999-11-17  Jim Meyering  <meyering@ascend.com>
28377
28378         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
28379
28380 1999-11-07  Jim Meyering  <meyering@ascend.com>
28381
28382         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
28383
28384 1999-11-06  Jim Meyering  <meyering@ascend.com>
28385
28386         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
28387         * m4/jm-macros.m4 (jm_MACROS): Use it here.
28388
28389 1999-11-05  Jim Meyering  <meyering@ascend.com>
28390
28391         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
28392         configure.in of textutils, fileutils, and sh-utils into this one
28393         (shared between those packages) file.
28394         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
28395         AC_STRUCT_ST_BLKSIZE.
28396
28397 1999-11-03  Jim Meyering  <meyering@ascend.com>
28398
28399         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
28400         of AC_CHECK_TYPE checks includes unistd.h.
28401         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
28402         Suggestion from Akim Demaille.
28403
28404 1999-10-30  Jim Meyering  <meyering@ascend.com>
28405
28406         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
28407         m4-quoted string.
28408         * m4/ls-mntd-fs.m4: Likewise.
28409         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
28410         * m4/jm-winsz1.m4: Likewise.
28411
28412         * m4/const.m4: Remove file, since the fix made it into the experimental
28413         version of autoconf.
28414         * m4/mktime.m4: Likewise.
28415
28416         * m4/check-type.m4: Remove file, now that the latest version of
28417         AC_CHECK_TYPE takes a third arg to specify additional #includes.
28418
28419         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
28420         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
28421         AC_CHECK_TYPE.
28422
28423 1999-10-04  Jim Meyering  <meyering@ascend.com>
28424
28425         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
28426
28427 1999-09-22  Paul Eggert  <eggert@twinsun.com>
28428
28429         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
28430         2.95.1 bug with HP-UX 10.20.
28431
28432 1999-09-17  Jim Meyering  <meyering@ascend.com>
28433
28434         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
28435         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
28436         due to missing strdup (against sh-utils-2.0).
28437
28438 1999-08-29  Jim Meyering  <meyering@ascend.com>
28439
28440         * m4/jm-macros.m4: Require jm_BISON.
28441         * m4/bison.m4: New file.
28442
28443 1999-08-17  Paul Eggert  <eggert@twinsun.com>
28444
28445         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
28446         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
28447
28448 1999-08-05  Jim Meyering  <meyering@ascend.com>
28449
28450         * m4/getline.m4: Rename test file from conftestdata to conftest.data
28451         to avoid conflicts with `conftest' on 8+3 filesystems.
28452         Suggestion from Eli Zaretskii.
28453
28454 1999-08-04  Jim Meyering  <meyering@ascend.com>
28455
28456         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
28457         fileutils and sh-utils (textutils's getline test was inadequate).
28458         (AM_FUNC_GETLINE): Run this test.
28459         (AC_CHECK_FUNCS): Check for getdelim.
28460         Reported by Bob Proulx.
28461
28462 1999-08-02  Jim Meyering  <meyering@ascend.com>
28463
28464         * m4/jm-macros.m4: Add a comment.
28465
28466 1999-08-01  Paul Eggert  <eggert@twinsun.com>
28467
28468         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
28469         <inttypes.h> defines strtoumax as a macro (and not as a
28470         function).
28471
28472 1999-08-01  Paul Eggert  <eggert@twinsun.com>
28473
28474         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
28475         that we can shift, multiply and divide unsigned long long
28476         values; Ultrix cc can't do it.
28477
28478 1999-08-01  Paul Eggert  <eggert@twinsun.com>
28479
28480         * m4/mktime.m4: New file, which is a preview of what should appear
28481         in the next public autoconf release.
28482
28483 1999-08-01  Paul Eggert  <eggert@twinsun.com>
28484
28485         * m4/lfs.m4: Remove this file.
28486         * m4/largefile.m4: New file.  It contains the old contents of
28487         lfs.m4, except that all names with prefix AC_LFS have been
28488         changed to use the prefix AC_SYS_LARGEFILE instead, to be
28489         compatible with future autoconf versions.  Also, some minor m4
28490         quoting problems have been fixed.
28491
28492 1999-08-01  Paul Eggert  <eggert@twinsun.com>
28493
28494         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
28495         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
28496         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
28497         and simplify the shell code.
28498
28499 1999-08-01  Jim Meyering  <meyering@ascend.com>
28500
28501         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
28502         m4.
28503
28504 1999-07-20  Jim Meyering  <meyering@ascend.com>
28505
28506         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
28507
28508 1999-07-15  Jim Meyering  <meyering@ascend.com>
28509
28510         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
28511
28512 1999-05-22  Jim Meyering  <meyering@ascend.com>
28513
28514         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
28515
28516 1999-05-20  Jim Meyering  <meyering@ascend.com>
28517
28518         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
28519         Add a colon after each `then' in case $4 is empty.
28520
28521 1999-05-16  Jim Meyering  <meyering@ascend.com>
28522
28523         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
28524
28525 1999-05-10  Jim Meyering  <meyering@ascend.com>
28526
28527         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
28528
28529         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
28530         AC_FUNC_MKTIME.
28531
28532 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
28533
28534         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
28535
28536 1999-05-04  Paul Eggert  <eggert@twinsun.com>
28537
28538         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
28539         not CPPFLAGS, so that linking works correctly in IRIX.
28540
28541 1999-04-30  Paul Eggert  <eggert@twinsun.com>
28542
28543         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
28544
28545 1999-04-20  Paul Eggert  <eggert@twinsun.com>
28546
28547         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
28548         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
28549         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
28550         jm_AC_TYPE_UNSIGNED_LONG_LONG.
28551         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
28552
28553         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
28554
28555 1999-04-20  Jim Meyering  <meyering@ascend.com>
28556
28557         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
28558         AC_REPLACE xstroull if necessary.  From Paul Eggert.
28559         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
28560
28561 1999-04-18  Jim Meyering  <meyering@ascend.com>
28562
28563         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
28564         * m4/jm-macros.m4: Use it.
28565
28566 1999-04-06  Jim Meyering  <meyering@ascend.com>
28567
28568         * m4/strftime.m4: Remove test for %f.
28569
28570 1999-03-29  Jim Meyering  <meyering@ascend.com>
28571
28572         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
28573         superset of the AC_TYPE_* checks in the textutils, fileutils,
28574         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
28575         AC_TYPE_PID_T.
28576
28577 1999-03-28  Jim Meyering  <meyering@ascend.com>
28578
28579         * m4/jm-macros.m4: Define GNU_PACKAGE here.
28580         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
28581         replaced e.g., in the *.sh files of the sh-utils.
28582
28583 1999-03-20  Jim Meyering  <meyering@ascend.com>
28584
28585         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
28586         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
28587         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
28588
28589 1999-03-19  Jim Meyering  <meyering@ascend.com>
28590
28591         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
28592
28593 1999-03-12  Jim Meyering  <meyering@ascend.com>
28594
28595         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
28596
28597 1999-03-07  Jim Meyering  <meyering@ascend.com>
28598
28599         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
28600         declared.
28601
28602 1999-02-17  Jim Meyering  <meyering@ascend.com>
28603
28604         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
28605         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
28606
28607 1999-02-07  Jim Meyering  <meyering@ascend.com>
28608
28609         * m4/group-member.m4: New file -- extracted from sh-utils'
28610         configure.in.
28611
28612         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
28613         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
28614
28615 1999-02-06  Jim Meyering  <meyering@ascend.com>
28616
28617         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
28618         * m4/fnmatch.m4: Likewise.
28619         * m4/getgroups.m4: Likewise.
28620         * m4/lstat.m4: Likewise.
28621         * m4/malloc.m4: Likewise.
28622         * m4/putenv.m4: Likewise.
28623         * m4/realloc.m4: Likewise.
28624         * m4/regex.m4: Likewise.
28625         * m4/stat.m4: Likewise.
28626         * m4/strftime.m4: Likewise.
28627         Suggestion from Alain Magloire.
28628
28629         * m4/chown.m4: Use `.$ac_objext', not `.o'.
28630         * m4/fnmatch.m4: Likewise.
28631         * m4/getgroups.m4: Likewise.
28632         * m4/getline.m4: Likewise.
28633         * m4/lstat.m4: Likewise.
28634         * m4/malloc.m4: Likewise.
28635         * m4/memcmp.m4: Likewise.
28636         * m4/putenv.m4: Likewise.
28637         * m4/realloc.m4: Likewise.
28638         * m4/regex.m4: Likewise.
28639         * m4/stat.m4: Likewise.
28640         * m4/strftime.m4: Likewise.
28641         Suggestion from Alain Magloire.
28642
28643         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
28644         an argument.
28645
28646         * m4/regex.m4: Add a run-time Test for proper operation of
28647         re_compile_pattern.
28648
28649 1999-01-31  Jim Meyering  <meyering@ascend.com>
28650
28651         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
28652
28653 1999-01-30  Jim Meyering  <meyering@ascend.com>
28654
28655         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
28656
28657         * m4/jm-mktime.m4: Make this a wrapper around the official
28658         AM_FUNC_MKTIME rather than my private copy, now that the official one
28659         is up to date.
28660         * m4/mktime.m4: Remove file.
28661
28662         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
28663         * m4/uptime.m4: Likewise.
28664         * m4/uintmax_t.m4: Likewise.
28665
28666 1999-01-28  Jim Meyering  <meyering@ascend.com>
28667
28668         * m4/jm-macros.m4: Use jm_AFS.
28669         * m4/afs.m4: New file (from fileutils' configure.in).
28670
28671         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
28672         * m4/chown.m4: Likewise.
28673         * m4/d-ino.m4: Likewise.
28674         * m4/d-type.m4: Likewise.
28675         * m4/fnmatch.m4: Likewise.
28676         * m4/getgroups.m4: Likewise.
28677         * m4/gettext.m4: Likewise.
28678         * m4/jm-mktime.m4: Likewise.
28679         * m4/jm-winsz2.m4: Likewise.
28680         * m4/lcmessage.m4: Likewise.
28681         * m4/ls-mntd-fs.m4: Likewise.
28682         * m4/malloc.m4: Likewise.
28683         * m4/memcmp.m4: Likewise.
28684         * m4/putenv.m4: Likewise.
28685         * m4/realloc.m4: Likewise.
28686         * m4/st_mtim.m4: Likewise.
28687         * m4/strftime.m4: Likewise.
28688
28689 1999-01-16  Jim Meyering  <meyering@ascend.com>
28690
28691         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
28692         (ARGMATCH_DIE_DECL): Define.
28693
28694 1999-01-12  Jim Meyering  <meyering@ascend.com>
28695
28696         * m4/Makefile.am.in: Rewrite to avoid using fmt.
28697         Reported by Lars Hecking.
28698
28699 1999-01-10  Jim Meyering  <meyering@ascend.com>
28700
28701         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
28702         gross kludge.
28703         * m4/inttypes_h.m4: Likewise.
28704         * m4/lstat.m4: Likewise.
28705         * m4/malloc.m4: Likewise.
28706         * m4/readdir.m4: Likewise.
28707         * m4/realloc.m4: Likewise.
28708         * m4/st_dm_mode.m4: Likewise.
28709         * m4/stat.m4: Likewise.
28710         * m4/utimbuf.m4: Likewise.
28711         * m4/utimes.m4: Likewise.
28712
28713         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
28714         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
28715         comments in config.h.in are meaningful.
28716
28717         * m4/jm-macros.m4: Require autoconf-2.13 here.
28718
28719         * m4/regex.m4: By default, don't use the included regex.c on systems
28720         with glibc 2.  Suggestion from Uli Drepper.
28721
28722 1999-01-02  Jim Meyering  <meyering@ascend.com>
28723
28724         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
28725
28726 1998-12-18  Jim Meyering  <meyering@ascend.com>
28727
28728         * m4/Makefile.am.in (Makefile.am): Simplify rule.
28729         Based on a suggestion from Lars Hecking.
28730
28731 1998-11-16  Paul Eggert  <eggert@twinsun.com>
28732
28733         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
28734
28735 1998-11-16  Jim Meyering  <meyering@ascend.com>
28736
28737         * m4/lfs.m4: Double-quote the `uname...` expression.
28738
28739 1998-11-14  Jim Meyering  <meyering@ascend.com>
28740
28741         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
28742         * m4/stat.m4: Likewise.
28743
28744 1998-11-03  Jim Meyering  <meyering@ascend.com>
28745
28746         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
28747         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
28748
28749 1998-10-18  Jim Meyering  <meyering@ascend.com>
28750
28751         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
28752
28753 1998-10-17  Jim Meyering  <meyering@ascend.com>
28754
28755         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
28756         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
28757         calls for those previously hard-coded headers.  Instead, take a new
28758         parameter.
28759         (jm_CHECK_DECLARATIONS): Reflect interface change.
28760         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
28761         (jm_CHECK_DECL_LOCALTIME_R): New macro.
28762
28763         * m4/mktime.m4: Test for spring-forward gap before long-running test.
28764
28765 1998-10-14  Jim Meyering  <meyering@ascend.com>
28766
28767         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
28768         instead of "TZ=America/Vancouver".  From Paul Eggert.
28769
28770 1998-10-11  Jim Meyering  <meyering@ascend.com>
28771
28772         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
28773         This adds a test for a recently added compatibility fix for mktime.c.
28774         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
28775
28776 1998-09-27  Jim Meyering  <meyering@ascend.com>
28777
28778         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
28779
28780         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
28781         ../configure.in, including a change from Gordon Matzigkeit to allow
28782         cross-compiling for the Hurd.
28783
28784         * m4/glibc.m4: New file/macro to test for the GNU C Library
28785         versions 1 and 2.  From Gordon Matzigkeit.
28786         Indent.
28787
28788 1998-09-21  Jim Meyering  <meyering@ascend.com>
28789
28790         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
28791
28792 1998-08-18  Paul Eggert  <eggert@twinsun.com>
28793
28794         Port nanosecond-resolution times to UnixWare 2.1.2 and
28795         pedantic Solaris 2.6.
28796
28797         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
28798         AC_STRUCT_ST_MTIM.
28799         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
28800         Generate name of ns member, instead of just 1 or undef.
28801         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
28802
28803 1998-08-15  Jim Meyering  <meyering@ascend.com>
28804
28805         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
28806         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
28807         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
28808         instead of jm_TYPE_SSIZE_T.
28809
28810 1998-08-12  Jim Meyering  <meyering@ascend.com>
28811
28812         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
28813
28814 1998-08-02  Jim Meyering  <meyering@ascend.com>
28815
28816         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
28817         in acconfig.h manually.
28818
28819 1998-07-31  Paul Eggert  <eggert@twinsun.com>
28820
28821         * m4/st_mtim.m4: New file.
28822
28823 1998-07-28  Jim Meyering  <meyering@ascend.com>
28824
28825         * m4/utimes.m4: Undef stat.
28826
28827 1998-07-25  Jim Meyering  <meyering@ascend.com>
28828
28829         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
28830         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
28831
28832 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
28833
28834         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
28835         uid and gid actually remain unchanged.
28836
28837 1998-07-07  Jim Meyering  <meyering@ascend.com>
28838
28839         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
28840
28841 1998-07-04  Jim Meyering  <meyering@ascend.com>
28842
28843         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
28844         to prove that this macro can be used in packages without regex.c.
28845
28846 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
28847
28848         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
28849         is to be used.
28850
28851 1998-07-03  Jim Meyering  <meyering@ascend.com>
28852
28853         * m4/gettext.m4: Add -lintl if it's found to be necessary.
28854
28855         * m4/gettext.m4: New file -- from gettext-0.10.35.
28856         * m4/lcmessage.m4: Likewise.
28857         * m4/progtest.m4: Likewise.
28858
28859         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
28860         * m4/jm-macros.m4: Require the new macro.
28861
28862 1998-06-29  Jim Meyering  <meyering@ascend.com>
28863
28864         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
28865         for the definition of NGROUPS (used in a system header included
28866         by sys/mount.h).
28867
28868 1998-06-28  Jim Meyering  <meyering@ascend.com>
28869
28870         * m4/ls-mntd-fs.m4: New file.
28871         * m4/fstypename.m4: New file.
28872
28873         * m4/jm-macros.m4: Require the new macro.
28874         * m4/jm-glibc-io.m4: New file.
28875
28876 1998-05-19  Jim Meyering  <meyering@ascend.com>
28877
28878         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
28879         * m4/lchown.m4: New file.
28880
28881         * m4/Makefile.am.in: New file.
28882         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
28883
28884 1998-05-14  Jim Meyering  <meyering@ascend.com>
28885
28886         * m4/Makefile.am (EXTRA_DIST): Add them.
28887         * m4/jm-macros.m4: New file.
28888         * m4/utimbuf.m4: New file.
28889
28890 1998-05-12  Jim Meyering  <meyering@ascend.com>
28891
28892         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
28893
28894 1998-05-11  Jim Meyering  <meyering@ascend.com>
28895
28896         * m4/isc-posix.m4: New file.
28897
28898 1998-05-10  Jim Meyering  <meyering@ascend.com>
28899
28900         * m4/jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
28901
28902 1998-05-09  Jim Meyering  <meyering@ascend.com>
28903
28904         * m4/Makefile.am (EXTRA_DIST): Add ssize_t.m4.
28905         (EXTRA_DIST): Remove mktime.m4, now that the new version is included
28906         with automake.
28907
28908         * m4/ssize_t.m4: New file.
28909         * m4/mktime.m4: Remove file -- the new automake has this now.
28910
28911 1998-04-26  Jim Meyering  <meyering@ascend.com>
28912
28913         * m4/assert.m4: New file.
28914         * m4/Makefile.am (EXTRA_DIST): Add assert.m4.
28915
28916 1998-04-05  Jim Meyering  <meyering@ascend.com>
28917
28918         * m4/prereq.m4 (jm_PREREQ_REGEX): New macro.
28919         (jm_PREREQ): Use it here.
28920
28921 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
28922
28923         * m4/inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H
28924         in acconfig.h.
28925
28926 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
28927
28928         * m4/prereq.m4: New file.
28929         * m4/error.m4: New file.
28930         * m4/Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4.
28931
28932 1998-02-07  Jim Meyering  <meyering@eng.ascend.com>
28933
28934         * m4/getline.m4: Don't set am_cv_func_working_getline before the
28935         cache-check for the same variable -- that defeated the purpose of
28936         the test; the test program was never run.  This was a problem only
28937         on systems with losing getline functions -- HP-UX 10.20 is one.
28938         Reported by Bjorn Helgaas.
28939
28940 1998-02-06  Jim Meyering  <meyering@eng.ascend.com>
28941
28942         * m4/Makefile.am (EXTRA_DIST): Add perl.m4.
28943
28944 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
28945
28946         * m4/Makefile.am (EXTRA_DIST): Add const.m4.
28947
28948         * m4/const.m4: New file.  Use an initializer in this declaration
28949         typedef int charset[2]; const charset x;
28950         Reported by Bob Glickstein.
28951
28952 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
28953
28954         * m4/chown.m4: Fix reversed types on -1 args to chown.
28955         From Kaveh Ghazi.
28956
28957 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
28958
28959         * m4/check-decl.m4: s/DECLARATION_/DECL_/g.
28960         Add lseek and memchr.
28961
28962         * m4/decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
28963         T.E.Dickey <dickey@clark.net> said that some older preprocessors
28964         have a 20-character limit on names.
28965
28966 1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>
28967
28968         * m4/inttypes_h.m4: New file.
28969         * m4/uintmax_t.m4: New file.
28970         * m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
28971
28972 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
28973   Free Software Foundation, Inc.
28974 Copying and distribution of this file, with or without modification,
28975 are permitted provided the copyright notice and this notice are preserved.