fc237af4e0868c0b6534bf8e4ec818bbb984f95a
[gnulib.git] / ChangeLog
1 2007-03-09  Eric Blake  <ebb9@byu.net>
2
3         * lib/stdlib_.h (EXIT_FAILURE): GNU code expects this to be 1, in
4         spite of platforms like Tandem/NSK that define it to -1.
5
6 2007-03-08  Bruno Haible  <bruno@clisp.org>
7
8         * modules/vprintf-posix-tests: New file.
9         * tests/test-vprintf-posix.sh: New file.
10         * tests/test-vprintf-posix.c: New file.
11         * tests/test-printf-posix.h: New file.
12
13         * modules/vprintf-posix: New file.
14         * lib/vprintf.c: New file.
15         * m4/vprintf-posix.m4: New file.
16         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VPRINTF_POSIX,
17         REPLACE_VPRINTF.
18         * lib/stdio_.h (vprintf): New declaration.
19         * modules/stdio (Makefile.am): Substitute also GNULIB_VPRINTF_POSIX,
20         REPLACE_VPRINTF.
21
22 2007-03-08  Bruno Haible  <bruno@clisp.org>
23
24         * modules/fprintf-posix-tests: New file.
25         * tests/test-fprintf-posix.sh: New file.
26         * tests/test-fprintf-posix.c: New file.
27
28         * modules/fprintf-posix: New file.
29         * lib/fprintf.c: New file.
30         * m4/fprintf-posix.m4: New file.
31         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FPRINTF_POSIX,
32         REPLACE_FPRINTF.
33         * lib/stdio_.h (fprintf): New declaration.
34         * modules/stdio (Makefile.am): Substitute also GNULIB_FPRINTF_POSIX,
35         REPLACE_FPRINTF.
36
37 2007-03-08  Bruno Haible  <bruno@clisp.org>
38
39         * modules/vfprintf-posix-tests: New file.
40         * tests/test-vfprintf-posix.sh: New file.
41         * tests/test-vfprintf-posix.c: New file.
42         * tests/test-fprintf-posix.h: New file.
43         * tests/test-fprintf-posix.out: New file.
44
45         * modules/vfprintf-posix: New file.
46         * lib/vfprintf.c: New file.
47         * m4/vfprintf-posix.m4: New file.
48         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VFPRINTF_POSIX,
49         REPLACE_VFPRINTF.
50         * lib/stdio_.h (vfprintf): New declaration.
51         * modules/stdio (Makefile.am): Substitute also GNULIB_VFPRINTF_POSIX,
52         REPLACE_VFPRINTF.
53
54 2007-03-08  Bruno Haible  <bruno@clisp.org>
55
56         * lib/stdio_.h: Treat __need___FILE like __need_FILE.
57
58 2007-03-08  Bruno Haible  <bruno@clisp.org>
59
60         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Use 'case' statements
61         instead of 'expr' invocations.
62         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
63         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
64         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
65         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
66         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
67         Suggested by Paul Eggert.
68
69 2007-03-08  Bruno Haible  <bruno@clisp.org>
70
71         * modules/fseterr-tests: New file.
72         * tests/test-fseterr.c: New file.
73
74         * modules/fseterr: New file.
75         * lib/fseterr.h: New file.
76         * lib/fseterr.c: New file.
77
78 2007-03-08  Bruno Haible  <bruno@clisp.org>
79
80         * lib/fnmatch_.h: Convert tabs in the middle of lines to spaces.
81         * lib/getopt_.h: Likewise.
82         * lib/mbswidth.h: Likewise.
83         * lib/setenv.h: Likewise.
84         * lib/vasnprintf.h: Likewise.
85         * lib/vasprintf.h: Likewise.
86         * lib/verror.h: Likewise.
87         * lib/xsetenv.h: Likewise.
88         * lib/xvasprintf.h: Likewise.
89
90 2007-03-08  Jim Meyering  <jim@meyering.net>
91
92         * users.txt: Add parted.
93
94         * ChangeLog: Restore 1500 lines mistakenly removed from the end.
95
96 2007-03-07  Bruno Haible  <bruno@clisp.org>
97
98         * m4/printf.m4: Make the shell script snippets copy&pastable.
99
100 2007-03-02  Bruno Haible  <bruno@clisp.org>
101
102         * lib/netinet_in_.h: New file.
103         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Test whether netinet/in.h
104         is self-contained. Set ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H.
105         * modules/netinet_in (Files): Add lib/netinet_in_.h.
106         (Depends-on): Add absolute-header.
107         (Makefile.am): Substitute ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H
108         into netinet/in.h.
109
110 2007-03-03  Bruno Haible  <bruno@clisp.org>
111
112         * lib/sys_select_.h: New file.
113         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SELECT): Test whether sys/select.h
114         is self-contained. Set ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H.
115         * modules/sys_select (Files): Add lib/sys_select_.h.
116         (Depends-on): Add absolute-header.
117         (Makefile.am): Substitute ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H
118         into sys/select.h.
119
120 2007-03-02  Bruno Haible  <bruno@clisp.org>
121
122         * lib/socket_.h: If sys/socket.h exists, include that and <sys/types.h>
123         before it. Turn HAVE_WINSOCK2_H and HAVE_WS2TCPIP_H into configute-time
124         values.
125         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Test also whether
126         <sys/socket.h> is self-contained. Set ABSOLUTE_SYS_SOCKET_H,
127         HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H.
128         * modules/sys_socket (Depends-on): Add absolute-header.
129         (Makefile.am): Substitute ABSOLUTE_SYS_SOCKET_H, HAVE_SYS_SOCKET_H,
130         HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H into sys/socket.h.
131         (Include): Remove requirement of inclusion of <sys/types.h>.
132
133 2007-03-02  Bruno Haible  <bruno@clisp.org>
134
135         * lib/byteswap_.h (bswap_32): Fix formula.
136
137 2007-03-06  Bruno Haible  <bruno@clisp.org>
138
139         * modules/sprintf-posix-tests: New file.
140         * tests/test-sprintf-posix.c: New file.
141
142         * modules/sprintf-posix: New file.
143         * lib/sprintf.c: New file.
144         * m4/sprintf-posix.m4: New file.
145         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_SPRINTF_POSIX,
146         REPLACE_SPRINTF.
147         * lib/stdio_.h (sprintf): New declaration.
148         * modules/stdio (Makefile.am): Substitute also GNULIB_SPRINTF_POSIX,
149         REPLACE_SPRINTF.
150
151 2007-03-06  Bruno Haible  <bruno@clisp.org>
152
153         * modules/vsprintf-posix-tests: New file.
154         * tests/test-vsprintf-posix.c: New file.
155         * tests/test-sprintf-posix.h: New file.
156
157         * modules/vsprintf-posix: New file.
158         * lib/vsprintf.c: New file.
159         * m4/vsprintf-posix.m4: New file.
160         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VSPRINTF_POSIX,
161         REPLACE_VSPRINTF.
162         * lib/stdio_.h (vsprintf): New declaration.
163         * modules/stdio (Makefile.am): Substitute also GNULIB_VSPRINTF_POSIX,
164         REPLACE_VSPRINTF.
165
166 2007-03-06  Bruno Haible  <bruno@clisp.org>
167
168         * modules/vsnprintf (Depend-on): Remove minmax.
169
170 2007-03-06  Bruno Haible  <bruno@clisp.org>
171
172         * modules/snprintf-posix-tests: New file.
173         * tests/test-snprintf-posix.c: New file.
174
175         * modules/snprintf-posix: New file.
176         * m4/snprintf-posix.m4: New file.
177         * m4/snprintf.m4 (gl_REPLACE_SNPRINTF): New macro, extracted from
178         gl_FUNC_SNPRINTF.
179         (gl_FUNC_SNPRINTF): Invoke it.
180         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_SNPRINTF.
181         * lib/stdio_.h (snprintf): Define as a replacement if REPLACE_SNPRINTF
182         is set.
183         * modules/stdio (Makefile.am): Substitute also REPLACE_SNPRINTF.
184
185 2007-03-06  Bruno Haible  <bruno@clisp.org>
186
187         * modules/vsnprintf-posix-tests: New file.
188         * tests/test-vsnprintf-posix.c: New file.
189         * tests/test-snprintf-posix.h: New file.
190
191         * modules/vsnprintf-posix: New file.
192         * m4/vsnprintf-posix.m4: New file.
193         * m4/vsnprintf.m4 (gl_REPLACE_VSNPRINTF): New macro, extracted from
194         gl_FUNC_VSNPRINTF.
195         (gl_FUNC_VSNPRINTF): Invoke it.
196         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_VSNPRINTF.
197         * lib/stdio_.h (vsnprintf): Define as a replacement if
198         REPLACE_VSNPRINTF is set.
199         * modules/stdio (Makefile.am): Substitute also REPLACE_VSNPRINTF.
200
201 2007-03-06  Bruno Haible  <bruno@clisp.org>
202
203         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Test for vasnprintf here.
204         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): ... not here.
205
206 2007-03-06  Bruno Haible  <bruno@clisp.org>
207
208         * lib/math_.h (acosl): Declare also if HAVE_DECL_ACOSL is set.
209         (asinl): Declare also if HAVE_DECL_ASINL is set.
210         (atanl): Declare also if HAVE_DECL_ATANL is set.
211         (ceill): Declare also if HAVE_DECL_CEILL is set.
212         (cosl): Declare also if HAVE_DECL_COSL is set.
213         (expl): Declare also if HAVE_DECL_EXPL is set.
214         (floorl): Declare also if HAVE_DECL_FLOORL is set.
215         (frexpl): Declare also if HAVE_DECL_FREXPL is set.
216         (ldexpl): Declare also if HAVE_DECL_LDEXPL is set.
217         (logl): Declare also if HAVE_DECL_LOGL is set.
218         (sinl): Declare also if HAVE_DECL_SINL is set.
219         (sqrtl): Declare also if HAVE_DECL_SQRTL is set.
220         (tanl): Declare also if HAVE_DECL_TANL is set.
221         * modules/math (Makefile.am): Substitute the values of HAVE_DECL_*.
222         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Set HAVE_DECL_* to 1.
223         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Fix tests for the
224         declaration of frexpl, ldexpl.
225         * modules/printf-frexpl (Depends-on): Add math.
226         * lib/printf-frexp.c (frexpl, ldexpl): Undo last change.
227
228 2007-03-05  Bruno Haible  <bruno@clisp.org>
229
230         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Also test whether
231         frexpl and ldexpl are declared.
232         * lib/printf-frexp.c (frexpl, ldexpl): Provide fallback declarations.
233
234 2007-03-05  Bruno Haible  <bruno@clisp.org>
235
236         * gnulib-tool (func_get_automake_snippet): Don't synthesize an
237         EXTRA_lib_SOURCES augmentation for the relocatable-prog-wrapper module.
238
239 2007-03-05  Bruno Haible  <bruno@clisp.org>
240
241         * lib/stdio_.h: Include <stddef.h>.
242
243 2007-03-05  Bruno Haible  <bruno@clisp.org>
244
245         * m4/printf.m4 (gl_SNPRINTF_DIRECTIVE_N): New macro.
246
247 2007-03-05  Bruno Haible  <bruno@clisp.org>
248
249         * m4/printf.m4: Update with info about OpenBSD 3.9, HP-UX 10.20,
250         NetBSD 4, from Ralf Wildenhues.
251
252 2007-03-04  Bruno Haible  <bruno@clisp.org>
253
254         * lib/vasprintf.h: Update #if logic for the case when the functions
255         exist but are overridden.
256
257 2007-03-04  Bruno Haible  <bruno@clisp.org>
258
259         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Exclude two buggy
260         implementations: glibc-2.4 and MacOS X 10.3.
261         * tests/test-vasnprintf-posix.c (test_function): Test also the case
262         that exhibits the bugs in glibc-2.4 and MacOS X 10.3.
263         * tests/test-vasprintf-posix.c (test_function): Likewise.
264
265 2007-03-04  Bruno Haible  <bruno@clisp.org>
266
267         * modules/vasprintf-posix-tests: New file.
268         * tests/test-vasprintf-posix.c: New file.
269
270         * modules/vasprintf-posix: New file.
271         * lib/vasprintf.h (asprintf, vasprintf): Rename if REPLACE_VASPRINTF is
272         defined.
273         * m4/vasprintf-posix.m4: New file.
274         * m4/vasprintf.m4 (gl_REPLACE_VASPRINTF): New macro, extracted from
275         gl_FUNC_VASPRINTF.
276         (gl_FUNC_VASPRINTF): Invoke it.
277         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Define REPLACE_VASNPRINTF
278         here.
279         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Not here.
280
281 2007-03-04  Bruno Haible  <bruno@clisp.org>
282
283         * lib/sys_time_.h: Rename GETTIMEOFDAY_REPLACEMENT to
284         REPLACE_GETTIMEOFDAY.
285         * modules/sys_time (Makefile.am): Likewise.
286         * m4/sys_time_h.m4: Likewise.
287         * m4/gettimeofday.m4: Likewise.
288
289 2007-03-04  Bruno Haible  <bruno@clisp.org>
290
291         * modules/vasnprintf-posix-tests: New file.
292         * tests/test-vasnprintf-posix.c: New file.
293
294         * modules/vasnprintf-posix: New file.
295         * lib/vasnprintf.c: Include isnan.h, isnanl.h, printf-frexp.h,
296         printf-frexpl.h.
297         (VASNPRINTF): Handle the 'a' and 'A' directives here, if needed.
298         * lib/vasnprintf.h (asnprintf, vasnprintf): Rename if
299         REPLACE_VASNPRINTF is defined.
300         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): New macro, extracted from
301         gl_FUNC_VASNPRINTF.
302         (gl_FUNC_VASNPRINTF): Invoke it.
303         * m4/vasnprintf-posix.m4: New file.
304         * m4/printf.m4: New file.
305
306 2007-03-04  Bruno Haible  <bruno@clisp.org>
307
308         Compile progreloc.c only if --enable-relocatable is specified.
309         * m4/relocatable.m4 (gl_RELOCATABLE): Arrange to compile progreloc.c
310         if --enable-relocatable was specified.
311         * modules/relocatable-prog (Makefile.am): Remove progreloc.c from
312         lib_SOURCES.
313
314 2007-03-04  Jim Meyering  <jim@meyering.net>
315
316         * lib/acl.c (ACL_NOT_WELL_SUPPORTED): New macro.
317         Use it consistently, rather than enumerating errno constants.
318
319 2007-03-04  Bruno Haible  <bruno@clisp.org>
320
321         * modules/xvasprintf-tests: New file.
322         * tests/test-xvasprintf.c: New file.
323
324         * modules/vasprintf-tests: New file.
325         * tests/test-vasprintf.c: New file.
326
327         * modules/vasnprintf-tests: New file.
328         * tests/test-vasnprintf.c: New file.
329
330         * modules/vsnprintf-tests: New file.
331         * tests/test-vsnprintf.c: New file.
332
333         * modules/snprintf-tests: New file.
334         * tests/test-snprintf.c: New file.
335
336 2007-03-04  Bruno Haible  <bruno@clisp.org>
337
338         Compile relocatable.c only if --enable-relocatable is specified.
339         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY_BODY): Renamed from
340         gl_RELOCATABLE_LIBRARY.
341         (gl_RELOCATABLE_LIBRARY, gl_RELOCATABLE_LIBRARY_SEPARATE): New macros.
342         * m4/relocatable.m4 (gl_RELOCATABLE): Invoke gl_RELOCATABLE_LIBRARY.
343         (gl_RELOCATABLE_BODY): Require gl_RELOCATABLE_LIBRARY_BODY instead of
344         gl_RELOCATABLE_LIBRARY.
345         * modules/relocatable-lib (configure.ac): Invoke gl_RELOCATABLE_LIBRARY.
346         (Makefile.am): Remove lib_SOURCES.
347         * modules/relocatable-lib-lgpl (configure.ac): Invoke
348         gl_RELOCATABLE_LIBRARY.
349         (Makefile.am): Remove lib_SOURCES.
350         * modules/relocatable-prog (Makefile.am): Don't compile relocatable.c
351         always.
352         * modules/relocatable-prog-wrapper (configure.ac): Invoke
353         gl_RELOCATABLE_LIBRARY_SEPARATE instead of gl_RELOCATABLE_LIBRARY.
354
355 2007-03-04  Bruno Haible  <bruno@clisp.org>
356
357         * modules/argmatch-tests: New file.
358         * tests/test-argmatch.c: New file.
359
360         * tests/test-allocsa.c (main): Halve the number of loop runs.
361
362         * modules/alloca-opt-tests: New file.
363         * tests/test-alloca-opt.c: New file.
364
365 2007-03-04  Jim Meyering  <jim@meyering.net>
366
367         Work around difference between Linux ACLs and Solaris 10 ZFS.
368         * lib/acl.c (set_acl): Revert to using chmod_or_fchmod also
369         for EINVAL.
370
371 2007-03-03  Bruno Haible  <bruno@clisp.org>
372
373         * modules/relocatable-prog (Depends-on): Add back progreloc's
374         dependencies: canonicalize-lgpl, xalloc, xreadlink, stdbool, unistd.
375
376 2007-03-03  Bruno Haible  <bruno@clisp.org>
377
378         * modules/relocatable-lib-lgpl: Renamed from modules/relocatable-lib.
379         * modules/relocatable-lib: New file.
380
381 2007-03-03  Bruno Haible  <bruno@clisp.org>
382
383         * modules/relocatable-prog: Renamed from modules/relocatable.
384         * doc/relocatable-maint.texi: Talk about module 'relocatable-prog'.
385
386 2007-03-03  Bruno Haible  <bruno@clisp.org>
387
388         * modules/relocatable-script (Files): Add doc/relocatable.texi,
389         m4/relocatable-lib.m4.
390         (Depends-on): Remove 'relocatable'.
391         (configure.ac): Add gl_RELOCATABLE_NOP.
392
393 2007-03-03  Bruno Haible  <bruno@clisp.org>
394
395         * modules/relocatable-prog-wrapper: New file.
396         * modules/relocatable (Depends-on): Add it. Remove all other
397         dependencies except progname.
398         (Files): Remove build-aux/install-reloc, lib/relocwrapper.c.
399
400         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): New macro.
401         (gl_FUNC_STRERROR): Nop.
402         * lib/strerror.c: Compile the file only if !HAVE_STRERROR.
403
404         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): New macro.
405         * lib/setenv.c: Compile the file only if _LIBC || !HAVE_SETENV.
406
407         * m4/readlink.m4 (gl_FUNC_READLINK_SEPARATE): New macro.
408         (gl_FUNC_READLINK): Update.
409
410         * m4/canonicalize-lgpl.m4 (gl_CANONICALIZE_LGPL_SEPARATE): New macro.
411
412 2007-03-03  Bruno Haible  <bruno@clisp.org>
413
414         * lib/xreadlink.c: Include <unistd.h> unconditionally.
415         * modules/xreadlink (Depends-on): Add unistd.
416         * modules/xreadlink-with-size (Depends-on): Likewise.
417
418 2007-03-03  Bruno Haible  <bruno@clisp.org>
419
420         * m4/setenv.m4 (gl_FUNC_SETENV, gl_FUNC_UNSETENV): New macros,
421         extracted from gt_FUNC_SETENV.
422         (gt_FUNC_SETENV): Remove macro.
423         * modules/setenv (configure.ac): Add gl_FUNC_SETENV, gl_FUNC_UNSETENV,
424         remove gt_FUNC_SETENV.
425
426 2007-03-03  Bruno Haible  <bruno@clisp.org>
427
428         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY): Define
429         ENABLE_RELOCATABLE here.
430         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Don't define it here.
431
432 2007-03-03  Bruno Haible  <bruno@clisp.org>
433
434         * modules/rbtreehash-list-tests (Depends-on): Add progname.
435         * tests/test-rbtreehash_list.c: Include progname.h.
436         (main): Call set_program_name.
437
438         * modules/rbtree-oset-tests (Depends-on): Add progname.
439         * tests/test-rbtree_oset.c: Include progname.h.
440         (main): Call set_program_name.
441
442         * modules/rbtree-list-tests (Depends-on): Add progname.
443         * tests/test-rbtree_list.c: Include progname.h.
444         (main): Call set_program_name.
445
446         * modules/linked-list-tests (Depends-on): Add progname.
447         * tests/test-linked_list.c: Include progname.h.
448         (main): Call set_program_name.
449
450 2007-03-03  Bruno Haible  <bruno@clisp.org>
451
452         * lib/glob-libc.h (_Restrict_): New macro, copied from lib/regex.h.
453         All uses of __restrict changed to _Restrict_.
454         * lib/glob_.h (__restrict): Remove macro.
455
456 2007-03-02  Bruno Haible  <bruno@clisp.org>
457
458         * modules/gettext (configure.ac): Require gettext infrastructure
459         from version 0.16.1.
460
461 2007-03-02  Bruno Haible  <bruno@clisp.org>
462
463         * modules/linkedhash-list-tests (Depends-on): Add progname.
464         * tests/test-linkedhash_list.c: Include progname.h.
465         (main): Call set_program_name.
466
467         * modules/carray-list-tests (Depends-on): Add progname.
468         * tests/test-carray_list.c: Include progname.h.
469         (main): Call set_program_name.
470
471         * modules/avltreehash-list-tests (Depends-on): Add progname.
472         * tests/test-avltreehash_list.c: Include progname.h.
473         (main): Call set_program_name.
474
475         * modules/avltree-oset-tests (Depends-on): Add progname.
476         * tests/test-avltree_oset.c: Include progname.h.
477         (main): Call set_program_name.
478
479         * modules/avltree-list-tests (Depends-on): Add progname.
480         * tests/test-avltree_list.c: Include progname.h.
481         (main): Call set_program_name.
482
483         * modules/array-oset-tests (Depends-on): Add progname.
484         * tests/test-array_oset.c: Include progname.h.
485         (main): Call set_program_name.
486
487         * modules/array-list-tests (Depends-on): Add progname.
488         * tests/test-array_list.c: Include progname.h.
489         (main): Call set_program_name.
490
491         * modules/argp-tests (Depends-on): Add progname.
492         * tests/test-argp.c: Include argp.h first. Include progname.h.
493         (main): Call set_program_name.
494
495 2007-03-02  Paul Eggert  <eggert@cs.ucla.edu>
496
497         * doc/gnulib-tool.texi (Initial import): Reword description of
498         _FILE_OFFSET_BITS and _GNU_SOURCE, since they sometimes have a
499         limited effect even if defined after the first system include.
500
501 2007-03-01  Bruno Haible  <bruno@clisp.org>
502
503         * build-aux/config.libpath: Update to libtool-1.5.22.
504         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
505
506 2007-03-01  Bruno Haible  <bruno@clisp.org>
507
508         * doc/relocatable-maint.texi: Recommend to set foo_CPPFLAGS, not
509         foo_CFLAGS.
510         Reported by Ralf Wildenhues.
511
512 2007-03-01  Bruno Haible  <bruno@clisp.org>
513
514         * build-aux/install-reloc: Remove object files left over by some
515         compilers.
516         Reported by Ralf Wildenhues.
517
518 2007-03-01  Bruno Haible  <bruno@clisp.org>
519
520         * build-aux/install-reloc: Break long lines.
521
522 2007-03-01  Bruno Haible  <bruno@clisp.org>
523
524         * doc/relocatable.texi: Document that it may not work on OpenBSD.
525         Reported by Ralf Wildenhues.
526
527 2007-03-01  Bruno Haible  <bruno@clisp.org>
528
529         * doc/gnulib-tool.texi (Initial import): Remove paragraph about
530         include ordering constraints.
531
532 2007-03-01  Paul Eggert  <eggert@cs.ucla.edu>
533
534         Followup to the 2007-02-12 patch, using suggestions from Bruno Haible in
535         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00136.html>.
536         * doc/gnulib-tool.texi (Initial import): Mention _FILE_OFFSET_BITS
537         as another example.
538         * lib/time_.h: Fix misspelling.
539         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
540         Require gl_HEADER_TIME_H_DEFAULTS.
541         * m4/strptime.m4 (gl_FUNC_STRPTIME): Likewise.
542         * m4/time_r.m4 (gl_TIME_R): Likewise.
543         * m4/timegm.m4 (gl_FUNC_TIMEGM): Likewise.
544
545 2007-03-01  Bruno Haible  <bruno@clisp.org>
546
547         * m4/utimecmp.m4 (gl_UTIMECMP): Don't require gl_TIMESPEC.
548         * m4/utimens.m4 (gl_UTIMENS): Likewise.
549
550 2007-03-01  Jim Meyering  <jim@meyering.net>
551
552         * modules/xreadlink (Maintainer): Add my name.
553         * modules/xreadlink-with-size (Depends-on): Alphabetize.
554
555 2007-02-26  Ben Pfaff  <blp@cs.stanford.edu>
556             Bruno Haible  <bruno@clisp.org>
557
558         * build-aux/install-reloc: Compile also c-ctype.c.
559         * build-aux/relocatable.sh.in: New file.
560         * doc/relocatable.texi: New file.
561         * doc/relocatable-maint.texi: New file.
562         * doc/gnulib.texi: Include relocatable-maint.texi.
563         * lib/progreloc.c: Include unistd.h unconditionally.
564         * lib/relocwrapper.c: Include unistd.h unconditionally.
565         Include c-ctype.h.
566         (add_dotbin): Use c_tolower.
567         * m4/relocatable-lib.m4: New file, extracted from m4/relocatable.m4.
568         (gl_RELOCATABLE_LIBRARY): Renamed from AC_RELOCATABLE_LIBRARY.
569         (gl_RELOCATABLE_NOP): Renamed from AC_RELOCATABLE_NOP.
570         * m4/relocatable.m4 (AC_RELOCATABLE_LIBRARY, AC_RELOCATABLE_NOP): Move
571         to m4/relocatable-lib.m4.
572         (gl_RELOCATABLE): Renamed from AC_RELOCATABLE. Set also
573         RELOCATABLE_CONFIG_H_DIR, RELOCATABLE_SRC_DIR, RELOCATABLE_BUILD_DIR.
574         (gl_RELOCATABLE_BODY): Renamed from AC_RELOCATABLE_BODY. Don't
575         require obsolete macro AC_EXEEXT. Don't check for unistd.h. Don't set
576         SET_RELOCATABLE. Instead set RELOCATABLE_LDFLAGS, INSTALL_PROGRAM_ENV.
577         * modules/relocatable: New file.
578         * modules/relocatable-lib: New file.
579         * modules/relocatable-script: New file.
580
581 2007-02-28  Bruno Haible  <bruno@clisp.org>
582
583         Import --enable-relocatable infrastructure.
584         * build-aux/config.libpath: New file, from GNU gettext.
585         * build-aux/install-reloc: New file, from GNU gettext.
586         * build-aux/reloc-ldflags: New file, from GNU gettext.
587         * lib/relocatable.h: New file, from GNU gettext.
588         * lib/relocatable.c: New file, from GNU gettext.
589         * lib/relocwrapper.c: New file, from GNU gettext.
590         * m4/relocatable.m4: New file, from GNU gettext.
591
592 2007-02-28  Bruno Haible  <bruno@clisp.org>
593
594         * MODULES.html.sh (File system functions): Add xreadlink-with-size.
595
596         * modules/xreadlink: New file, from GNU gettext with modifications.
597         * lib/xreadlink.c: New file, from GNU gettext.
598         * lib/xreadlink.h: Add comments.
599         (xreadlink): New declaration.
600
601         * modules/xreadlink-with-size: Renamed from modules/xreadlink.
602         (Files): Remove m4/xreadlink.m4. Replace lib/xreadlink.c with
603         lib/xreadlink-with-size.c.
604         (configure.ac): Remove gl_XREADLINK invocation.
605         (Makefile.am): Augment lib_SOURCES.
606         * m4/xreadlink.m4: Remove file.
607         * lib/xreadlink-with-size.c: Renamed from lib/xreadlink.c.
608         (xreadlink_with_size): Renamed from xreadink.
609         * lib/xreadlink.h (xreadlink_with_size): Renamed from xreadink.
610         * modules/canonicalize (Depends-on): Replace xreadlink with
611         xreadlink-with-size.
612         * lib/canonicalize.c (canonicalize_filename_mode): Update.
613
614 2007-02-25  Jim Meyering  <jim@meyering.net>
615
616         * build-aux/announce-gen: When complaining about excess arguments,
617         list them.
618
619 2007-02-25  Paul Eggert  <eggert@cs.ucla.edu>
620
621         * README: Document signed integer overflow situation more
622         accurately.
623
624 2007-02-25  Bruno Haible  <bruno@clisp.org>
625
626         * lib/vasnprintf.c (VASNPRINTF): Fix estimate of size needed for a
627         'a' or 'A' conversion.
628
629 2007-02-25  Bruno Haible  <bruno@clisp.org>
630
631         * modules/filename: Renamed from modules/pathname.
632         (Files): Replace lib/pathname.h with lib/filename.h. Replace
633         lib/concatpath.c with lib/concat-filename.c.
634         (Makefile.am): Update.
635         (Include): Replace pathname.h with filename.h.
636         * lib/filename.h: Renamed from lib/pathname.h.
637         (concatenated_filename): Renamed from concatenated_pathname.
638         * lib/concat-filename.c: Renamed from lib/concatpath.c.
639         (concatenated_filename): Renamed from concatenated_pathname.
640         * lib/findprog.c: Include filename.h instead of pathname.h.
641         (find_in_path): Update.
642         * lib/javacomp.c: Include filename.h instead of pathname.h.
643         (is_envjavac_gcj43_usable, is_envjavac_oldgcj_14_14_usable,
644         is_envjavac_oldgcj_14_13_usable, is_envjavac_nongcj_usable,
645         is_gcj_present, is_gcj43_usable, is_oldgcj_14_14_usable,
646         is_oldgcj_14_13_usable, is_javac_usable): Update.
647         * lib/javaexec.c: Include filename.h instead of pathname.h.
648         (execute_java_class): Update.
649         * modules/findprog: Update.
650         * modules/javacomp: Update.
651         * modules/javaexec: Update.
652         * MODULES.html.sh (File system functions): Add 'filename', remove
653         'pathname'.
654
655 2007-02-25  Bruno Haible  <bruno@clisp.org>
656
657         * modules/printf-frexpl-tests: New file.
658         * tests/test-printf-frexpl.c: New file.
659
660         * modules/printf-frexpl: New file.
661         * lib/printf-frexpl.h: New file.
662         * lib/printf-frexpl.c: New file.
663         * m4/printf-frexpl.m4: New file.
664
665 2007-02-25  Bruno Haible  <bruno@clisp.org>
666
667         * modules/printf-frexp-tests: New file.
668         * tests/test-printf-frexp.c: New file.
669
670         * modules/printf-frexp: New file.
671         * lib/printf-frexp.h: New file.
672         * lib/printf-frexp.c: New file.
673         * m4/printf-frexp.m4: New file.
674
675 2007-02-25  Bruno Haible  <bruno@clisp.org>
676
677         Assume automake >= 1.10 for the tests.
678         * modules/arcfour-tests (TESTS): Remove $(EXEEXT) suffix.
679         * modules/arctwo-tests: Likewise.
680         * modules/argp-tests: Likewise.
681         * modules/avltree-list-tests: Likewise.
682         * modules/avltree-oset-tests: Likewise.
683         * modules/avltreehash-list-tests: Likewise.
684         * modules/carray-list-tests: Likewise.
685         * modules/crc-tests: Likewise.
686         * modules/des-tests: Likewise.
687         * modules/gc-arcfour-tests: Likewise.
688         * modules/gc-arctwo-tests: Likewise.
689         * modules/gc-des-tests: Likewise.
690         * modules/gc-hmac-md5-tests: Likewise.
691         * modules/gc-hmac-sha1-tests: Likewise.
692         * modules/gc-md2-tests: Likewise.
693         * modules/gc-md4-tests: Likewise.
694         * modules/gc-md5-tests: Likewise.
695         * modules/gc-pbkdf2-sha1-tests: Likewise.
696         * modules/gc-rijndael-tests: Likewise.
697         * modules/gc-sha1-tests: Likewise.
698         * modules/gc-tests: Likewise.
699         * modules/getaddrinfo-tests: Likewise.
700         * modules/hmac-md5-tests: Likewise.
701         * modules/hmac-sha1-tests: Likewise.
702         * modules/linked-list-tests: Likewise.
703         * modules/linkedhash-list-tests: Likewise.
704         * modules/lock-tests: Likewise.
705         * modules/md2-tests: Likewise.
706         * modules/md4-tests: Likewise.
707         * modules/md5-tests: Likewise.
708         * modules/rbtree-list-tests: Likewise.
709         * modules/rbtree-oset-tests: Likewise.
710         * modules/rbtreehash-list-tests: Likewise.
711         * modules/read-file-tests: Likewise.
712         * modules/rijndael-tests: Likewise.
713         * modules/stdint-tests: Likewise.
714         * modules/tls-tests: Likewise.
715
716 2007-02-24  Bruno Haible  <bruno@clisp.org>
717
718         * lib/isnanl.h (isnanl): Define through isnan if isnan is a macro.
719         * m4/isnan.m4 (gl_FUNC_ISNAN_NO_LIBM): Don't check for isnan as a
720         function; instead check whether isnan with a double argument links.
721         * m4/isnanl.m4 (gl_FUNC_ISNANL_NO_LIBM): Don't check for isnanl as a
722         function; instead check whether isnan with a 'long double' argument
723         links.
724         Reported by Eric Blake <ebb9@byu.net>.
725
726 2007-02-24  Bruno Haible  <bruno@clisp.org>
727
728         * lib/isnan.c: Support the 'long double' case if USE_LONG_DOUBLE is
729         defined.
730         * lib/isnanl.c: Remove all code. Just include isnan.c.
731         * modules/isnanl-nolibm (Files): Add lib/isnan.c.
732
733 2007-02-25  Jim Meyering  <jim@meyering.net>
734
735         Avoid conflicting types for 'unsetenv' on FreeBSD.
736         * lib/putenv.c (_unsetenv): Rename from "unsetenv", to avoid
737         conflicting with FreeBSD's (5.0 and 6.1) function declaration
738         in stdlib.h.
739
740 2007-02-24  Bruno Haible  <bruno@clisp.org>
741
742         * modules/isnanl-nolibm-tests: New file.
743         * tests/test-isnanl.c: New file.
744
745         * modules/isnanl-nolibm: New file.
746         * lib/isnanl.h: New file.
747         * lib/isnanl.c: New file.
748         * m4/isnanl.m4: New file.
749
750 2007-02-24  Bruno Haible  <bruno@clisp.org>
751
752         * modules/isnan-nolibm-tests: New file.
753         * tests/test-isnan.c: New file.
754
755         * modules/isnan-nolibm: New file.
756         * lib/isnan.h: New file.
757         * lib/isnan.c: New file.
758         * m4/isnan.m4: New file.
759
760 2007-02-24  Bruno Haible  <bruno@clisp.org>
761
762         * lib/frexpl.c (frexpl): Correct return values for x = 1.0L. Don't
763         assume that an exponent fits in 20 bits.
764
765 2007-02-24  Jim Meyering  <jim@meyering.net>
766
767         * m4/regex.m4: Update the description of the configure-time option,
768         --without-included-regex, to state accurately what the defaults are,
769         and perhaps to give people an idea why using this option is risky.
770
771 2007-02-24  Paul Eggert  <eggert@cs.ucla.edu>
772
773         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check for a nanosleep that
774         loops on small arguments.  This attempts to avoid the problem
775         Bruno Haible reported for AIX 4.3.2 in
776         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00309.html>.
777
778 2007-02-23  Bruno Haible  <bruno@clisp.org>
779
780         * m4/perl.m4 (gl_PERL): Require version 5.005, not 5.003.
781         Needed for help2man.
782
783 2007-02-23  Karl Berry  <karl@gnu.org>
784
785         * doc/gnulib-tool.texi (CVS Issues): mention that when foo_.h
786         exists, foo.h should be cvs-ignored, not committed.
787
788 2007-02-23  Eric Blake  <ebb9@byu.net>
789
790         * lib/getdate.h (includes):  Include <time.h>, not "timespec.h".
791         * lib/stat-time.h (includes): Likewise.
792         * lib/utimecmp.c (includes): Likewise.
793         * lib/utimens.h (includes): Likewise.
794         * lib/getdate.y (includes): Also include "timespec.h" for use
795         internal to the module.
796         * modules/utimens (Depends-on): Revert yesterday's patch.
797         * modules/nanosleep (Depends-on): Add missing dependency.
798
799 2007-02-22  Bruno Haible  <bruno@clisp.org>
800
801         * lib/glob.c: Don't include getlogin_r.h.
802
803 2007-02-22  Jim Meyering  <jim@meyering.net>
804
805         * modules/utimens (Depends-on): Add timespec, required for
806         utimens.h's inclusion of timespec.h.
807
808 2007-02-21  Paul Eggert  <eggert@cs.ucla.edu>
809
810         * lib/getcwd.c (__getcwd): Undo previous change; it mishandled
811         long unreadable paths in GNU/Linux.  Problem reported by Andreas
812         Schwab in
813         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00261.html>.
814         I'll try to think of a better way to fix the Solaris problem.
815
816         * lib/getcwd.c (__getcwd): Don't assume getcwd (NULL, 0) works
817         like glibc; on Solaris 10, it fails with errno == EINVAL.
818         POSIX says the behavior is unspecified if the first argument is NULL,
819         so play it safe and never pass NULL to the system getcwd.
820
821 2007-02-21  Jim Meyering  <jim@meyering.net>
822
823         * lib/gettimeofday.c (rpl_gettimeofday): Remove declaration
824         of gettimeofday.  It would conflict with the one now always
825         provided via sys_time_.h.  Reported by Matthew Woehlke, as
826         an IRIX 6.5 build failure.
827
828 2007-02-20  Paul Eggert  <eggert@cs.ucla.edu>
829
830         Minor fixups to port to Solaris 10 with Sun C 5.8.
831         * lib/getcwd.c [!_LIBC]: Include dirfd.h, since we use dirfd.
832         * modules/getcwd (Depends-on): Add dirfd.
833         * lib/putenv.c (putenv): #undef it.
834         (rpl_putenv): New decl.
835         (malloc, free): Include <stdlib.h> rather than prototyping separately.
836
837 2007-02-20  Bruno Haible  <bruno@clisp.org>
838
839         * modules/stdio-tests: New file.
840         * tests/test-stdio.c: New file.
841
842         * modules/vsnprintf (Files): Remove lib/vsnprintf.h.
843         (Depends-on): Add stdio.
844         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
845         (Include): Use <stdio.h> instead of vsnprintf.h.
846         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
847         HAVE_DECL_VSNPRINTF.
848         * lib/vsnprintf.c: Include <stdio.h> instead of vsnprintf.h.
849
850         * modules/snprintf (Files): Remove lib/snprintf.h.
851         (Depends-on): Add stdio.
852         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
853         (Include): Use <stdio.h> instead of snprintf.h.
854         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
855         HAVE_DECL_SNPRINTF.
856         * lib/snprintf.c: Include <stdio.h> instead of snprintf.h.
857         * lib/getaddrinfo.c: Likewise.
858
859         * modules/stdio: New file.
860         * lib/stdio_.h: New file, incorporating snprintf.h and vsnprintf.h.
861         * lib/snprintf.h: Remove file.
862         * lib/vsnprintf.h: Remove file.
863         * lib/.cppi-disable: Remove snprintf.h.
864         * m4/stdio_h.m4: New file.
865         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdio.
866
867 2007-02-20  Jim Meyering  <jim@meyering.net>
868
869         * lib/ftruncate.c [HAVE_CHSIZE]: Document that this code is
870         used by e.g., mingw.  From Bruno Haible.
871
872 2007-02-19  Bruno Haible  <bruno@clisp.org>
873
874         * lib/string_.h: Use "#pragma GCC system_header" to suppress some gcc
875         warnings.
876         Reported by Ben Pfaff <blp@cs.stanford.edu>.
877
878 2007-02-19  Bruno Haible  <bruno@clisp.org>
879
880         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Don't request a complaint mail
881         from mingw users.
882
883 2007-02-19  Bruno Haible  <bruno@clisp.org>
884
885         * lib/stdlib_.h: Use "#pragma GCC system_header" to suppress some gcc
886         warnings.
887         Reported by Joel E. Denny <jdenny@ces.clemson.edu> via Paul Eggert.
888
889 2007-02-19  Jim Meyering  <jim@meyering.net>
890
891         Don't use FD after a successful "fdopendir (fd)".
892         * lib/getcwd.c (__getcwd) [AT_FDCWD]: fdopendir (fd) usually closes fd.
893         Reset it by calling dirfd on the just-obtained DIR*.
894
895         * m4/ftruncate.m4: Adjust comment to give this module a 3-year reprieve.
896         Prompted by a report from Bruno Haible that mingw lacks ftruncate.
897
898 2007-02-18  Bruno Haible  <bruno@clisp.org>
899
900         * lib/readlink.c: Include <unistd.h>.
901         * m4/readlink.m4 (gl_FUNC_READLINK): Require gl_UNISTD_H_DEFAULTS. Set
902         HAVE_READLINK.
903         * modules/readlink (Depends-on): Add unistd.
904         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
905         (Include): Add <unistd.h>.
906
907         * lib/getlogin_r.h: Remove file.
908         * lib/getlogin_r.c: Include <unistd.h> instead of getlogin_r.h.
909         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE): Remove macro.
910         (gl_GETLOGIN_R): Inline it here. Require gl_UNISTD_H_DEFAULTS. Set
911         HAVE_DECL_GETLOGIN_R.
912         * modules/getlogin_r (Files): Remove lib/getlogin_r.h.
913         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
914         (Include): Use <unistd.h> instead of getlogin_r.h.
915
916         * lib/getcwd.h: Remove file.
917         * lib/getcwd.c: Include <unistd.h> instead of getcwd.h.
918         * lib/xgetcwd.c: Likewise.
919         * m4/getcwd.m4 (gl_FUNC_GETCWD): Require gl_UNISTD_H_DEFAULTS. Set
920         REPLACE_GETCWD. Don't define __GETCWD_PREFIX.
921         * modules/getcwd (Files): Remove lib/getcwd.h.
922         (Depends-on): Add unistd.
923         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
924         (Include): Use <unistd.h> instad of getcwd.h.
925
926         * lib/ftruncate.c: Include <unistd.h> first.
927         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Require gl_UNISTD_H_DEFAULTS.
928         Set HAVE_FTRUNCATE.
929         * modules/ftruncate (Depends-on): Add unistd.
930         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
931
932         * lib/fchdir.c: Include <unistd.h> first.
933         * lib/dirent_.h: Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT.
934         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_UNISTD_H_DEFAULTS instead
935         of gl_HEADER_UNISTD_DEFAULTS. Set REPLACE_FCHDIR. Don't set UNISTD_H.
936         * modules/fchdir (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
937         (Makefile.am): Substitute also REPLACE_FCHDIR into dirent.h.
938
939         * lib/dup2.c: Include <unistd.h> first.
940         * m4/dup2.m4 (gl_FUNC_DUP2): Require gl_UNISTD_H_DEFAULTS. Set
941         HAVE_DUP2.
942         * modules/dup2 (Depends-on): Add unistd.
943         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
944
945         * lib/chown.c: Include <unistd.h> first. Undefine chown later.
946         * m4/chown.m4 (gl_FUNC_CHOWN): Require gl_UNISTD_H_DEFAULTS. Set
947         REPLACE_CHOWN. Don't define chown as a macro here.
948         * modules/chown (Depends-on): Add unistd.
949         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
950
951         * lib/unistd_.h: Test HAVE_UNISTD_H determined at configure time.
952         Add definition for GL_LINK_WARNING.
953         (chown, dup2): New declarations.
954         (fchdir): Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT. Provide optional
955         link warning.
956         (ftruncate): New declaration.
957         (getcwd): New declaration, taken from old getcwd.h.
958         (getlogin_r): New declaration, taken from old getlogin_r.h.
959         (readlink): New declaration.
960         * m4/unistd_h.m4 (gl_UNISTD_H): Renamed from gl_HEADER_UNISTD. Don't
961         set UNISTD_H. Inline gl_PREREQ_UNISTD. Set HAVE_UNISTD_H.
962         (gl_PREREQ_UNISTD): Remove macro.
963         (gl_UNISTD_MODULE_INDICATOR): New macro.
964         (gl_UNISTD_H_DEFAULTS): Renamed from gl_HEADER_UNISTD_DEFAULTS. Set
965         many new variables. Don't set UNISTD_H.
966         * modules/unistd (Description): Change.
967         (Depends-on): Add link-warning.
968         (configure.ac): Update.
969         (Makefile.am): Create unistd.h always. Substitute many new variables
970         into it.
971
972 2007-02-18  Bruno Haible  <bruno@clisp.org>
973
974         * lib/stdlib_.h (getsubopt): New declaration, copied from getsubopt.h.
975         * modules/stdlib (stdlib.h): Also substitute GNULIB_GETSUBOPT and
976         HAVE_GETSUBOPT.
977         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Also initialize
978         GNULIB_GETSUBOPT and HAVE_GETSUBOPT.
979         * lib/getsubopt.h: Remove file.
980         * modules/getsubopt (Files): Remove lib/getsubopt.h.
981         (Depends-on): Add stdlib.
982         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
983         (Includes): Use <stdlib.h> instead of getsubopt.h.
984         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Require gl_STDLIB_H_DEFAULTS.
985         Set HAVE_GETSUBOPT.
986         * lib/getsubopt.c: Don't include getsubopt.h.
987
988 2007-02-18  Bruno Haible  <bruno@clisp.org>
989
990         * modules/fchdir (Depends-on): Add dup2.
991
992 2007-02-18  Bruno Haible  <bruno@clisp.org>
993
994         * lib/stdlib_.h: Handle glibc's special invocation convention
995         specially.
996
997 2007-02-18  Bruno Haible  <bruno@clisp.org>
998
999         * modules/stdlib-tests: New file.
1000         * tests/test-stdlib.c: New file.
1001
1002         * modules/mkstemp (Files): Remove lib/mkstemp.h.
1003         (Depends-on): Add stdlib.
1004         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
1005         (Includes): Use <stdlib.h> instead of mkstemp.h.
1006         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require gl_STDLIB_H_DEFAULTS. Set
1007         REPLACE_MKSTEMP. Remove definition of __MKSTEMP_PREFIX.
1008         * lib/mkstemp.c: Don't include mkstemp.h.
1009         * lib/mkstemp-safer.c: Include <stdlib.h> instead of mkstemp.h.
1010         * lib/stdlib--.h: Don't include mkstemp.h.
1011
1012         * modules/mkdtemp (Files): Remove lib/mkdtemp.h.
1013         (Depends-on): Add stdlib.
1014         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
1015         (Includes): Use <stdlib.h> instead of mkdtemp.h.
1016         * m4/mkdtemp.m4 (gt_FUNC_MKDTEMP): Require gl_STDLIB_H_DEFAULTS. Set
1017         HAVE_MKDTEMP.
1018         * lib/mkdtemp.c: Don't include mkdtemp.h.
1019         * lib/clean-temp.c: Don't include mkdtemp.h.
1020
1021         * modules/exit (Files): Remove lib/exit.h.
1022         (Depends-on): Add stdlib.
1023         (Makefile.am): Remove lib_SOURCES.
1024         (Include): Use <stdlib.h> instead of exit.h.
1025         * lib/argmatch.c: Don't include exit.h.
1026         * lib/execute.c: Likewise.
1027         * lib/pagealign_alloc.c: Likewise.
1028         * lib/pipe.c: Likewise.
1029         * lib/wait-process.c: Likewise.
1030         * lib/copy-file.c: Include <stdlib.h> instead of exit.h.
1031         * lib/exitfail.c: Likewise.
1032         * lib/savewd.c: Likewise.
1033         * lib/xsetenv.c: Likewise.
1034
1035         * modules/stdlib: New file.
1036         * lib/stdlib_.h: New file, incorporating exit.h, mkdtemp.h, mkstemp.h
1037         and extra comments about mkstemp().
1038         * lib/exit.h: Remove file.
1039         * lib/mkdtemp.h: Remove file.
1040         * lib/mkstemp.h: Remove file.
1041         * m4/stdlib_h.m4: New file.
1042         * MODULES.html.sh (Support for systems lacking ANSI C 89): Add stdlib.
1043
1044 2007-02-18  Bruno Haible  <bruno@clisp.org>
1045
1046         * modules/math-tests: New file.
1047         * tests/test-math.c: New file.
1048
1049         * modules/math: New file.
1050         * modules/mathl (Files): Remove lib/mathl.h.
1051         (Depends-on): Add math.
1052         (Makefile.am): Don't mention mathl.h.
1053         (Include): Use <math.h> instead of mathl.h.
1054         * lib/math_.h: New file.
1055         * lib/mathl.h: Remove file.
1056         * lib/acosl.c: Include <config.h> and <math.h> first. Don't include
1057         mathl.h.
1058         * lib/asinl.c: Likewise.
1059         * lib/atanl.c: Likewise.
1060         * lib/ceill.c: Likewise.
1061         * lib/cosl.c: Likewise.
1062         * lib/expl.c: Likewise.
1063         * lib/floorl.c: Likewise.
1064         * lib/frexpl.c: Likewise.
1065         * lib/ldexpl.c: Likewise.
1066         * lib/logl.c: Likewise.
1067         * lib/sincosl.c: Likewise.
1068         * lib/sinl.c: Likewise.
1069         * lib/sqrtl.c: Likewise.
1070         * lib/tanl.c: Likewise.
1071         * lib/trigl.c: Likewise.
1072         * m4/math_h.m4: New file.
1073         * MODULES.html.sh (Mathematics): Add math.
1074
1075 2007-02-17  Bruno Haible  <bruno@clisp.org>
1076
1077         * modules/wctype-tests: New file.
1078         * tests/test-wctype.c: New file.
1079
1080         * modules/wchar-tests: New file.
1081         * tests/test-wchar.c: New file.
1082
1083         * modules/unistd-tests: New file.
1084         * tests/test-unistd.c: New file.
1085
1086         * modules/time-tests: New file.
1087         * tests/test-time.c: New file.
1088
1089         * modules/sysexits-tests: New file.
1090         * tests/test-sysexits.c: New file.
1091
1092         * modules/sys_time-tests: New file.
1093         * tests/test-sys_time.c: New file.
1094
1095         * modules/sys_stat-tests: New file.
1096         * tests/test-sys_stat.c: New file.
1097
1098         * modules/sys_socket-tests: New file.
1099         * tests/test-sys_socket.c: New file.
1100
1101         * modules/sys_select-tests: New file.
1102         * tests/test-sys_select.c: New file.
1103
1104         * modules/string-tests: New file.
1105         * tests/test-string.c: New file.
1106
1107         * modules/stdbool-tests: New file.
1108         * tests/test-stdbool.c: New file.
1109
1110         * modules/netinet_in-tests: New file.
1111         * tests/test-netinet_in.c: New file.
1112
1113         * modules/inttypes-tests: New file.
1114         * tests/test-inttypes.c: New file.
1115
1116         * modules/fcntl-tests: New file.
1117         * tests/test-fcntl.c: New file.
1118
1119         * modules/byteswap-tests: New file.
1120         * tests/test-byteswap.c: New file.
1121
1122         * modules/arpa_inet-tests: New file.
1123         * tests/test-arpa_inet.c: New file.
1124
1125 2007-02-17  Bruno Haible  <bruno@clisp.org>
1126
1127         * lib/inttypes_.h: Add definition for GL_LINK_WARNING.
1128         (imaxabs, imaxdiv, strtoimax, strtoumax): Don't declare the function
1129         if the corresponding module is not enabled. Emit link warnings if
1130         the function is used nevertheless.
1131         * m4/inttypes.m4 (gl_INTTYPES_H): Never use the existing <inttypes.h>.
1132         Don't AC_SUBST HAVE_DECL_IMAXABS, HAVE_DECL_IMAXDIV,
1133         HAVE_DECL_STRTOIMAX, HAVE_DECL_STRTOUMAX.
1134         (gl_INTTYPES_MODULE_INDICATOR, gl_INTTYPES_H_DEFAULTS): New macros.
1135         * modules/inttypes (Depends-on): Add link-warning.
1136         (Makefile.am): Copy the contents of build-aux/link-warning.h into
1137         inttypes.h. Substitute also GNULIB_IMAXABS, GNULIB_IMAXDIV,
1138         GNULIB_STRTOIMAX, GNULIB_STRTOUMAX.
1139         * modules/imaxabs (configure.ac): Invoke gl_INTTYPES_MODULE_INDICATOR.
1140         * modules/imaxdiv (configure.ac): Likewise.
1141         * modules/strtoimax (configure.ac): Likewise.
1142         * modules/strtoumax (configure.ac): Likewise.
1143
1144 2007-02-17  Bruno Haible  <bruno@clisp.org>
1145
1146         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Include the contents of
1147         gl_STRING_MODULE_INDICATOR_DEFAULTS.
1148         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Remove macro.
1149         (gl_HEADER_STRING_H_BODY, gl_STRING_MODULE_INDICATOR): Update.
1150
1151 2007-02-17  Bruno Haible  <bruno@clisp.org>
1152
1153         * modules/link-warning: New file.
1154         * build-aux/link-warning.h: New file, extracted from lib/string_.h.
1155         * lib/string_.h (GL_LINK_WARNING): Remove definition.
1156         * modules/string (Depends-on): Add link-warning.
1157         (Makefile.am): Copy the contents of build-aux/link-warning.h into
1158         string.h.
1159         * MODULES.html.sh (Support for building libraries and executables): Add
1160         link-warning.
1161
1162 2007-02-17  Bruno Haible  <bruno@clisp.org>
1163
1164         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strcasecmp,
1165         strncasecmp, strchr, strchrnul, strdup, strndup, strnlen, strcspn,
1166         strpbrk, strspn, strrchr, strsep, strstr, strcasestr, strtok_r): Break
1167         long lines.
1168
1169 2007-02-17  Ben Pfaff  <blp@cs.stanford.edu>
1170             Bruno Haible  <bruno@clisp.org>
1171
1172         * modules/tmpfile: New file.
1173         * lib/tmpfile.c: New file.
1174         * m4/tmpfile.m4: New file.
1175         * MODULES.html.sh (func_all_modules): New section "Input/output".
1176
1177 2007-02-15  Bruno Haible  <bruno@clisp.org>
1178
1179         * lib/clean-temp.c [WIN32 && !CYGWIN]: Include <windows.h>.
1180         (supports_delete_on_close): New function.
1181         (open_temp, fopen_temp): Use _O_TEMPORARY when supported.
1182
1183 2007-02-14  Bruno Haible  <bruno@clisp.org>
1184
1185         * modules/mbspcasecmp-tests: New file.
1186         * tests/test-mbspcasecmp.sh: New file.
1187         * tests/test-mbspcasecmp.c: New file.
1188
1189         New module mbspcasecmp.
1190         * modules/mbspcasecmp: New file.
1191         * lib/mbspcasecmp.c: New file.
1192         * lib/string_.h (strncasecmp): Change warning message.
1193         (mbspcasecmp): New declaration.
1194         * m4/mbspcasecmp.m4: New file.
1195         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1196         GNULIB_MBSPCASECMP.
1197         * modules/string (string.h): Also substitute GNULIB_MBSPCASECMP.
1198         * MODULES.html.sh (Internationalization functions): Add mbspcasecmp.
1199
1200 2007-02-14  Bruno Haible  <bruno@clisp.org>
1201
1202         * modules/mbsncasecmp-tests: New file.
1203         * tests/test-mbsncasecmp.sh: New file.
1204         * tests/test-mbsncasecmp.c: New file.
1205
1206         New module mbsncasecmp.
1207         * modules/mbsncasecmp: New file.
1208         * lib/mbsncasecmp.c: New file.
1209         * lib/string_.h (mbsncasecmp): New declaration.
1210         * m4/mbsncasecmp.m4: New file.
1211         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1212         GNULIB_MBSNCASECMP.
1213         * modules/string (string.h): Also substitute GNULIB_MBSNCASECMP.
1214         * MODULES.html.sh (Internationalization functions): Add mbsncasecmp.
1215
1216 2007-02-14  Paul Eggert  <eggert@cs.ucla.edu>
1217
1218         * lib/exclude.c (FNM_EXTMATCH): Define if system does not.
1219         Verify that it doesn't overlap with our flags.
1220         (fnmatch_no_wildcards): Don't use strcasecmp or strncasecmp, which
1221         do not have the desired effect in multibyte locales; instead, use
1222         mbscasecmp.
1223         * modules/exclude (Depends-on): Depend on mbscasecmp, not strcase.
1224         Add dependency on xalloc.  Depend on fnmatch, not fnmatch-gnu, since
1225         we don't require GNU fnmatch ourselves (if our users require it, they
1226         should do so explicitly).
1227
1228         Fix regex code so it doesn't rely on strcasecmp.
1229         * lib/regex_internal.h: Include <langinfo.h> only if _LIBC is defined.
1230         Otherwise, include gnulib's langinfo.h.
1231         * lib/regcomp.c (init_dfa): Don't use strcasecmp, as it can have
1232         undesirable behavior in non-C locales.  Instead, rely on localecharset.
1233         * m4/regex.m4 (gl_PREREQ_REGEX): Don't require AM_LANGINFO_CODESET.
1234         * modules/regex (FILES): Remove m4/codeset.m4.
1235         (Depends-on): Add localcharset.  Remove strcase.
1236
1237 2007-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1238
1239         * m4/unlinkdir.m4 (gl_UNLINKDIR): Fix m4 quoting bug.
1240         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
1241
1242 2007-02-13  Bruno Haible  <bruno@clisp.org>
1243
1244         * m4/intdiv0.m4 (gt_INTDIV0): Assume ANSI C. Fix underquoting bug.
1245         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
1246
1247 2007-02-12  Bruno Haible  <bruno@clisp.org>
1248
1249         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
1250         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): If
1251         GNULIB_POSIXCHECK and the gnulib module not enabled, provoke a link-
1252         time warning rather than a link error.
1253
1254 2007-02-12  Bruno Haible  <bruno@clisp.org>
1255
1256         * m4/locale-fr.m4 (gt_LOCALE_FR): Fix m4 quoting bug.
1257         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
1258         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
1259
1260 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
1261
1262         * lib/string_.h (strncasecmp): Fix typo: this macro takes 3
1263         args, not 2.
1264
1265 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
1266
1267         New module 'time', so that apps can include <time.h> as per
1268         POSIX and GNU instead of separate include files like time_r.h
1269         and timegm.h.  This implementation tries out a simpler approach
1270         for replacing decls in standard include files (as compared to
1271         the string module), somewhat as an experiment.
1272
1273         * config/srclist.txt: Comment out mktime.c for now.
1274         * doc/gnulib-tool.texi (Initial import): Don't use time_r as an example
1275         since it doesn't apply any more.  Use generic wording instead.
1276         * MODULES.html.sh (Support for systems lacking POSIX:2001): New module
1277         'time'.
1278         * lib/time_.h, m4/time_h.m4, modules/time: New files.
1279         * lib/strptime.h, lib/time_r.h, lib/timegm.h: Remove.
1280         * lib/mktime.c: Include config.h depending on _LIBC, not HAVE_CONFIG_H.
1281         Don't include <sys/types.h>; no longer needed since we assume C89.
1282         * lib/mktime.c: Don't include "time_r.h"; no longer needed.
1283         * lib/strftime.c: Likewise.
1284         * lib/time_r.c: Likewise.
1285         * lib/nanosleep.c (nanosleep): #undef after include files, not before.
1286         * lib/nanosleep.c: Include <time.h> first, to check interface.
1287         * lib/strptime.c: Likewise.
1288         * lib/time_r.c: Likewise.
1289         * lib/timegm.c: Likewise.
1290         * lib/strptime.c: Don't include strptime.h or time_r.h; no longer
1291         needed.
1292         * lib/timegm.c: Don't include timegm.h; no longer needed.
1293         * lib/timespec.h: Don't include <sys/time.h> before <time.h>;
1294         time.h now handles any problems in that area.
1295         (struct timespec, nanosleep): Remove; time.h now arranges for these.
1296         * lib/xnanosleep.c: Don't include timespec.h; no longer needed now
1297         that time.h defines struct timespec.
1298         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check that nanosleep is declared.
1299         Set REPLACE_NANOSLEEP.  Don't AC_DEFINE nanosleep; the time module now
1300         handles that.
1301         * m4/strptime.m4 (gl_FUNC_STPRTIME): Set REPLACE_STRPTIME.
1302         * m4/time_r.m4 (gl_TIME_R): Don't define HAVE_TIME_R_POSIX; no longer
1303         needed.  Set REPLACE_LOCALTIME.
1304         * m4/timegm.m4 (gl_FUNC_TIMEGM): Set REPLACE_TIMEGM.
1305         * m4/timespec.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Move to time_h.m4.
1306         (gl_TIMESPEC): Don't check for sys/time.h or struct timespec or
1307         nanosleep; time_h.m4 now does that.  Don't require
1308         gl_USE_SYSTEM_EXTENSIONS; no longer needed directly, and the time
1309         module handles this now.
1310         * modules/getdate (Depends-on): Remove timespec.  Add time.
1311         * modules/nanosleep (Depends-on): Likewise.
1312         * modules/stat-time (Depends-on): Likewise.
1313         * modules/nanosleep (Include): Include time.h, not timespec.h.
1314         * modules/strptime (Files): Remove lib/strptime.h.
1315         (Depends-on): Add extensions, time.
1316         (Include): Include time.h, not strptime.h.
1317         * modules/time_r (Files): Remove lib/time_r.h.
1318         (Depends-on): Add time.
1319         (Include): Include time.h, not time_r.h.
1320         * modules/timegm: Likewise.
1321         * modules/timespec (Description): Now does timespec-related decls
1322         of our own, instead of struct timespec itself.
1323         (Depends-on): Add time; remove extensions.
1324         (Maintainer): Add self.
1325         * modules/utimecmp (Depends-on): Add time; remove timespec.
1326         * modules/utimens (Depends-on): Likewise.
1327         * modules/xnanosleep (Depends-on): Likewise.
1328
1329 2007-02-11  Bruno Haible  <bruno@clisp.org>
1330
1331         * lib/c-strstr.c: Include allocsa.h.
1332         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
1333         * lib/c-strcasestr.c: Include allocsa.h.
1334         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
1335         * lib/strcasestr.c: Include allocsa.h.
1336         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
1337         * lib/mbsstr.c: Include allocsa.h.
1338         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
1339         allocsa/freesa instead of malloc/free.
1340         * lib/mbscasestr.c: Include allocsa.h.
1341         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
1342         allocsa/freesa instead of malloc/free.
1343         * modules/c-strstr (Depends-on): Add allocsa.
1344         * modules/c-strcasestr (Depends-on): Likewise.
1345         * modules/strcasestr (Depends-on): Likewise.
1346         * modules/mbsstr (Depends-on): Likewise.
1347         * modules/mbscasestr (Depends-on): Likewise.
1348
1349 2007-02-11  Bruno Haible  <bruno@clisp.org>
1350
1351         * lib/mbsspn.c (mbsspn): Fix bug. Remove unnecessary strlen call.
1352
1353         * modules/mbsspn-tests: New file.
1354         * tests/test-mbsspn.sh: New file.
1355         * tests/test-mbsspn.c: New file.
1356
1357 2007-02-11  Bruno Haible  <bruno@clisp.org>
1358
1359         * lib/mbspbrk.c (mbspbrk): Remove unneeded cast.
1360
1361         * modules/mbspbrk-tests: New file.
1362         * tests/test-mbspbrk.sh: New file.
1363         * tests/test-mbspbrk.c: New file.
1364
1365 2007-02-11  Bruno Haible  <bruno@clisp.org>
1366
1367         * lib/mbscspn.c (mbscspn): Remove unnecessary strlen call and
1368         unneeded cast.
1369
1370         * modules/mbscspn-tests: New file.
1371         * tests/test-mbscspn.sh: New file.
1372         * tests/test-mbscspn.c: New file.
1373
1374 2007-02-11  Bruno Haible  <bruno@clisp.org>
1375
1376         * modules/mbscasecmp-tests: New file.
1377         * tests/test-mbscasecmp.sh: New file.
1378         * tests/test-mbscasecmp.c: New file.
1379
1380 2007-02-11  Bruno Haible  <bruno@clisp.org>
1381
1382         Ensure O(n) worst-case complexity of mbscasestr.
1383         * lib/mbscasestr.c: Include stdbool.h.
1384         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
1385         functions.
1386         (mbscasestr): Add some bookkeeping. Invoke knuth_morris_pratt_* when
1387         the bookkeeping indicates that it's worth it.
1388         * modules/mbscasestr (Depends-on): Add stdbool, mbslen, strnlen.
1389
1390         * modules/mbscasestr-tests: New file.
1391         * tests/test-mbscasestr1.c: New file.
1392         * tests/test-mbscasestr2.sh: New file.
1393         * tests/test-mbscasestr2.c: New file.
1394         * tests/test-mbscasestr3.sh: New file.
1395         * tests/test-mbscasestr3.c: New file.
1396         * tests/test-mbscasestr4.sh: New file.
1397         * tests/test-mbscasestr4.c: New file.
1398         * m4/locale-tr.m4: New file.
1399
1400 2007-02-11  Bruno Haible  <bruno@clisp.org>
1401
1402         Ensure O(n) worst-case complexity of mbsstr.
1403         * lib/mbsstr.c: Include stdbool.h.
1404         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
1405         functions.
1406         (mbsstr): Add some bookkeeping. Invoke knuth_morris_pratt_* when the
1407         bookkeeping indicates that it's worth it.
1408         * modules/mbsstr (Depends-on): Add stdbool, mbslen, strnlen.
1409
1410         * modules/mbsstr-tests: New file.
1411         * tests/test-mbsstr1.c: New file.
1412         * tests/test-mbsstr2.sh: New file.
1413         * tests/test-mbsstr2.c: New file.
1414         * tests/test-mbsstr3.sh: New file.
1415         * tests/test-mbsstr3.c: New file.
1416         * m4/locale-fr.m4: New file.
1417
1418 2007-02-11  Bruno Haible  <bruno@clisp.org>
1419
1420         * lib/mbsrchr.c (mbsrchr): Fix bug.
1421
1422         * modules/mbsrchr-tests: New file.
1423         * tests/test-mbsrchr.sh: New file.
1424         * tests/test-mbsrchr.c: New file.
1425
1426 2007-02-11  Bruno Haible  <bruno@clisp.org>
1427
1428         * lib/mbschr.c (mbschr): Fix bug.
1429
1430         * modules/mbschr-tests: New file.
1431         * tests/test-mbschr.sh: New file.
1432         * tests/test-mbschr.c: New file.
1433         * m4/locale-zh.m4: New file.
1434
1435 2007-02-11  Bruno Haible  <bruno@clisp.org>
1436
1437         Support for copying multibyte string iterators.
1438         * lib/mbiter.h: Include <string.h>.
1439         (mbiter_multi_copy): New function.
1440         (mbi_copy): New macro.
1441         * lib/mbuiter.h: Include <string.h>.
1442         (mbuiter_multi_copy): New function.
1443         (mbui_copy): New macro.
1444
1445 2007-02-11  Bruno Haible  <bruno@clisp.org>
1446
1447         New module mbslen.
1448         * modules/mbslen: New file.
1449         * lib/mbslen.c: New file.
1450         * lib/string_.h (mbslen): New declaration.
1451         * m4/mbslen.m4: New file.
1452         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1453         GNULIB_MBSLEN.
1454         * modules/string (string.h): Also substitute GNULIB_MBSLEN.
1455         * MODULES.html.sh (Internationalization functions): Add mbslen.
1456
1457 2007-02-11  Bruno Haible  <bruno@clisp.org>
1458
1459         Ensure O(n) worst-case complexity of strcasestr substitute.
1460         * lib/strcasestr.c: Include stdbool.h.
1461         (knuth_morris_pratt): New function.
1462         (strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when the
1463         bookkeeping indicates that it's worth it.
1464         * modules/strcasestr (Depends-on): Add stdbool, strnlen.
1465
1466         * modules/strcasestr-tests: New file.
1467         * tests/test-strcasestr.c: New file.
1468
1469 2007-02-11  Bruno Haible  <bruno@clisp.org>
1470
1471         Ensure O(n) worst-case complexity of c_strcasestr.
1472         * lib/c-strcasestr.c: Include stdbool.h, string.h.
1473         (knuth_morris_pratt): New function.
1474         (c_strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when
1475         the bookkeeping indicates that it's worth it.
1476         * modules/c-strcasestr (Depends-on): Add stdbool, strnlen.
1477
1478         * modules/c-strcasestr-tests: New file.
1479         * tests/test-c-strcasestr.c: New file.
1480
1481 2007-02-11  Bruno Haible  <bruno@clisp.org>
1482
1483         Ensure O(n) worst-case complexity of c_strstr.
1484         * lib/c-strstr.c: Include stdbool.h, string.h.
1485         (knuth_morris_pratt): New function.
1486         (c_strstr): Add some bookkeeping. Invoke knuth_morris_pratt when the
1487         bookkeeping indicates that it's worth it.
1488         * modules/c-strstr (Depends-on): Add stdbool, strnlen.
1489
1490         * lib/c-strstr.c: Complete rewrite for maintainability.
1491
1492         * modules/c-strstr-tests: New file.
1493         * tests/test-c-strstr.c: New file.
1494
1495 2007-02-11  Bruno Haible  <bruno@clisp.org>
1496
1497         * m4/javacomp.m4 (gt_JAVACOMP): Work around a 'tr' bug in coreutils
1498         5.2.1 and earlier, whereby \055 was treated just like the range
1499         delimiter '-'.
1500         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
1501
1502 2007-02-08  Bruno Haible  <bruno@clisp.org>
1503
1504         * modules/regex (Depends-on): Add stdbool.
1505         Reported by Dalibor Topic <robilad@kaffe.org>.
1506
1507 2007-02-05  Paul Eggert  <eggert@cs.ucla.edu>
1508
1509         * m4/regex.m4 (gl_REGEX): Check for glibc bug #3957.
1510         Prefer returning from main to exiting from it.
1511         Remove unnecessary parens after sizeof.
1512
1513 2007-02-05  Bruno Haible  <bruno@clisp.org>
1514
1515         New module mbssep.
1516         * modules/mbssep: New file.
1517         * lib/mbssep.c: New file.
1518         * lib/string_.h (strsep): Add a conditional link warning.
1519         (mbssep): New declaration.
1520         * m4/mbssep.m4: New file.
1521         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1522         GNULIB_MBSSEP.
1523         * modules/string (string.h): Also substitute GNULIB_MBSSEP.
1524         * MODULES.html.sh (Internationalization functions): Add mbssep.
1525
1526 2007-02-05  Bruno Haible  <bruno@clisp.org>
1527
1528         * lib/strsep.c (strsep): Fix actions in case of no delimiters.
1529         Optimize search in case of 1 delimiter.
1530
1531 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
1532
1533         * lib/acl.h: Include sys/types.h before sys/acl.h.
1534
1535 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
1536
1537         Merge upstream fix for glibc bugzilla #3957:
1538
1539         2007-02-05  Jakub Jelinek  <jakub@redhat.com>
1540
1541         * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0'
1542         bit for RE_HAT_LISTS_NOT_NEWLINE.
1543         (build_charclass_op): Remove bogus comment.
1544
1545 2007-02-05  Simon Josefsson  <simon@josefsson.org>
1546
1547         * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
1548
1549 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
1550
1551         * lib/getsubopt.c [!_LIBC]: Include config.h and getsubopt.h.
1552         * lib/memmem.c [!defined _LIBC]: Include config.h.
1553
1554 2007-02-04  Bruno Haible  <bruno@clisp.org>
1555
1556         * lib/string_.h (GL_LINK_WARNING2): Put the word "warning:" into the
1557         warning message.
1558
1559 2007-02-04  Bruno Haible  <bruno@clisp.org>
1560
1561         New module mbstok_r.
1562         * modules/mbstok_r: New file.
1563         * lib/mbstok_r.c: New file.
1564         * lib/string_.h (strtok_r): Change argument names to match the
1565         comments. Add a conditional link warning.
1566         (mbstok_r): New declaration.
1567         * m4/mbstok_r.m4: New file.
1568         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1569         GNULIB_MBSTOK_R.
1570         * modules/string (string.h): Also substitute GNULIB_MBSTOK_R.
1571         * MODULES.html.sh (Internationalization functions): Add mbstok_r.
1572
1573 2007-02-04  Bruno Haible  <bruno@clisp.org>
1574
1575         New module mbsspn.
1576         * modules/mbsspn: New file.
1577         * lib/mbsspn.c: New file.
1578         * lib/string_.h (strspn): Add a conditional link warning.
1579         (mbsspn): New declaration.
1580         * m4/mbsspn.m4: New file.
1581         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1582         GNULIB_MBSSPN.
1583         * modules/string (string.h): Also substitute GNULIB_MBSSPN.
1584         * MODULES.html.sh (Internationalization functions): Add mbsspn.
1585
1586 2007-02-04  Bruno Haible  <bruno@clisp.org>
1587
1588         New module mbspbrk.
1589         * modules/mbspbrk: New file.
1590         * lib/mbspbrk.c: New file.
1591         * lib/string_.h (strpbrk): Add a conditional link warning.
1592         (mbspbrk): New declaration.
1593         * m4/mbspbrk.m4: New file.
1594         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1595         GNULIB_MBSPBRK.
1596         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
1597         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
1598
1599 2007-02-04  Bruno Haible  <bruno@clisp.org>
1600
1601         New module mbscspn.
1602         * modules/mbscspn: New file.
1603         * lib/mbscspn.c: New file.
1604         * lib/string_.h (strcspn): Add a conditional link warning.
1605         (mbscspn): New declaration.
1606         * m4/mbscspn.m4: New file.
1607         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1608         GNULIB_MBSCSPN.
1609         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
1610         * MODULES.html.sh (Internationalization functions): Add mbscspn.
1611
1612 2007-02-04  Bruno Haible  <bruno@clisp.org>
1613
1614         New module mbscasestr, reduced goal of strcasestr.
1615         * modules/mbscasestr: New file.
1616         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
1617         (mbscasestr): Renamed from strcasestr.
1618         * lib/strcasestr.c: Don't include mbuiter.h.
1619         (strcasestr): Remove support for multibyte locales.
1620         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
1621         Change the conditional link warning.
1622         (mbscasestr): New declaration.
1623         * m4/mbscasestr.m4: New file.
1624         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
1625         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
1626         REPLACE_STRCASESTR.
1627         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
1628         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
1629         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
1630         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
1631         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
1632         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
1633         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
1634         (Depends-on): Remove mbuiter.
1635         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
1636
1637 2007-02-04  Bruno Haible  <bruno@clisp.org>
1638
1639         Simplify handling of strncasecmp.
1640         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
1641         the conditional link warning.
1642         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
1643         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
1644         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
1645         * modules/strcase (configure.ac): Don't invoke
1646         gl_STRING_MODULE_INDICATOR.
1647         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
1648
1649 2007-02-04  Bruno Haible  <bruno@clisp.org>
1650
1651         New module mbscasecmp, reduced goal of strcasecmp.
1652         * modules/mbscasecmp: New file.
1653         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
1654         (mbscasecmp): Renamed from strcasecmp.
1655         * lib/strcasecmp.c: Don't include mbuiter.h.
1656         (strcasecmp): Remove support for multibyte locales.
1657         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
1658         Change the conditional link warning.
1659         (mbscasecmp): New declaration.
1660         * m4/mbscasecmp.m4: New file.
1661         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
1662         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
1663         REPLACE_STRCASECMP.
1664         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
1665         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1666         GNULIB_MBSCASECMP.
1667         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
1668         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
1669         * modules/strcase (Files): Remove m4/mbrtowc.m4.
1670         (Depends-on): Remove mbuiter.
1671         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
1672
1673 2007-02-04  Bruno Haible  <bruno@clisp.org>
1674
1675         New module mbsstr. Remove module strstr.
1676         * modules/mbsstr: New file.
1677         * modules/strstr: Remove file.
1678         * lib/mbsstr.c: Renamed from lib/strstr.c.
1679         (mbsstr): Renamed from strstr.
1680         * lib/string_.h (strstr): Remove declaration. Change the conditional
1681         link warning.
1682         (mbsstr): New declaration.
1683         * m4/mbsstr.m4: New file.
1684         * m4/strstr.m4: Remove file.
1685         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
1686         REPLACE_STRSTR.
1687         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
1688         Don't initialize GNULIB_STRSTR.
1689         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
1690         substitute GNULIB_STRSTR and REPLACE_STRSTR.
1691         * MODULES.html.sh (Internationalization functions): Add mbsstr.
1692         (Support for systems lacking ANSI C 89): Remove strstr.
1693
1694 2007-02-04  Bruno Haible  <bruno@clisp.org>
1695
1696         New module mbsrchr.
1697         * modules/mbsrchr: New file.
1698         * lib/mbsrchr.c: New file.
1699         * lib/string_.h (strrchr): Add a conditional link warning.
1700         (mbsrchr): New declaration.
1701         * m4/mbsrchr.m4: New file.
1702         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1703         GNULIB_MBSRCHR.
1704         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
1705         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
1706
1707 2007-02-04  Bruno Haible  <bruno@clisp.org>
1708
1709         New module mbschr.
1710         * modules/mbschr: New file.
1711         * lib/mbschr.c: New file.
1712         * lib/string_.h (strchr): Add a conditional link warning.
1713         (mbschr): New declaration.
1714         * m4/mbschr.m4: New file.
1715         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1716         GNULIB_MBSCHR.
1717         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
1718         * MODULES.html.sh (Internationalization functions): Add mbschr.
1719
1720 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
1721
1722         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
1723
1724         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
1725
1726 2007-02-04  Bruno Haible  <bruno@clisp.org>
1727
1728         New module description section 'configure.ac-early'.
1729         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
1730         (func_get_autoconf_early_snippet): New function.
1731         (func_import, func_create_testdir): Use it. Remove special cases for
1732         modules 'extensions' and 'lock'.
1733         * modules/extensions (configure.ac-early): Require
1734         gl_USE_SYSTEM_EXTENSIONS.
1735         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
1736
1737 2007-02-04  Bruno Haible  <bruno@clisp.org>
1738
1739         Make use of gcj-4.3's -fsource and -ftarget option.
1740         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
1741         and if so try the options -fsource and -ftarget.
1742         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
1743         source_version, ftarget_option, target_version arguments.
1744         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
1745         (is_envjavac_oldgcj_14_14_usable): Renamed from
1746         is_envjavac_gcj_14_14_usable.
1747         (is_envjavac_oldgcj_14_13_usable): Renamed from
1748         is_envjavac_gcj_14_13_usable.
1749         (is_gcj_present): Update.
1750         (is_gcj_43, is_gcj43_usable): New functions.
1751         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
1752         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
1753         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
1754         try the options -fsource and -ftarget.
1755
1756 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
1757
1758         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
1759         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
1760         larger value.
1761
1762 2007-02-03  Jim Meyering  <jim@meyering.net>
1763
1764         Give tools a better chance to allocate space for very large buffers.
1765         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
1766
1767         Make pwd and readlink work also when run with an unreadable parent dir
1768         on systems with openat support.
1769         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
1770         provided getcwd function, even when we have openat support.
1771         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
1772
1773 2007-02-02  Bruno Haible  <bruno@clisp.org>
1774
1775         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
1776         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
1777         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
1778         portability problems if one of these functions is only used on specific
1779         platforms.
1780         Reported by Paul Eggert.
1781
1782 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
1783
1784         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
1785         is causing more trouble than it's curing.
1786         * lib/regex_internal.h (__mempcpy): Remove.
1787         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
1788         (and make the code a tad smaller to boot).
1789         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
1790
1791 2007-02-02  Jim Meyering  <jim@meyering.net>
1792
1793         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
1794         section, not in the Makefile.am: one.
1795
1796 2007-02-02  Eric Blake  <ebb9@byu.net>
1797
1798         * lib/strchrnul.c: Always include config.h first.
1799
1800         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
1801         gnulib strstr is not necessary here.
1802
1803 2007-02-02  Simon Josefsson  <simon@josefsson.org>
1804
1805         * m4/socklen.m4: Fix typo.
1806
1807 2007-02-02  Eric Blake  <ebb9@byu.net>
1808
1809         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
1810         * modules/netinet_in (Makefile.am): Likewise.
1811
1812 2007-02-01  Bruno Haible  <bruno@clisp.org>
1813
1814         * lib/string_.h (GL_LINK_WARNING): New macro.
1815         (strcasecmp, strstr, strcasestr): If provided by the system,
1816         conditionally define as a macro that leads to a warning instead of to
1817         an error.
1818         (strncasecmp): Conditionally define as a macro that leads to a warning.
1819
1820 2007-02-01  Karl Berry  <karl@gnu.org>
1821
1822         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
1823
1824 2007-02-01  Bruno Haible  <bruno@clisp.org>
1825
1826         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
1827         renamings.
1828
1829 2007-02-01  Eric Blake  <ebb9@byu.net>
1830
1831         * modules/regex (Depends-on): Revert dependence on mempcpy.
1832         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
1833         module's definition of mempcpy.
1834         Reported by Paul Eggert.
1835
1836 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
1837
1838         * lib/string_.h: If the gnulib module XYZ is not present, undefine
1839         the symbol XYZ before redefining it.  This fixes a problem with
1840         programs that don't use XYZ, when compiled on systems that define
1841         XYZ to something else.
1842
1843 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
1844
1845         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
1846         occurs when "mkdir -m foo" creates a setgid directory that is (1)
1847         writeable to group or other and (2) is intended to have a special
1848         mode bit that is set or cleared.  In such a case, the directory
1849         should be neither group- nor other-writeable until the special
1850         mode bits are right.
1851
1852 2007-01-31  Eric Blake  <ebb9@byu.net>
1853
1854         * modules/mountlist (Depends-on): Add strstr.
1855
1856         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
1857         bug.
1858         * modules/string (Makefile.am): Remove redundant replacement.
1859         * modules/regex (Depends-on): Add mempcpy.
1860
1861 2007-01-31  Bruno Haible  <bruno@clisp.org>
1862
1863         New module description field 'Link'.
1864         * gnulib-tool (func_usage): Document --extract-link-directive.
1865         (sed_extract_prog): Recognize 'Link' directive.
1866         (func_get_link_directive): New function.
1867         (func_import): Show summary of link directives.
1868         Handle --extract-link-directive option.
1869         * modules/acl (Link): New section.
1870         * modules/clock-time (Link): New section.
1871         * modules/euidaccess (Link): New section.
1872         * modules/gettext (Link): New section.
1873         * modules/iconv (Link): New section.
1874         * modules/lock (Link): New section.
1875         * modules/nanosleep (Link): New section.
1876         * modules/readline (Link): New section.
1877
1878 2007-01-27  Bruno Haible  <bruno@clisp.org>
1879
1880         Enforce the use of gnulib modules for unportable <string.h> functions.
1881         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
1882         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
1883         (gl_HEADER_STRING_H_BODY): Require it.
1884         * lib/string_.h: If the gnulib module XYZ is not present, redefine
1885         the symbol XYZ to one that gives a link error.
1886         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
1887         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
1888         * modules/mempcpy (configure.ac): Likewise.
1889         * modules/memrchr (configure.ac): Likewise.
1890         * modules/stpcpy (configure.ac): Likewise.
1891         * modules/stpncpy (configure.ac): Likewise.
1892         * modules/strcase (configure.ac): Likewise.
1893         * modules/strcasestr (configure.ac): Likewise.
1894         * modules/strchrnul (configure.ac): Likewise.
1895         * modules/strdup (configure.ac): Likewise.
1896         * modules/strndup (configure.ac): Likewise.
1897         * modules/strnlen (configure.ac): Likewise.
1898         * modules/strpbrk (configure.ac): Likewise.
1899         * modules/strsep (configure.ac): Likewise.
1900         * modules/strstr (configure.ac): Likewise.
1901         * modules/strtok_r (configure.ac): Likewise.
1902
1903 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
1904
1905         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
1906
1907 2007-01-30  Jim Meyering  <jim@meyering.net>
1908
1909         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
1910
1911 2007-01-29  Bruno Haible  <bruno@clisp.org>
1912
1913         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
1914         * lib/execute.c: Likewise.
1915         * lib/pipe.c: Likewise.
1916         * lib/printf-args.h: Likewise.
1917         * lib/printf-args.c: Likewise.
1918         * lib/printf-parse.c: Likewise.
1919         * lib/vasnprintf.c: Likewise.
1920
1921 2007-01-29  Eric Blake  <ebb9@byu.net>
1922
1923         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
1924         declaration.
1925
1926 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
1927
1928         * lib/strptime.h (strptime): Use 'restrict' for args where
1929         POSIX requires this.
1930         * lib/strptime.c (strptime): Likewise.
1931         Change license notice from LGPL to GPL, since gnulib-tool will
1932         change this as needed.
1933         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
1934         defined.
1935         Include "strptime.h" first, to check interface.
1936         Do not #undef _LIBC and _NL_CURRENT.
1937         Do not include <stdlib.h>; no longer needed.
1938         Include "time_r.h" and declare ptime_locale_status
1939         only if _LIBC is not defined.
1940         (__P): Remove unused macro.
1941         (match_string): Bring back glibc version, but use it only if _LIBC
1942         is defined.
1943         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
1944         Remove unnecessary assertion and abort() call.
1945         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
1946         * m4/strptime.m4: Fix serial number comment.
1947         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
1948         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
1949         (Depends-on): Add time_r.
1950
1951 2007-01-29  Bruno Haible  <bruno@clisp.org>
1952
1953         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
1954         strptime.
1955         * modules/strptime (Depends-on): Add stdbool.
1956         * lib/strptime.h: Include <time.h> always. Add comments.
1957
1958 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
1959
1960         * modules/strptime: New file.
1961         * lib/strptime.h: New file.
1962         * lib/strptime.c: New file.
1963         * m4/strptime.m4: New file.
1964
1965 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
1966
1967         * MODULES.html.sh: New module mpsort.
1968         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
1969
1970         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
1971         a circularity problem with HP-UX ia64 reported by Bob Proulx in
1972         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
1973         All uses changed.
1974         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
1975         All uses changed.
1976         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
1977         to _Restrict_.
1978         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
1979         the parameter matches the prototype.
1980
1981 2007-01-28  Jim Meyering  <jim@meyering.net>
1982
1983         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
1984         sys/time.h here, reverting that part of the previous patch:
1985         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
1986
1987 2007-01-28  Bruno Haible  <bruno@clisp.org>
1988
1989         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
1990         value of $(SYS_TIME_H).
1991         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
1992         remove it conditionally, too. [added by Jim Meyering]
1993         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
1994         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
1995         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
1996         GETTIMEOFDAY_REPLACEMENT to 1.
1997
1998 2007-01-28  Bruno Haible  <bruno@clisp.org>
1999
2000         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
2001         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
2002         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
2003         Set UNISTD_H instead of UNISTD_H2.
2004         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
2005
2006 2007-01-28  Bruno Haible  <bruno@clisp.org>
2007
2008         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
2009         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
2010
2011 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2012
2013         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
2014         (func_create_testdir): Ensure C locale for `grep' and `tr'
2015         character ranges.
2016         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
2017         ACLOCAL_AMFLAGS parsing state machine.
2018
2019 2007-01-27  Bruno Haible  <bruno@clisp.org>
2020
2021         * modules/unistr/base: Update.
2022
2023 2007-01-27  Bruno Haible  <bruno@clisp.org>
2024
2025         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
2026         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
2027         * modules/unistr/u32-mbtouc-unsafe: Renamed from
2028         modules/unistr/u32-mbtouc.
2029         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
2030         * lib/unistr.h: Update.
2031         * lib/linebreak.c: Update.
2032         * modules/unistr/u32-mbtouc: Renamed from
2033         modules/unistr/u32-mbtouc-safe.
2034         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
2035         * lib/unistr.h: Update.
2036         * lib/unistr/u32-to-u8.c: Update.
2037         * lib/unistr/u32-to-u16.c: Update.
2038
2039 2007-01-27  Bruno Haible  <bruno@clisp.org>
2040
2041         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
2042         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
2043         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
2044         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
2045         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
2046         * modules/unistr/u16-mbtouc-unsafe: Renamed from
2047         modules/unistr/u16-mbtouc.
2048         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
2049         * lib/unistr.h: Update.
2050         * lib/linebreak.c: Update.
2051         * modules/linebreak: Update.
2052         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
2053         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
2054         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
2055         * modules/unistr/u16-mbtouc: Renamed from
2056         modules/unistr/u16-mbtouc-safe.
2057         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
2058         * lib/unistr.h: Update.
2059         * lib/unistr/u16-to-u8.c: Update.
2060         * modules/unistr/u16-to-u8: Update.
2061         * lib/unistr/u16-to-u32.c: Update.
2062         * modules/unistr/u16-to-u32: Update.
2063
2064 2007-01-27  Bruno Haible  <bruno@clisp.org>
2065
2066         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
2067         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
2068         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
2069         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
2070         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
2071         * modules/unistr/u8-mbtouc-unsafe: Renamed from
2072         modules/unistr/u8-mbtouc.
2073         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
2074         * lib/unistr.h: Update.
2075         * lib/striconveh.c: Update.
2076         * modules/striconveh: Update.
2077         * lib/linebreak.c: Update.
2078         * modules/linebreak: Update.
2079         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
2080         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
2081         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
2082         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
2083         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
2084         * lib/unistr.h: Update.
2085         * lib/striconveh.c: Update.
2086         * modules/striconveh: Update.
2087         * lib/unistr/u8-to-u16.c: Update.
2088         * modules/unistr/u8-to-u16: Update.
2089         * lib/unistr/u8-to-u32.c: Update.
2090         * modules/unistr/u8-to-u32: Update.
2091
2092 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2093
2094         Sync from Libtool.
2095         * lib/argz.c: Do not include strings.h nor memory.h, include
2096         string.h unconditionally.  Patch by Simon Josefsson.
2097
2098 2007-01-27  Bruno Haible  <bruno@clisp.org>
2099
2100         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
2101         from gl_HEADER_STRING_H_BODY.
2102         (gl_HEADER_STRING_H_BODY): Require it.
2103         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
2104         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
2105         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
2106         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
2107         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
2108         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
2109         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
2110         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
2111         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
2112         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
2113         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
2114         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
2115         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
2116         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
2117         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
2118
2119 2007-01-27  Bruno Haible  <bruno@clisp.org>
2120
2121         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
2122         check_PROGRAMS into noinst_PROGRAMS.
2123         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
2124         check_PROGRAMS in this case.
2125         (func_import): Set for_test to false.
2126         (func_create_testdir): Set for_test to true.
2127
2128 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
2129             Bruno Haible  <bruno@clisp.org>
2130
2131         * modules/strcasestr (Files): Remove lib/strcasestr.h.
2132         (Depends-on): Add string.
2133         (Includes): Use <string.h> instead of strcasestr.h.
2134         * modules/string (Makefile.am): Also substitute the value of
2135         REPLACE_STRCASESTR.
2136         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
2137         assume strcasestr is declared in <string.h> not <strings.h>. Also
2138         set REPLACE_STRCASESTR.
2139         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
2140         REPLACE_STRCASESTR.
2141         * lib/strcasestr.h: Remove file.
2142         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
2143         * lib/string_.h (strcasestr): New declaration.
2144
2145 2007-01-27  Bruno Haible  <bruno@clisp.org>
2146
2147         * lib/string_.h: Use 'extern'.
2148
2149 2007-01-27  Jim Meyering  <jim@meyering.net>
2150
2151         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
2152         of set-but-not-used local, "q".
2153
2154         * lib/mempcpy.c: Include <config.h> before <string.h>.
2155         This fixes a compilation error on HP-UX, due to the system's
2156         "restrict"-using mempcpy prototype.
2157
2158 2007-01-26  Bruno Haible  <bruno@clisp.org>
2159
2160         Small optimization.
2161         * lib/javacomp.c: Include c-strstr.h.
2162          (is_envjavac_gcj): Use c_strstr instead of strstr.
2163         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
2164
2165 2007-01-26  Bruno Haible  <bruno@clisp.org>
2166
2167         * MODULES.html.sh (Unicode string functions): Add the new modules.
2168
2169         * modules/uniconv/u32-strconv-to-locale: New file.
2170         * lib/uniconv/u32-strconv-to-locale.c: New file.
2171
2172         * modules/uniconv/u16-strconv-to-locale: New file.
2173         * lib/uniconv/u16-strconv-to-locale.c: New file.
2174
2175         * modules/uniconv/u8-strconv-to-locale: New file.
2176         * lib/uniconv/u8-strconv-to-locale.c: New file.
2177
2178         * modules/uniconv/u32-strconv-from-locale: New file.
2179         * lib/uniconv/u32-strconv-from-locale.c: New file.
2180
2181         * modules/uniconv/u16-strconv-from-locale: New file.
2182         * lib/uniconv/u16-strconv-from-locale.c: New file.
2183
2184         * modules/uniconv/u8-strconv-from-locale: New file.
2185         * lib/uniconv/u8-strconv-from-locale.c: New file.
2186
2187         * modules/uniconv/u32-strconv-to-enc: New file.
2188         * lib/uniconv/u32-strconv-to-enc.c: New file.
2189         * modules/uniconv/u32-strconv-to-enc-tests: New file.
2190         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
2191
2192         * modules/uniconv/u16-strconv-to-enc: New file.
2193         * lib/uniconv/u16-strconv-to-enc.c: New file.
2194         * lib/uniconv/u-strconv-to-enc.h: New file.
2195         * modules/uniconv/u16-strconv-to-enc-tests: New file.
2196         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
2197
2198         * modules/uniconv/u8-strconv-to-enc: New file.
2199         * lib/uniconv/u8-strconv-to-enc.c: New file.
2200         * modules/uniconv/u8-strconv-to-enc-tests: New file.
2201         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
2202
2203         * modules/uniconv/u32-strconv-from-enc: New file.
2204         * lib/uniconv/u32-strconv-from-enc.c: New file.
2205         * modules/uniconv/u32-strconv-from-enc-tests: New file.
2206         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
2207
2208         * modules/uniconv/u16-strconv-from-enc: New file.
2209         * lib/uniconv/u16-strconv-from-enc.c: New file.
2210         * modules/uniconv/u16-strconv-from-enc-tests: New file.
2211         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
2212
2213         * modules/uniconv/u8-strconv-from-enc: New file.
2214         * lib/uniconv/u8-strconv-from-enc.c: New file.
2215         * lib/uniconv/u-strconv-from-enc.h: New file.
2216         * modules/uniconv/u8-strconv-from-enc-tests: New file.
2217         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
2218
2219         * modules/uniconv/u32-conv-from-enc: New file.
2220         * lib/uniconv/u32-conv-from-enc.c: New file.
2221         * modules/uniconv/u32-conv-from-enc-tests: New file.
2222         * tests/uniconv/test-u32-conv-from-enc.c: New file.
2223
2224         * modules/uniconv/u16-conv-from-enc: New file.
2225         * lib/uniconv/u16-conv-from-enc.c: New file.
2226         * lib/uniconv/u-conv-from-enc.h: New file.
2227         * modules/uniconv/u16-conv-from-enc-tests: New file.
2228         * tests/uniconv/test-u16-conv-from-enc.c: New file.
2229
2230         * modules/uniconv/u8-conv-from-enc: New file.
2231         * lib/uniconv/u8-conv-from-enc.c: New file.
2232         * modules/uniconv/u8-conv-from-enc-tests: New file.
2233         * tests/uniconv/test-u8-conv-from-enc.c: New file.
2234
2235         * modules/uniconv/base: New file.
2236         * lib/uniconv.h: New file.
2237
2238 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
2239
2240         * doc/gnulib-tool.texi (Initial import): Update to match current
2241         behavior with strdup module.
2242         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
2243         * lib/memmem.h: Remove; all uses removed.  This is now done
2244         by <string.h>.
2245         * lib/mempcpy.h: Likewise.
2246         * lib/memrchr.h: Likewise.
2247         * lib/stpcpy.h: Likewise.
2248         * lib/stpncpy.h: Likewise.
2249         * lib/strcase.h: Likewise.
2250         * lib/strchrnul.h: Likewise.
2251         * lib/strdup.h: Likewise.
2252         * lib/strndup.h: Likewise.
2253         * lib/strnlen.h: Likewise.
2254         * lib/strpbrk.h: Likewise.
2255         * lib/strsep.h: Likewise.
2256         * lib/strstr.h: Likewise.
2257         * lib/strtok_r.h: Likewise.
2258         * lib/string_.h: New file.
2259         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
2260         Rely on <string.h> instead.
2261         * lib/canon-host.c: Likewise.
2262         * lib/chdir-long.c: Likewise.
2263         * lib/concatpath.c: Likewise.
2264         * lib/exclude.c: Likewise.
2265         * lib/fchdir.c: Likewise.
2266         * lib/getaddrinfo.c: Likewise.
2267         * lib/getcwd.c: Likewise.
2268         * lib/getsubopt.c: Likewise.
2269         * lib/glob.c: Likewise.
2270         * lib/hard-locale.c: Likewise.
2271         * lib/iconvme.c: Likewise.
2272         * lib/javacomp.c: Likewise.
2273         * lib/mempcpy.c: Likewise.
2274         * lib/memrchr.c: Likewise.
2275         * lib/regex_internal.h: Likewise.
2276         * lib/stpncpy.c: Likewise.
2277         * lib/strcasecmp.c: Likewise.
2278         * lib/strchrnul.c: Likewise.
2279         * lib/strdup.c: Likewise.
2280         * lib/striconv.c: Likewise.
2281         * lib/striconveh.c: Likewise.
2282         * lib/striconveha.c: Likewise.
2283         * lib/strncasecmp.c: Likewise.
2284         * lib/strndup.c: Likewise.
2285         * lib/strnlen.c: Likewise.
2286         * lib/strsep.c: Likewise.
2287         * lib/strstr.c: Likewise.
2288         * lib/strtok_r.c: Likewise.
2289         * lib/userspec.c: Likewise.
2290         * lib/w32spawn.h: Likewise.
2291         * lib/xstrndup.c: Likewise.
2292         * lib/mountlist.c (strstr): Remove decl.
2293         * m4/string_h.m4: New file.
2294         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
2295         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
2296         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
2297         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
2298         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
2299         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
2300         Set REPLACE_STRCASECMP if necessary.
2301         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
2302         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
2303         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
2304         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
2305         HAVE_DECL_STRDUP if necessary.
2306         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
2307         since gl_FUNC_STRNDUP does that now.
2308         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
2309         Check for decl here...
2310         (gl_PREREQ_STRNLEN): ... not here.
2311         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
2312         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
2313         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
2314         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
2315         necessary.
2316         * modules/string: New file.
2317         * modules/memmem (Files): Remove special-purpose include file.
2318         (Depends-on): Add string.
2319         (Include): Include <string.h>, not the removed file.
2320         * modules/mempcpy: Likewise.
2321         * modules/memrchr: Likewise.
2322         * modules/stpcpy: Likewise.
2323         * modules/stpncpy: Likewise.
2324         * modules/strcase: Likewise.
2325         * modules/strchrnul: Likewise.
2326         * modules/strdup: Likewise.
2327         * modules/strndup: Likewise.
2328         * modules/strnlen: Likewise.
2329         * modules/strpbrk: Likewise.
2330         * modules/strsep: Likewise.
2331         * modules/strstr: Likewise.
2332         * modules/strtok_r: Likewise.
2333         * tests/test-dirname.c: Don't include "strdup.h", since
2334         <string.h> now suffices.
2335         * tests/test-memmem.c: Don't include "memmem.h", since
2336         <string.h> now suffices.
2337
2338 2007-01-25  Bruno Haible  <bruno@clisp.org>
2339
2340         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
2341         *resultp is 0.
2342
2343         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
2344         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
2345         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
2346         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
2347
2348         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
2349         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
2350         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
2351         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
2352         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
2353         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
2354
2355 2007-01-24  Bruno Haible  <bruno@clisp.org>
2356
2357         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
2358         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
2359         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
2360         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
2361         gl_FUNC_FTS_CORE.
2362         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
2363         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
2364         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
2365         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
2366         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
2367         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
2368         gl_FUNC_FCHOWNAT.
2369         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
2370         gl_FUNC_STRFTIME.
2371         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
2372         Reported by Ralf Wildenhues.
2373
2374 2007-01-24  Bruno Haible  <bruno@clisp.org>
2375
2376         Drop AC_REQUIRE calls that are redundant with the module dependencies.
2377         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
2378         gl_GETADDRINFO.
2379         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
2380         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
2381         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
2382
2383 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
2384
2385         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
2386         Don't use 'exit'; just return from 'main'.
2387         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
2388
2389         * lib/fnmatch_.h: Readjust white space and comments to match
2390         glibc, to avoid spurious diffs.
2391
2392 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
2393
2394         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
2395         2004-12-01 change by Jakub Jelinek, since this code won't compile
2396         if !LIBC.  Problem reported by Bob Proulx.
2397
2398 2007-01-23  Bruno Haible  <bruno@clisp.org>
2399
2400         * lib/striconveh.c: Include c-strcaseeq.h.
2401         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
2402         * modules/striconveh (Depends-on): Add c-strcaseeq.
2403
2404 2007-01-23  Bruno Haible  <bruno@clisp.org>
2405
2406         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
2407
2408         * modules/c-strcaseeq: New file.
2409         * lib/c-strcaseeq.h: New file.
2410
2411         * modules/streq: New file.
2412         * lib/streq.h: New file.
2413
2414 2007-01-23  Bruno Haible  <bruno@clisp.org>
2415
2416         * modules/striconveha-tests: New file.
2417         * tests/test-striconveha.c: New file.
2418
2419         * lib/striconveha.h: Include <stdbool.h>.
2420         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
2421         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
2422         (mem_iconveha_notranslit): Renamed from mem_iconveha.
2423         (mem_iconveha): New function.
2424         (str_iconveha_notranslit): Renamed from str_iconveha.
2425         (str_iconveha): New function.
2426         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
2427         c-strcase.
2428
2429 2007-01-23  Bruno Haible  <bruno@clisp.org>
2430
2431         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
2432         encodings without forgiving before trying any encoding with handler.
2433         (str_iconveha): Try all encodings without forgiving before trying any
2434         encoding with handler.
2435
2436 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
2437
2438         Import the following changes from libc.
2439
2440         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
2441
2442         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
2443
2444         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
2445
2446         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
2447         normal_bracket label.
2448
2449         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
2450
2451         [BZ #361]
2452         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
2453         to normal_bracket after fetching the next character.
2454
2455 2007-01-22  Bruno Haible  <bruno@clisp.org>
2456
2457         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
2458         argument.
2459         * lib/striconveh.c (iconv_carefully_1): New function.
2460         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
2461         argument.
2462         (str_cd_iconveh): Update.
2463         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
2464         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
2465         * tests/test-striconveh.c (MAGIC): New macro.
2466         (new_offsets): New function.
2467         (main): Test call with and without offsets.
2468
2469 2007-01-22  Bruno Haible  <bruno@clisp.org>
2470
2471         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
2472         * modules/sys_select (Makefile.am): Likewise.
2473         * modules/sys_socket (Makefile.am): Likewise.
2474         * modules/sys_time (Makefile.am): Likewise.
2475
2476 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
2477
2478         * modules/gettimeofday (License): Change from GPL to LGPL, since
2479         gettimeofday is a library function.
2480
2481 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
2482
2483         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
2484
2485 2007-01-21  Bruno Haible  <bruno@clisp.org>
2486
2487         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
2488
2489 2007-01-21  Bruno Haible  <bruno@clisp.org>
2490
2491         * modules/striconveha: New file.
2492         * lib/striconveha.h: New file.
2493         * lib/striconveha.c: New file.
2494         * MODULES.html.sh (Internationalization functions): Add striconveha.
2495         * lib/striconv.c (str_iconv): Optimize the case of an empty input
2496         string.
2497         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
2498
2499 2007-01-21  Bruno Haible  <bruno@clisp.org>
2500
2501         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
2502         * lib/striconveh.c (str_iconveh): Likewise.
2503
2504 2007-01-21  Bruno Haible  <bruno@clisp.org>
2505
2506         * lib/striconveh.h (mem_iconveh): New declaration.
2507         * lib/striconveh.c (mem_iconveh): New function.
2508         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
2509
2510 2007-01-21  Bruno Haible  <bruno@clisp.org>
2511
2512         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
2513
2514         * lib/striconveh.h (mem_cd_iconveh): Change specification.
2515         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
2516         original result buffer.
2517         (str_cd_iconveh): Update.
2518         * tests/test-striconveh.c (main): Update.
2519
2520         * lib/striconv.h (mem_cd_iconv): Change specification.
2521         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
2522         result buffer.
2523         (str_cd_iconv): Update.
2524         * tests/test-striconv.c (main): Update.
2525
2526 2007-01-21  Bruno Haible  <bruno@clisp.org>
2527
2528         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
2529
2530 2007-01-20  Jim Meyering  <jim@meyering.net>
2531
2532         * lib/userspec.c (parse_with_separator): If a user or group string
2533         starts with "+", skip the corresponding name-to-ID look-up, since
2534         such a look-up must fail: user and group names may not include "+".
2535
2536 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
2537
2538         * lib/poll.c: Include sys/time.h and time.h unconditionally,
2539         since we now assume the sys_time module.
2540         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
2541         check for sys/time.h; no longer needed.
2542         * modules/poll (Depends-on): Depend on sys_time.
2543
2544 2007-01-18  Bruno Haible  <bruno@clisp.org>
2545
2546         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
2547         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
2548
2549         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
2550         gettimeofday.
2551
2552         * tests/test-gettimeofday.c: Include <time.h>.
2553         (dummy): Remove variable.
2554
2555         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
2556         gl_HEADER_SYS_TIME_H.
2557         (gl_HEADER_SYS_TIME_H): New macro.
2558
2559         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
2560         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
2561         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
2562         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
2563         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
2564         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
2565         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
2566         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
2567         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
2568         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
2569         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
2570
2571         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
2572         last change; it caused a compilation error when cross-compiling to
2573         Cygwin.
2574
2575 2007-01-18  Jim Meyering  <jim@meyering.net>
2576
2577         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
2578         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
2579         than the race-prone "test -d sys || mkdir sys".
2580         (configure.ac): Use AC_PROG_MKDIR_P.
2581         * modules/sys_select: Likewise.
2582         * modules/sys_socket: Likewise.
2583         * modules/sys_time: Likewise.
2584
2585 2007-01-18  Eric Blake  <ebb9@byu.net>
2586
2587         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
2588         replace gettimeofday.
2589         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
2590         name, to avoid infinite recursion.
2591
2592 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
2593
2594         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
2595         module sys_time.
2596         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
2597         assume timespec.h defines struct timeval.
2598         * lib/settime.c: Likewise.
2599         * lib/utimens.c: Likewise.
2600         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
2601         since we now assume the gettimeofday module.
2602         * lib/tempname.c (__gen_tempname): Likewise.
2603         * lib/gettimeofday.h: Remove.
2604         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
2605         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
2606         Include <time.h>, for 'time()'.
2607         (localtime_buffer_addr): Also use this workaround if
2608         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
2609         to simplify the uses.  All uses changed.
2610         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
2611         that #undef is inside {}, and 'const' follows type name consistently.
2612         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
2613         (gettimeofday): Do not use the maximum possible value for
2614         tv->tv_usec, since that might break usages other than ls.c.
2615         Instead, we'll leave ls.c alone.  This undoes today's patch
2616         by Bruno.  Add a compile-time warning for 1s-clock resolution;
2617         we've never observed the problem but might as well keep the
2618         canary.
2619         * lib/nanosleep.c: Include timespec.h first, for interface check.
2620         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
2621         now assume the sys_time module.
2622         * lib/tempname.c: Likewise.
2623         * lib/timespec.h: Likewise.
2624         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
2625         needed.
2626         * lib/strftime.c: Likewise.
2627         * lib/timespec.h: Likewise.
2628         * lib/posixtm.c: Include posixtm.h first, for interface check.
2629         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
2630         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
2631         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
2632         * lib/sys_time_.h: New file.
2633         * lib/timespec.h (struct timespec): Use long int, not long.
2634         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
2635         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
2636         Remove obsolescent call to AC_HEADER_TIME.
2637         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
2638         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
2639         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
2640         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
2641         Likewise.
2642         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
2643         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
2644         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
2645         into the sys_time module.  Check for gettimeofday just once.
2646         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
2647         for gettimeofday signature to just check the signature.  Merely
2648         compile it, since linking doesn't test signature.  Improve test for
2649         whether gettimeofday.o is actually needed.
2650         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
2651         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
2652         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
2653         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
2654         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
2655         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
2656         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
2657         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
2658         than worrying about sys/time.h.
2659         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
2660         Don't bother worrying about TIME_WITH_SYS_TIME.
2661         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
2662         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
2663         * m4/sys_time_h.m4: New file.
2664         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
2665         Don't include sys/time.h.  Return from main rather than exiting.
2666         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
2667         all uses changed.
2668         * modules/gethrxtime (Depends-on): Add sys_time.
2669         * modules/gettime (Depends-on): Likewise.
2670         * modules/gettimeofday (Depends-on): Likewise.
2671         * modules/nanosleep (Depends-on): Likewise.
2672         * modules/settime (Depends-on): Likewise.
2673         * modules/tempname (Depends-on): Likewise.
2674         * modules/utimens (Depends-on): Likewise.
2675         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
2676         (Include:) Change back to <sys/time.h>.
2677         (Maintainer:) Add self.
2678         * modules/sys_time: New file.
2679         * modules/tempname (Depends-on): Add gettimeofday.
2680         * tests/test-gettimeofday.c: Include <sys/time.h>
2681         rather than gettimeofday.h.
2682
2683 2007-01-17  Bruno Haible  <bruno@clisp.org>
2684
2685         * gnulib-tool (func_get_license): Revert last patch. Instead, let
2686         the license default to GPL.
2687         (func_create_testdir): Don't complain if a module is LGPL and its
2688         tests module depends on GPLed modules.
2689
2690 2007-01-17  Bruno Haible  <bruno@clisp.org>
2691
2692         * lib/gettimeofday.c (gettimeofday): Add code for the case
2693         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
2694         maximum possible value for tv->tv_usec, rather than the minimum one.
2695
2696 2005-10-08  Martin Lambers  <marlam@marlam.de>
2697 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
2698 2007-01-16  Bruno Haible  <bruno@clisp.org>
2699
2700         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
2701         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
2702         gl_FUNC_GETTIMEOFDAY.
2703         (Include): Add gettimeofday.h.
2704         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
2705         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
2706         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
2707         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
2708         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
2709         * lib/gettimeofday.h: New file.
2710         * lib/gettimeofday.c: Include <sys/timeb.h>.
2711         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
2712         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
2713         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
2714         fall back on time().
2715
2716         * tests/test-gettimeofday.c: New file.
2717         * modules/gettimeofday-tests: New file.
2718
2719 2007-01-16  Eric Blake  <ebb9@byu.net>
2720
2721         * modules/fnmatch (Depends-on): Depend on wchar.
2722         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
2723         * m4/fnmatch.m4: Likewise.
2724         * modules/mbchar (Makefile.am): Assume <wchar.h>.
2725         * m4/mbchar.m4: Likewise.
2726         * modules/mbswidth (Depends-on): Depend on wchar.
2727         * lib/mbswidth.c: Assume <wchar.h>.
2728         * m4/mbswidth.m4: Likewise.
2729         * modules/quotearg (Depends-on): Depend on wchar.
2730         * lib/quotearg.c: Assume <wchar.h>.
2731         * m4/quotearg.m4: Likewise.
2732         * modules/regex (Depends-on): Depend on wchar.
2733         * lib/regex_internal.h: Assume <wchar.h>.
2734         * m4/regex.m4: Likewise.
2735         * modules/stdint (Depends-on): Depend on wchar.
2736         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
2737         * m4/stdint.m4: Likewise.
2738         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
2739         * modules/strftime (Depends-on): Depend on wchar.
2740         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
2741         * modules/strtol (Depends-on): Depend on wchar.
2742         * lib/strtol.c: Assume <wchar.h>.
2743         * modules/wcwidth (Depends-on): Depend on wchar.
2744         * lib/wcwidth.h: Assume <wchar.h>.
2745         * m4/wcwidth.m4: Likewise.
2746
2747 2007-01-16  Bruno Haible  <bruno@clisp.org>
2748
2749         * modules/csharpexec-script: New, created from...
2750         * modules/csharpexec: ... this.
2751
2752 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
2753
2754         * modules/javaexec-script: New, created from...
2755         * modules/javaexec: ... this.
2756
2757 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
2758
2759         * modules/poll (Dependencies): Add sys_select.
2760
2761 2007-01-15  Jim Meyering  <jim@meyering.net>
2762
2763         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
2764         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
2765         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
2766         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
2767
2768 2007-01-15  Bruno Haible  <bruno@clisp.org>
2769
2770         * modules/striconveh: New file.
2771         * lib/striconveh.h: New file.
2772         * lib/striconveh.c: New file.
2773         * MODULES.html.sh (Internationalization functions): Add striconveh.
2774
2775         * modules/striconveh-tests: New file.
2776         * tests/test-striconveh.c: New file.
2777
2778 2007-01-15  Bruno Haible  <bruno@clisp.org>
2779
2780         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
2781         not from GNU libiconv or GNU libc.
2782
2783 2007-01-15  Bruno Haible  <bruno@clisp.org>
2784
2785         * doc/gnulib-intro.texi (Copyright): Explain the different license
2786         terms for module descriptions, autoconf macros, tests, documentation.
2787
2788 2007-01-14  Bruno Haible  <bruno@clisp.org>
2789
2790         * modules/striconv-tests: New file.
2791         * tests/test-striconv.c: New file.
2792
2793 2007-01-14  Bruno Haible  <bruno@clisp.org>
2794
2795         * modules/iconv-tests: New file.
2796         * tests/test-iconv.c: New file.
2797
2798 2007-01-14  Bruno Haible  <bruno@clisp.org>
2799
2800         * gnulib-tool (func_get_license): For test modules, use the license of
2801         the main module.
2802
2803 2007-01-14  Bruno Haible  <bruno@clisp.org>
2804
2805         * modules/iconv (Include): Clarify that <iconv.h> can only be included
2806         if iconv is found to exist.
2807
2808 2007-01-14  Bruno Haible  <bruno@clisp.org>
2809
2810         * modules/c-ctype-tests: New file.
2811         * tests/test-c-ctype.c: New file.
2812
2813 2007-01-14  Bruno Haible  <bruno@clisp.org>
2814
2815         * modules/binary-io-tests: New file.
2816         * tests/test-binary-io.sh: New file.
2817         * tests/test-binary-io.c: New file.
2818
2819 2007-01-14  Bruno Haible  <bruno@clisp.org>
2820
2821         * modules/array-oset-tests: New file.
2822         * tests/test-array_oset.c: New file.
2823
2824 2007-01-14  Bruno Haible  <bruno@clisp.org>
2825
2826         * modules/array-list-tests: New file.
2827         * tests/test-array_list.c: New file.
2828
2829 2007-01-14  Bruno Haible  <bruno@clisp.org>
2830
2831         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
2832         and make.
2833         Reported by Simon Josefsson in
2834         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
2835
2836 2007-01-14  Bruno Haible  <bruno@clisp.org>
2837
2838         * modules/allocsa-tests: New file.
2839         * tests/test-allocsa.c: New file.
2840
2841 2007-01-14  Bruno Haible  <bruno@clisp.org>
2842
2843         * modules/fchdir (Depends-on): Add absolute-header.
2844         * modules/unistd (Depends-on): Likewise.
2845
2846 2006-12-30  Bruno Haible  <bruno@clisp.org>
2847
2848         * modules/fchdir: New file.
2849         * modules/unistd (Files): Add lib/unistd_.h.
2850         (Makefile.am): Generate unistd.h from unistd_.h.
2851         * lib/fchdir.c: New file.
2852         * lib/dirent_.h: New file.
2853         * lib/unistd_.h: New file.
2854         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
2855         * m4/fchdir.m4: New file.
2856         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
2857         (gl_HEADER_UNISTD): Invoke it.
2858         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
2859         function.
2860         * lib/backupfile.c (opendir, closedir): Undefine.
2861         * lib/chown.c (open, close): Undefine.
2862         * lib/clean-temp.c (open, close): Undefine.
2863         * lib/copy-file.c (open, close): Undefine.
2864         * lib/execute.c (open, close): Undefine.
2865         * lib/fsusage.c (open, close): Undefine.
2866         * lib/gc-gnulib.c (open, close): Undefine.
2867         * lib/getcwd.c (opendir, closedir): Undefine.
2868         * lib/glob.c (opendir, closedir): Undefine.
2869         * lib/javacomp.c (open, close): Undefine.
2870         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
2871         * lib/openat-proc.c (open, close): Undefine.
2872         * lib/pagealign_alloc.c (open, close): Undefine.
2873         * lib/pipe.c (open, close): Undefine.
2874         * lib/progreloc.c (open, close): Undefine.
2875         * lib/savedir.c (opendir, closedir): Undefine.
2876         * lib/utime.c (open, close): Undefine.
2877         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
2878
2879 2007-01-10  Bruno Haible  <bruno@clisp.org>
2880
2881         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
2882
2883 2007-01-12  Eric Blake  <ebb9@byu.net>
2884
2885         Provide a robust <wchar.h>.  Further simplifications are now
2886         possible in other modules, but not included here.
2887         * modules/wchar: New module.
2888         * m4/wchar.m4: New file.
2889         * lib/wchar_.h: Likewise.
2890         * modules/mbchar (Depends-on): Depend on wchar, as the first use
2891         of the new module.
2892         * MODULES.html.sh (Extended multibyte and wide character utilities):
2893         New section.
2894
2895 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
2896
2897         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
2898         to a reasonable default for memory allocation.
2899         (xreadlink): Don't allocate a huge buffer, to work around a buggy
2900         file system that reports garbage st_size values for symlinks.
2901         Problem reported by Liyang Hu.
2902
2903 2007-01-11  Simon Josefsson  <simon@josefsson.org>
2904
2905         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
2906         Emacs .#* auto-save files).
2907
2908 2007-01-11  Bruno Haible  <bruno@clisp.org>
2909
2910         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
2911         directory.
2912
2913 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
2914
2915         Use @...@ consistently in lib/wctype_.h.
2916         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
2917         on it being set to 1 or 0.
2918         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
2919         go back to AC_SUBSTing it.
2920         * modules/wctype (Makefile.am): Undo previous change.
2921
2922 2007-01-10  Eric Blake  <ebb9@byu.net>
2923
2924         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
2925         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
2926         * modules/wctype (Makefile.am): Likewise.
2927         Reported by Chris McGuire.
2928
2929 2007-01-10  Jim Meyering  <jim@meyering.net>
2930
2931         fts.c: a small readability/maintainability improvement
2932         * lib/fts.c (fts_read): Make this code slightly more readable and
2933         maintainable by hoisting the "sp->fts_cur = p" assignments to
2934         immediately follow the statements that set P.  Derived from
2935         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
2936
2937 2007-01-10  Eric Blake  <ebb9@byu.net>
2938
2939         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
2940         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
2941         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
2942         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
2943         Reported by Chris McGuire.
2944
2945 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2946
2947         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
2948         in sed script.
2949
2950 2007-01-09  Bruno Haible  <bruno@clisp.org>
2951
2952         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
2953         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
2954         variables.
2955         (func_module): Use them.
2956
2957 2007-01-09  Bruno Haible  <bruno@clisp.org>
2958
2959         * modules/unistr/base: New file.
2960         * lib/unistr.h: New file.
2961
2962         * modules/unistr/u8-to-u16: New file.
2963         * lib/unistr/u8-to-u16.c: New file.
2964
2965         * modules/unistr/u8-to-u32: New file.
2966         * lib/unistr/u8-to-u32.c: New file.
2967
2968         * modules/unistr/u16-to-u8: New file.
2969         * lib/unistr/u16-to-u8.c: New file.
2970
2971         * modules/unistr/u16-to-u32: New file.
2972         * lib/unistr/u16-to-u32.c: New file.
2973
2974         * modules/unistr/u32-to-u8: New file.
2975         * lib/unistr/u32-to-u8.c: New file.
2976
2977         * modules/unistr/u32-to-u16: New file.
2978         * lib/unistr/u32-to-u16.c: New file.
2979
2980         * modules/unistr/u8-check: New file.
2981         * modules/unistr/u16-check: New file.
2982         * modules/unistr/u32-check: New file.
2983         * lib/unistr/u8-check.c: New file.
2984         * lib/unistr/u16-check.c: New file.
2985         * lib/unistr/u32-check.c: New file.
2986
2987         * modules/unistr/u8-chr: New file.
2988         * modules/unistr/u16-chr: New file.
2989         * modules/unistr/u32-chr: New file.
2990         * lib/unistr/u8-chr.c: New file.
2991         * lib/unistr/u16-chr.c: New file.
2992         * lib/unistr/u32-chr.c: New file.
2993
2994         * modules/unistr/u8-cmp: New file.
2995         * modules/unistr/u16-cmp: New file.
2996         * modules/unistr/u32-cmp: New file.
2997         * lib/unistr/u8-cmp.c: New file.
2998         * lib/unistr/u16-cmp.c: New file.
2999         * lib/unistr/u32-cmp.c: New file.
3000
3001         * modules/unistr/u8-cpy: New file.
3002         * modules/unistr/u16-cpy: New file.
3003         * modules/unistr/u32-cpy: New file.
3004         * lib/unistr/u8-cpy.c: New file.
3005         * lib/unistr/u16-cpy.c: New file.
3006         * lib/unistr/u32-cpy.c: New file.
3007         * lib/unistr/u-cpy.h: New file.
3008
3009         * modules/unistr/u8-cpy-alloc: New file.
3010         * modules/unistr/u16-cpy-alloc: New file.
3011         * modules/unistr/u32-cpy-alloc: New file.
3012         * lib/unistr/u8-cpy-alloc.c: New file.
3013         * lib/unistr/u16-cpy-alloc.c: New file.
3014         * lib/unistr/u32-cpy-alloc.c: New file.
3015         * lib/unistr/u-cpy-alloc.h: New file.
3016
3017         * modules/unistr/u8-endswith: New file.
3018         * modules/unistr/u16-endswith: New file.
3019         * modules/unistr/u32-endswith: New file.
3020         * lib/unistr/u8-endswith.c: New file.
3021         * lib/unistr/u16-endswith.c: New file.
3022         * lib/unistr/u32-endswith.c: New file.
3023         * lib/unistr/u-endswith.h: New file.
3024
3025         * modules/unistr/u8-mblen: New file.
3026         * modules/unistr/u16-mblen: New file.
3027         * modules/unistr/u32-mblen: New file.
3028         * lib/unistr/u8-mblen.c: New file.
3029         * lib/unistr/u16-mblen.c: New file.
3030         * lib/unistr/u32-mblen.c: New file.
3031
3032         * modules/unistr/u8-mbtouc: New file.
3033         * modules/unistr/u16-mbtouc: New file.
3034         * modules/unistr/u32-mbtouc: New file.
3035         * lib/unistr/u8-mbtouc.c: New file.
3036         * lib/unistr/u16-mbtouc.c: New file.
3037         * lib/unistr/u32-mbtouc.c: New file.
3038
3039         * modules/unistr/u8-mbtouc-safe: New file.
3040         * modules/unistr/u16-mbtouc-safe: New file.
3041         * modules/unistr/u32-mbtouc-safe: New file.
3042         * lib/unistr/u8-mbtouc-safe.c: New file.
3043         * lib/unistr/u16-mbtouc-safe.c: New file.
3044         * lib/unistr/u32-mbtouc-safe.c: New file.
3045
3046         * modules/unistr/u8-move: New file.
3047         * modules/unistr/u16-move: New file.
3048         * modules/unistr/u32-move: New file.
3049         * lib/unistr/u8-move.c: New file.
3050         * lib/unistr/u16-move.c: New file.
3051         * lib/unistr/u32-move.c: New file.
3052         * lib/unistr/u-move.h: New file.
3053
3054         * modules/unistr/u8-next: New file.
3055         * modules/unistr/u16-next: New file.
3056         * modules/unistr/u32-next: New file.
3057         * lib/unistr/u8-next.c: New file.
3058         * lib/unistr/u16-next.c: New file.
3059         * lib/unistr/u32-next.c: New file.
3060
3061         * modules/unistr/u8-prev: New file.
3062         * modules/unistr/u16-prev: New file.
3063         * modules/unistr/u32-prev: New file.
3064         * lib/unistr/u8-prev.c: New file.
3065         * lib/unistr/u16-prev.c: New file.
3066         * lib/unistr/u32-prev.c: New file.
3067
3068         * modules/unistr/u8-set: New file.
3069         * modules/unistr/u16-set: New file.
3070         * modules/unistr/u32-set: New file.
3071         * lib/unistr/u8-set.c: New file.
3072         * lib/unistr/u16-set.c: New file.
3073         * lib/unistr/u32-set.c: New file.
3074         * lib/unistr/u-set.h: New file.
3075
3076         * modules/unistr/u8-startswith: New file.
3077         * modules/unistr/u16-startswith: New file.
3078         * modules/unistr/u32-startswith: New file.
3079         * lib/unistr/u8-startswith.c: New file.
3080         * lib/unistr/u16-startswith.c: New file.
3081         * lib/unistr/u32-startswith.c: New file.
3082         * lib/unistr/u-startswith.h: New file.
3083
3084         * modules/unistr/u8-stpcpy: New file.
3085         * modules/unistr/u16-stpcpy: New file.
3086         * modules/unistr/u32-stpcpy: New file.
3087         * lib/unistr/u8-stpcpy.c: New file.
3088         * lib/unistr/u16-stpcpy.c: New file.
3089         * lib/unistr/u32-stpcpy.c: New file.
3090         * lib/unistr/u-stpcpy.h: New file.
3091
3092         * modules/unistr/u8-stpncpy: New file.
3093         * modules/unistr/u16-stpncpy: New file.
3094         * modules/unistr/u32-stpncpy: New file.
3095         * lib/unistr/u8-stpncpy.c: New file.
3096         * lib/unistr/u16-stpncpy.c: New file.
3097         * lib/unistr/u32-stpncpy.c: New file.
3098         * lib/unistr/u-stpncpy.h: New file.
3099
3100         * modules/unistr/u8-strcat: New file.
3101         * modules/unistr/u16-strcat: New file.
3102         * modules/unistr/u32-strcat: New file.
3103         * lib/unistr/u8-strcat.c: New file.
3104         * lib/unistr/u16-strcat.c: New file.
3105         * lib/unistr/u32-strcat.c: New file.
3106         * lib/unistr/u-strcat.h: New file.
3107
3108         * modules/unistr/u8-strchr: New file.
3109         * modules/unistr/u16-strchr: New file.
3110         * modules/unistr/u32-strchr: New file.
3111         * lib/unistr/u8-strchr.c: New file.
3112         * lib/unistr/u16-strchr.c: New file.
3113         * lib/unistr/u32-strchr.c: New file.
3114
3115         * modules/unistr/u8-strcmp: New file.
3116         * modules/unistr/u16-strcmp: New file.
3117         * modules/unistr/u32-strcmp: New file.
3118         * lib/unistr/u8-strcmp.c: New file.
3119         * lib/unistr/u16-strcmp.c: New file.
3120         * lib/unistr/u32-strcmp.c: New file.
3121
3122         * modules/unistr/u8-strcpy: New file.
3123         * modules/unistr/u16-strcpy: New file.
3124         * modules/unistr/u32-strcpy: New file.
3125         * lib/unistr/u8-strcpy.c: New file.
3126         * lib/unistr/u16-strcpy.c: New file.
3127         * lib/unistr/u32-strcpy.c: New file.
3128         * lib/unistr/u-strcpy.h: New file.
3129
3130         * modules/unistr/u8-strcspn: New file.
3131         * modules/unistr/u16-strcspn: New file.
3132         * modules/unistr/u32-strcspn: New file.
3133         * lib/unistr/u8-strcspn.c: New file.
3134         * lib/unistr/u16-strcspn.c: New file.
3135         * lib/unistr/u32-strcspn.c: New file.
3136         * lib/unistr/u-strcspn.h: New file.
3137
3138         * modules/unistr/u8-strdup: New file.
3139         * modules/unistr/u16-strdup: New file.
3140         * modules/unistr/u32-strdup: New file.
3141         * lib/unistr/u8-strdup.c: New file.
3142         * lib/unistr/u16-strdup.c: New file.
3143         * lib/unistr/u32-strdup.c: New file.
3144         * lib/unistr/u-strdup.h: New file.
3145
3146         * modules/unistr/u8-strlen: New file.
3147         * modules/unistr/u16-strlen: New file.
3148         * modules/unistr/u32-strlen: New file.
3149         * lib/unistr/u8-strlen.c: New file.
3150         * lib/unistr/u16-strlen.c: New file.
3151         * lib/unistr/u32-strlen.c: New file.
3152         * lib/unistr/u-strlen.h: New file.
3153
3154         * modules/unistr/u8-strmblen: New file.
3155         * modules/unistr/u16-strmblen: New file.
3156         * modules/unistr/u32-strmblen: New file.
3157         * lib/unistr/u8-strmblen.c: New file.
3158         * lib/unistr/u16-strmblen.c: New file.
3159         * lib/unistr/u32-strmblen.c: New file.
3160
3161         * modules/unistr/u8-strmbtouc: New file.
3162         * modules/unistr/u16-strmbtouc: New file.
3163         * modules/unistr/u32-strmbtouc: New file.
3164         * lib/unistr/u8-strmbtouc.c: New file.
3165         * lib/unistr/u16-strmbtouc.c: New file.
3166         * lib/unistr/u32-strmbtouc.c: New file.
3167
3168         * modules/unistr/u8-strncat: New file.
3169         * modules/unistr/u16-strncat: New file.
3170         * modules/unistr/u32-strncat: New file.
3171         * lib/unistr/u8-strncat.c: New file.
3172         * lib/unistr/u16-strncat.c: New file.
3173         * lib/unistr/u32-strncat.c: New file.
3174         * lib/unistr/u-strncat.h: New file.
3175
3176         * modules/unistr/u8-strncmp: New file.
3177         * modules/unistr/u16-strncmp: New file.
3178         * modules/unistr/u32-strncmp: New file.
3179         * lib/unistr/u8-strncmp.c: New file.
3180         * lib/unistr/u16-strncmp.c: New file.
3181         * lib/unistr/u32-strncmp.c: New file.
3182
3183         * modules/unistr/u8-strncpy: New file.
3184         * modules/unistr/u16-strncpy: New file.
3185         * modules/unistr/u32-strncpy: New file.
3186         * lib/unistr/u8-strncpy.c: New file.
3187         * lib/unistr/u16-strncpy.c: New file.
3188         * lib/unistr/u32-strncpy.c: New file.
3189         * lib/unistr/u-strncpy.h: New file.
3190
3191         * modules/unistr/u8-strnlen: New file.
3192         * modules/unistr/u16-strnlen: New file.
3193         * modules/unistr/u32-strnlen: New file.
3194         * lib/unistr/u8-strnlen.c: New file.
3195         * lib/unistr/u16-strnlen.c: New file.
3196         * lib/unistr/u32-strnlen.c: New file.
3197         * lib/unistr/u-strnlen.h: New file.
3198
3199         * modules/unistr/u8-strpbrk: New file.
3200         * modules/unistr/u16-strpbrk: New file.
3201         * modules/unistr/u32-strpbrk: New file.
3202         * lib/unistr/u8-strpbrk.c: New file.
3203         * lib/unistr/u16-strpbrk.c: New file.
3204         * lib/unistr/u32-strpbrk.c: New file.
3205         * lib/unistr/u-strpbrk.h: New file.
3206
3207         * modules/unistr/u8-strrchr: New file.
3208         * modules/unistr/u16-strrchr: New file.
3209         * modules/unistr/u32-strrchr: New file.
3210         * lib/unistr/u8-strrchr.c: New file.
3211         * lib/unistr/u16-strrchr.c: New file.
3212         * lib/unistr/u32-strrchr.c: New file.
3213
3214         * modules/unistr/u8-strspn: New file.
3215         * modules/unistr/u16-strspn: New file.
3216         * modules/unistr/u32-strspn: New file.
3217         * lib/unistr/u8-strspn.c: New file.
3218         * lib/unistr/u16-strspn.c: New file.
3219         * lib/unistr/u32-strspn.c: New file.
3220         * lib/unistr/u-strspn.h: New file.
3221
3222         * modules/unistr/u8-strstr: New file.
3223         * modules/unistr/u16-strstr: New file.
3224         * modules/unistr/u32-strstr: New file.
3225         * lib/unistr/u8-strstr.c: New file.
3226         * lib/unistr/u16-strstr.c: New file.
3227         * lib/unistr/u32-strstr.c: New file.
3228         * lib/unistr/u-strstr.h: New file.
3229
3230         * modules/unistr/u8-strtok: New file.
3231         * modules/unistr/u16-strtok: New file.
3232         * modules/unistr/u32-strtok: New file.
3233         * lib/unistr/u8-strtok.c: New file.
3234         * lib/unistr/u16-strtok.c: New file.
3235         * lib/unistr/u32-strtok.c: New file.
3236         * lib/unistr/u-strtok.h: New file.
3237
3238         * modules/unistr/u8-uctomb: New file.
3239         * modules/unistr/u16-uctomb: New file.
3240         * modules/unistr/u32-uctomb: New file.
3241         * lib/unistr/u8-uctomb.c: New file.
3242         * lib/unistr/u16-uctomb.c: New file.
3243         * lib/unistr/u32-uctomb.c: New file.
3244
3245         * MODULES.html.sh (Unicode string functions): Add the new modules.
3246
3247 2007-01-08  Bruno Haible  <bruno@clisp.org>
3248
3249         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
3250         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
3251         subdirectories.
3252
3253 2007-01-08  Karl Berry  <karl@gnu.org>
3254
3255         * doc/error.texi: mention that main() fns must set program_name
3256         when progname is used.
3257
3258 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
3259
3260         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
3261         WCTYPE_H is empty, for the benefit of builds from non-distclean
3262         directories.  Problem reported by Eric Blake in
3263         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
3264
3265 2007-01-08  Bruno Haible  <bruno@clisp.org>
3266
3267         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
3268         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
3269         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
3270         PROVIDE_CANONICALIZE_FILENAME_MODE.
3271         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
3272
3273 2007-01-08  Bruno Haible  <bruno@clisp.org>
3274
3275         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
3276         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
3277         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
3278         * lib/fts.c: Likewise.
3279         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
3280
3281 2006-12-25  Bruno Haible  <bruno@clisp.org>
3282
3283         * modules/utf8-ucs4-safe: New file.
3284         * lib/utf8-ucs4-safe.h: New file.
3285         * lib/unistr/utf8-ucs4-safe.c: New file.
3286
3287         * modules/utf16-ucs4-safe: New file.
3288         * lib/utf16-ucs4-safe.h: New file.
3289         * lib/unistr/utf16-ucs4-safe.c: New file.
3290
3291         * MODULES.html.sh (Unicode string functions): Add the new modules.
3292
3293 2007-01-08  Bruno Haible  <bruno@clisp.org>
3294
3295         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
3296         (Depends-on): Add unitypes.
3297         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
3298         (u8_mbtouc_aux): Move out to separate file.
3299         (u8_mbtouc): Use ucs4_t, uint8_t types.
3300         * lib/unistr/utf8-ucs4.c: New file.
3301
3302         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
3303         (Depends-on): Add unitypes.
3304         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
3305         (u16_mbtouc_aux): Move out to separate file.
3306         (u16_mbtouc): Use ucs4_t, uint16_t types.
3307         * lib/unistr/utf16-ucs4.c: New file.
3308
3309         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
3310         (Depends-on): Add unitypes.
3311         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
3312         (u8_uctomb_aux): Move out to separate file.
3313         (u8_uctomb): Use ucs4_t, uint8_t types.
3314         * lib/unistr/ucs4-utf8.c: New file.
3315
3316         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
3317         (Depends-on): Add unitypes.
3318         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
3319         (u16_uctomb_aux): Move out to separate file.
3320         (u16_uctomb): Use ucs4_t, uint16_t types.
3321         * lib/unistr/ucs4-utf16.c: New file.
3322
3323 2006-12-25  Bruno Haible  <bruno@clisp.org>
3324
3325         * modules/unitypes: New file.
3326         * lib/unitypes.h: New file.
3327         * MODULES.html.sh (func_all_modules): New section "Unicode string
3328         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
3329         this section. Add unitypes.
3330
3331 2007-01-08  Bruno Haible  <bruno@clisp.org>
3332
3333         Avoid variable names that conflict with those from libtool.
3334         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
3335         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
3336         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
3337         library_names_spec to acl_library_names_spec, hardcode_* to
3338         acl_hardcode_*.
3339         Reported by Ralf Wildenhues.
3340
3341 2007-01-08  Bruno Haible  <bruno@clisp.org>
3342
3343         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
3344         definition.
3345         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
3346         definition.
3347         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
3348         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
3349         definition.
3350         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
3351         definition.
3352         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
3353         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
3354         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
3355         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
3356         definition.
3357         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
3358         definition.
3359         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
3360         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
3361         GC_USE_<algorithm>.
3362         * lib/gc-libgcrypt.c: Likewise.
3363         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
3364         * modules/gc-arctwo (configure.ac): Likewise.
3365         * modules/gc-des (configure.ac): Likewise.
3366         * modules/gc-hmac-md5 (configure.ac): Likewise.
3367         * modules/gc-hmac-sha1 (configure.ac): Likewise.
3368         * modules/gc-md2 (configure.ac): Likewise.
3369         * modules/gc-md4 (configure.ac): Likewise.
3370         * modules/gc-md5 (configure.ac): Likewise.
3371         * modules/gc-random (configure.ac): Likewise.
3372         * modules/gc-rijndael (configure.ac): Likewise.
3373         * modules/gc-sha1 (configure.ac): Likewise.
3374
3375 2007-01-08  Bruno Haible  <bruno@clisp.org>
3376
3377         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
3378         macro definition.
3379         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
3380         definition.
3381         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
3382         definition.
3383         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
3384         * modules/fcntl-safer (configure.ac): Likewise.
3385         * modules/fopen-safer (configure.ac): Likewise.
3386         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
3387         GNULIB_FWRITEERROR macro definition.
3388
3389 2007-01-08  Bruno Haible  <bruno@clisp.org>
3390
3391         * m4/gnulib-common.m4: New file.
3392         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
3393         (func_get_filelist): Add m4/gnulib-common.m4.
3394
3395 2007-01-08  Bruno Haible  <bruno@clisp.org>
3396
3397         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
3398         command.
3399
3400 2007-01-08  Jim Meyering  <jim@meyering.net>
3401
3402         Use a more robust test for a "can't happen" condition.
3403         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
3404         narrowed the st_size value.  Presuming the "can't happen" condition
3405         is true, that narrowing could conceivably convert an invalid st_size
3406         value into a valid one.  Instead, use a change based on Matthew
3407         Woehlke's original patch.
3408
3409         Slight readability improvement: use an assert-like macro
3410         in place of literal "abort ()" uses.
3411         * lib/fts.c (fts_assert): Define.
3412         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
3413         Use this macro instead of a bare 'abort'.
3414
3415 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
3416
3417         Don't worry about using IRIX 5.3's wctype.h broken definitions;
3418         simply work around them.
3419         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
3420         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
3421         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before
3422         declaring.
3423         Don't bother to define as macros, since the standard doesn't require it.
3424         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
3425         longer worry about IRIX 5.3.
3426         (HAVE_WCTYPE_CTMP_BUG): Remove.
3427
3428 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
3429
3430         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
3431         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
3432         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
3433         Problems reported by Georg Schwarz for IRIX 5.3.
3434
3435         * gnulib-tool (autoconf_minversion): Take the maximum version number
3436         found, not the minimum.  Problem reported by James Youngman.
3437
3438 2007-01-03  Karl Berry  <karl@gnu.org>
3439
3440         * doc/error.texi: new file, explaining interaction with progname.
3441         * doc/gnulib.texi: include it.  Update copyright.
3442
3443 2007-01-03  Simon Josefsson  <simon@josefsson.org>
3444
3445         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
3446         AC_CANONICAL_HOST, to improve autobuild outputs.
3447
3448 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
3449             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
3450
3451         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
3452         sockets, server sockets, and other file descriptors.  Count errors
3453         to compute the return value.  Reorder the code a bit to be easier
3454         to follow.  Don't set event bits that were not requested (except
3455         POLLERR and POLLHUP).
3456
3457 2007-01-01  Bruno Haible  <bruno@clisp.org>
3458
3459         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
3460
3461 2007-01-03  Jim Meyering  <jim@meyering.net>
3462
3463         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
3464
3465 2007-01-02  Bruno Haible  <bruno@clisp.org>
3466
3467         * modules/settime (Include): Require timespec.h.
3468         * modules/nanosleep (Include): Likewise.
3469
3470 2007-01-01  Bruno Haible  <bruno@clisp.org>
3471
3472         * gnulib-tool (func_emit_copyright_notice): Bump year.
3473         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
3474
3475 2007-01-01  Bruno Haible  <bruno@clisp.org>
3476
3477         Improve support for OpenBSD.
3478         * build-aux/config.rpath (libname_spec): Export.
3479         (library_names_spec): New variable. Export.
3480         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
3481         library_names_spec from the config.rpath output. Locate shared library
3482         through the name pattern in library_names_spec.
3483
3484 2007-01-01  Eric Blake  <ebb9@byu.net>
3485
3486         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
3487
3488 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
3489
3490         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
3491         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
3492         assume the C locale, and avoid an "eval" that could cause trouble.
3493         Problem with SORT reported by Bob Proulx.
3494
3495         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
3496         Define.  Trivial patch from Henning Nielsen Lund, originally
3497         sent to bug-grep@gnu.org today.
3498
3499 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
3500
3501         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
3502         struct stat.  Problem reported by Henning Nielsen Lund.
3503         * lib/acl.c: Include acl.h first, to check interface.  Don't
3504         bother to include sys/types.h and sys/stat.h again.
3505
3506 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
3507
3508         Import the following change from libc; problem reported by
3509         Sven Verdoolaege.
3510
3511         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
3512
3513         [BZ #1373]
3514         * lib/argp.h: Remove __NTH for __argp_usage inline function.
3515
3516 2006-12-28  Jim Meyering  <jim@meyering.net>
3517
3518         * build-aux/announce-gen: Do not assume that the package
3519         builds any of tar.gz, tar.bz2, and .xdelta files.
3520         Suggestion from Simon Josefsson.
3521
3522 2006-12-28  Simon Josefsson  <simon@josefsson.org>
3523
3524         * modules/announce-gen: New file.
3525
3526 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
3527
3528         * lib/mbchar.h: Just include <wctype.h>; the wctype module
3529         handles its gotchas now.
3530         * lib/mbswidth.c: Likewise.
3531         * lib/wcwidth.h: Likewise.
3532         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
3533         and iswcntrl; the wctype module does this stuff now.
3534         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
3535         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
3536         * modules/mbchar (Depends-on): Add wctype.
3537         * modules/mbswidth (Depends-on): Likewise.
3538         * modules/wcwidth (Depends-on): Likewise.
3539
3540 2006-12-27  Eric Blake  <ebb9@byu.net>
3541
3542         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
3543         module uses more than what <wctype.h> is required to provide.
3544
3545 2006-12-26  Eric Blake  <ebb9@byu.net>
3546
3547         * gnulib-tool (sed_extract_prog): Avoid space-tab.
3548
3549 2006-12-26  Eric Blake  <ebb9@byu.net>
3550
3551         * modules/absolute-header: New module.
3552         * modules/fcntl (Depends-on): Depend on it.
3553         * modules/inttypes (Depends-on): Likewise.
3554         * modules/stdint (Depends-on): Likewise.
3555         * modules/sys_stat (Depends-on): Likewise.
3556         * modules/wctype (Depends-on): Likewise.
3557         * MODULES.html.sh (Support for building libraries and
3558         executables): Document it.
3559
3560 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
3561
3562         * gnulib-tool (SED): Remove, undoing previous change.
3563         The problem was that it broke coreutils on Solaris, because
3564         "sed --posix" leaked into a makefile.
3565         (sed): New alias, if 'alias' and GNU sed.
3566
3567 2006-12-24  Jim Meyering  <jim@meyering.net>
3568
3569         Work around an fchownat bug in glibc-2.4:
3570         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
3571         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
3572         in spite of the -P option.
3573         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
3574         New macros.
3575         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
3576         * modules/openat (Files): Add lib/fchownat.c.
3577         * lib/openat.c (fchownat): Don't define here.  Move to...
3578         * lib/fchownat.c: ...this new file.
3579
3580 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
3581
3582         Fix bug reported by Bruno Haible in
3583         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
3584         where quotearg.c didn't compile on Mac OS X 10.2 because it
3585         lacks <wchar.h> and wint_t.
3586         * lib/wctype_.h (__wctype_wint_t): New type.
3587         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
3588         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
3589         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
3590         Arg is now of type __wctype_wint_t, not wint_t.
3591         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
3592         substitute HAVE_WINT_T.
3593         * modules/wctype (Files): Add m4/wint_t.m4.
3594         (wctype.h): Substitute HAVE_WINT_T.
3595
3596 2006-12-23  Bruno Haible  <bruno@clisp.org>
3597
3598         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
3599
3600 2006-12-23  Bruno Haible  <bruno@clisp.org>
3601
3602         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
3603         S_ISLNK.
3604         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
3605         mingw.
3606
3607 2006-12-22  Bruno Haible  <bruno@clisp.org>
3608
3609         * lib/copy-file.c: Include acl.h.
3610         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
3611         Close the file descriptors only after being done with copy_acl.
3612         * modules/copy-file (Depends-on): Add acl.
3613
3614 2006-12-22  Bruno Haible  <bruno@clisp.org>
3615
3616         * gnulib-tool (SED): New variable.
3617         Use $SED instead of sed everywhere.
3618
3619 2006-12-22  Bruno Haible  <bruno@clisp.org>
3620
3621         * modules/no-c++: New file.
3622         * m4/no-c++.m4: New file.
3623         * MODULES.html.sh (Support for building libraries and executables):
3624         Add no-c++.
3625
3626 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
3627
3628         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
3629         Include <limits.h>, and use its INT_MAX to rewrite the
3630         j loop so that it does not overflow 'int'.  Problem reported by
3631         Ralf Wildenhues in
3632         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
3633         Play it safe by shifting left by 1 rather than multiplying by 2,
3634         as GCC is less likely to optimize this away when the value
3635         is signed (when it assumes overflow leads to undefined behavior).
3636         Also, don't assume time_t uses two's complement.
3637
3638 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
3639
3640         * MODULES.html.sh: New module wctype.
3641         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
3642         * lib/fnmatch.c: Don't bother to include <wchar.h> before
3643         <wctype.h>, since the new wctype module should fix this.
3644         * lib/quotearg.c: Include <wctype.h> unconditionally, since
3645         the wctype module should arrange for it.
3646         * lib/regex_internal.h: Likewise.
3647         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
3648         since the wctype module should handle this now.
3649         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
3650         * modules/fnmatch (Depends-on): Add wctype.
3651         * modules/quotearg (Depends-on): Likewise.
3652         * modules/regex (Depends-on): Likewise.
3653
3654 2006-12-19  Bruno Haible  <bruno@clisp.org>
3655
3656         * lib/strdup.h [C++]: Wrap definitions in extern "C".
3657         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
3658
3659 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3660
3661         * modules/savewd (Depends-on): Fix dependency on fcntl.
3662
3663 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
3664
3665         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
3666         conforms to C99, rather than relying on the user's environment
3667         setting of STDINT_H.
3668
3669 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
3670         and Eric Blake  <ebb9@byu.net>
3671
3672         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
3673         This is more consistent with the other defines here.
3674         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
3675         Port to z/OS.  Problem reported by Paul Gilmartin.
3676         Change local vars to use gl_ prefix rather than ac_.
3677         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
3678         with other defines.
3679         * modules/double-slash-root: New module.
3680         * modules/dirname (Files): Remove m4/double-slash-root.m4.
3681         (Depends-on): Add double-slash-root.
3682         * MODULES.html.sh (File system functions): Mention new module.
3683
3684 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
3685
3686         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
3687         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
3688         This is for the benefit of gzip, which doesn't do i18n.
3689
3690 2006-12-12  Jim Meyering  <jim@meyering.net>
3691
3692         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
3693         Reported by Andreas Schwab <schwab@suse.de>.
3694
3695 2006-12-12  Bruno Haible  <bruno@clisp.org>
3696
3697         Merge these changes.
3698         2006-09-05  Bruno Haible  <bruno@clisp.org>
3699         * lib/iconvme.c (iconv_string): No need to save and restore errno when
3700         iconv_alloc succeeded.
3701         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
3702         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
3703         test for " && dest " at the end - dest is always != NULL there. Call
3704         iconv with 4xNULL arguments initially, to reset the state. Call iconv
3705         with 2xNULL arguments, also to flush the state storage. Handle the
3706         IRIX iconv behaviour. Realloc the final result, to throw away unused
3707         memory.
3708
3709 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
3710
3711         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
3712         and fchmodat unconditionally, since glibc 2.4 has them.
3713         Problem reported by Arkadiusz Miskiewicz.
3714
3715 2006-12-10  Bruno Haible  <bruno@clisp.org>
3716
3717         * gnulib-tool (func_import): Show the include files only for those
3718         modules that are copied and specified.
3719         Reported by Karl Berry.
3720
3721 2006-12-08  Jim Meyering  <jim@meyering.net>
3722
3723         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
3724         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
3725
3726         * build-aux/announce-gen: Add two new options, both optional:
3727         --bootstrap-tools=TOOL_LIST
3728               a comma-separated list of tools, e.g.,
3729               autoconf,automake,bison,gnulib
3730         --gnulib-snapshot-date=DATE
3731               if gnulib is in the bootstrap tool list,
3732               then report this as the snapshot date.
3733               If not specified, use the current date/time.
3734               If you specify a date here, be sure it's UTC.
3735
3736 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3737
3738         * tests/test-argp-2.sh: Fix test to match actual output.
3739         (func_compare): Fix sed script to be portable.
3740
3741 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
3742
3743         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
3744         workaround for this case.  It is not autoconfigured now; offhand
3745         it's hard to see how to autoconfigure it.
3746
3747 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
3748
3749         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
3750         a directory that is about to be chowned.  Such a directory's
3751         initial file permissions should permit the owner only and this
3752         should not be changed until after the chown, since the group and
3753         other bits would be incorrect if they granted permission before
3754         the chown.
3755
3756         Fix porting problem for iswctype reported by Georg Schwarz in:
3757         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
3758         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
3759         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
3760         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
3761         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
3762
3763 2006-12-03  Jim Meyering  <jim@meyering.net>
3764
3765         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
3766         p->fts_statp may not yet be defined.
3767         (fts_read): Instead, set it in the caller, once p->fts_statp is
3768         sure to be defined, and corresponds to a top-level directory.
3769         This bug made du -x fail.  Here's the coreutils test case:
3770         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
3771         Reported by Mike Frysinger.
3772
3773 2006-12-01  Jim Meyering  <jim@meyering.net>
3774
3775         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
3776         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
3777         Reported by Simon Josefsson.
3778
3779 2006-11-30  Jim Meyering  <jim@meyering.net>
3780
3781         * m4/warning.m4: Use the all-permissive copyright notice
3782         recommended by RMS (rather than LGPL).
3783         * m4/vararrays.m4: Likewise.
3784         * m4/flexmember.m4: Likewise.
3785
3786 2006-11-29  Bruno Haible  <bruno@clisp.org>
3787
3788         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
3789         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
3790         using +=.
3791         Reported by Simon Josefsson <simon@josefsson.org>.
3792
3793 2006-11-28  James Youngman <jay@gnu.org>
3794
3795         * README: Advise users that they might find the bug-gnulib@gnu.org
3796         and autotools-announce@gnu.org mailing lists useful.
3797
3798 2006-11-28  Bruno Haible  <bruno@clisp.org>
3799
3800         * m4/ptrdiff_max.m4: Remove file.
3801
3802 2006-11-21  Bruno Haible  <bruno@clisp.org>
3803
3804         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
3805         _AC_COMPUTE_INT.
3806         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
3807         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
3808         _AC_COMPUTE_INT.
3809         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
3810         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
3811         _AC_COMPUTE_INT.
3812         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
3813
3814 2006-11-28  Jim Meyering  <jim@meyering.net>
3815
3816         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
3817         warning from "gcc -Wshadow" about shadowing the builtin.
3818
3819 2006-11-27  Bruno Haible  <bruno@clisp.org>
3820
3821         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
3822         _AC_COMPUTE_INT.
3823         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
3824
3825 2006-11-27  Bruno Haible  <bruno@clisp.org>
3826             Paul Eggert  <eggert@cs.ucla.edu>
3827
3828         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
3829
3830 2006-11-26  Bruno Haible  <bruno@clisp.org>
3831
3832         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
3833         noinst_LTLIBRARIES.
3834
3835 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
3836             Bruno Haible  <bruno@clisp.org>
3837
3838         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
3839         if compiling with "gcc -ansi".
3840
3841 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
3842
3843         Fix some incompatibilities with gcc -ansi -pedantic.
3844         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
3845         if compiling pedantically with GCC, unless it's C99 or later.
3846         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
3847         it mishandles gcc -ansi -pedantic as well.
3848         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
3849         if gcc -pedantic.
3850         * lib/regexec.c (check_node_accept_bytes): Don't use auto
3851         initializers for struct if -pedantic, unless it's C99 or later.
3852
3853 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
3854
3855         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
3856         Don't close an fd more than once. Identical atimes indicate
3857         success, not failure.
3858
3859 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
3860
3861         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
3862
3863 2006-11-23  Jim Meyering  <jim@meyering.net>
3864
3865         * build-aux/announce-gen: New file.  From coreutils.
3866
3867 2006-11-22  Jim Meyering  <jim@meyering.net>
3868
3869         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
3870         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
3871         (fts_read): Use a temporary to narrow the overused st_size member
3872         before using it in a switch statement.  Reported by Matthew Woehlke.
3873
3874         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
3875         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
3876
3877 2006-11-20  Bruno Haible  <bruno@clisp.org>
3878
3879         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
3880         changequote instead of pairs of brackets.
3881         Reported by Andreas Schwab <schwab@suse.de>.
3882
3883 2006-11-21  Jim Meyering  <jim@meyering.net>
3884
3885         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
3886         so as to remain compatible with older compilers.
3887         Patch from Michael Deutschmann.
3888
3889 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
3890
3891         * MODULES.html.sh (File system functions): Add openat.
3892
3893         * lib/openat.h (rpl_fstatat): New macro, if
3894         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
3895         (fstatat): Define to rpl_fstatat under the same conditions,
3896         unless COMPILING_FSTATAT.
3897         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
3898         seems to have the bug.
3899         * lib/fstatat.c: New file.
3900         * modules/openat (Files): Add it.
3901
3902 2006-11-20  Bruno Haible  <bruno@clisp.org>
3903
3904         * Makefile: New file.
3905
3906 2006-11-20  Jim Meyering  <jim@meyering.net>
3907
3908         The beginnings of syntax-related checks for gnulib.
3909         * lib/Makefile: New file.
3910         * lib/t-idcache: New script.  Ensure that the two halves of
3911         idcache.c stay in sync.
3912
3913         * lib/idcache.c: Adjust comments in user- and group- portions to
3914         be more accurate, and to be consistent with one another.
3915
3916 2006-11-20  Jim Meyering  <jim@meyering.net>
3917
3918         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
3919         continue using the flexible array member (thus, this module performs
3920         half as many malloc calls), with the addition that...
3921         (getgroup, getuser): Consistently record a non-match via an empty
3922         "name" string, and map an empty string match to a NULL return value.
3923         * modules/idcache (Depends-on): Re-add flexmember.
3924
3925         * lib/idcache.c (getuser): Remove all uses of the register keyword.
3926         (getuidbyname, getgroup, getgidbyname): Likewise.
3927
3928         Use cleaner syntax: NULL rather than 0.
3929         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
3930
3931 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
3932
3933         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
3934         It mishandled the case where the group was missing.
3935         Problem reported by Greg Schafer.
3936         * modules/idcache: Likewise.
3937
3938 2006-11-18  Jim Meyering  <jim@meyering.net>
3939
3940         * check-module (%exempt_header): Add exception for some
3941         conditionally-included headers.
3942
3943         * modules/i-ring (Depends-on): Add verify.
3944         (License): Change to LGPL.
3945
3946 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
3947
3948         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
3949         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
3950         and inttostr.h.  Use snprintf rather than uinttostr, so that
3951         LGPLed code doesn't depend on GPLed.
3952
3953 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
3954
3955         * modules/inline (License): Change from GPL to LGPL.
3956
3957 2006-11-17  Jim Meyering  <jim@meyering.net>
3958
3959         * modules/d-type (License): Switch to LGPL.
3960
3961 2006-11-15  Bruno Haible  <bruno@clisp.org>
3962
3963         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
3964
3965 2006-11-15  Eric Blake  <ebb9@byu.net>
3966
3967         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
3968         the module dependency.
3969
3970 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
3971             Bruno Haible  <bruno@clisp.org>
3972
3973         * gnulib-tool (func_create_testdir): Add license consistency check.
3974
3975 2006-11-15  Eric Blake  <ebb9@byu.net>
3976
3977         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
3978         random "(cached)" in configure output.
3979
3980 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3981
3982         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
3983         test for conforming inttypes.h is both announced and cached.
3984
3985         * MODULES.html.sh (seen_modules, seen_files): New variables.
3986         (func_module): Rewrite to use a few less gnulib-tool and sed
3987         invocations.  Avoid a couple of quadratic algorithms for ...
3988         (missed_modules, missed_files): ... these, with ...
3989         (func_append, func_tmpdir): ... these new functions, from
3990         gnulib-tool.  Analogously, install traps for cleanup.
3991
3992         * tests/test-gc.c (main): Remove unused variables.
3993         * tests/test-read-file.c: Include stdlib.h, for 'free'.
3994
3995 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
3996
3997         * modules/inttostr (License): Change to LGPL.
3998
3999 2006-11-14  Eric Blake  <ebb9@byu.net>
4000
4001         * modules/tempname (License): Change to LGPL.
4002
4003 2006-11-14  Eric Blake  <ebb9@byu.net>
4004
4005         * doc/functions.texi (Function Portability): *printf functions on
4006         Cygwin now understand all POSIX size specifiers.
4007
4008 2006-11-14  Bruno Haible  <bruno@clisp.org>
4009
4010         * modules/c-ctype (License): Change to LGPL.
4011
4012 2006-11-12  Bruno Haible  <bruno@clisp.org>
4013
4014         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
4015         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
4016         for GNOME libraries, for which the include files are installed in
4017         subdirectories of $prefix/include.
4018
4019 2006-11-12  Bruno Haible  <bruno@clisp.org>
4020
4021         * m4/lib-link.m4: Require at least autoconf-2.54.
4022         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
4023         name to underscores for the --with option.
4024
4025 2006-11-13  Bruno Haible  <bruno@clisp.org>
4026
4027         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
4028         the tests directory.
4029         Reported by Ralf Wildenhues.
4030
4031 2006-11-13  Bruno Haible  <bruno@clisp.org>
4032
4033         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
4034         (func_emit_initmacro_end): Undo the override here.
4035         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
4036         Works around the famous automake error in coreutils.
4037
4038 2006-11-13  Eric Blake  <ebb9@byu.net>
4039
4040         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
4041         element, not its node.
4042
4043 2006-11-12  Bruno Haible  <bruno@clisp.org>
4044
4045         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
4046         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
4047
4048 2006-11-12  Bruno Haible  <bruno@clisp.org>
4049
4050         * gnulib-tool: New option --local-symlink.
4051         (func_usage): Document it.
4052         (lsymbolic): New variable.
4053         (func_import, func_create_testdir): If --symlink was not specified,
4054         test whether --local-symlink was specified and the file comes from
4055         the local_gnulib_dir.
4056
4057 2006-11-12  Bruno Haible  <bruno@clisp.org>
4058
4059         * gnulib-tool (func_ln): New function.
4060         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
4061
4062 2006-11-12  Bruno Haible  <bruno@clisp.org>
4063
4064         Finish support for source files in subdirectories.
4065         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
4066         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
4067         AUTOMAKE_OPTIONS.
4068         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
4069
4070 2006-11-12  Bruno Haible  <bruno@clisp.org>
4071
4072         * gnulib-tool (func_get_automake_snippet): Synthesize also an
4073         EXTRA_lib_SOURCES augmentation.
4074         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
4075
4076 2006-11-12  Jim Meyering  <jim@meyering.net>
4077
4078         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
4079         file descriptors.  This also averts a failure on systems with
4080         native openat support when a traversed directory lacks "x" access.
4081         * lib/fts_.h: Include "i-ring.h"
4082         (struct FTS) [fts_fd_ring]: New member.
4083         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
4084         (FCHDIR): Add parentheses.
4085         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
4086         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
4087         When descending, rather than simply closing the previous
4088         fts_cwd_fd value, push that file descriptor onto the ring.
4089         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
4090         (fts_open): Initialize the new fd_ring member.
4091         (fts_close): Clear the ring.
4092         (fts_safe_changedir): When possible, use our new fd_ring to skip
4093         the diropen and fstat and dev/ino comparison that would normally
4094         accompany a virtual `chdir ("..")'.
4095
4096         * modules/fts (Depends-on): Add i-ring.
4097         * modules/i-ring: New module.
4098         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
4099         * m4/i-ring.m4: New file.
4100
4101 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4102
4103         * gnulib-tool (func_create_testdir): Fix replacement of
4104         `build-aux' in configure.ac.  Run autotools in gltests
4105         subdirectory.
4106         (func_create_testdir, func_create_megatestdir, test): There is
4107         no need for '--force' in most autotool invocations in a new
4108         tree.  Actually fail the whole test if any of the tools, or the
4109         configure or make stages fail.
4110
4111         Sync from Automake.
4112         * build-aux/gnupload: Revert last change.  Add pointer to upload
4113         instructions of the GNU Maintenance Instructions.
4114         Suggestion by Karl Berry.
4115
4116 2006-11-10  Jim Meyering  <jim@meyering.net>
4117
4118         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
4119
4120 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
4121
4122         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
4123         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
4124         (bind_textdomain_codeset) [! ENABLE_NLS]:
4125         Evaluate all the arguments.  That way, callers get compatible behavior
4126         if the arguments have side effects.  Also, it avoids some GCC
4127         diagnostics in some cases; Joel E. Denny reported problems when Bison
4128         was configured with --enable-gcc-warnigs.
4129
4130 2006-11-10  Jim Meyering  <jim@meyering.net>
4131
4132         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
4133         relevant options in CFLAGS (like -O, -fno-inline) are taken into
4134         account.
4135
4136 2006-11-10  Jim Meyering  <jim@meyering.net>
4137
4138         * modules/inline: New file/module.
4139         * modules/xalloc (Files): Remove m4/inline.m4.
4140         (Depends-on): Add inline, instead.
4141         * modules/oset: Likewise.
4142         * modules/list: Likewise.
4143
4144 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
4145
4146         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
4147         Problem reported by Matthew Woehlke.
4148
4149 2006-11-09  Bruno Haible  <bruno@clisp.org>
4150
4151         * lib/tempname.c (gen_tempname): Remove variant that invokes
4152         __gen_tempname.
4153         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
4154         __gen_tempname.
4155
4156 2006-11-08  Bruno Haible  <bruno@clisp.org>
4157
4158         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
4159         to 'yes' instead of 'cross-compiling'.
4160
4161 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
4162
4163         * lib/quotearg.h (quotearg_free): New decl.
4164         * lib/quotearg.c (quotearg_free): New function.
4165         (slot0, nslots, slotvec0, slotvec):
4166         Now file-scope so that quotearg_free can get at them.
4167
4168 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4169
4170         Sync from Automake.
4171         * build-aux/gnupload: Add missing 'gnu' to example URL.
4172         Report by Karl Berry.
4173
4174 2006-11-08  Bruno Haible  <bruno@clisp.org>
4175
4176         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
4177         Suggested by Paul Eggert.
4178
4179 2006-11-08  Jim Meyering  <jim@meyering.net>
4180
4181         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
4182         It's already included if !_LIBC.
4183         (fts_safe_changedir): Add a comment.
4184
4185 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
4186
4187         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
4188         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
4189         Matthew Woehlke.
4190
4191         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
4192         definitions up, to avoid colliding with change below.
4193         (static_inline) [HAVE_INLINE]: New macro.
4194         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
4195         Provide extern decls when !HAVE_INLINE.  Do not define unless
4196         static_inline is defined, either by us or by xmalloc.c.  Use
4197         static_inline rather than static inline.
4198         (XCALLOC): Optimize sizeof(T) = 1 case.
4199         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
4200
4201 2006-11-07  Bruno Haible  <bruno@clisp.org>
4202
4203         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
4204         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
4205         AC_C_INLINE.
4206         * modules/xalloc (Files): Add m4/inline.m4.
4207
4208 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4209
4210         * README: Fix typo.
4211         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
4212         (Miscellanous Notes): ...from this.
4213
4214 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
4215
4216         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
4217         Mention that offsetof should be used instead of sizeof.
4218         From Bruno Haible.
4219
4220 2006-11-07  Bruno Haible  <bruno@clisp.org>
4221
4222         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
4223
4224 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
4225
4226         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
4227         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
4228         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
4229         (gl_tree_add_before, gl_tree_add_after):
4230         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
4231         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
4232         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
4233         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
4234         (gl_linked_add_after, gl_linked_add_at): Likewise.
4235         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
4236         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
4237         (gl_tree_add_before, gl_tree_add_after): Likewise.
4238         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
4239         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
4240         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
4241
4242 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4243
4244         * lib/gl_oset.h: Use C comment style, not C++ comment style.
4245
4246 2006-11-06  Bruno Haible  <bruno@clisp.org>
4247
4248         * m4/inline.m4: New file.
4249         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
4250         * modules/list (Files): Add m4/inline.m4.
4251         * modules/oset (Files): Likewise.
4252
4253 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
4254
4255         * lib/idcache.c: Include <stddef.h>, for offsetof.
4256         (struct userid.name): Change from char * to a flexible array member.
4257         All uses changed.
4258         * modules/idcache (Depends-on): Add flexmember.
4259
4260         * MODULES.html.sh (Core language properties): New module flexmember.
4261         * modules/flexmember, m4/flexmember.m4: New files.
4262
4263         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
4264         inline functions that are identical with the old xnmalloc_inline,
4265         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
4266         that we can avoid some unnecessary integer multiplications and
4267         divisions in the common case where the element size is known at
4268         compile time.
4269         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
4270         needed.
4271         (xnboundedmalloc): Remove.
4272         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
4273         arguments, for consistency with rest of this header.
4274         (xcharalloc): Rewrite using XNMALLOC.
4275         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
4276         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
4277         versions have been moved to lib/xalloc.h and renamed to be the
4278         non-*_inline versions.
4279         (xmalloc, xrealloc): Implement without reference to the xnmalloc
4280         and xnrealloc functions, since those functions are now inline and
4281         now call us.
4282         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
4283         renaming described above.
4284         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
4285         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
4286         captures the dependency in AC_C_INLINE.
4287
4288         New module canonicalize-lgpl, proposed by Charles Wilson in
4289         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
4290         with a few small changes afterwards.
4291         * MODULES.html.sh (File system functions): New module
4292         canonicalize-lgpl.
4293         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
4294         and canonicalize_file_name.
4295         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
4296         * modules/canonicalize-lgpl: New files.
4297
4298 2006-11-05  Bruno Haible  <bruno@clisp.org>
4299
4300         * gnulib-tool (func_import, func_create_testdir): Create directories
4301         also for files in subdirectories of lib/.
4302
4303 2006-11-05  Bruno Haible  <bruno@clisp.org>
4304
4305         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
4306         ANSI C compliant.
4307
4308 2006-11-03  Bruno Haible  <bruno@clisp.org>
4309
4310         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
4311         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
4312         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
4313         (xnboundedmalloc): New inline function.
4314         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
4315         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
4316         xmalloc.
4317         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
4318         xmalloc.
4319         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
4320         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
4321         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
4322         xmalloc.
4323         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
4324         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
4325         xmalloc.
4326         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
4327         gl_tree_add_after): Use XMALLOC instead of xmalloc.
4328         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
4329         xmalloc.
4330         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
4331         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
4332         gl_tree_add_after): Use XMALLOC instead of xmalloc.
4333         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
4334         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
4335         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
4336         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
4337
4338 2006-11-03  Bruno Haible  <bruno@clisp.org>
4339
4340         * lib/c-ctype.h [C++]: Define functions without name mangling.
4341         * lib/fwriteerror.h [C++]: Likewise.
4342         * lib/gcd.h [C++]: Likewise.
4343         * lib/linebreak.h [C++]: Likewise.
4344
4345 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
4346
4347         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
4348         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
4349         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
4350         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
4351         Check for functions and headers just once.
4352         Check for declaration of canonicalize_file_name.
4353         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
4354
4355 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
4356
4357         * gnulib-tool (func_import): Fix typo in actioncmd.
4358
4359 2006-11-02  Bruno Haible  <bruno@clisp.org>
4360
4361         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
4362         newline sequence in the Makefile.am snippet as a space, like "make"
4363         does.
4364         Reported by Roger Persson <perrog@gmail.com>.
4365
4366 2006-11-01  Bruno Haible  <bruno@clisp.org>
4367
4368         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
4369         already declared in <string.h>.
4370         * lib/strcase.h (strncasecmp): Don't declare it if yes.
4371
4372 2006-11-01  Bruno Haible  <bruno@clisp.org>
4373
4374         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
4375         * lib/strcase.h: Include <string.h>.
4376         (strcasecmp): Define to rpl_strcasecmp here.
4377
4378 2006-11-01  Bruno Haible  <bruno@clisp.org>
4379
4380         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
4381
4382 2006-11-01  Eric Blake  <ebb9@byu.net>
4383
4384         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
4385
4386         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
4387
4388 2006-10-29  Bruno Haible  <bruno@clisp.org>
4389
4390         Make it compile in C++ mode.
4391         * lib/full-write.c (full_rw): Add a cast.
4392
4393 2006-11-01  Bruno Haible  <bruno@clisp.org>
4394
4395         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
4396         be POSIX compliant.
4397         Reported by Roger Persson <perrog@gmail.com>.
4398
4399 2006-11-01  Eric Blake  <ebb9@byu.net>
4400
4401         * lib/getopt_.h: Fix comments.
4402
4403 2006-10-31  Eric Blake  <ebb9@byu.net>
4404
4405         * modules/tmpdir (Depends-on): Add sys_stat.
4406         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
4407         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
4408         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
4409         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
4410         tempname.
4411
4412 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
4413
4414         Avoid some C++ diagnostics reported by Bruno Haible.
4415         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
4416         xmalloc.
4417         (quotearg_alloc): Use xcharalloc rather than xmalloc.
4418         (struct slotvec): Move to top level.
4419         (quotearg_n_options): Rewrite to avoid xmalloc.
4420         * lib/xalloc.h (xcharalloc): New function.
4421         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
4422         [defined __cplusplus]: Add function template that provides result
4423         type propagation.  This part of the change is from Bruno Haible.
4424
4425 2006-10-29  Bruno Haible  <bruno@clisp.org>
4426
4427         Make it compile in C++ mode.
4428         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
4429         * lib/strnlen1.c (strnlen1): Cast memchr result.
4430         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
4431         * lib/clean-temp.c (string_equals, string_hash): Add casts.
4432         (create_temp_dir): Rename local variable 'template'.
4433         (compile_csharp_using_sscli): Add cast.
4434         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
4435         * lib/findprog.c (find_in_path): Likewise.
4436         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
4437         * lib/wait-process.c (register_slave_subprocess): Likewise.
4438
4439 2006-10-22  Bruno Haible  <bruno@clisp.org>
4440
4441         * modules/tsearch: New file.
4442         * lib/tsearch.h: New file.
4443         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
4444         * m4/tsearch.m4: New file.
4445         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
4446
4447 2006-10-29  Eric Blake  <ebb9@byu.net>
4448
4449         * lib/arcfour.c: Assume config.h.
4450         * lib/arctwo.c: Likewise.
4451         * lib/base64.c: Likewise.
4452         * lib/check-version.c: Likewise.
4453         * lib/crc.c: Likewise.
4454         * lib/des.c: Likewise.
4455         * lib/gc-gnulib.c: Likewise.
4456         * lib/gc-libgcrypt.c: Likewise.
4457         * lib/gc-pbkdf2-sha1.c: Likewise.
4458         * lib/getaddrinfo.c: Likewise.
4459         * lib/getdelim.c: Likewise.
4460         * lib/getline.c: Likewise.
4461         * lib/hmac-md5.c: Likewise.
4462         * lib/hmac-sha1.c: Likewise.
4463         * lib/iconvme.c: Likewise.
4464         * lib/md2.c: Likewise.
4465         * lib/md4.c: Likewise.
4466         * lib/memxor.c: Likewise.
4467         * lib/read-file.c: Likewise.
4468         * lib/readline.c: Likewise.
4469         * lib/rijndael-alg-fst.c: Likewise.
4470         * lib/rijndael-api-fst.c: Likewise.
4471         * lib/xgetdomainname.c: Likewise.
4472
4473 2006-10-28  Eric Blake  <ebb9@byu.net>
4474
4475         * lib/xstrndup.c: Assume config.h.
4476
4477 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
4478
4479         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
4480         stat-macros.h is now for our own macros, whereas stat_h is for
4481         macros in the <sys/stat.h> name space.
4482         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
4483         (STAT_MACROS_H): Remove.
4484         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
4485         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
4486         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
4487         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
4488         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
4489         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
4490         Move these macros to ...
4491         * lib/stat_.h: here.  Don't include stat-macros.h.
4492         * lib/canonicalize.c: Don't include stat-macros.h.
4493         * lib/chown.c: Likewise.
4494         * lib/euidaccess.c: Likewise.
4495         * lib/file-type.c: Likewise.
4496         * lib/filemode.c: Likewise.
4497         * lib/glob.c: Likewise.
4498         * lib/isapipe.c: Likewise.
4499         * lib/lchown.c: Likewise.
4500         * lib/lstat.c: Likewise.
4501         * lib/mkdir-p.c: Likewise.
4502         * lib/rmdir.c: Likewise.
4503         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
4504         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
4505         unless mkdir isn't declared, to speed up 'configure'.
4506         Always create sys/stat.h, since it's unlikely any real sys/stat.h
4507         would define all the S_* symbols.
4508         * modules/canonicalize (Depends-on):
4509         Depend on sys_stat, not stat-macros.
4510         * modules/chown: Likewise.
4511         * modules/euidaccess: Likewise.
4512         * modules/filemode: Likewise.
4513         * modules/file-type: Likewise.
4514         * modules/glob: Likewise.
4515         * modules/isapipe: Likewise.
4516         * modules/lchown: Likewise.
4517         * modules/lstat: Likewise.
4518         * modules/mkancesdirs: Likewise.
4519         * modules/rmdir: Likewise.
4520         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
4521         * modules/modechange: Likewise.
4522         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
4523         (configure.ac): Remove gl_STAT_MACROS.
4524         * modules/sys_stat (Depends-on): Remove stat-macros.
4525
4526 2006-10-27  Bruno Haible  <bruno@clisp.org>
4527
4528         * m4/signed.m4: Remove file.
4529         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
4530         invocation.
4531         * modules/vasnprintf (Files): Remove m4/signed.m4.
4532
4533 2006-10-27  Bruno Haible  <bruno@clisp.org>
4534
4535         Update to GNU gettext 0.16.
4536         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
4537         m4/inttypes-h.m4, m4/signed.m4.
4538         * m4/gettext.m4: Update to GNU gettext 0.16.
4539         * m4/intl.m4: New file, from GNU gettext.
4540         * m4/intldir.m4: New file, from GNU gettext.
4541         * config/srclist.txt: Update
4542
4543 2006-10-27  Eric Blake  <ebb9@byu.net>
4544
4545         * MODULES.html.sh: Document tempname.
4546         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
4547         dependencies.
4548         (Files): Move lib/tempname.c...
4549         * modules/tempname: ...to this new module.
4550         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
4551         (gl_PREREQ_TEMPNAME): Move...
4552         * m4/tempname.m4: ...to this new file.
4553         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
4554         * modules/sys_stat (Depends-on): Add stat-macros.
4555         * lib/stat_.h (includes): Pick up stat macros.
4556         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
4557         if stat macros are broken.
4558         * lib/tempname.c (includes): No need to include "stat-macros.h".
4559         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
4560         (direxists, __path_search) [!_LIBC]: Don't compile these in
4561         gnulib; the tmpdir module covers that.
4562         * lib/tempname.h: New file.
4563
4564 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
4565
4566         * COPYING: Explain how gnulib-tool converts licence headers.
4567         Almost all wording by Eric Blake.
4568
4569 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
4570
4571         * lib/mbchar.h (is_basic_table): Make read-only.
4572         * lib/mbchar.c (is_basic_table): Likewise.
4573         Reported by John Darrington.
4574
4575 2006-10-25  Bruno Haible  <bruno@clisp.org>
4576
4577         * lib/progname.h (set_program_name): Undefine before defining.
4578
4579 2006-10-25  Bruno Haible  <bruno@clisp.org>
4580
4581         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
4582         false for non-gcc C++ compilers.
4583         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
4584
4585 2006-10-24  Bruno Haible  <bruno@clisp.org>
4586
4587         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
4588         iconv implementations like Irix iconv.
4589
4590 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
4591
4592         * modules/vararrays: New file.
4593         * m4/vararrays.m4: New file, taken from diffutils.
4594         * MODULES.html.sh: New module vararrays.
4595
4596 2006-10-24  Karl Berry  <karl@gnu.org>
4597
4598         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
4599         Don't call GNU Unix.
4600
4601 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4602
4603         * users.txt: Add Libtool.
4604
4605         Sync from Libtool:
4606
4607         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
4608
4609         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
4610         to gnulib's policy of including config.h unconditionally.
4611
4612 2006-10-24  Bruno Haible  <bruno@clisp.org>
4613
4614         * modules/wcwidth (Files): Add m4/wint_t.m4.
4615         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
4616         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
4617
4618 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
4619
4620         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
4621         to pacify GCC with some -W flags enabled.  Problem reported by
4622         Bruno Haible.
4623
4624 2006-10-24  Jim Meyering  <jim@meyering.net>
4625
4626         * MODULES.html.sh: Remove uinttostr.  It's not a module.
4627         Reported by Karl Berry.
4628
4629 2006-10-23  Bruno Haible  <bruno@clisp.org>
4630
4631         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
4632
4633 2006-10-24  Bruno Haible  <bruno@clisp.org>
4634
4635         * lib/gl_list.h: Use C comment style, not C++ comment style.
4636
4637 2006-10-23  Eric Blake  <ebb9@byu.net>
4638
4639         * lib/getaddrinfo.c (includes): Add missing include.
4640
4641 2006-10-23  Bruno Haible  <bruno@clisp.org>
4642             Paul Eggert  <eggert@cs.ucla.edu>
4643
4644         Ability to rename obstack_free.
4645         * lib/obstack.h (__obstack_free): New macro. Declare instead of
4646         obstack_free.
4647         (obstack_free): Invoke the __obstack_free macro.
4648         * lib/obstack.c (obstack_free): Use __obstack_free macro.
4649
4650 2006-10-23  Bruno Haible  <bruno@clisp.org>
4651             Paul Eggert  <eggert@cs.ucla.edu>
4652
4653         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
4654         __argc, __argv from the declaration. (They are defined as macros on
4655         mingw.)
4656
4657 2006-10-22  Bruno Haible  <bruno@clisp.org>
4658
4659         * doc/gnulib-intro.texi: New file.
4660         * doc/gnulib.texi: Include it.
4661
4662 2006-10-21  Bruno Haible  <bruno@clisp.org>
4663
4664         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
4665         "Introduction", "Miscellanous Notes", "Particular Modules".
4666
4667 2006-10-21  Bruno Haible  <bruno@clisp.org>
4668
4669         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
4670         Change mostlyclean-local rule to avoid sh syntax error from bash
4671         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
4672
4673 2006-10-23  Jim Meyering  <jim@meyering.net>
4674
4675         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
4676         in place of snprintf.
4677
4678         * modules/inttostr (Files): Add lib/uinttostr.c.
4679         * lib/uinttostr.c (inttostr): New file/function.
4680         * lib/inttostr.h (uinttostr): Declare.
4681         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
4682         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
4683         Add uinttostr.
4684         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
4685
4686 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
4687
4688         * lib/canonicalize.c (ELOOP): Define if not already defined.
4689         Problem reported by Bruno Haible in
4690         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
4691
4692 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
4693
4694         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
4695         Problem reported by Perry Smith and Ville Laurikari.
4696
4697         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
4698         uses.
4699
4700 2006-10-19  Bruno Haible  <bruno@clisp.org>
4701
4702         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
4703         for mingw.
4704
4705 2006-10-19  Bruno Haible  <bruno@clisp.org>
4706
4707         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
4708         Needed for mingw.
4709
4710 2006-10-19  Bruno Haible  <bruno@clisp.org>
4711
4712         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
4713
4714 2006-10-19  Bruno Haible  <bruno@clisp.org>
4715
4716         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
4717         it.
4718
4719 2006-10-19  Bruno Haible  <bruno@clisp.org>
4720
4721         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
4722         invocation.
4723
4724 2006-10-19  Bruno Haible  <bruno@clisp.org>
4725
4726         * gnulib-tool (func_create_testdir): Don't include ftruncate and
4727         mountlist by default.
4728
4729 2006-10-16  Bruno Haible  <bruno@clisp.org>
4730
4731         * lib/c-strstr.c: Include c-strstr.h.
4732
4733 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
4734
4735         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
4736         in a slash.
4737
4738 2006-10-18  Bruno Haible  <bruno@clisp.org>
4739
4740         * lib/lock.h [C++]: Wrap definitions in extern "C".
4741
4742 2006-10-18  Bruno Haible  <bruno@clisp.org>
4743
4744         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
4745         gl_LIBOBJS list.
4746
4747 2006-10-18  Bruno Haible  <bruno@clisp.org>
4748
4749         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
4750
4751 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
4752
4753         * lib/xstrtol.h: Include gettext.h.
4754         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
4755         Problem reported by Eric Blake.
4756         * modules/xstrtol (Depends-on): Add gettext-h.
4757
4758 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
4759
4760         * lib/strftime.c (advance): New macro.
4761         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
4762         incomplete type, so you can't add 0 to it.  Problem and patch
4763         reported by Eelco Dolstra for dietlibc.
4764
4765 2006-10-18  Jim Meyering  <jim@meyering.net>
4766
4767         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
4768         type for a local, and rename it: s/up/user_proc/.
4769
4770 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
4771
4772         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
4773         READ_UTMP_USER_PROCESS.
4774         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
4775
4776 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
4777
4778         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
4779         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
4780
4781 2006-10-17  Eric Blake  <ebb9@byu.net>
4782
4783         * lib/sigprocmask.c (sigprocmask): Fix typo.
4784
4785         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
4786
4787         * modules/clean-temp (Makefile.am): Don't add to make output...
4788         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
4789         config.h.
4790
4791 2006-10-17  Bruno Haible  <bruno@clisp.org>
4792
4793         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
4794         differently if DEFAULT_TEXT_DOMAIN is set.
4795
4796 2006-10-16  Bruno Haible  <bruno@clisp.org>
4797
4798         * lib/clean-temp.c: Include fwriteerror.h.
4799
4800 2006-10-16  Bruno Haible  <bruno@clisp.org>
4801
4802         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
4803
4804 2006-10-16  Bruno Haible  <bruno@clisp.org>
4805
4806         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
4807         * lib/sigprocmask.h: Include <sys/types.h>.
4808         (sigset_t): Use the system's definition if present.
4809
4810 2006-10-17  Eric Blake  <ebb9@byu.net>
4811
4812         * lib/xvasprintf.c (includes): Assume config.h.
4813         * lib/xasprintf.c (includes): Likewise.
4814
4815 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
4816
4817         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
4818         at least as wide as intmax_t.
4819
4820 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
4821
4822         (Imported from Automake.)
4823         * build-aux/gnupload: Update to version 1.1 of directive file.
4824
4825 2006-10-16  Eric Blake  <ebb9@byu.net>
4826
4827         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
4828         match Automake 1.10a.
4829
4830 2006-10-14  Bruno Haible  <bruno@clisp.org>
4831
4832         * modules/sigprocmask: New file.
4833         * lib/sigprocmask.h: New file.
4834         * lib/sigprocmask.c: New file.
4835         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
4836         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
4837         request sigprocmask.o.
4838         (gl_PREREQ_SIGPROCMASK): New macro.
4839         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
4840         (Depends-on): Add sigprocmask.
4841         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
4842         gt_SIGNALBLOCKING. Test for 'raise' only once.
4843         * lib/fatal-signal.c: Include sigprocmask.h.
4844         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
4845         unblock_fatal_signals): Define always.
4846         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
4847         sigprocmask.
4848
4849 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
4850
4851         Sync from Automake.
4852         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
4853         which incorrectly sets the mode of an existing destination
4854         directory.  In some cases the unpatched install-sh could do the
4855         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
4856         system.  We hope this is rare in practice, but it's clearly worth
4857         fixing.  Problem reported by Alex Unleashed in
4858         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
4859         Also, don't bother to check for -m bugs unless we're using -m;
4860         suggested by Stepan Kasal.
4861
4862 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4863
4864         Sync from Automake.
4865         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
4866         `-c' flag, so they appear at the same position as in %FASTDEP%
4867         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
4868         which ignores unknown options only after the first non-option.
4869         Bug report against M4 by Nelson H. F. Beebe.
4870
4871 2006-10-13  Jim Meyering  <jim@meyering.net>
4872
4873         Fix a bug in yesterday's change.
4874         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
4875         p->fts_statp->st_dev would be used uninitialized.
4876         Ensures that we always call fts_stat on the very first entry.
4877         Miklos Szeredi reported that find -xdev stopped working.
4878
4879 2006-10-12  Bruno Haible  <bruno@clisp.org>
4880
4881         * gnulib-tool (func_get_automake_snippet): Append an automatically
4882         computed EXTRA_DIST augmentation.
4883         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
4884         * modules/alloca-opt (Makefile.am): Likewise.
4885         * modules/allocsa (Makefile.am): Likewise.
4886         * modules/arcfour (Makefile.am): Likewise.
4887         * modules/arctwo (Makefile.am): Likewise.
4888         * modules/argmatch (Makefile.am): Likewise.
4889         * modules/argz (Makefile.am): Likewise.
4890         * modules/atexit (Makefile.am): Likewise.
4891         * modules/backupfile (Makefile.am): Likewise.
4892         * modules/byteswap (Makefile.am): Likewise.
4893         * modules/c-strtod (Makefile.am): Likewise.
4894         * modules/c-strtold (Makefile.am): Likewise.
4895         * modules/calloc (Makefile.am): Likewise.
4896         * modules/canon-host (Makefile.am): Likewise.
4897         * modules/canonicalize (Makefile.am): Likewise.
4898         * modules/chdir-long (Makefile.am): Likewise.
4899         * modules/chdir-safer (Makefile.am): Likewise.
4900         * modules/check-version (Makefile.am): Likewise.
4901         * modules/chown (Makefile.am): Likewise.
4902         * modules/cloexec (Makefile.am): Likewise.
4903         * modules/close-stream (Makefile.am): Likewise.
4904         * modules/closeout (Makefile.am): Likewise.
4905         * modules/crc (Makefile.am): Likewise.
4906         * modules/csharpexec (Makefile.am): Likewise.
4907         * modules/cycle-check (Makefile.am): Likewise.
4908         * modules/des (Makefile.am): Likewise.
4909         * modules/dev-ino (Makefile.am): Likewise.
4910         * modules/dirfd (Makefile.am): Likewise.
4911         * modules/dirname (Makefile.am): Likewise.
4912         * modules/dup2 (Makefile.am): Likewise.
4913         * modules/eealloc (Makefile.am): Likewise.
4914         * modules/error (Makefile.am): Likewise.
4915         * modules/euidaccess (Makefile.am): Likewise.
4916         * modules/exclude (Makefile.am): Likewise.
4917         * modules/exitfail (Makefile.am): Likewise.
4918         * modules/fcntl-safer (Makefile.am): Likewise.
4919         * modules/fcntl (Makefile.am): Likewise.
4920         * modules/file-type (Makefile.am): Likewise.
4921         * modules/fileblocks (Makefile.am): Likewise.
4922         * modules/filemode (Makefile.am): Likewise.
4923         * modules/filenamecat (Makefile.am): Likewise.
4924         * modules/fnmatch (Makefile.am): Likewise.
4925         * modules/fopen-safer (Makefile.am): Likewise.
4926         * modules/fpending (Makefile.am): Likewise.
4927         * modules/fprintftime (Makefile.am): Likewise.
4928         * modules/free (Makefile.am): Likewise.
4929         * modules/fsusage (Makefile.am): Likewise.
4930         * modules/ftruncate (Makefile.am): Likewise.
4931         * modules/fts (Makefile.am): Likewise.
4932         * modules/gc-arcfour (Makefile.am): Likewise.
4933         * modules/gc-des (Makefile.am): Likewise.
4934         * modules/gc-hmac-md5 (Makefile.am): Likewise.
4935         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
4936         * modules/gc-md4 (Makefile.am): Likewise.
4937         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
4938         * modules/gc-sha1 (Makefile.am): Likewise.
4939         * modules/gc (Makefile.am): Likewise.
4940         * modules/getaddrinfo (Makefile.am): Likewise.
4941         * modules/getcwd (Makefile.am): Likewise.
4942         * modules/getdelim (Makefile.am): Likewise.
4943         * modules/getdomainname (Makefile.am): Likewise.
4944         * modules/getgroups (Makefile.am): Likewise.
4945         * modules/gethostname (Makefile.am): Likewise.
4946         * modules/gethrxtime (Makefile.am): Likewise.
4947         * modules/getline (Makefile.am): Likewise.
4948         * modules/getloadavg (Makefile.am): Likewise.
4949         * modules/getlogin_r (Makefile.am): Likewise.
4950         * modules/getndelim2 (Makefile.am): Likewise.
4951         * modules/getopt (Makefile.am): Likewise.
4952         * modules/getpagesize (Makefile.am): Likewise.
4953         * modules/getpass-gnu (Makefile.am): Likewise.
4954         * modules/getpass (Makefile.am): Likewise.
4955         * modules/getsubopt (Makefile.am): Likewise.
4956         * modules/gettime (Makefile.am): Likewise.
4957         * modules/gettimeofday (Makefile.am): Likewise.
4958         * modules/getugroups (Makefile.am): Likewise.
4959         * modules/getusershell (Makefile.am): Likewise.
4960         * modules/glob (Makefile.am): Likewise.
4961         * modules/group-member (Makefile.am): Likewise.
4962         * modules/hard-locale (Makefile.am): Likewise.
4963         * modules/hash (Makefile.am): Likewise.
4964         * modules/hmac-md5 (Makefile.am): Likewise.
4965         * modules/hmac-sha1 (Makefile.am): Likewise.
4966         * modules/human (Makefile.am): Likewise.
4967         * modules/idcache (Makefile.am): Likewise.
4968         * modules/imaxabs (Makefile.am): Likewise.
4969         * modules/imaxdiv (Makefile.am): Likewise.
4970         * modules/inet_ntop (Makefile.am): Likewise.
4971         * modules/inet_pton (Makefile.am): Likewise.
4972         * modules/intprops (Makefile.am): Likewise.
4973         * modules/inttostr (Makefile.am): Likewise.
4974         * modules/inttypes (Makefile.am): Likewise.
4975         * modules/isapipe (Makefile.am): Likewise.
4976         * modules/javaversion (Makefile.am): Likewise.
4977         * modules/lchmod (Makefile.am): Likewise.
4978         * modules/lchown (Makefile.am): Likewise.
4979         * modules/localcharset (Makefile.am): Likewise.
4980         * modules/long-options (Makefile.am): Likewise.
4981         * modules/lstat (Makefile.am): Likewise.
4982         * modules/malloc (Makefile.am): Likewise.
4983         * modules/mathl (Makefile.am): Likewise.
4984         * modules/mbchar (Makefile.am): Likewise.
4985         * modules/md2 (Makefile.am): Likewise.
4986         * modules/md4 (Makefile.am): Likewise.
4987         * modules/md5 (Makefile.am): Likewise.
4988         * modules/memcasecmp (Makefile.am): Likewise.
4989         * modules/memchr (Makefile.am): Likewise.
4990         * modules/memcmp (Makefile.am): Likewise.
4991         * modules/memcoll (Makefile.am): Likewise.
4992         * modules/memcpy (Makefile.am): Likewise.
4993         * modules/memmem (Makefile.am): Likewise.
4994         * modules/memmove (Makefile.am): Likewise.
4995         * modules/mempcpy (Makefile.am): Likewise.
4996         * modules/memrchr (Makefile.am): Likewise.
4997         * modules/memset (Makefile.am): Likewise.
4998         * modules/memxor (Makefile.am): Likewise.
4999         * modules/mkancesdirs (Makefile.am): Likewise.
5000         * modules/mkdir-p (Makefile.am): Likewise.
5001         * modules/mkdir (Makefile.am): Likewise.
5002         * modules/mkdtemp (Makefile.am): Likewise.
5003         * modules/mkstemp (Makefile.am): Likewise.
5004         * modules/mktime (Makefile.am): Likewise.
5005         * modules/modechange (Makefile.am): Likewise.
5006         * modules/mountlist (Makefile.am): Likewise.
5007         * modules/nanosleep (Makefile.am): Likewise.
5008         * modules/obstack (Makefile.am): Likewise.
5009         * modules/openat (Makefile.am): Likewise.
5010         * modules/pagealign_alloc (Makefile.am): Likewise.
5011         * modules/pathmax (Makefile.am): Likewise.
5012         * modules/physmem (Makefile.am): Likewise.
5013         * modules/poll (Makefile.am): Likewise.
5014         * modules/posixtm (Makefile.am): Likewise.
5015         * modules/posixver (Makefile.am): Likewise.
5016         * modules/putenv (Makefile.am): Likewise.
5017         * modules/quote (Makefile.am): Likewise.
5018         * modules/quotearg (Makefile.am): Likewise.
5019         * modules/raise (Makefile.am): Likewise.
5020         * modules/read-file (Makefile.am): Likewise.
5021         * modules/readline (Makefile.am): Likewise.
5022         * modules/readlink (Makefile.am): Likewise.
5023         * modules/readtokens (Makefile.am): Likewise.
5024         * modules/readutmp (Makefile.am): Likewise.
5025         * modules/realloc (Makefile.am): Likewise.
5026         * modules/regex (Makefile.am): Likewise.
5027         * modules/rename-dest-slash (Makefile.am): Likewise.
5028         * modules/rename (Makefile.am): Likewise.
5029         * modules/rijndael (Makefile.am): Likewise.
5030         * modules/rmdir (Makefile.am): Likewise.
5031         * modules/rpmatch (Makefile.am): Likewise.
5032         * modules/safe-read (Makefile.am): Likewise.
5033         * modules/safe-write (Makefile.am): Likewise.
5034         * modules/same-inode (Makefile.am): Likewise.
5035         * modules/same (Makefile.am): Likewise.
5036         * modules/save-cwd (Makefile.am): Likewise.
5037         * modules/savedir (Makefile.am): Likewise.
5038         * modules/setenv (Makefile.am): Likewise.
5039         * modules/settime (Makefile.am): Likewise.
5040         * modules/sha1 (Makefile.am): Likewise.
5041         * modules/sig2str (Makefile.am): Likewise.
5042         * modules/snprintf (Makefile.am): Likewise.
5043         * modules/stat-macros (Makefile.am): Likewise.
5044         * modules/stat-time (Makefile.am): Likewise.
5045         * modules/stdbool (Makefile.am): Likewise.
5046         * modules/stdint (Makefile.am): Likewise.
5047         * modules/stdlib-safer (Makefile.am): Likewise.
5048         * modules/stpcpy (Makefile.am): Likewise.
5049         * modules/stpncpy (Makefile.am): Likewise.
5050         * modules/strcase (Makefile.am): Likewise.
5051         * modules/strcasestr (Makefile.am): Likewise.
5052         * modules/strchrnul (Makefile.am): Likewise.
5053         * modules/strcspn (Makefile.am): Likewise.
5054         * modules/strdup (Makefile.am): Likewise.
5055         * modules/strerror (Makefile.am): Likewise.
5056         * modules/strftime (Makefile.am): Likewise.
5057         * modules/strndup (Makefile.am): Likewise.
5058         * modules/strnlen (Makefile.am): Likewise.
5059         * modules/strpbrk (Makefile.am): Likewise.
5060         * modules/strsep (Makefile.am): Likewise.
5061         * modules/strstr (Makefile.am): Likewise.
5062         * modules/strtod (Makefile.am): Likewise.
5063         * modules/strtoimax (Makefile.am): Likewise.
5064         * modules/strtok_r (Makefile.am): Likewise.
5065         * modules/strtol (Makefile.am): Likewise.
5066         * modules/strtoll (Makefile.am): Likewise.
5067         * modules/strtoul (Makefile.am): Likewise.
5068         * modules/strtoull (Makefile.am): Likewise.
5069         * modules/strtoumax (Makefile.am): Likewise.
5070         * modules/strverscmp (Makefile.am): Likewise.
5071         * modules/sys_socket (Makefile.am): Likewise.
5072         * modules/sys_stat (Makefile.am): Likewise.
5073         * modules/sysexits (Makefile.am): Likewise.
5074         * modules/time_r (Makefile.am): Likewise.
5075         * modules/timegm (Makefile.am): Likewise.
5076         * modules/timespec (Makefile.am): Likewise.
5077         * modules/tmpfile-safer (Makefile.am): Likewise.
5078         * modules/trim (Makefile.am): Likewise.
5079         * modules/unistd-safer (Makefile.am): Likewise.
5080         * modules/unlinkdir (Makefile.am): Likewise.
5081         * modules/unlocked-io (Makefile.am): Likewise.
5082         * modules/userspec (Makefile.am): Likewise.
5083         * modules/utime (Makefile.am): Likewise.
5084         * modules/utimecmp (Makefile.am): Likewise.
5085         * modules/utimens (Makefile.am): Likewise.
5086         * modules/vasnprintf (Makefile.am): Likewise.
5087         * modules/vasprintf (Makefile.am): Likewise.
5088         * modules/vsnprintf (Makefile.am): Likewise.
5089         * modules/xalloc (Makefile.am): Likewise.
5090         * modules/xgetcwd (Makefile.am): Likewise.
5091         * modules/xnanosleep (Makefile.am): Likewise.
5092         * modules/xreadlink (Makefile.am): Likewise.
5093         * modules/xstrtod (Makefile.am): Likewise.
5094         * modules/xstrtol (Makefile.am): Likewise.
5095         * modules/xstrtold (Makefile.am): Likewise.
5096         * modules/yesno (Makefile.am): Likewise.
5097         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
5098
5099 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
5100
5101         * modules/error (Makefile.am): Distribute files through
5102         EXTRA_DIST, not lib_SOURCES.
5103
5104 2006-10-12  Eric Blake  <ebb9@byu.net>
5105
5106         * modules/error (Makefile.am): Distribute files in /lib.
5107         * modules/obstack (Makefile.am): Likewise.
5108
5109 2006-10-12  Bruno Haible  <bruno@clisp.org>
5110
5111         * modules/acl (Makefile.am): Distribute all files in lib/ through
5112         EXTRA_DIST.
5113         * modules/arcfour (Makefile.am): Likewise.
5114         * modules/arctwo (Makefile.am): Likewise.
5115         * modules/argmatch (Makefile.am): Likewise.
5116         * modules/argz (Makefile.am): Likewise.
5117         * modules/atexit (Makefile.am): Likewise.
5118         * modules/backupfile (Makefile.am): Likewise.
5119         * modules/c-strtod (Makefile.am): Likewise.
5120         * modules/c-strtold (Makefile.am): Likewise.
5121         * modules/calloc (Makefile.am): Likewise.
5122         * modules/canon-host (Makefile.am): Likewise.
5123         * modules/canonicalize (Makefile.am): Likewise.
5124         * modules/chdir-long (Makefile.am): Likewise.
5125         * modules/chdir-safer (Makefile.am): Likewise.
5126         * modules/check-version (Makefile.am): Likewise.
5127         * modules/chown (Makefile.am): Likewise.
5128         * modules/cloexec (Makefile.am): Likewise.
5129         * modules/close-stream (Makefile.am): Likewise.
5130         * modules/closeout (Makefile.am): Likewise.
5131         * modules/crc (Makefile.am): Likewise.
5132         * modules/cycle-check (Makefile.am): Likewise.
5133         * modules/des (Makefile.am): Likewise.
5134         * modules/dirfd (Makefile.am): Likewise.
5135         * modules/dirname (Makefile.am): Likewise.
5136         * modules/dup2 (Makefile.am): Likewise.
5137         * modules/euidaccess (Makefile.am): Likewise.
5138         * modules/exclude (Makefile.am): Likewise.
5139         * modules/exitfail (Makefile.am): Likewise.
5140         * modules/fcntl-safer (Makefile.am): Likewise.
5141         * modules/file-type (Makefile.am): Likewise.
5142         * modules/fileblocks (Makefile.am): Likewise.
5143         * modules/filemode (Makefile.am): Likewise.
5144         * modules/filenamecat (Makefile.am): Likewise.
5145         * modules/fnmatch (Makefile.am): Likewise.
5146         * modules/fopen-safer (Makefile.am): Likewise.
5147         * modules/fpending (Makefile.am): Likewise.
5148         * modules/fprintftime (Makefile.am): Likewise.
5149         * modules/free (Makefile.am): Likewise.
5150         * modules/fsusage (Makefile.am): Likewise.
5151         * modules/ftruncate (Makefile.am): Likewise.
5152         * modules/fts (Makefile.am): Likewise.
5153         * modules/gc (Makefile.am): Likewise.
5154         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
5155         * modules/getaddrinfo (Makefile.am): Likewise.
5156         * modules/getcwd (Makefile.am): Likewise.
5157         * modules/getdelim (Makefile.am): Likewise.
5158         * modules/getdomainname (Makefile.am): Likewise.
5159         * modules/getgroups (Makefile.am): Likewise.
5160         * modules/gethostname (Makefile.am): Likewise.
5161         * modules/gethrxtime (Makefile.am): Likewise.
5162         * modules/getline (Makefile.am): Likewise.
5163         * modules/getloadavg (Makefile.am): Likewise.
5164         * modules/getlogin_r (Makefile.am): Likewise.
5165         * modules/getopt (Makefile.am): Likewise.
5166         * modules/getpass (Makefile.am): Likewise.
5167         * modules/getpass-gnu (Makefile.am): Likewise.
5168         * modules/getsubopt (Makefile.am): Likewise.
5169         * modules/gettime (Makefile.am): Likewise.
5170         * modules/gettimeofday (Makefile.am): Likewise.
5171         * modules/getugroups (Makefile.am): Likewise.
5172         * modules/getusershell (Makefile.am): Likewise.
5173         * modules/glob (Makefile.am): Likewise.
5174         * modules/group-member (Makefile.am): Likewise.
5175         * modules/hard-locale (Makefile.am): Likewise.
5176         * modules/hash (Makefile.am): Likewise.
5177         * modules/hmac-md5 (Makefile.am): Likewise.
5178         * modules/hmac-sha1 (Makefile.am): Likewise.
5179         * modules/human (Makefile.am): Likewise.
5180         * modules/idcache (Makefile.am): Likewise.
5181         * modules/imaxabs (Makefile.am): Likewise.
5182         * modules/imaxdiv (Makefile.am): Likewise.
5183         * modules/inet_ntop (Makefile.am): Likewise.
5184         * modules/inet_pton (Makefile.am): Likewise.
5185         * modules/inttostr (Makefile.am): Likewise.
5186         * modules/isapipe (Makefile.am): Likewise.
5187         * modules/lchown (Makefile.am): Likewise.
5188         * modules/long-options (Makefile.am): Likewise.
5189         * modules/lstat (Makefile.am): Likewise.
5190         * modules/malloc (Makefile.am): Likewise.
5191         * modules/mathl (Makefile.am): Likewise.
5192         * modules/mbchar (Makefile.am): Likewise.
5193         * modules/md2 (Makefile.am): Likewise.
5194         * modules/md4 (Makefile.am): Likewise.
5195         * modules/md5 (Makefile.am): Likewise.
5196         * modules/memcasecmp (Makefile.am): Likewise.
5197         * modules/memchr (Makefile.am): Likewise.
5198         * modules/memcmp (Makefile.am): Likewise.
5199         * modules/memcoll (Makefile.am): Likewise.
5200         * modules/memcpy (Makefile.am): Likewise.
5201         * modules/memmem (Makefile.am): Likewise.
5202         * modules/memmove (Makefile.am): Likewise.
5203         * modules/mempcpy (Makefile.am): Likewise.
5204         * modules/memrchr (Makefile.am): Likewise.
5205         * modules/memset (Makefile.am): Likewise.
5206         * modules/memxor (Makefile.am): Likewise.
5207         * modules/mkancesdirs (Makefile.am): Likewise.
5208         * modules/mkdir (Makefile.am): Likewise.
5209         * modules/mkdir-p (Makefile.am): Likewise.
5210         * modules/mkdtemp (Makefile.am): Likewise.
5211         * modules/mkstemp (Makefile.am): Likewise.
5212         * modules/mktime (Makefile.am): Likewise.
5213         * modules/modechange (Makefile.am): Likewise.
5214         * modules/mountlist (Makefile.am): Likewise.
5215         * modules/nanosleep (Makefile.am): Likewise.
5216         * modules/openat (Makefile.am): Likewise.
5217         * modules/pagealign_alloc (Makefile.am): Likewise.
5218         * modules/physmem (Makefile.am): Likewise.
5219         * modules/poll (Makefile.am): Likewise.
5220         * modules/posixtm (Makefile.am): Likewise.
5221         * modules/posixver (Makefile.am): Likewise.
5222         * modules/putenv (Makefile.am): Likewise.
5223         * modules/quote (Makefile.am): Likewise.
5224         * modules/quotearg (Makefile.am): Likewise.
5225         * modules/raise (Makefile.am): Likewise.
5226         * modules/read-file (Makefile.am): Likewise.
5227         * modules/readline (Makefile.am): Likewise.
5228         * modules/readlink (Makefile.am): Likewise.
5229         * modules/readtokens (Makefile.am): Likewise.
5230         * modules/readutmp (Makefile.am): Likewise.
5231         * modules/realloc (Makefile.am): Likewise.
5232         * modules/regex (Makefile.am): Likewise.
5233         * modules/rename (Makefile.am): Likewise.
5234         * modules/rename-dest-slash (Makefile.am): Likewise.
5235         * modules/rijndael (Makefile.am): Likewise.
5236         * modules/rmdir (Makefile.am): Likewise.
5237         * modules/rpmatch (Makefile.am): Likewise.
5238         * modules/safe-read (Makefile.am): Likewise.
5239         * modules/safe-write (Makefile.am): Likewise.
5240         * modules/same (Makefile.am): Likewise.
5241         * modules/save-cwd (Makefile.am): Likewise.
5242         * modules/savedir (Makefile.am): Likewise.
5243         * modules/setenv (Makefile.am): Likewise.
5244         * modules/settime (Makefile.am): Likewise.
5245         * modules/sha1 (Makefile.am): Likewise.
5246         * modules/sig2str (Makefile.am): Likewise.
5247         * modules/snprintf (Makefile.am): Likewise.
5248         * modules/stdlib-safer (Makefile.am): Likewise.
5249         * modules/stpcpy (Makefile.am): Likewise.
5250         * modules/stpncpy (Makefile.am): Likewise.
5251         * modules/strcase (Makefile.am): Likewise.
5252         * modules/strcasestr (Makefile.am): Likewise.
5253         * modules/strchrnul (Makefile.am): Likewise.
5254         * modules/strcspn (Makefile.am): Likewise.
5255         * modules/strdup (Makefile.am): Likewise.
5256         * modules/strerror (Makefile.am): Likewise.
5257         * modules/strftime (Makefile.am): Likewise.
5258         * modules/strndup (Makefile.am): Likewise.
5259         * modules/strnlen (Makefile.am): Likewise.
5260         * modules/strpbrk (Makefile.am): Likewise.
5261         * modules/strsep (Makefile.am): Likewise.
5262         * modules/strstr (Makefile.am): Likewise.
5263         * modules/strtod (Makefile.am): Likewise.
5264         * modules/strtoimax (Makefile.am): Likewise.
5265         * modules/strtok_r (Makefile.am): Likewise.
5266         * modules/strtol (Makefile.am): Likewise.
5267         * modules/strtoll (Makefile.am): Likewise.
5268         * modules/strtoul (Makefile.am): Likewise.
5269         * modules/strtoull (Makefile.am): Likewise.
5270         * modules/strtoumax (Makefile.am): Likewise.
5271         * modules/strverscmp (Makefile.am): Likewise.
5272         * modules/time_r (Makefile.am): Likewise.
5273         * modules/timegm (Makefile.am): Likewise.
5274         * modules/tmpfile-safer (Makefile.am): Likewise.
5275         * modules/unistd-safer (Makefile.am): Likewise.
5276         * modules/unlinkdir (Makefile.am): Likewise.
5277         * modules/userspec (Makefile.am): Likewise.
5278         * modules/utime (Makefile.am): Likewise.
5279         * modules/utimecmp (Makefile.am): Likewise.
5280         * modules/utimens (Makefile.am): Likewise.
5281         * modules/vasnprintf (Makefile.am): Likewise.
5282         * modules/vasprintf (Makefile.am): Likewise.
5283         * modules/vsnprintf (Makefile.am): Likewise.
5284         * modules/xalloc (Makefile.am): Likewise.
5285         * modules/xgetcwd (Makefile.am): Likewise.
5286         * modules/xnanosleep (Makefile.am): Likewise.
5287         * modules/xreadlink (Makefile.am): Likewise.
5288         * modules/xstrtod (Makefile.am): Likewise.
5289         * modules/xstrtol (Makefile.am): Likewise.
5290         * modules/xstrtold (Makefile.am): Likewise.
5291         * modules/yesno (Makefile.am): Likewise.
5292
5293 2006-10-12  Jim Meyering  <jim@meyering.net>
5294
5295         * m4/getloadavg.m4: Revert the change below.
5296
5297         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
5298         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
5299         fail with a symlink, which is what coreutils' ./bootstrap now
5300         creates by default.
5301
5302 2006-10-12  Bruno Haible  <bruno@clisp.org>
5303
5304         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
5305         mingw.
5306         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
5307         MSVC and mingw explicitly.
5308
5309 2006-10-11  Simon Josefsson  <jas@extundo.com>
5310             Bruno Haible  <bruno@clisp.org>
5311
5312         Add support for multiple gnulib-tool invocations in the scope of a
5313         single configure.ac file.
5314         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
5315         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
5316         with the same contents as the _LIBADD variable.
5317         (func_emit_initmacro_start, func_emit_initmacro_end,
5318         func_emit_initmacro_done): New functions.
5319         (func_import, func_create_testdir): Invoke them. Allow the identifiers
5320         gl_LIBOBJS and gl_LTLIBOBJS.
5321
5322 2006-10-11  Bruno Haible  <bruno@clisp.org>
5323
5324         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
5325         (func_create_testdir): Don't create po/Makefile.am, don't invoke
5326         autoreconf. Instead, invoke autopoint explicitly but move back the
5327         *.m4 files from gnulib.
5328
5329 2006-10-11  Bruno Haible  <bruno@clisp.org>
5330
5331         * gnulib-tool (func_usage): Make module names after --create-testdir
5332         optional.
5333         (func_create_testdir): If no module was specified, use nearly all
5334         modules.
5335
5336 2006-10-12  Jim Meyering  <jim@meyering.net>
5337
5338         Big performance improvement for fts-based tools that use FTS_NOSTAT.
5339         Avoid spurious inode-mismatch problems on non-POSIX file systems.
5340         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
5341         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
5342         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
5343         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
5344         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
5345         (fts_set_stat_required): New function.
5346         (fts_open): Defer the calls to fts_stat, if possible or requested.
5347         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
5348         into fts_stat itself.
5349         (fts_read): Perform any required (deferred) fts_stat call.
5350         (fts_build): Likewise, for the directory we're about to open and read.
5351         In the readdir loop, carefully decide whether each entry will require
5352         an eventual call to fts_stat, using dirent.d_type info if available.
5353         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
5354         a command line argument into this function.  Update all callers.
5355         Map a return value of FTS_DOT to FTS_D for a command line argument.
5356         * modules/fts (Depends-on): Add d-type.  Alphabetize.
5357         Thanks to Miklos Szeredi for his tenacity and for the initial
5358         bug report about "find" failing on a FUSE-based file system.
5359
5360         * lib/fts.c (fts_open): Use consistent indentation.
5361
5362 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
5363
5364         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
5365         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
5366         reported by Jim Meyering.  All uses of cache variables renamed
5367         to match Autoconf's.
5368         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
5369         the other one.
5370
5371         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
5372         Fix misspelling in diagnostic.
5373
5374 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
5375
5376         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
5377         defined.  Problem reported by Matthew Woehlke.
5378
5379         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
5380         Add support for Tandem NonStop R series.
5381         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
5382         Use new macro.
5383
5384         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
5385         (has_trailing_slash): Omit size arg; all callers changed.
5386         Omit 'inline', since it doesn't help performance and we'd
5387         need to configure it.
5388         Don't count //, ///, etc. as having a trailing slash.
5389         As a side effect, this removes a C99ism reported by Matthew Woehlke.
5390         (rpl_rename_dest_slash): On failure, use rename's errno rather
5391         than (in some cases) an incorrect or junk errno.
5392         Simplify code by removing need to compute length; this does
5393         cause it to make two passes instead of one over the file name,
5394         but it's worth it.
5395
5396         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
5397         change, since Autoconf's version may no longer be appropriate now
5398         that we are using CVS Autoconf's version.  Add support for Tandem.
5399
5400 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
5401             Bruno Haible  <bruno@clisp.org>
5402
5403         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
5404         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
5405         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
5406         gl_AC_TYPE_LONG_LONG.
5407
5408         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
5409         instead of HAVE_LONG_LONG.
5410         * lib/printf-args.c (printf_fetchargs): Likewise.
5411         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
5412         * lib/vasnprintf.c (VASNPRINTF): Likewise.
5413         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
5414         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
5415         gl_AC_TYPE_LONG_LONG.
5416
5417 2006-10-11  Bruno Haible  <bruno@clisp.org>
5418
5419         * m4/longlong.m4: Add comments.
5420         * m4/ulonglong.m4: Likewise.
5421
5422 2006-10-10  Bruno Haible  <bruno@clisp.org>
5423
5424         Make it possible to #define stpcpy, strdup to aliases.
5425         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
5426         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
5427
5428 2006-10-10  Bruno Haible  <bruno@clisp.org>
5429
5430         Make it possible to #define gcd to an alias.
5431         * lib/gcd.c: Include config.h.
5432
5433 2006-10-10  Bruno Haible  <bruno@clisp.org>
5434
5435         Make it possible to #define c_isascii to an alias.
5436         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
5437         defined. Undefine the macros before defining them, to avoid gcc
5438         warnings.
5439         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
5440         define NO_C_CTYPE_MACROS early.
5441
5442 2006-10-10  Bruno Haible  <bruno@clisp.org>
5443
5444         Make it possible to #define set_program_name to an alias.
5445         * lib/progname.c: Don't undefine set_program_name; instead, undefine
5446         ENABLE_RELOCATABLE early.
5447
5448 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
5449
5450         Port to Tandem NSK OSS, which has 64-bit signed int but at most
5451         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
5452         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
5453         More generally, don't assume that 64-bit signed int is available
5454         if unsigned int is, and vice versa.
5455         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
5456         unsigned symbols, not on their signed counterparts.
5457         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
5458         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
5459         (UINT64_C, UINTMAX_C):
5460         Likewise.
5461         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
5462         unsigned counterparts.
5463         (Have_long_long, Unsigned): New macros.
5464         (Int): Renamed from INT.
5465         (strtoimax): Use the new macros.
5466         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
5467         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
5468         * modules/inttypes (inttypes.h): Substitute
5469         HAVE_UNSIGNED_LONG_LONG_INT.
5470         * modules/stdint (stdint.h): Likewise.
5471         (Files): Add m4/ulonglong.m4.
5472
5473 2006-10-10  Bruno Haible  <bruno@clisp.org>
5474
5475         Fix a gcc -Wshadow warning.
5476         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
5477         to 'bucket'.
5478         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
5479         gl_linked_indexof_from_to): Likewise.
5480         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
5481         Likewise.
5482         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
5483         Likewise.
5484         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
5485         Reported by Eric Blake.
5486
5487 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
5488
5489         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
5490         for NetBSD.  Problem reported by Bruno Haible.
5491
5492 2006-10-09  Jim Meyering  <jim@meyering.net>
5493
5494         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
5495         Patch from Bruno Haible.
5496
5497 2006-10-09  Jim Meyering  <jim@meyering.net>
5498
5499         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
5500         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
5501         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
5502
5503 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
5504
5505         Don't include <config.h> twice; this doesn't work in some cases,
5506         e.g., when config.h has "#define intmax_t long long int" and
5507         we include <config.h>, <inttypes.h>, <config.h> in that order.
5508         Problem reported by Matthew Woehlke in:
5509         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
5510         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
5511         * lib/fts-cycle.c: Don't include config.h.
5512         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
5513         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
5514         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
5515         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
5516         inttypes.h.
5517         * lib/xstrtoumax.c: Likewise.
5518         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
5519         __strtol and the like, so that this module is more like its siblings.
5520         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
5521         Remove; no longer needed now that we assume gnulib inttypes.h.
5522
5523 2006-10-08  Bruno Haible  <bruno@clisp.org>
5524
5525         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
5526         option.
5527
5528 2006-10-07  Jim Meyering  <jim@meyering.net>
5529
5530         * modules/inttypes (inttypes.h): Revert what seems to have been
5531         an inadvertent part of today's change: use "|", not "/" in the
5532         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
5533
5534 2006-10-07  Bruno Haible  <bruno@clisp.org>
5535
5536         * modules/sublist: New file.
5537
5538 2006-10-07  Bruno Haible  <bruno@clisp.org>
5539
5540         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
5541         * modules/argz (argz.h): Likewise.
5542         * modules/arpa_inet (arpa/inet.h): Likewise.
5543         * modules/byteswap (byteswap.h): Likewise.
5544         * modules/configmake (configmake.h): Likewise.
5545         * modules/fcntl (fcntl.h): Likewise.
5546         * modules/fnmatch (fnmatch.h): Likewise.
5547         * modules/getopt (getopt.h): Likewise.
5548         * modules/glob (glob.h): Likewise.
5549         * modules/inttypes (inttypes.h): Likewise.
5550         * modules/netinet_in (netinet/in.h): Likewise.
5551         * modules/poll (poll.h): Likewise.
5552         * modules/stdbool (stdbool.h): Likewise.
5553         * modules/stdint (stdint.h): Likewise.
5554         * modules/sys_select (sys/select.h): Likewise.
5555         * modules/sys_socket (sys/socket.h): Likewise.
5556         * modules/sys_stat (sys/stat.h): Likewise.
5557         * modules/sysexits (sysexits.h): Likewise.
5558         * modules/unistd (unistd.h): Likewise.
5559         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5560         Add a "DO NOT EDIT" comment to the generated file.
5561         (func_import): Likewise for gnulib-comp.m4.
5562
5563 2006-10-07  Bruno Haible  <bruno@clisp.org>
5564
5565         * lib/gl_sublist.h: New file.
5566         * lib/gl_sublist.c: New file.
5567
5568 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
5569
5570         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
5571         name (relative to the original working directory) and the file
5572         name component (relative to the temporary working directory).  All
5573         callers changed.
5574         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
5575         * lib/mkdir-p.c (make_dir_parents): Likewise.
5576         * lib/mkdir-p.h (make_dir_parents): Likewise.
5577
5578 2006-10-06  Eric Blake  <ebb9@byu.net>
5579
5580         Define several macros for use by the clean-temp module.
5581         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
5582         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
5583         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
5584
5585         * lib/clean-temp.h (close_stream_temp): New declaration.
5586         * lib/clean-temp.c (includes): Pull in headers according to what
5587         other modules are in use.
5588         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
5589
5590 2006-10-06  Bruno Haible  <bruno@clisp.org>
5591
5592         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
5593         instead of fopen, fwriteerror.
5594
5595 2006-10-06  Bruno Haible  <bruno@clisp.org>
5596
5597         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
5598         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
5599         int.
5600         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
5601         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
5602         Return an error indicator.
5603         Suggested by Eric Blake.
5604
5605 2006-10-06  Bruno Haible  <bruno@clisp.org>
5606
5607         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
5608         Reported by Eric Blake.
5609
5610 2006-10-06  Bruno Haible  <bruno@clisp.org>
5611
5612         * modules/closeout (Description): Mention stderr too.
5613
5614 2006-10-06  Bruno Haible  <bruno@clisp.org>
5615         and Paul Eggert  <eggert@cs.ucla.edu>
5616
5617         * lib/closeout.c (close_stdout): Also close stderr.
5618         * lib/closeout.h: Update comment.
5619
5620 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
5621
5622         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
5623         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
5624         * lib/dirchownmod.c: Include lchown.h.
5625         * lib/lchown.c: Don't include files that lchown.h now includes.
5626         Don't declare chown, since lchown.h now does that.
5627         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
5628         (lchown): Define to rpl_chown if lchown is declared but
5629         does not exist.  Declare using a prototype if lchown is not
5630         declared.  Add a copyright notice.
5631         * lib/mkstemp.h: Include <unistd.h>.
5632         * lib/openat.c: Include lchown.h.
5633
5634         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
5635         we now test for that separately.
5636         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
5637         rather than O_NOFOLLOW, when testing whether it's possible to
5638         avoid a race condition reliably.
5639         * lib/savewd.c (savewd_chdir): Likewise.
5640
5641         Remove macros that are no longer needed now that stdint.h is
5642         reliable.
5643         * lib/fsusage.c (UINTMAX_MAX): Remove.
5644         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
5645         * lib/utimecmp.c (SIZE_MAX): Remove.
5646
5647         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
5648
5649         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
5650         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
5651         O_NOATIME works.
5652
5653 2006-10-05  Bruno Haible  <bruno@clisp.org>
5654
5655         * lib/gl_list.h (gl_sortedlist_search_from_to,
5656         gl_sortedlist_indexof_from_to): New declarations.
5657         (gl_list_implementation): New fields sortedlist_search_from_to,
5658         sortedlist_indexof_from_to.
5659         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
5660         inline functions.
5661         * lib/gl_list.c (gl_sortedlist_search_from_to,
5662         gl_sortedlist_indexof_from_to): New functions.
5663         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
5664         function.
5665         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
5666         (gl_array_sortedlist_search_from_to): New function.
5667         (gl_array_list_implementation): Update.
5668         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
5669         function.
5670         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
5671         (gl_carray_sortedlist_search_from_to): New function.
5672         (gl_carray_list_implementation): Update.
5673         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
5674         gl_linked_sortedlist_indexof_from_to): New functions.
5675         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
5676         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
5677         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
5678         gl_tree_sortedlist_indexof_from_to): New functions.
5679         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
5680         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
5681         Update.
5682         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
5683         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
5684         Update.
5685
5686 2006-10-05  Bruno Haible  <bruno@clisp.org>
5687
5688         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
5689         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
5690         (struct gl_list_implementation): Add fields search_from_to,
5691         indexof_from_to. Remove fields search, indexof.
5692         (gl_list_search): Use the search_from_to method.
5693         (gl_list_search_from, gl_list_search_from_to): New functions.
5694         (gl_list_indexof): Use the indexof_from_to method.
5695         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
5696         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
5697         (gl_list_search_from, gl_list_search_from_to): New functions.
5698         (gl_list_indexof): Use the indexof_from_to method.
5699         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
5700         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
5701         gl_array_indexof. Add start_index, end_index arguments.
5702         (gl_array_search_from_to): Renamed from gl_array_search. Add
5703         start_index, end_index arguments.
5704         (gl_array_remove, gl_array_list_implementation): Update.
5705         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
5706         gl_carray_indexof. Add start_index, end_index arguments.
5707         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
5708         start_index, end_index arguments.
5709         (gl_carray_remove, gl_carray_list_implementation): Update.
5710         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
5711         gl_linked_search. Add start_index, end_index arguments.
5712         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
5713         start_index, end_index arguments.
5714         (gl_linked_remove): Update.
5715         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
5716         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
5717         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
5718         field to 'size_t'.
5719         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
5720         gl_tree_search. Add start_index, end_index arguments.
5721         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
5722         start_index, end_index arguments.
5723         (gl_tree_remove): Update.
5724         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
5725         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
5726         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
5727         function.
5728         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
5729         gl_tree_search. Add start_index, end_index arguments.
5730         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
5731         start_index, end_index arguments.
5732         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
5733         Update.
5734         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
5735
5736 2006-10-05  Bruno Haible  <bruno@clisp.org>
5737
5738         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
5739
5740         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
5741         fwriteerror_temp): New declarations.
5742         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
5743         (descriptors): New variable.
5744         (cleanup): First, close the descriptors.
5745         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
5746         fclose_temp, fwriteerror_temp): New functions.
5747
5748 2006-10-04  Jim Meyering  <jim@meyering.net>
5749
5750         * lib/fts.c (fts_open): Tiny comment change.
5751
5752 2006-10-04  Bruno Haible  <bruno@clisp.org>
5753
5754         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
5755         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
5756         gl_LOCK_BODY.
5757         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
5758         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
5759         gl_LOCK_EARLY_BODY.
5760         (gl_LOCK): Require gl_LOCK_BODY.
5761
5762 2006-10-04  Bruno Haible  <bruno@clisp.org>
5763
5764         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
5765         (gl_oset_search_atleast): New declaration.
5766         (struct gl_oset_implementation): Add field 'search_atleast'.
5767         (gl_oset_search_atleast): New inline function.
5768         * lib/gl_oset.c (gl_oset_search_atleast): New function.
5769         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
5770         (gl_array_oset_implementation): Update.
5771         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
5772         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
5773         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
5774
5775 2006-10-04  Bruno Haible  <bruno@clisp.org>
5776
5777         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
5778
5779 2006-10-03  Bruno Haible  <bruno@clisp.org>
5780
5781         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
5782         from gl_avltreehash_list_implementation.
5783
5784 2006-10-03  Bruno Haible  <bruno@clisp.org>
5785
5786         * lib/gl_oset.c (gl_oset_add): Fix return type.
5787
5788 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
5789
5790         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
5791
5792 2006-10-02  Eric Blake  <ebb9@byu.net>
5793
5794         * modules/strnlen (Depends-on): Add extensions.
5795
5796 2006-10-02  Eric Blake  <ebb9@byu.net>
5797
5798         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
5799         definition in 2.60+.
5800
5801 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
5802
5803         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
5804         checks.
5805
5806 2006-10-02  Bruno Haible  <bruno@clisp.org>
5807
5808         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
5809         to the AUTOMAKE_OPTIONS.
5810         Reported by Jim Meyering.
5811
5812 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
5813
5814         Work around bug in Solaris 10 /proc file system:
5815         /proc/self/fd/NNN/.. isn't the parent directory of
5816         the directory whose file descriptor is NNN.  This needs to
5817         be worked around at run time, not compile time, since a
5818         program might be built on Solaris 8, where things work, and
5819         run on Solaris 10.
5820         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
5821         to use the following interface instead:
5822         (OPENAT_BUFFER_SIZE): New macro.
5823         (openat_proc_name): New function.
5824         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
5825         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
5826         Likewise.
5827         * lib/openat-proc.c: New file.
5828         * modules/openat (Files): Add lib/openat-proc.c.
5829         (Depends-on): Add same-inode, stdbool.
5830         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
5831
5832 2006-09-29  Bruno Haible  <bruno@clisp.org>
5833
5834         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
5835         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
5836         argument. Set stdout_closed before testing for ferror, not after.
5837         (fwriteerror, fwriteerror_no_ebadf): New functions.
5838
5839 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5840
5841         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
5842
5843 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
5844
5845         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
5846         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
5847
5848 2006-09-28  Jim Meyering  <jim@meyering.net>
5849
5850         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
5851         Include <unistd.h>.
5852
5853 2006-09-28  Bruno Haible  <bruno@clisp.org>
5854
5855         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
5856         * modules/linkedhash-list (Depends-on): Likewise.
5857         * modules/rbtreehash-list (Depends-on): Likewise.
5858
5859 2006-09-28  Bruno Haible  <bruno@clisp.org>
5860
5861         * lib/strndup.h: Simplify the redefinition of strndup.
5862         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
5863         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
5864
5865 2006-09-28  Bruno Haible  <bruno@clisp.org>
5866
5867         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
5868         * lib/gl_linkedhash_list.c: Likewise.
5869         * lib/gl_rbtreehash_list.c: Likewise.
5870
5871 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
5872
5873         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
5874         getaddrinfo.
5875
5876         * lib/__fpending.h: Don't include <stdio_ext.h> unless
5877         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
5878         it causes <stdio_ext.h> to cause a compile-time error.
5879         Problem reported by Nelson H. F. Beebe.
5880         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
5881         of HAVE_DECL___PENDING.
5882
5883         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
5884         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
5885         declaration.
5886
5887 2006-09-27  Jim Meyering  <jim@meyering.net>
5888
5889         This file could end up with a definition for a function
5890         named __strndup, rather than rpl_strndup on a system with
5891         incomplete weak_alias support.
5892         * lib/strndup.c (strndup): Rename from __strndup.
5893         Remove #defines that used to map __strndup to strndup.
5894         Don't use K&R prototypes.
5895         Remove LIBC-related code, since this file is not sync'd with glibc.
5896         * lib/strndup.h: Revamp, accordingly.
5897         * m4/strndup.m4: Modernize.
5898
5899 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
5900
5901         * modules/savewd (Depends-on): Add 'raise'.
5902         * lib/savewd.c: Include <signal.h>, for 'raise'.
5903
5904 2006-09-26  Jim Meyering  <jim@meyering.net>
5905
5906         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
5907         when we detect Darwin 8.7.0's acl_get_file bug.
5908         Rearrange to perform the new (below) run-test while $LIBS
5909         contains any acl-related library.  Set USE_ACL at the end.
5910         (gl_ACL_GET_FILE): New function.
5911
5912 2006-09-26  Eric Blake  <ebb9@byu.net>
5913
5914         * lib/verror.c: Include <config.h> unconditionally.
5915
5916 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
5917
5918         * modules/clock-time (Maintainer): Add self.
5919         * modules/getlogin_r (Depends-on): Add extensions.
5920
5921 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5922
5923         * modules/clock-time: New module.
5924         * modules/nanosleep (Depends-on): Add clock-time.
5925         * modules/gethrxtime (Depends-on): Likewise.
5926         * modules/gettime (Depends-on): Likewise.
5927         * modules/settime (Depends-on): Likewise.
5928
5929         * modules/fts-lgpl: Depend on openat.
5930         * modules/mkancesdirs: Depend on savewd.
5931         * modules/mkdir-p: Likewise.
5932
5933 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5934
5935         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
5936
5937         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
5938         `gl_have_arbitrary_file_name_length_limit' to
5939         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
5940         actually works between configure runs.
5941
5942 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5943             Bruno Haible  <bruno@clisp.org>
5944
5945         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
5946
5947 2006-09-25  Jim Meyering  <jim@meyering.net>
5948
5949         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
5950         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
5951
5952 2006-09-25  Eric Blake  <ebb9@byu.net>
5953
5954         * gnulib-tool (func_import, func_create_testdir): Fix typos in
5955         exec's in 2006-09-18 patch when shuffling fds.
5956
5957 2006-09-25  Bruno Haible  <bruno@clisp.org>
5958
5959         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
5960         Reported by Jim Meyering.
5961
5962 2006-09-24  Jim Meyering  <jim@meyering.net>
5963
5964         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
5965         compare a pointer against a literal "0".  That caused failures with
5966         at least HP-UX's hpcc.
5967
5968 2006-09-22  Simon Josefsson  <jas@extundo.com>
5969
5970         * modules/gc-sha1:
5971         * modules/gc-md4:
5972         * modules/gc-hmac-sha1:
5973         * modules/gc-hmac-md5:
5974         * modules/gc-des:
5975         * modules/gc-arcfour: Distribute more files.
5976
5977 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5978
5979         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
5980         (gl_linked_iterator_from_to): Initialize struct completely.
5981         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
5982         (gl_tree_iterator_from_to): Likewise
5983         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
5984         * lib/gl_array_list.c [lint] (gl_array_iterator)
5985         (gl_array_iterator_from_to): Likewise.
5986         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
5987         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
5988         (gl_carray_iterator_from_to): Likewise.
5989
5990         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
5991         * lib/md4.c (md4_process_block): Remove unused variable.
5992         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
5993         parentheses for clarity.
5994
5995 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5996
5997         * modules/bison-i18n (Depends-on): Add gettext.
5998
5999 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6000
6001         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
6002         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
6003         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
6004         also add missing comma that caused broken test.
6005         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
6006         stdlib.h, for `abort'.
6007         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
6008         variables.
6009         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
6010         include unistd.h if present, for `rmdir'.
6011         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
6012         variables.
6013         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
6014         in the process include standard headers for prototypes.
6015         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
6016         gets declared on GNU/Linux.
6017         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
6018         unistd.h, for `rmdir'.
6019         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
6020
6021         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
6022         always true.
6023         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
6024
6025         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
6026
6027 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6028
6029         * gnulib-tool (func_version): Create output all at once.  This
6030         may help avoid triggering unnecessary SIGPIPEs, and at any
6031         rate it doesn't hurt.
6032
6033 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6034             Bruno Haible  <bruno@clisp.org>
6035
6036         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
6037         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
6038         * m4/signed.m4 (bh_C_SIGNED): Likewise.
6039
6040         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
6041         (gl_FUNC_VASPRINTF): Invoke it.
6042
6043 2006-09-22  Bruno Haible  <bruno@clisp.org>
6044
6045         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
6046         getloadavg.c as first argument.
6047
6048 2006-09-22  Bruno Haible  <bruno@clisp.org>
6049
6050         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
6051         at the beginning of the gl_INIT macro.
6052         * modules/getloadavg (configure.ac): Pass $gl_source_base to
6053         gl_GETLOADAVG.
6054
6055 2006-09-22  Bruno Haible  <bruno@clisp.org>
6056
6057         * gnulib-tool (func_create_megatestdir): Don't include the config-h
6058         module.
6059         Suggested by Ralf Wildenhues.
6060
6061 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
6062
6063         Import this patch from libc:
6064
6065         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
6066
6067         * lib/regex_internal.c (re_string_reconstruct): Handle
6068         offset < pstr->valid_raw_len && pstr->offsets_needed case.
6069         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
6070         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
6071         re_string_context_at.
6072
6073         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
6074         now requires it.
6075         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
6076         gl_REGEX now does it for us.
6077         (gl_REGEX): Add test taken from
6078         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
6079
6080         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
6081         Check that large offsets work.  Modernize Autoconf usages.
6082         Prefer "yes" to mean a good thing rather than a bad.
6083         Don't put "#define mkstemp" in config.h, as this might interfere
6084         with standard system headers that "#define mkstemp mkstemp64".
6085
6086         * modules/mkstemp (Depends-on): Add extensions, so that
6087         mkstemp is visible on some platforms.
6088         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
6089         (Include): Change to "mkstemp.h" from <stdlib.h>.
6090         (Files): Add mkstemp.h.
6091
6092         * lib/mkstemp.h: New file, since some standard headers
6093         #define mkstemp.
6094         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
6095         Include "mkstemp.h".
6096         Make the _LIBC code resemble glibc original more,
6097         e.g., use K&R style.
6098         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
6099         (mkstemp): Remove, since mkstemp.h does this for us.
6100         * lib/stdlib--.h: Include mkstemp.h.
6101
6102         Import this patch from libc:
6103
6104         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
6105
6106         * lib/tempname.c (__gen_tempname): Change attempts_min
6107         into a macro.  Use preprocessor to decide how to initialize
6108         attempts [Coverity CID 67].
6109
6110 2006-09-20  Bruno Haible  <bruno@clisp.org>
6111
6112         * lib/mkdtemp.c: Import from libc.
6113         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
6114                 * sysdeps/posix/tempname.c (__gen_tempname): Change
6115                 attempts_min into a macro.  Use preprocessor to decide how to
6116                 initialize attempts [Coverity CID 67].
6117         2001-11-27  Paul Eggert  <eggert@twinsun.com>
6118                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
6119                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
6120
6121 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6122
6123         * gnulib-tool (func_exit): New function, to allow to pass the
6124         exit status portably through the trap.  Use everywhere.
6125         (--help, --version): Signal a write error.
6126         (trap): catch SIGPIPE, for write errors.
6127         Exit at the end of the trap, with the correct exit status.
6128
6129 2006-09-19  Karl Berry  <karl@gnu.org>
6130
6131         * doc/gnulib.texi: note about the license texinfo files.
6132
6133 2006-09-19  Eric Blake  <ebb9@byu.net>
6134
6135         * gnulib-tool: Avoid space-tab.
6136
6137 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
6138
6139         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
6140         that prevented coreutils 6.1 from building.  Problem reported
6141         by Petter Reinholdtsen.
6142
6143 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
6144
6145         * gnulib-tool (avoidlist): Fix typo that broke options like
6146         --avoid=lock that are used by coreutils bootstrap.
6147
6148 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
6149
6150         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
6151         more systematically.
6152
6153 2006-09-18  Jim Meyering  <jim@meyering.net>
6154
6155         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
6156
6157 2006-09-18  Bruno Haible  <bruno@clisp.org>
6158
6159         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
6160
6161 2006-09-18  Bruno Haible  <bruno@clisp.org>
6162
6163         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
6164         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
6165         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
6166         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
6167         * m4/gettext.m4: Require autoconf >= 2.52.
6168         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
6169         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
6170         of gl_cv_header_inttypes_h.
6171
6172 2006-09-18  Bruno Haible  <bruno@clisp.org>
6173
6174         * lib/javaversion.c: Include configmake.h.
6175
6176 2006-09-18  Bruno Haible  <bruno@clisp.org>
6177
6178         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
6179         avoid that the while loops be executed in a subshell.
6180
6181 2006-09-18  Bruno Haible  <bruno@clisp.org>
6182
6183         * MODULES.html.sh (func_module): Break long lines.
6184         Suggested by Bruce Korb <bkorb@gnu.org>.
6185
6186 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6187
6188         Speed up by a factor of 1.12.
6189         * gnulib-tool (nl): New variable.
6190         (func_import): Rewrite include directive extraction to only read each
6191         directive once.
6192
6193 2006-09-17  Bruno Haible  <bruno@clisp.org>
6194
6195         * modules/javaversion (Makefile.am): Remove DEFS setting.
6196         (Depends-on): Add configmake, for PKGDATADIR definition.
6197
6198 2006-09-17  Bruno Haible  <bruno@clisp.org>
6199
6200         * gnulib-tool (func_create_testdir): Rewrite all files at once.
6201
6202 2006-09-17  Bruno Haible  <bruno@clisp.org>
6203
6204         * gnulib-tool (func_append): New function, stolen from libtool.m4.
6205         (func_modules_transitive_closure, func_modules_add_dummy,
6206         func_modules_to_filelist, func_import, func_create_testdir,
6207         func_create_megatestdir, ...): Use it wherever possible.
6208         Suggested by Ralf Wildenhues.
6209
6210 2006-09-16  Karl Berry  <karl@gnu.org>
6211
6212         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
6213         to avoid sectioning errors.
6214         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
6215         [ifinfo]: blank line after @center-ed titles.
6216         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
6217         Spell FSF address consistently with others.
6218         (These changes approved by rms.)
6219
6220 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6221
6222         Speed up by a factor of 1.61.
6223         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
6224         already checked module names again.
6225
6226 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6227
6228         Speed up by a factor of 1.13.
6229         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
6230         for new_files, and the input to func_add_or_update.
6231
6232 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6233
6234         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
6235         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
6236
6237 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
6238
6239         * modules/mkancesdirs (Depends-on): Add fcntl.
6240         * modules/savewd: New file.
6241         * MODULES.html.sh (File system functions): Add savewd.
6242
6243         * modules/configmake (Makefile.am): Add support for the
6244         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
6245
6246 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
6247
6248         * m4/savewd.m4: New file.
6249
6250 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
6251
6252         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
6253         (dirchownmod): New arg FD.  All callers changed.
6254         Use FD rather than opening the directory ourself, as opening is
6255         now the caller's responsibility.
6256         * lib/dirchownmod.h: Likewise.
6257         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
6258         hosts that require <sys/types.h> before <sys/stat.h>.  Include
6259         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
6260         (test_dir): Remove.
6261         (mkancesdirs): Return length of prefix of FILE that has already
6262         been made, or -2 if there is a child doing the work.  Redo
6263         algorithm so that it is O(N) rather than O(N**2).  Optimize away
6264         ".", and treat ".." specially since it might stray back into
6265         already-created areas.  Use a subprocess if necessary.  New arg
6266         WD; all users changed.  MAKE_DIR function should now return 1
6267         if it creates a directory that is not readable.  Return -2 if
6268         a child process is spun off.
6269         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
6270         Adjust signature to match code.
6271         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
6272         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
6273         all users changed.
6274         * lib/savewd.c, lib/savewd.h: New files.
6275
6276 2006-09-15  Jim Meyering  <jim@meyering.net>
6277
6278         * modules/rename-dest-slash: New module.
6279         * MODULES.html.sh (posix_compat): Add it here.
6280
6281         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
6282
6283 2006-09-15  Jim Meyering  <jim@meyering.net>
6284
6285         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
6286         file.
6287
6288         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
6289
6290 2006-09-15  Jim Meyering  <jim@meyering.net>
6291
6292         * lib/rename-dest-slash.c (has_trailing_slash): Use
6293         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
6294         (rpl_rename_dest_slash): Perform the cheaper trailing slash
6295         test before testing whether SRC is a directory.
6296         Suggestions from Bruno Haible.
6297
6298         Avoid a warning about an unused variable.
6299         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
6300         into the #ifdef block where it's used.
6301
6302         * lib/rename-dest-slash.c: New file.
6303
6304 2006-09-14  Bruno Haible  <bruno@clisp.org>
6305
6306         * lib/allocsa.c: Include <config.h> unconditionally.
6307         * lib/asnprintf.c: Likewise.
6308         * lib/asprintf.c: Likewise.
6309         * lib/c-strcasecmp.c: Likewise.
6310         * lib/c-strcasestr.c: Likewise.
6311         * lib/c-strncasecmp.c: Likewise.
6312         * lib/c-strstr.c: Likewise.
6313         * lib/classpath.c: Likewise.
6314         * lib/clean-temp.c: Likewise.
6315         * lib/concatpath.c: Likewise.
6316         * lib/copy-file.c: Likewise.
6317         * lib/csharpcomp.c: Likewise.
6318         * lib/csharpexec.c: Likewise.
6319         * lib/execute.c: Likewise.
6320         * lib/fatal-signal.c: Likewise.
6321         * lib/findprog.c: Likewise.
6322         * lib/fwriteerror.c: Likewise.
6323         * lib/gl_array_list.c: Likewise.
6324         * lib/gl_array_oset.c: Likewise.
6325         * lib/gl_avltree_list.c: Likewise.
6326         * lib/gl_avltree_oset.c: Likewise.
6327         * lib/gl_avltreehash_list.c: Likewise.
6328         * lib/gl_carray_list.c: Likewise.
6329         * lib/gl_linked_list.c: Likewise.
6330         * lib/gl_linkedhash_list.c: Likewise.
6331         * lib/gl_list.c: Likewise.
6332         * lib/gl_oset.c: Likewise.
6333         * lib/gl_rbtree_list.c: Likewise.
6334         * lib/gl_rbtree_oset.c: Likewise.
6335         * lib/gl_rbtreehash_list.c: Likewise.
6336         * lib/imaxabs.c: Likewise.
6337         * lib/imaxdiv.c: Likewise.
6338         * lib/javacomp.c: Likewise.
6339         * lib/javaexec.c: Likewise.
6340         * lib/javaversion.c: Likewise.
6341         * lib/linebreak.c: Likewise.
6342         * lib/localcharset.c: Likewise.
6343         * lib/lock.c: Likewise.
6344         * lib/mbchar.c: Likewise.
6345         * lib/mbswidth.c: Likewise.
6346         * lib/mkdtemp.c: Likewise.
6347         * lib/pipe.c: Likewise.
6348         * lib/printf-args.c: Likewise.
6349         * lib/printf-parse.c: Likewise.
6350         * lib/progname.c: Likewise.
6351         * lib/progreloc.c: Likewise.
6352         * lib/readlink.c: Likewise.
6353         * lib/sh-quote.c: Likewise.
6354         * lib/stpcpy.c: Likewise.
6355         * lib/stpncpy.c: Likewise.
6356         * lib/strcasecmp.c: Likewise.
6357         * lib/strcasestr.c: Likewise.
6358         * lib/strcspn.c: Likewise.
6359         * lib/striconv.c: Likewise.
6360         * lib/strncasecmp.c: Likewise.
6361         * lib/strnlen1.c: Likewise.
6362         * lib/strstr.c: Likewise.
6363         * lib/strtok_r.c: Likewise.
6364         * lib/tls.c: Likewise.
6365         * lib/tmpdir.c: Likewise.
6366         * lib/unicodeio.c: Likewise.
6367         * lib/unsetenv.c: Likewise.
6368         * lib/vasnprintf.c: Likewise.
6369         * lib/vasprintf.c: Likewise.
6370         * lib/wait-process.c: Likewise.
6371         * lib/xallocsa.c: Likewise.
6372         * lib/xsetenv.c: Likewise.
6373         * lib/xstriconv.c: Likewise.
6374
6375 2006-09-13  Simon Josefsson  <jas@extundo.com>
6376
6377         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
6378         that internally, suggested by Ralf Wildenhues
6379         <Ralf.Wildenhues@gmx.de>.
6380
6381 2006-09-13  Simon Josefsson  <jas@extundo.com>
6382
6383         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
6384         @LIBOBJS@.
6385         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6386
6387 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
6388
6389         * lib/_fpending.c: Include <config.h> unconditionally, since we no
6390         longer worry about uses that don't define HAVE_CONFIG_H.
6391         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
6392         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
6393         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
6394         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
6395         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
6396         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
6397         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
6398         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
6399         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
6400         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
6401         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
6402         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
6403         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
6404         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
6405         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
6406         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
6407         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
6408         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
6409         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
6410         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
6411         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
6412         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
6413         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
6414         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
6415         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
6416         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
6417         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
6418         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
6419         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
6420         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
6421         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
6422         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
6423         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
6424         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
6425         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
6426         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
6427         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
6428         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
6429         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
6430         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
6431         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
6432         Likewise.
6433
6434 2006-09-13  Eric Blake  <ebb9@byu.net>
6435
6436         * lib/getopt.c: Fix typo in last commit.
6437
6438 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
6439
6440         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
6441         dgettext.
6442
6443 2006-09-12  Jim Meyering  <jim@meyering.net>
6444
6445         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
6446         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
6447         Reported by Nelson H. F. Beebe.
6448
6449 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
6450
6451         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
6452         program_invocation_name and program_invocation_short_name are
6453         initialized.
6454         * lib/argp-namefrob.h: Move declarations of program_invocation_name
6455         and program_invocation_short_name to argp.h, so they are visible
6456         to user programs.
6457         * lib/argp.h: Likewise
6458
6459 2006-09-10  Bruno Haible  <bruno@clisp.org>
6460
6461         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
6462         m4/inttypes_h.m4, m4/uintmax_t.m4.
6463
6464 2006-09-10  Bruno Haible  <bruno@clisp.org>
6465
6466         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
6467         gl_AC_TYPE_UINTMAX_T.
6468
6469 2006-09-10  Bruno Haible  <bruno@clisp.org>
6470
6471         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
6472
6473 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
6474
6475         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
6476         convention.  Text proposed by Bruno Haible.
6477         (struct argp_option): Document the use of N_() wrappers.
6478
6479         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
6480         '\v', and translate the two parts separately, instead of feeding
6481         the whole string to gettext.  This allows to exclude
6482         '\v' from the strings visible to the translator by writing doc
6483         strings as N_("..") "\v" N_("..").
6484
6485 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
6486
6487         * config/srclist.txt: Undo latest change; the bug was fixed.
6488
6489 2006-09-09  Bruno Haible  <bruno@clisp.org>
6490
6491         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
6492         assignments if building a library without libtool.
6493         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
6494         in func_emit_lib_Makefile_am.
6495         (func_import): When building a static library libfoo.a, arrange to
6496         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
6497         (func_create_testdir): Likewise.
6498         * modules/gc (configure.ac, Makefile.am): If building statically,
6499         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
6500         * modules/iconvme (configure.ac, Makefile.am): Likewise.
6501         * modules/striconv (configure.ac, Makefile.am): Likewise.
6502         Based on a suggestion by Ralf Wildenhues.
6503
6504 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
6505
6506         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
6507         Check for unistd.h too, since Autoconf doesn't assume POSIX.
6508         Also:
6509
6510         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
6511         Add year_2050_test to catch glibc bug 2821
6512         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
6513
6514         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
6515         Prefer #ifdef to #if.
6516
6517         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
6518         Return from 'main' instead of calling 'exit'.
6519
6520 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
6521
6522         * lib/mktime.c (guess_time_tm): Fix bug where mktime
6523         returned the maximum time_t value rather than (time_t) -1.
6524         Problem originally reported by William Bardwell
6525         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
6526
6527         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
6528         Moved to here ...
6529         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
6530         ... from here.
6531
6532 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
6533
6534         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
6535         2821 is fixed.
6536
6537 2006-09-08  Jim Meyering  <jim@meyering.net>
6538
6539         Don't make generated files read-only.  That would bother too many
6540         people.  However, do retain the ability to work when targets are
6541         read-only: remove the destination and temporary files before writing
6542         them (when generated via sed or echo), or by using the -f option for
6543         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
6544         * modules/alloca-opt, modules/argz, modules/arpa_inet:
6545         * modules/byteswap, modules/configmake, modules/fcntl:
6546         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
6547         * modules/localcharset, modules/netinet_in, modules/poll:
6548         * modules/stdbool, modules/stdint, modules/sys_select:
6549         * modules/sys_socket, modules/sys_stat, modules/sysexits:
6550
6551 2006-09-08  Jim Meyering  <jim@meyering.net>
6552
6553         Avoid new build failure on FreeBSD 6.0.
6554         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
6555         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
6556         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
6557
6558 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6559
6560         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
6561
6562 2006-09-07  Jim Meyering  <jim@meyering.net>
6563
6564         Fix global typo in last change: use chmod u-w, not chmod u-x.
6565         Spotted by Paul Eggert and Bruce Korb.
6566         * modules/alloca-opt, modules/argz, modules/arpa_inet:
6567         * modules/byteswap, modules/configmake, modules/fcntl:
6568         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
6569         * modules/localcharset, modules/netinet_in, modules/poll:
6570         * modules/stdbool, modules/stdint, modules/sys_select:
6571         * modules/sys_socket, modules/sys_stat, modules/sysexits:
6572
6573 2006-09-06  Jim Meyering  <jim@meyering.net>
6574
6575         Make generated files be read-only.
6576         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
6577         Ensure that each generated file is now read-only.
6578         * modules/argz: Likewise.
6579         * modules/arpa_inet: Likewise.
6580         * modules/byteswap: Likewise.
6581         * modules/configmake: Likewise.
6582         * modules/fcntl: Likewise.
6583         * modules/fnmatch: Likewise.
6584         * modules/getopt: Likewise.
6585         * modules/glob: Likewise.
6586         * modules/inttypes: Likewise.
6587         * modules/netinet_in: Likewise.
6588         * modules/poll: Likewise.
6589         * modules/stdbool: Likewise.
6590         * modules/stdint: Likewise.
6591         * modules/sys_select: Likewise.
6592         * modules/sys_socket: Likewise.
6593         * modules/sys_stat: Likewise.
6594         * modules/sysexits: Likewise.
6595         * modules/localcharset: Same as above, but continue using temporary
6596         file named "t-$@" (why different?) rather than the "$@-t" used
6597         everywhere else.
6598
6599         * modules/sysexits (Makefile.am): Replace literal occurrences
6600         of "sysexit.h" more readable, and more consistent, "$@".
6601
6602 2006-09-06  Bruno Haible  <bruno@clisp.org>
6603
6604         * modules/striconv: New file.
6605         * modules/xstriconv: New file.
6606         * MODULES.html.sh (Internationalization functions): Add striconv,
6607         xstriconv.
6608
6609 2006-09-06  Bruno Haible  <bruno@clisp.org>
6610
6611         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
6612         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
6613         not using libtool correctly.
6614
6615 2006-09-06  Bruno Haible  <bruno@clisp.org>
6616
6617         * lib/striconv.h: New file.
6618         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
6619         iconvstring.c.
6620         * lib/xstriconv.h: New file.
6621         * lib/xstriconv.c: New file.
6622
6623 2006-09-06  Bruno Haible  <bruno@clisp.org>
6624
6625         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
6626         lib_..._LDFLAGS.
6627
6628 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6629
6630         * lib/argz_.h: Sync from Libtool.
6631
6632         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
6633                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6634
6635         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
6636
6637 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
6638
6639         * modules/trim: New file.
6640
6641 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
6642
6643         * lib/trim.h: New file.
6644         * lib/trim.c: New file.
6645
6646 2006-09-05  Bruno Haible  <bruno@clisp.org>
6647
6648         * MODULES.html.sh (String handling): Add trim.
6649
6650 2006-09-04  Karl Berry  <karl@gnu.org>
6651
6652         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
6653         until next release.
6654
6655 2006-09-03  Bruno Haible  <bruno@clisp.org>
6656
6657         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
6658         correctly.
6659
6660 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
6661
6662         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
6663         not gl_GETLOADAVG.  Omit unneeded semicolons.
6664         Problems reported by Ralf Wildenhues in
6665         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
6666         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
6667         at the end, which is the usual gnulib style.
6668
6669         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
6670         of doing all the work ourselves.
6671         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
6672         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
6673
6674 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
6675
6676         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
6677         Problem reported by Ralf Wildenhues in
6678         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
6679
6680         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
6681         HAVE_STRUCT_STATFS_F_FSTYPENAME.
6682
6683 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
6684
6685         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
6686         yesterday's patch by changing test -n to test -z.
6687
6688 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
6689
6690         * modules/getloadavg (Files): Add m4/getloadavg.m4.
6691         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
6692         the former is now obsolescent.
6693
6694         * modules/chdir-long (Depends-on): Add fcntl.
6695
6696 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
6697
6698         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
6699         obsolescent, and programs should use gnulib instead.
6700         * m4/getloadavg.m4: New file, with contents taken from Autoconf
6701         but with prefixes changed.
6702
6703 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
6704
6705         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
6706         or stdbool.h, because they might not exist while configuring.
6707
6708         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
6709         Don't include unistd.h or limits.h; not needed, since chdir-long.h
6710         does that for us.
6711         (O_DIRECTORY): Remove.
6712
6713 2006-08-31  Eric Blake  <ebb9@byu.net>
6714
6715         * gnulib-tool: Don't let emacs change spaces to TAB.
6716
6717 2006-08-31  Bruno Haible  <bruno@clisp.org>
6718
6719         * gnulib-tool: When calling func_import more than once, do it in a
6720         subshell.
6721         Reported by Eric Blake <ebb9@byu.net>.
6722
6723 2006-08-31  Bruno Haible  <bruno@clisp.org>
6724
6725         * gnulib-tool (nl): Remove variable.
6726         (sed_transform_lib_file): Use more robust test for config-h module.
6727         (func_import): Fix typo in 2006-08-25 patch.
6728
6729 2006-08-31  Bruno Haible  <bruno@clisp.org>
6730
6731         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
6732         specified, augment Makefile.am variables instead of assigning them.
6733
6734 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
6735
6736         Work around a bug in both the Linux and SunOS 64-bit kernels:
6737         nanosleep mishandles sleeps for longer than 2**31 seconds.
6738         Problem reported by Frank v Waveren in
6739         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
6740         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
6741         Check for nanosleep bug.
6742         (LIB_NANOSLEEP): Append clock_gettime library if needed.
6743
6744 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
6745
6746         Work around a bug in both the Linux and SunOS 64-bit kernels:
6747         nanosleep mishandles sleeps for longer than 2**31 seconds.
6748         Problem reported by Frank v Waveren in
6749         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
6750         * lib/nanosleep.c (BILLION): New constant.
6751         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
6752         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
6753         implementation.
6754
6755 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
6756
6757         * modules/nanosleep (Depends-on): Add gettime.
6758
6759 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
6760         and Simon Josefsson  <jas@extundo.com>
6761         and Oskar Liljeblad  <oskar@osk.mine.nu>
6762
6763         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
6764         * gnulib-tool (func_import): New license type 'unmodifiable license
6765         text'.
6766         * modules/fdl: Use it.  Longer description.
6767         * module/gpl, module/lgpl: New files.
6768
6769 2006-08-30  Jim Meyering  <jim@meyering.net>
6770
6771         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
6772         shadowing the parameter.
6773
6774 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6775
6776         Sync from Libtool:
6777
6778         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6779
6780         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
6781         sharing with gnulib.  Report by Eric Blake.
6782
6783 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
6784
6785         * modules/isapipe: New file.
6786         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
6787
6788 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
6789
6790         * modules/configmake (Makefile.am): Add a comment, and omit
6791         the CONFIGMAKE_ prefix from generated macro names.  Suggested
6792         by Bruno Haible.
6793
6794 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
6795
6796         * m4/isapipe.m4: New file.
6797
6798 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
6799
6800         * lib/isapipe.c, lib/isapipe.h: New files.
6801
6802 2006-08-29  Jim Meyering  <jim@meyering.net>
6803
6804         * modules/configmake (Makefile.am): Make configmake.h depend on
6805         Makefile.  Otherwise, a stale configmake.h could hang around.
6806
6807 2006-08-29  Eric Blake  <ebb9@byu.net>
6808
6809         * lib/error.c (error_at_line, print_errno_message): Match libc, after
6810         resolution of upstream bug 3044.
6811
6812 2006-08-29  Bruno Haible  <bruno@clisp.org>
6813
6814         * modules/localcharset (Depends-on): Add configmake.
6815         (Makefile.am): Remove setting of LIBDIR through DEFS.
6816
6817 2006-08-29  Bruno Haible  <bruno@clisp.org>
6818
6819         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
6820         defined.
6821
6822 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
6823
6824         * modules/fcntl: New file.
6825         * modules/chdir-safer (Depends-on): Add fcntl.
6826         * modules/fts: Likewise.
6827         * modules/mkdir-p: Likewise.
6828
6829         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
6830         This undoes the most recent change, since we're now addressing the
6831         problem in a different way.
6832
6833         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
6834         into output, since the output might be called Makefile.am even
6835         if $makefile_name is something different.
6836         (func_import): Use $makefile_am rather than
6837         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
6838         empty.
6839
6840         * modules/inttypes (Files): Add m4/inttypes-h.m4.
6841
6842 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
6843
6844         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
6845         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
6846         recent change to stdint.m4, since we're now addressing the problem in a
6847         different way.
6848
6849 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
6850
6851         * m4/fcntl_h.m4: New file.
6852
6853 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
6854
6855         * lib/fcntl_.h: New file.
6856         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
6857         the fcntl module.
6858         * lib/dirchownmod.c: Likewise.
6859         * lib/fts.c: Likewise.
6860
6861         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
6862         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
6863         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
6864         just before including <inttypes.h>, to avoid circular inclusion.
6865
6866 2006-08-28  Jim Meyering  <jim@meyering.net>
6867
6868         * doc/visibility.texi: Actually read and correct the grammar of the
6869         sentence affected by yesterday's change.
6870
6871 2006-08-28  Eric Blake  <ebb9@byu.net>
6872
6873         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
6874         needs wrapper.
6875
6876 2006-08-28  Eric Blake  <ebb9@byu.net>
6877
6878         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
6879
6880 2006-08-28  Eric Blake  <ebb9@byu.net>
6881
6882         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
6883
6884 2006-08-28  Bruno Haible  <bruno@clisp.org>
6885
6886         * modules/c-strstr: New file, from GNU gettext.
6887         * MODULES.html.sh (String handling): Add c-strstr.
6888
6889 2006-08-28  Bruno Haible  <bruno@clisp.org>
6890
6891         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
6892         macros.
6893         Reported by Eric Blake.
6894
6895 2006-08-28  Bruno Haible  <bruno@clisp.org>
6896
6897         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
6898         (VASNPRINTF): Return a string of length > INT_MAX without failing.
6899         * lib/vasprintf.c: Include errno.h, limits.h.
6900         (EOVERFLOW): New fallback definition.
6901         (vasprintf): Test here whether the string length is > INT_MAX.
6902         * lib/vsnprintf.c: Include errno.h, limits.h.
6903         (EOVERFLOW): New fallback definition.
6904         (vsnprintf): Fix bug when generated string was too long for the buffer.
6905         Test here whether the string length is > INT_MAX.
6906
6907 2006-08-28  Bruno Haible  <bruno@clisp.org>
6908
6909         * lib/inttypes_.h (SCNX*): Remove definitions.
6910         Reported by Eric Blake.
6911
6912 2006-08-28  Bruno Haible  <bruno@clisp.org>
6913
6914         * lib/c-strstr.h: New file, from GNU gettext.
6915         * lib/c-strstr.c: New file, from GNU gettext.
6916
6917 2006-08-28  Bruno Haible  <bruno@clisp.org>
6918
6919         * gnulib-tool: Reorder some statements.
6920
6921 2006-08-28  Bruno Haible  <bruno@clisp.org>
6922
6923         * gnulib-tool: New option --makefile-name.
6924         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
6925         $makefile_name.
6926         (func_import): Write $makefile_name to the cache file, and read it from
6927         there unless explicitly specified. Use $makefile_name as file name
6928         instead of Makefile.am. Adjust the recommendations accordingly.
6929
6930 2006-08-28  Bruno Haible  <bruno@clisp.org>
6931
6932         * gnulib-tool (func_verify_module): Check against misapplying patch.
6933
6934 2006-08-28  Bruno Haible  <bruno@clisp.org>
6935
6936         * gnulib-tool (func_relativize, func_relconcat): New functions.
6937         Give an error if --local-dir is given with --update.
6938         Remove trailing slashes from $local_gnulib_dir.
6939         (func_import): Store the relativized $local_gnulib_dir in
6940         gnulib-cache.m4, and read it from there if not specified explicitly.
6941
6942 2006-08-28  Bruno Haible  <bruno@clisp.org>
6943
6944         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
6945         is the current directory. Respect also $local_gnulib_dir.
6946
6947 2006-08-28  Bruno Haible  <bruno@clisp.org>
6948             Simon Josefsson  <jas@extundo.com>
6949
6950         BeOS portability.
6951         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
6952
6953 2006-08-27  Jim Meyering  <jim@meyering.net>
6954
6955         * doc/visibility.texi: Remove duplicate word: "pointer".
6956
6957 2006-08-26  Bruno Haible  <bruno@clisp.org>
6958
6959         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
6960         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
6961         (Makefile.am): Create inttypes.h from inttypes_.h.
6962         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
6963
6964         * modules/imaxabs: New file.
6965
6966         * modules/imaxdiv: New file.
6967
6968 2006-08-26  Bruno Haible  <bruno@clisp.org>
6969
6970         * m4/inttypes.m4: New file.
6971         * m4/_inttypes_h.m4: Remove file.
6972         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
6973         PRI_MACROS_BROKEN.
6974         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
6975
6976         * m4/imaxabs.m4: New file.
6977
6978         * m4/imaxdiv.m4: New file.
6979
6980 2006-08-26  Bruno Haible  <bruno@clisp.org>
6981
6982         * lib/inttypes_.h: New file.
6983         * lib/inttypes.h: Remove file.
6984         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
6985
6986         * lib/imaxabs.c: New file.
6987
6988         * lib/imaxdiv.c: New file.
6989
6990 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
6991
6992         New config-h module, so that "make" output needn't be cluttered
6993         by -DHAVE_CONFIG_H.
6994         * MODULES.html.sh (Support for building libraries and executables):
6995         Add config-h.
6996         * modules/config-h: New file.
6997         * gnulib-tool (nl, sed_transform_lib_file): New vars.
6998         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
6999         the config-h module is used.
7000
7001         New configmake module, so that "make" output needn't be cluttered
7002         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
7003         * MODULES.html.sh (Support for building libraries and executables):
7004         Add configmake.
7005         * modules/configmake: New file.
7006
7007 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
7008
7009         * m4/config-h.m4: New file.
7010
7011 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
7012
7013         * config/srclist.txt: Add elisp-comp.
7014
7015 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
7016
7017         * MODULES.html.sh (Support for building libraries and executables):
7018         Add elisp-comp.
7019         * build-aux/elisp-comp: New file.
7020         * modules/elisp-comp: New file.
7021
7022 2006-08-24  Bruno Haible  <bruno@clisp.org>
7023
7024         * gnulib-tool (func_create_testdir): Use non-default values of
7025         sourcebase and m4base.
7026
7027 2006-08-24  Bruno Haible  <bruno@clisp.org>
7028
7029         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
7030         HTML structure.
7031
7032 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
7033
7034         * modules/openat (Depends-on): Add lchown.
7035
7036 2006-08-23  Bruno Haible  <bruno@clisp.org>
7037
7038         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
7039         of gl_LOCK_EARLY instead of gl_LOCK.
7040
7041 2006-08-23  Bruno Haible  <bruno@clisp.org>
7042
7043         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
7044         on OSF/1 to no.
7045         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
7046
7047 2006-08-23  Bruno Haible  <bruno@clisp.org>
7048
7049         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
7050         as unusable.
7051
7052         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
7053         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
7054         (gl_LOCK): New macro.
7055
7056 2006-08-22  Simon Josefsson  <jas@extundo.com>
7057
7058         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
7059         to md5 module.
7060
7061 2006-08-22  Simon Josefsson  <jas@extundo.com>
7062
7063         * MODULES.html.sh: Add "Support for maintaining and release
7064         projects".
7065
7066         * build-aux/gnupload: New file, from coreutils.
7067
7068 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
7069
7070         Avoid the need for AC_LIBSOURCES in m4 macros.
7071         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
7072         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
7073         * modules/check-version (EXTRA_DIST): Add check-version.h.
7074         * modules/crc (EXTRA_DIST): Add crc.h.
7075         * modules/des (EXTRA_DIST): Add des.h.
7076         * modules/gc (EXTRA_DIST): Add gc.h.
7077         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
7078         * modules/getline (EXTRA_DIST): Add getline.h.
7079         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
7080         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
7081         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
7082         * modules/md2 (EXTRA_DIST): Add md2.h.
7083         * modules/md4 (EXTRA_DIST): Add md4.h.
7084         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
7085         * modules/read-file (EXTRA_DIST): Add read-file.h.
7086         * modules/readline (EXTRA_DIST): Add readline.h.
7087         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
7088         rijndael-api-fst.h.
7089
7090 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
7091
7092         * m4/rijndael.m4 (gl_ARCFOUR):
7093         * m4/arctwo.m4 (gl_ARCTWO):
7094         * m4/check-version.m4 (gl_CHECK_VERSION):
7095         * m4/crc.m4 (gl_CRC):
7096         * m4/des.m4 (gl_DES):
7097         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
7098         * m4/gc.m4 (gl_GC):
7099         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
7100         * m4/getline.m4 (gl_FUNC_GETLINE):
7101         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
7102         * m4/hmac-md5.m4 (gl_HMAC_MD5):
7103         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
7104         * m4/md2.m4 (gl_MD2):
7105         * m4/md4.m4 (gl_MD4):
7106         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
7107         * m4/read-file.m4 (gl_FUNC_READ_FILE):
7108         * m4/readline.m4 (gl_FUNC_READLINE):
7109         * m4/rijndael.m4 (gl_RIJNDAEL):
7110         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
7111         to get the necessary .h files and whatnot.
7112
7113 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
7114
7115         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
7116         gnulib rather than the other way around.
7117         * config/srclistvars.sh (COREUTILS): Remove.
7118
7119 2006-08-22  Jim Meyering  <jim@meyering.net>
7120
7121         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
7122
7123         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
7124
7125 2006-08-22  Eric Blake  <ebb9@byu.net>
7126
7127         * modules/regexprops-generic: New file.
7128         * MODULES.html.sh (Support for building documentation): List it.
7129
7130 2006-08-22  Eric Blake  <ebb9@byu.net>
7131
7132         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
7133         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
7134         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
7135         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
7136
7137 2006-08-22  Bruno Haible  <bruno@clisp.org>
7138
7139         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
7140         and lib_LTLIBRARIES like the other lib_* variables.
7141
7142 2006-08-22  Bruno Haible  <bruno@clisp.org>
7143
7144         * build-aux/x-to-1.in: New file, from GNU gettext.
7145
7146 2006-08-22  Bruno Haible  <bruno@clisp.org>
7147
7148         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
7149         <utmpx.h> exists.
7150
7151 2006-08-22  Bruno Haible  <bruno@clisp.org>
7152
7153         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
7154         <utmpx.h> exists.
7155
7156 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
7157
7158         BeOS portability.
7159         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
7160         exist.
7161         Problem reported by Bruno Haible.
7162
7163 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
7164
7165         Avoid the need for AC_LIBSOURCES in m4 macros.
7166         * modules/acl (EXTRA_DIST): Add acl.h.
7167         * modules/argmatch (Files): Add m4/argmatch.m4.
7168         (configure.ac): Add gl_ARGMATCH.
7169         (EXTRA_DIST): Renamed from lib_SOURCES, for
7170         consistency with the other modules.  Remove argmatch.c.
7171         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
7172         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
7173         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
7174         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
7175         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
7176         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
7177         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
7178         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
7179         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
7180         * modules/closeout (EXTRA_DIST): Add closeout.h.
7181         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
7182         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
7183         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
7184         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
7185         dirname.h; remove basename.c and stripslash.c.
7186         * modules/exclude (EXTRA_DIST): Add exclude.h.
7187         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
7188         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
7189         * modules/file-type (EXTRA_DIST): Add file-type.h.
7190         * modules/filemode (EXTRA_DIST): Add filemode.h.
7191         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
7192         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
7193         * modules/fpending (EXTRA_DIST): Add __fpending.h.
7194         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
7195         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
7196         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
7197         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
7198         * modules/getdate (EXTRA_DIST): Add getdate.c.
7199         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
7200         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
7201         * modules/getpass (EXTRA_DIST): Add getpass.h.
7202         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
7203         * modules/group-member (EXTRA_DIST): Add group-member.h.
7204         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
7205         * modules/hash (EXTRA_DIST): Add hash.h.
7206         * modules/human (EXTRA_DIST): Add human.h.
7207         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
7208         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
7209         * modules/lchown (EXTRA_DIST): Add lchown.h.
7210         * modules/long-options (EXTRA_DIST): Add long-options.h.
7211         * modules/lstat (EXTRA_DIST): Add lstat.h.
7212         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
7213         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
7214         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
7215         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
7216         * modules/memxor (EXTRA_DIST): Add memxor.h.
7217         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
7218         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
7219         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
7220         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
7221         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
7222         * modules/physmem (EXTRA_DIST): Add physmem.h.
7223         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
7224         * modules/posixver (EXTRA_DIST): Add posixver.h.
7225         * modules/quote (EXTRA_DIST): Add quote.h.
7226         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
7227         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
7228         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
7229         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
7230         regex_internal.h regexec.c.
7231         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
7232         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
7233         * modules/same (EXTRA_DIST): Add same.h.
7234         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
7235         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
7236         * modules/savedir (EXTRA_DIST): Add savedir.h.
7237         * modules/sha1 (EXTRA_DIST): Add sha1.h.
7238         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
7239         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
7240         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
7241         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
7242         * modules/strdup (EXTRA_DIST): Add strdup.h.
7243         * modules/strftime (EXTRA_DIST): Add strftime.h.
7244         * modules/strndup (EXTRA_DIST): Add strndup.h.
7245         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
7246         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
7247         * modules/time_r (EXTRA_DIST): Add time_r.h.
7248         * modules/timespec (EXTRA_DIST): Add timespec.h.
7249         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
7250         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
7251         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
7252         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
7253         * modules/userspec (EXTRA_DIST): Add userspec.h.
7254         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
7255         * modules/utimens (EXTRA_DIST): Add utimens.h.
7256         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
7257         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
7258         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
7259         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
7260         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
7261         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
7262         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
7263         * modules/yesno (EXTRA_DIST): Add yesno.h.
7264
7265 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
7266
7267         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
7268
7269         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
7270         * m4/dev-ino.m4, same-inode.m4: Remove.
7271
7272         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
7273         * m4/acl.m4 (AC_FUNC_ACL):
7274         * m4/backupfile.m4 (gl_BACKUPFILE):
7275         * m4/c-strtod.m4 (gl_C99_STRTOLD):
7276         * m4/canon-host.m4 (gl_CANON_HOST):
7277         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
7278         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
7279         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
7280         * m4/cloexec.m4 (gl_CLOEXEC):
7281         * m4/close-stream.m4 (gl_CLOSE_STREAM):
7282         * m4/closeout.m4 (gl_CLOSEOUT):
7283         * m4/dirfd.m4 (gl_FUNC_DIRFD):
7284         * m4/dirname.m4 (gl_DIRNAME):
7285         * m4/exclude.m4 (gl_EXCLUDE):
7286         * m4/exitfail.m4 (gl_EXITFAIL):
7287         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
7288         * m4/file-type.m4 (gl_FILE_TYPE):
7289         * m4/filemode.m4 (gl_FILEMODE):
7290         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
7291         * m4/fpending.m4 (gl_FUNC_FPENDING):
7292         * m4/fprintftime.m4 (gl_FPRINTFTIME):
7293         * m4/fts.m4 (gl_FUNC_FTS):
7294         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
7295         * m4/getdate.m4 (gl_GETDATE):
7296         * m4/gethrxtime.m4 (gl_GETHRXTIME):
7297         * m4/getpagesize.m4 (gl_GETPAGESIZE):
7298         * m4/getpass.m4 (gl_FUNC_GETPASS):
7299         * m4/gettime.m4 (gl_GETTIME):
7300         * m4/getugroups.m4 (gl_GETUGROUPS):
7301         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
7302         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
7303         * m4/hard-locale.m4 (gl_HARD_LOCALE):
7304         * m4/hash.m4 (gl_HASH):
7305         * m4/idcache.m4 (gl_IDCACHE):
7306         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
7307         * m4/lchown.m4 (gl_FUNC_LCHOWN):
7308         * m4/long-options.m4 (gl_LONG_OPTIONS):
7309         * m4/lstat.m4 (gl_FUNC_LSTAT):
7310         * m4/md5.m4 (gl_MD5):
7311         * m4/memcasecmp.m4 (gl_MEMCASECMP):
7312         * m4/memcoll.m4 (gl_MEMCOLL):
7313         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
7314         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
7315         * m4/memxor.m4 (gl_MEMXOR):
7316         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
7317         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
7318         * m4/modechange.m4 (gl_MODECHANGE):
7319         * m4/mountlist.m4 (gl_MOUNTLIST):
7320         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
7321         * m4/openat.m4 (gl_FUNC_OPENAT):
7322         * m4/pathmax.m4 (gl_PATHMAX):
7323         * m4/physmem.m4 (gl_PHYSMEM):
7324         * m4/posixtm.m4 (gl_POSIXTM):
7325         * m4/posixver.m4 (gl_POSIXVER):
7326         * m4/quote.m4 (gl_QUOTE):
7327         * m4/quotearg.m4 (gl_QUOTEARG):
7328         * m4/readtokens.m4 (gl_READTOKENS):
7329         * m4/readutmp.m4 (gl_READUTMP):
7330         * m4/regex.m4 (gl_REGEX):
7331         * m4/safe-read.m4 (gl_SAFE_READ):
7332         * m4/safe-write.m4 (gl_SAFE_WRITE):
7333         * m4/same.m4 (gl_SAME):
7334         * m4/save-cwd.m4 (gl_SAVE_CWD):
7335         * m4/savedir.m4 (gl_SAVEDIR):
7336         * m4/settime.m4 (gl_SETTIME):
7337         * m4/sha1.m4 (gl_SHA1):
7338         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
7339         * m4/stat-macros.m4 (gl_STAT_MACROS):
7340         * m4/stat-time.m4 (gl_STAT_TIME):
7341         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
7342         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
7343         * m4/strdup.m4 (gl_FUNC_STRDUP):
7344         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
7345         * m4/strndup.m4 (gl_FUNC_STRNDUP):
7346         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
7347         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
7348         * m4/time_r.m4 (gl_TIME_R):
7349         * m4/timespec.m4 (gl_TIMESPEC):
7350         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
7351         * m4/unlinkdir.m4 (gl_UNLINKDIR):
7352         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
7353         * m4/userspec.m4 (gl_USERSPEC):
7354         * m4/utimecmp.m4 (gl_UTIMECMP):
7355         * m4/utimens.m4 (gl_UTIMENS):
7356         * m4/xalloc.m4 (gl_XALLOC):
7357         * m4/xgetcwd.m4 (gl_XGETCWD):
7358         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
7359         * m4/xreadlink.m4 (gl_XREADLINK):
7360         * m4/xstrtod.m4 (gl_XSTRTOD):
7361         * m4/yesno.m4 (gl_YESNO):
7362         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
7363         to get the necessary .h files and whatnot.
7364
7365 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
7366             Bruno Haible  <bruno@clisp.org>
7367
7368         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
7369         /bin/sh understanding of '!' conditional negation.
7370
7371 2006-08-21  Jim Meyering  <jim@meyering.net>
7372
7373         * modules/openat (Depends-on): Really alphabetize.
7374
7375         * modules/acl (Depends-on): Add error and quote.
7376
7377         * check-module (find_included_lib_files): Add at-func.c to the
7378         ok-to-include-more-than-once white list.
7379
7380         * modules/openat (Depends-on): Add lstat.  Alphabetize.
7381
7382 2006-08-21  Bruno Haible  <bruno@clisp.org>
7383
7384         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7385         Emit a pkgdata_DATA variable only if some snippets add contents to it.
7386         Reported by Martin Lambers <marlam@marlam.de>.
7387
7388 2006-08-21  Bruno Haible  <bruno@clisp.org>
7389
7390         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
7391         specify an installation location, don't emit a noinst_LIBRARIES or
7392         noinst_LTLIBRARIES assignment.
7393
7394 2006-08-21  Bruno Haible  <bruno@clisp.org>
7395
7396         BeOS portability.
7397         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
7398         BeOS has mbrtowc() but no <wctype.h>.
7399
7400 2006-08-21  Bruno Haible  <bruno@clisp.org>
7401
7402         BeOS portability.
7403         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
7404         exist.
7405
7406 2006-08-21  Bruno Haible  <bruno@clisp.org>
7407
7408         BeOS portability.
7409         * lib/mbchar.h: Include <wctype.h> only if it exists.
7410
7411 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
7412
7413         Remove files that are no longer needed by their respective modules.
7414         * m4/obstack.m4: Remove.
7415         * m4/strerror_r.m4: Remove.
7416         * m4/uint32_t.m4: Remove.
7417         * m4/uintptr_t.m4: Remove.
7418         * m4/ullong_max.m4: Remove.
7419         * m4/xstrtoimax.m4: Remove.
7420         * m4/xstrtoumax.m4: Remove.
7421
7422         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
7423         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
7424         dependencies now capture this.
7425
7426         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
7427         Do not use AC_LIBSOURCES, since gnulib modules now do this.
7428         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
7429         * m4/human.m4 (gl_HUMAN): Likewise.
7430         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
7431         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
7432
7433         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
7434
7435         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
7436         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
7437         stdint.
7438         * m4/human.m4 (gl_HUMAN): Likewise.
7439         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
7440         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
7441         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
7442         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
7443         * m4/xstrtol (gl_XSTRTOL): Likewise.
7444
7445         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
7446         AC_TYPE_LONG_LONG_INT.
7447         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
7448         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
7449         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
7450         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
7451
7452         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
7453         on stdbool.
7454
7455         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
7456         (gl_PREREQ_XSTRTOUL): Remove.
7457
7458         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
7459
7460         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
7461         mode.
7462
7463 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
7464
7465         Add and change modules to make it easier for coreutils to use
7466         gnulib-tool.
7467         * modules/backupfile (Files): Remove m4/d-ino.m4.
7468         (Depends-on): Add d-ino.
7469         * modules/cycle-check (Depends-on): Add stdint.
7470         (lib_SOURCES): Add cycle-check.h.
7471         * modules/d-ino: New module.
7472         * modules/d-type: New module.
7473         * modules/error (Files): Remove m4/strerror_r.m4.
7474         * modules/filemode (Files): Add m4/st_dm_mode.m4.
7475         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
7476         m4/inttypes_h.m4, m4/uintmax_t.m4.
7477         (Depends-on): Add stdint.
7478         (lib_SOURCES): Add fsusage.h.
7479         * modules/getcwd (Files): Remove d-ino.m4.
7480         (Depends-on): Add d-ino.
7481         * modules/getndelim2 (Depends-on): Add stdint.
7482         * modules/glob (Files): Remove m4/d-type.m4.
7483         (Depends-on): Add d-type.
7484         * modules/host-os: New module.
7485         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
7486         m4/inttypes_h.m4, m4/uintmax_t.m4.
7487         * Depends-on: Add stdint.
7488         (lib_SOURCES): Add human.h.
7489         * modules/inttostr (Files): Remove m4/intmax_t.m4,
7490         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
7491         m4/uintmax_t.m4, m4/ulonglong.m4.
7492         (Depends-on): Add stdint.
7493         (EXTRA_DIST): Add inttostr.h.
7494         * modules/lchmod: New module.
7495         * modules/link-follow: New module.
7496         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
7497         (Depends-on): Add lchmod.
7498         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
7499         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
7500         (Depends-on): Add stdint.
7501         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
7502         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
7503         (Depends-on): Add stdint.
7504         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
7505         * modules/perl: New module.
7506         * modules/regex (Depends-on): Add stdint.
7507         * modules/rmdir-errno: New module.
7508         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
7509         m4/intmax_t.m4.
7510         (Depends-on): Add stdint.
7511         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
7512         m4/uintmax_t.m4.
7513         (Depends-on): Add stdint.
7514         * modules/unlink-busy: New module.
7515         * modules/utimecmp (Depends-on): Add stdint.
7516         * modules/uptime: New module.
7517         * modules/winsz-ioctl: New module.
7518         * modules/winsz-termios: New module.
7519         * modules/xnanosleep (Depends-on): Add nanosleep.
7520         * modules/ullong_max: Remove.
7521         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
7522         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
7523         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
7524         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
7525         (Depends-on): Add inttypes.
7526         (lib_SOURCES): Add xstrtol.h.
7527         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
7528         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
7529         * MODULES.html.sh: Move 'assert' into the assert section.
7530         Move 'dummy' into the linking section.
7531         Remove ullong_max.
7532         Add section for compatibility checks for POSIX:2001 functions,
7533         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
7534         winsz-ioctl, and winsz-termios into it.
7535         Add lchmod.
7536         Add top-level Misc section and put host-os, perl, and uptime
7537         into it.
7538
7539 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
7540
7541         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
7542         now assume the stdint module.  Do not include inttypes.h.
7543         * lib/fsusage.h: Likewise.
7544         * lib/getndelim2.c: Likewise.
7545         * lib/human.h: Likewise.
7546         * lib/inttostr.h: Likewise.
7547         * lib/obstack.c: Likewise.
7548         * lib/regex_internal.h: Likewise.
7549         * lib/tempname.c: Likewise.
7550         * lib/utimecmp.c: Likewise.
7551         * lib/xstrtol.h: Likewise.
7552
7553         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
7554
7555         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
7556         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
7557         * lib/xtime.h: Likewise.
7558
7559 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
7560
7561         * modules/openat (Files): Add lib/fchmodat.c.
7562         Fixes problem reported by Jay Youngman.
7563
7564 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
7565
7566         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
7567         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
7568
7569 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
7570             Bruno Haible  <bruno@clisp.org>
7571
7572         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
7573         and is a script that invokes bison. Tighten the code. Add comments.
7574
7575 2006-08-18  Jim Meyering  <jim@meyering.net>
7576
7577         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
7578         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
7579         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
7580         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
7581
7582 2006-08-18  Bruno Haible  <bruno@clisp.org>
7583
7584         * modules/bison-i18n: New file.
7585         * MODULES.html.sh (Internationalization functions): Add it.
7586
7587 2006-08-18  Bruno Haible  <bruno@clisp.org>
7588
7589         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
7590         sys/statvfs.h. When getmntinfo was found, check its declaration and
7591         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
7592
7593 2006-08-18  Bruno Haible  <bruno@clisp.org>
7594
7595         * m4/bison-i18n.m4: New file, from bison.
7596
7597 2006-08-18  Bruno Haible  <bruno@clisp.org>
7598
7599         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
7600         (ME_DUMMY): Treat "kernfs" as a dummy.
7601         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
7602
7603 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
7604
7605         Update from coreutils.
7606
7607         2006-08-15  Jim Meyering  <jim@meyering.net>
7608
7609         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
7610
7611         2006-01-17  Jim Meyering  <jim@meyering.net>
7612
7613         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
7614
7615         2006-01-11  Jim Meyering  <jim@meyering.net>
7616
7617         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
7618         Check for the lchmod function.
7619
7620 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
7621
7622         Update from coreutils.
7623
7624         * lib/__fpending.h: Add copyright notice.
7625         * lib/fprintftime.h: Likewise.
7626         * lib/savedir.c: Use (C) in copyright notice.
7627         * lib/savedir.h: Likewise.
7628
7629         2006-08-15  Jim Meyering  <jim@meyering.net>
7630
7631         * lib/at-func.c: New file, with the logic of all emulated at-functions.
7632         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
7633         in support of the EXPECTED_ERRNO macro.
7634         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
7635         definitions.  Instead, define the appropriate symbols and include
7636         "at-func.c".
7637         * lib/mkdirat.c (mkdirat): Likewise.
7638         * lib/fchmodat.c (fchmodat): Likewise.
7639         (ENOSYS): Remove definition.
7640         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
7641         it.  Don't include "unistd--.h" -- it wasn't ever used.
7642
7643         2006-01-17  Jim Meyering  <jim@meyering.net>
7644
7645         Rewrite fts.c not to change the current working directory,
7646         by using openat, fstatat, fdopendir, etc..
7647
7648         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
7649         (HAVE_OPENAT_SUPPORT): Define.
7650         [_LIBC] (fchdir): Don't undef or define; no longer used.
7651         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
7652         Now, this `function' always succeeds, and consumes its file descriptor
7653         parameter -- so callers must not close such FDs.  Update callers.
7654         (diropen_fd, opendirat, cwd_advance_fd): New functions.
7655         (diropen): Add parameter, SP.  Adjust all callers.
7656         Implement using diropen_fd, rather than open.
7657         (fts_open): Initialize new member, fts_cwd_fd.
7658         Remove fts_rft-setting code.
7659         (fts_close): Close fts_cwd_fd, if necessary.
7660         (__opendir2): Define in terms of opendir or opendirat,
7661         depending on whether the FST_NOCHDIR flag is set.
7662         (fts_build): Since fts_safe_changedir consumes its FD, and since
7663         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
7664         and close the dup'd file descriptor upon failure.
7665         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
7666         (fts_safe_changedir): Tweak semantics to reflect that this function
7667         now calls cwd_advance_fd and hence consumes its FD argument.
7668         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
7669         [struct FTS] (fts_rft): Remove now-unused member.
7670         [struct FTS] (fts_cycle.state): Improve comment.
7671
7672         * lib/openat.c (openat_needs_fchdir): New function.
7673         * lib/openat.h (openat_needs_fchdir): Declare it.
7674
7675 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
7676
7677         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
7678         Problem and fix reported by Pádraig Brady in
7679         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
7680
7681 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
7682
7683         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
7684
7685 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
7686
7687         * lib/memcoll.c (memcoll): Optimize for the common case where the
7688         arguments are bytewise equal.
7689
7690 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
7691
7692         * doc/regexprops-generic.texi: Add a copyright notice.
7693
7694 2006-08-15  Bruno Haible  <bruno@clisp.org>
7695
7696         * modules/tmpdir (License): Change to LGPL.
7697
7698 2006-08-15  Bruno Haible  <bruno@clisp.org>
7699
7700         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
7701         module.
7702
7703 2006-08-14  Simon Josefsson  <jas@extundo.com>
7704
7705         * config/srclist.txt: Add gnupload.
7706
7707 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
7708
7709         Change copyright notice from LGPL 2 to GPL 2, since that's the
7710         standard form used in the gnulib repository.
7711         * tests/test-lock.c: Likewise.
7712         * tests/test-stdint.c: Likewise.
7713         * tests/test-tls.c: Likewise.
7714
7715         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
7716         prelude-manager.  User shorter URLs for GNU projects, without '?'.
7717         Add copyright notice.
7718
7719         * check-module: Add copyright notice.  Output a copyright
7720         notice if "--version" is specified.
7721         * modules/COPYING: New file.
7722         * tests/test-getaddrinfo.c: Add copyright notice.
7723         * tests/test-verify.c: Likewise.
7724
7725 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
7726
7727         Change copyright notice from LGPL 2 to GPL 2, since that's the
7728         standard form used in the gnulib repository.
7729         * lib/lock.c: LGPL -> GPL.
7730         * lib/lock.h: Likewise.
7731         * lib/strnlen1.c: Likewise.
7732         * lib/strnlen1.h: Likewise.
7733         * lib/tls.c: Likewise.
7734         * lib/tls.h: Likewise.
7735         * lib/tmpdir.c: Likewise.
7736
7737         * lib/TODO: Remove; this belongs only in coreutils.
7738
7739 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
7740
7741         Add copyright notices to long-enough files that lack them, since
7742         otherwise the files aren't clearly free.  Use the same notice that
7743         getdate.texi already uses.
7744         * doc/alloca-opt.texi: Add copyright notice.
7745         * doc/alloca.texi: Likewise.
7746         * doc/ctime.texi: Likewise.
7747         * doc/functions.texi: Likewise.
7748         * doc/gcd.texi: Likewise.
7749         * doc/gnulib-tool.texi: Likewise.
7750         * doc/inet_ntoa.texi: Likewise.
7751         * doc/visibility.texi: Likewise.
7752
7753         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
7754         * doc/quote.texi: Add copyright notice.
7755
7756         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
7757         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
7758         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
7759         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
7760         is now obsolete, and give a pointer to the Sun list.
7761         Add copyright notice.
7762
7763 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
7764
7765         * config/srclistvars.sh: Add copyright notice.
7766
7767 2006-08-14  Eric Blake  <ebb9@byu.net>
7768
7769         Import the following change from libc:
7770
7771         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
7772
7773         Upstream bug 2997.
7774         * lib/misc/error.c: Add space between program name and message if file
7775         name is missing.
7776
7777 2006-08-12  Karl Berry  <karl@gnu.org>
7778
7779         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
7780         remove, these originate in gnulib now.
7781
7782 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7783
7784         * doc/Makefile (standards.info standards.html standards.dvi):
7785         Also depend on make-stds.texi.
7786
7787 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
7788
7789         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
7790         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
7791
7792         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
7793         in wchar_t.  Problem reported by Eric Blake.
7794
7795         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
7796         LEN is smaller than SIZE.  Suggested by Bruno Haible.
7797         Also, help the compiler to keep LEN in a register.
7798
7799 2006-08-11  Eric Blake  <ebb9@byu.net>
7800
7801         * users.txt: Sort.  Add tar.
7802
7803 2006-08-11  Bruno Haible  <bruno@clisp.org>
7804
7805         * users.txt: New file.
7806
7807 2006-08-11  Bruno Haible  <bruno@clisp.org>
7808
7809         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
7810         before <wchar.h>. Needed for OSF/1 and BSD/OS.
7811
7812 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
7813
7814         * modules/snprintf (Depends-on): Remove minmax.
7815         (Maintainer): Add self and Bruno.
7816
7817 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
7818
7819         * lib/.cppi-disable: Add snprintf.h, socket_.h.
7820         * lib/snprintf.c: Include <errno.h> and <limits.h>.
7821         (EOVERFLOW): Define if the system does not.
7822         Do not include "minmax.h"; it wasn't used.
7823         (snprintf): Don't assume size_t promotes to an unsigned type.
7824         Fix bug when generated string was too long for the buffer: the
7825         buffer's contents are supposed to be the initial prefix of the
7826         output.  Don't assume vasnprintf returns EOVERFLOW if the size
7827         exceeds INT_MAX; do the check ourselves.
7828
7829         Import the following changes from libc:
7830
7831         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
7832
7833         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
7834         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
7835         set wc to the byte which couldn't be converted.
7836         (re_string_reconstruct): Don't clear valid_raw_len before calling
7837         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
7838         tip_context using re_string_context_at.
7839
7840         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
7841
7842         * lib/posix/regex.h: g++ still cannot handled [restrict].
7843
7844         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
7845
7846         * lib/posix/regex.h: Remove special handling for VMS.
7847
7848 2006-08-10  Jim Meyering  <jim@meyering.net>
7849
7850         * modules/same-inode: New module.
7851         * modules/dev-ino: New module.
7852         * modules/cycle-check: Depend on these modules, rather than simply
7853         including their .h files.
7854         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
7855         required via m4/cycle-check.m4.
7856         * modules/same: Depend on new same-inode module, rather than
7857         including same-inode.h.
7858         * modules/chdir-safer: New file.
7859
7860         * modules/chown (Depends-on): Add stat-macros.
7861
7862 2006-08-10  Jim Meyering  <jim@meyering.net>
7863
7864         * m4/cycle-check.m4: New file.
7865         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
7866         * m4/dev-ino.m4, m4/same-inode.m4: New files.
7867
7868 2006-08-10  Eric Blake  <ebb9@byu.net>
7869
7870         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
7871         in from original proposal.
7872
7873 2006-08-10  Eric Blake  <ebb9@byu.net>
7874         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7875
7876         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
7877         namespace.
7878
7879 2006-08-10  Bruno Haible  <bruno@clisp.org>
7880
7881         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
7882         as well.
7883
7884 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
7885
7886         Sync from coreutils.
7887
7888         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
7889
7890         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
7891         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
7892
7893 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
7894
7895         * modules/restrict: Remove; no longer needed now that we assume
7896         Autoconf 2.59 or later.
7897         * MODULES.html.sh: Remove 'restrict'.
7898         * modules/argp (Depends-on): Remove 'restrict'.
7899         * modules/base64 (Depends-on): Likewise.
7900         * modules/gc (Depends-on): Likewise.
7901         * modules/getaddrinfo (Depends-on): Likewise.
7902         * modules/glob (Depends-on): Likewise.
7903         * modules/inet_ntop (Depends-on): Likewise.
7904         * modules/inet_pton (Depends-on): Likewise.
7905         * modules/memxor (Depends-on): Likewise.
7906         * modules/regex (Depends-on): Likewise.
7907         * modules/strtok_r (Depends-on): Likewise.
7908         * modules/time_r (Depends-on): Likewise.
7909
7910 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
7911
7912         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
7913         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
7914         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
7915         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
7916         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
7917         * m4/memxor.m4 (gl_MEMXOR): Likewise.
7918         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
7919         gl_C_RESTRICT replaced by AC_C_RESTRICT.
7920
7921         Merge from coreutils.
7922         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
7923         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
7924         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
7925         * m4/time_r.m4 (gl_TIME_R): Likewise.
7926
7927 2006-08-09  Karl Berry  <karl@gnu.org>
7928
7929         * config/srclist.txt: no more gettext-tools, per Bruno.
7930
7931 2006-08-08  Eric Blake  <ebb9@byu.net>
7932
7933         * modules/verror: New module.
7934         * MODULES.html.sh: Document it.
7935
7936 2006-08-08  Eric Blake  <ebb9@byu.net>
7937
7938         * lib/verror.h, lib/verror.c: New files.
7939
7940 2006-08-08  Eric Blake  <ebb9@byu.net>
7941
7942         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
7943         verror_at_line output complies with GNU Coding Standards even when
7944         file is NULL.
7945
7946 2006-08-07  Bruno Haible  <bruno@clisp.org>
7947
7948         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
7949         versions of AIX.
7950         Reported by Ralf Wildenhues.
7951
7952 2006-08-07  Bruno Haible  <bruno@clisp.org>
7953
7954         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
7955         in an AC_DEFUN. Needed so that the autoconf snippets can use
7956         AC_REQUIRE.
7957
7958 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7959
7960         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7961         Initialize pkgdata_DATA.
7962         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
7963         overriding it.
7964
7965 2006-08-06  Eric Blake  <ebb9@byu.net>
7966
7967         * lib/error.h: Fold in some upstream changes from glibc.
7968         * lib/error.c: Likewise.
7969
7970 2006-08-04  Bruno Haible  <bruno@clisp.org>
7971
7972         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7973         Make the mostlyclean-local rule depend on mostlyclean-generic.
7974         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
7975
7976 2006-07-31  Bruno Haible  <bruno@clisp.org>
7977
7978         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
7979         <stdlib.h>, <string.h>.
7980
7981 2006-07-30  Bruno Haible  <bruno@clisp.org>
7982
7983         * modules/readlink (License): Change to LGPL.
7984
7985 2006-07-30  Bruno Haible  <bruno@clisp.org>
7986
7987         * modules/javaversion (Makefile.am): Distribute javaversion.java and
7988         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
7989         set PKGDATADIR to point to it.
7990
7991 2006-07-30  Bruno Haible  <bruno@clisp.org>
7992
7993         * modules/csharpexec (configure.ac): Comment out macro invocation.
7994         * modules/javaexec (configure.ac): Likewise.
7995         * modules/javacomp-script (configure.ac): Likewise.
7996
7997         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
7998
7999 2006-07-30  Bruno Haible  <bruno@clisp.org>
8000
8001         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
8002         linked-list.
8003
8004 2006-07-30  Bruno Haible  <bruno@clisp.org>
8005
8006         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
8007
8008 2006-07-30  Bruno Haible  <bruno@clisp.org>
8009
8010         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
8011         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
8012         get removed.
8013
8014 2006-07-29  Bruno Haible  <bruno@clisp.org>
8015
8016         Make it possible for gnulib-tool to work with locally modified or
8017         augmented gnulib repositories.
8018         * gnulib-tool (func_usage): Document --local-dir option.
8019         (local_gnulib_dir): New variable.
8020         Handle --local-dir option.
8021         (func_lookup_file): New function.
8022         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
8023         (func_get_description, func_get_filelist, func_get_description,
8024         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
8025         func_get_automake_snippet, func_get_include_directive,
8026         func_get_license, func_get_maintainer): Use func_lookup_file.
8027         (func_import, func_create_testdir): Use func_lookup_file.
8028
8029 2006-07-29  Bruno Haible  <bruno@clisp.org>
8030
8031         * modules/setenv (Depends-on): Add unistd.
8032
8033 2006-07-29  Bruno Haible  <bruno@clisp.org>
8034
8035         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
8036
8037 2006-07-29  Bruno Haible  <bruno@clisp.org>
8038
8039         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
8040
8041 2006-07-29  Bruno Haible  <bruno@clisp.org>
8042
8043         * gnulib-tool (import, update): If there is no Makefile.am, look at
8044         aclocal.m4, instead of bailing out.
8045
8046 2006-07-29  Bruno Haible  <bruno@clisp.org>
8047
8048         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
8049         Categorize the options by when they are useful.
8050
8051 2006-07-29  Bruno Haible  <bruno@clisp.org>
8052
8053         * gnulib-tool (func_usage): Document option --no-libtool.
8054         Handle option --no-libtool.
8055         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
8056         for changed semantics of $libtool variable.
8057         (func_import): Likewise. If libtool is not used, show this through
8058         an option --no-libtool.
8059         (func_create_testdir): Update.
8060
8061 2006-07-29  Bruno Haible  <bruno@clisp.org>
8062
8063         * gnulib-tool (func_import): Extend error message about missing
8064         --doc-base.
8065
8066 2006-07-29  Bruno Haible  <bruno@clisp.org>
8067
8068         * gnulib-tool (func_import): Don't create the $docbase directory if
8069         there is no file to store there.
8070
8071 2006-07-29  Bruno Haible  <bruno@clisp.org>
8072
8073         * gnulib-tool (autoconf_minversion): If a --dir option is given and
8074         relevant, look for configure.ac there, not in the current directory.
8075         Also use a simple search for AC_PREREQ, not "autoconf --trace".
8076
8077 2006-07-29  Bruno Haible  <bruno@clisp.org>
8078
8079         * gnulib-tool (SORT): New variable.
8080         (func_usage): Undocument --assume-autoconf option.
8081         Remove --assume-autoconf option handling.
8082         (autoconf_minversion): Determine from the contents of configure.ac.
8083         (func_import): Remove autoconf_minversion handling.
8084         Suggested by Eric Blake.
8085
8086 2006-07-29  Bruno Haible  <bruno@clisp.org>
8087
8088         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
8089
8090 2006-07-29  Bruno Haible  <bruno@clisp.org>
8091
8092         * config/srclist.txt (*setenv.[ch]): Remove rules.
8093
8094 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
8095
8096         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
8097
8098 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
8099
8100         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
8101         arpa/inet.h.
8102
8103 2006-07-28  Simon Josefsson  <jas@extundo.com>
8104
8105         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
8106         * modules/inet_pton (Depends-on): Likewise.
8107
8108 2006-07-28  Simon Josefsson  <jas@extundo.com>
8109
8110         * m4/netinet_in_h.m4: New file.
8111
8112 2006-07-28  Simon Josefsson  <jas@extundo.com>
8113
8114         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
8115         #include's.
8116
8117 2006-07-28  Simon Josefsson  <jas@extundo.com>
8118
8119         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
8120         #include's.
8121
8122 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
8123
8124         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
8125         setgid on directories only if they set these bits.
8126         * lib/modechange.h: Remove obsolete comment about masks.
8127
8128 2006-07-28  Eric Blake  <ebb9@byu.net>
8129
8130         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
8131         macro expansion.
8132
8133 2006-07-28  Bruno Haible  <bruno@clisp.org>
8134
8135         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
8136
8137 2006-07-28  Bruno Haible  <bruno@clisp.org>
8138
8139         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
8140
8141 2006-07-28  Bruno Haible  <bruno@clisp.org>
8142
8143         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
8144         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
8145         Define fallbacks.
8146         Avoids link error on FreeBSD 4.x.
8147         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
8148
8149         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
8150         encoding.
8151         * lib/mbswidth.c (iswcntrl): Likewise.
8152
8153 2006-07-27  Bruno Haible  <bruno@clisp.org>
8154
8155         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
8156         test.
8157
8158 2006-07-27  Bruno Haible  <bruno@clisp.org>
8159
8160         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
8161         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
8162         defined.
8163
8164 2006-07-26  Eric Blake  <ebb9@byu.net>
8165
8166         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
8167
8168 2006-07-26  Eric Blake  <ebb9@byu.net>
8169
8170         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
8171         like mingw that lack mkstemp.
8172         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
8173         avoid compilation warning on mingw.
8174
8175 2006-07-26  Bruno Haible  <bruno@clisp.org>
8176
8177         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
8178         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
8179         INT_FAST*_MIN, INTPTR_MIN.
8180
8181 2006-07-25  Bruno Haible  <bruno@clisp.org>
8182
8183         * modules/version-etc (Depends-on): Add stdarg.
8184
8185 2006-07-25  Bruno Haible  <bruno@clisp.org>
8186
8187         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
8188         complex commands.
8189
8190 2006-07-25  Bruno Haible  <bruno@clisp.org>
8191
8192         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
8193         defined in <stdarg.h> or config.h.
8194
8195 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
8196
8197         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
8198         (gl_STDIO_SAFER): Remove.
8199
8200 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
8201
8202         * MODULES.html.sh (File stream based Input/Output):
8203         Add fopen-safer, tmpfile-safer; remove stdio-safer.
8204         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
8205         * modules/fopen-safer, modules/tmpfile-safer: New files.
8206         * modules/stdio-safer: Remove.
8207
8208 2006-07-24  Bruno Haible  <bruno@clisp.org>
8209
8210         * modules/tmpdir: New file.
8211         * MODULES.html.sh (File system functions): Add it.
8212
8213 2006-07-24  Bruno Haible  <bruno@clisp.org>
8214
8215         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
8216         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
8217
8218 2006-07-24  Bruno Haible  <bruno@clisp.org>
8219
8220         * modules/clean-temp: New file.
8221
8222 2006-07-24  Bruno Haible  <bruno@clisp.org>
8223
8224         * m4/tmpdir.m4: New file, from GNU gettext.
8225
8226 2006-07-24  Bruno Haible  <bruno@clisp.org>
8227
8228         * lib/tmpdir.h: New file, from GNU gettext.
8229         * lib/tmpdir.c: New file, from GNU gettext.
8230
8231 2006-07-24  Bruno Haible  <bruno@clisp.org>
8232
8233         * lib/clean-temp.h: New file, from GNU gettext.
8234         * lib/clean-temp.c: New file, from GNU gettext.
8235
8236 2006-07-23  Eric Blake  <ebb9@byu.net>
8237
8238         * modules/stdio-safer (Files): Add tmpfile-safer.c.
8239         (Depends-on): Add binary-io.
8240
8241 2006-07-23  Eric Blake  <ebb9@byu.net>
8242
8243         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
8244
8245 2006-07-23  Eric Blake  <ebb9@byu.net>
8246
8247         * lib/tmpfile-safer.c: New file.
8248         * lib/stdio-safer.h (fopen_safer): Add prototype.
8249         * lib/stdio--.h (tmpfile): Make safer.
8250
8251 2006-07-23  Bruno Haible  <bruno@clisp.org>
8252
8253         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
8254         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
8255         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
8256         gl_linked_remove_at): Use it.
8257
8258 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
8259         and Simon Josefsson <jas@extundo.com>
8260
8261         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
8262
8263         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
8264
8265 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
8266
8267         * modules/close-stream: New file.
8268         * modules/closeout (Description): Make it clear that it exits
8269         with a diagnostic on error.
8270         (Depends-on): Add close-stream.  Remove fpending, stdbool.
8271         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
8272
8273 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
8274
8275         * m4/close-stream.m4: New file.
8276
8277 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
8278
8279         * lib/close-stream.c, lib/close-stream.h: New files.
8280
8281 2006-07-22  Bruno Haible  <bruno@clisp.org>
8282
8283         Merge from GNU gettext 0.15.
8284
8285         2006-05-01  Bruno Haible  <bruno@clisp.org>
8286
8287                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
8288
8289         2006-07-22  Bruno Haible  <bruno@clisp.org>
8290
8291                 * modules/javaversion: New file.
8292                 * MODULES.html.sh (Java): Add javaversion.
8293
8294         2006-03-12  Bruno Haible  <bruno@clisp.org>
8295
8296                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
8297
8298         2005-12-04  Bruno Haible  <bruno@clisp.org>
8299
8300                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
8301                 (untested).
8302
8303         2006-06-21  Bruno Haible  <bruno@clisp.org>
8304
8305                 Avoid warnings from recent versions of mcs.
8306                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
8307                 -o, -L, -r any more. Use options documented since mcs-1.0
8308                 instead. Similarly for -g.
8309
8310         2005-12-04  Bruno Haible  <bruno@clisp.org>
8311
8312                 * build-aux/csharpcomp.sh.in: Suffix for resources is
8313                 .resources, not .resource.
8314
8315         2005-07-09  Bruno Haible  <bruno@clisp.org>
8316
8317                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
8318                 add a .dll suffix.
8319                 Reported by Mark Junker <mjscod@gmx.de>.
8320
8321         2006-07-22  Bruno Haible  <bruno@clisp.org>
8322
8323                 * modules/gettext: Upgrade to gettext-0.15.
8324                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
8325                 m4/visibility.m4.
8326                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
8327
8328 2006-07-22  Bruno Haible  <bruno@clisp.org>
8329
8330         Merge from GNU gettext 0.15.
8331
8332         2006-03-25  Bruno Haible  <bruno@clisp.org>
8333
8334                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
8335
8336         2006-07-21  Bruno Haible  <bruno@clisp.org>
8337
8338                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
8339                 "1.1".
8340
8341         2006-05-09  Bruno Haible  <bruno@clisp.org>
8342
8343                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
8344                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
8345                 for the conftestver execution.
8346
8347         2006-05-01  Bruno Haible  <bruno@clisp.org>
8348
8349                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
8350                 optional target-version argument. Verify that the compiler
8351                 groks source of the specified source-version, or add -source
8352                 option as necessary. Verify that the compiler produces
8353                 bytecode in the specified target-version, or add -target and
8354                 -source options as necessary. Make the result of the test
8355                 available as variable CONF_JAVAC. Also log error output in
8356                 config.log.
8357
8358         2006-03-11  Bruno Haible  <bruno@clisp.org>
8359
8360                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
8361
8362         2006-05-09  Bruno Haible  <bruno@clisp.org>
8363
8364                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
8365                 CLASSPATH_SEPARATOR to a semicolon.
8366
8367         2006-03-12  Bruno Haible  <bruno@clisp.org>
8368
8369                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
8370                 available as variable CONF_JAVA, for subsequent autoconf
8371                 tests. Also log error output in config.log.
8372
8373         2006-07-19  Bruno Haible  <bruno@clisp.org>
8374
8375                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
8376                 that getline works on glibc2 systems. Needed to avoid trouble
8377                 in relocatable.c.
8378                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
8379
8380         2005-12-04  Bruno Haible  <bruno@clisp.org>
8381
8382                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
8383                 launcher (untested).
8384
8385         2005-12-04  Bruno Haible  <bruno@clisp.org>
8386
8387                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
8388
8389         2006-07-22  Bruno Haible  <bruno@clisp.org>
8390
8391                 * gettext.m4: Update from GNU gettext-0.15.
8392                 * nls.m4: Likewise.
8393                 * po.m4: Likewise.
8394                 * inttypes-pri.m4: Likewise.
8395                 * inttypes-h.m4: Renamed from inttypes.m4.
8396                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
8397
8398 2006-07-22  Bruno Haible  <bruno@clisp.org>
8399
8400         Merge from GNU gettext 0.15.
8401
8402         2005-07-05  Bruno Haible  <bruno@clisp.org>
8403
8404                 * printf-args.c (printf_fetchargs): Work around broken
8405                 definition of wint_t on mingw.
8406
8407         2005-02-12  Bruno Haible  <bruno@clisp.org>
8408
8409                 * xallocsa.h: Add extern "C" for C++.
8410
8411         2006-05-17  Bruno Haible  <bruno@clisp.org>
8412
8413                 Cygwin portability.
8414                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
8415
8416         2006-04-30  Bruno Haible  <bruno@clisp.org>
8417
8418                 * progreloc.c: Include <mach-o/dyld.h> if available.
8419                 (find_executable): Use _NSGetExecutablePath when possible.
8420
8421         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
8422
8423                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
8424                 function.
8425
8426         2005-12-29  Bruno Haible  <bruno@clisp.org>
8427
8428                 * progreloc.c (set_program_name_and_installdir): Fix
8429                 compilation error.
8430
8431         2005-12-04  Bruno Haible  <bruno@clisp.org>
8432
8433                 Cygwin portability.
8434                 * progreloc.c: Include <windows.h> also on Cygwin.
8435                 (find_executable): Add support for Cygwin.
8436                 (set_program_name_and_installdir): Handle also platforms with
8437                 nonempty EXEEXT.
8438
8439         2006-07-11  Bruno Haible  <bruno@clisp.org>
8440
8441                 * javacomp.c: Fix a comment.
8442                 Reported by Jim Meyering.
8443
8444         2006-04-30  Bruno Haible  <bruno@clisp.org>
8445
8446                 * javacomp.h (compile_java_class): Add source_version,
8447                 target_version arguments.
8448                 * javacomp.c: Rewritten to choose only a compiler that
8449                 respects the specified source_version and target_version.
8450
8451         2006-06-27  Bruno Haible  <bruno@clisp.org>
8452
8453                 Assume correct S_ISDIR macro.
8454                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
8455
8456         2006-07-22  Bruno Haible  <bruno@clisp.org>
8457
8458                 * javaversion.h: New file, from GNU gettext.
8459                 * javaversion.c: New file, from GNU gettext.
8460                 * javaversion.java: New file, from GNU gettext.
8461                 * javaversion.class: New file, from GNU gettext.
8462
8463         2006-05-17  Bruno Haible  <bruno@clisp.org>
8464
8465                 Cygwin portability.
8466                 * javaexec.c (execute_java_class): Test for jview program
8467                 also on Cygwin.
8468
8469         2006-04-09  Bruno Haible  <bruno@clisp.org>
8470
8471                 * fatal-signal.c: Don't include string.h.
8472                 (at_fatal_signal): Use a copying loop instead of memcpy.
8473
8474         2005-12-04  Bruno Haible  <bruno@clisp.org>
8475
8476                 * csharpexec.c: Add support for 'clix' launcher (untested).
8477                 (execute_csharp_using_sscli): New function.
8478                 (execute_csharp_program): Call it.
8479
8480         2006-06-21  Bruno Haible  <bruno@clisp.org>
8481
8482                 Avoid warnings from recent versions of mcs.
8483                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
8484                 -o, -L, -r any more. Use options documented since mcs-1.0
8485                 instead. Similarly for -g.
8486
8487         2005-07-09  Bruno Haible  <bruno@clisp.org>
8488
8489                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
8490                 add a .dll suffix.
8491                 Reported by Mark Junker <mjscod@gmx.de>.
8492
8493         2006-06-17  Bruno Haible  <bruno@clisp.org>
8494
8495                 * config.charset: Update for NetBSD 3.0.
8496
8497         2006-05-17  Bruno Haible  <bruno@clisp.org>
8498
8499                 Cygwin portability.
8500                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
8501
8502         2006-05-16  Bruno Haible  <bruno@clisp.org>
8503
8504                 * localcharset.c [CYGWIN]: Include <windows.h>.
8505                 (get_charset_aliases): For Cygwin, return the same CPxxx
8506                 aliases list as under WIN32.
8507                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
8508                 the environment variables. Fall back to GetACP().
8509
8510         2006-04-05  Bruno Haible  <bruno@clisp.org>
8511
8512                 * config.charset: Update Juan Manuel Guerrero's address.
8513
8514         2005-02-12  Bruno Haible  <bruno@clisp.org>
8515
8516                 * allocsa.h: Add extern "C" for C++.
8517
8518         2005-02-10  Bruno Haible  <bruno@clisp.org>
8519
8520                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
8521                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
8522
8523         2006-07-22  Bruno Haible  <bruno@clisp.org>
8524
8525                 * gettext.h: Update to GNU gettext-0.15.
8526
8527 2006-07-22  Bruno Haible  <bruno@clisp.org>
8528
8529         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
8530         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
8531         lib-prefix.m4, longdouble.m4, ssize_t.m4.
8532
8533 2006-07-21  Eric Blake  <ebb9@byu.net>
8534
8535         * modules/stdlib-safer: New file.
8536         * MODULES.html.sh (File stream based Input/Output): Add
8537         stdlib-safer.
8538
8539 2006-07-21  Eric Blake  <ebb9@byu.net>
8540
8541         * lib/stdlib-safer.h: New file from coreutils, required by
8542         stdlib--.h.
8543
8544 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
8545
8546         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
8547
8548 2006-07-20  Bruno Haible  <bruno@clisp.org>
8549
8550         * gnulib-tool: Recognize new option --assume-autoconf.
8551         (autoconf_minversion): New variable.
8552         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
8553
8554 2006-07-20  Bruno Haible  <bruno@clisp.org>
8555
8556         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
8557
8558 2006-07-19  Derek R. Price  <derek@ximbiot.com>
8559
8560         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
8561         Reindent and repaginate.
8562
8563 2006-07-19  Derek Price  <derek@ximbiot.com>
8564
8565         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
8566         Correct grammar.
8567
8568 2006-07-17  Bruno Haible  <bruno@clisp.org>
8569
8570         * modules/list: New file.
8571         * modules/array-list: New file.
8572         * modules/carray-list, modules/carray-list-tests: New files.
8573         * modules/linked-list, modules/linked-list-tests: New files.
8574         * modules/avltree-list, modules/avltree-list-tests: New files.
8575         * modules/rbtree-list, modules/rbtree-list-tests: New files.
8576         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
8577         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
8578         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
8579         * modules/oset: New file.
8580         * modules/array-oset: New file.
8581         * modules/avltree-oset, modules/avltree-oset-tests: New files.
8582         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
8583         * tests/test-carray_list.c: New file.
8584         * tests/test-linked_list.c: New file.
8585         * tests/test-avltree_list.c: New file.
8586         * tests/test-rbtree_list.c: New file.
8587         * tests/test-linkedhash_list.c: New file.
8588         * tests/test-avltreehash_list.c: New file.
8589         * tests/test-rbtreehash_list.c: New file.
8590         * tests/test-avltree_oset.c: New file.
8591         * tests/test-rbtree_oset.c: New file.
8592         * MODULES.html.sh (Container data structures): New section.
8593
8594 2006-07-17  Bruno Haible  <bruno@clisp.org>
8595
8596         * m4/gl_list.m4: New file.
8597
8598 2006-07-17  Bruno Haible  <bruno@clisp.org>
8599
8600         * lib/gl_list.h: New file.
8601         * lib/gl_list.c: New file.
8602         * lib/gl_array_list.h: New file.
8603         * lib/gl_array_list.c: New file.
8604         * lib/gl_carray_list.h: New file.
8605         * lib/gl_carray_list.c: New file.
8606         * lib/gl_linked_list.h: New file.
8607         * lib/gl_linked_list.c: New file.
8608         * lib/gl_anylinked_list1.h: New file.
8609         * lib/gl_anylinked_list2.h: New file.
8610         * lib/gl_avltree_list.h: New file.
8611         * lib/gl_avltree_list.c: New file.
8612         * lib/gl_anyavltree_list1.h: New file.
8613         * lib/gl_anyavltree_list2.h: New file.
8614         * lib/gl_rbtree_list.h: New file.
8615         * lib/gl_rbtree_list.c: New file.
8616         * lib/gl_anyrbtree_list1.h: New file.
8617         * lib/gl_anyrbtree_list2.h: New file.
8618         * lib/gl_anytree_list1.h: New file.
8619         * lib/gl_anytree_list2.h: New file.
8620         * lib/gl_linkedhash_list.h: New file.
8621         * lib/gl_linkedhash_list.c: New file.
8622         * lib/gl_anyhash_list1.h: New file.
8623         * lib/gl_anyhash_list2.h: New file.
8624         * lib/gl_avltreehash_list.h: New file.
8625         * lib/gl_avltreehash_list.c: New file.
8626         * lib/gl_rbtreehash_list.h: New file.
8627         * lib/gl_rbtreehash_list.c: New file.
8628         * lib/gl_anytreehash_list1.h: New file.
8629         * lib/gl_anytreehash_list2.h: New file.
8630
8631         * lib/gl_oset.h: New file.
8632         * lib/gl_oset.c: New file.
8633         * lib/gl_array_oset.h: New file.
8634         * lib/gl_array_oset.c: New file.
8635         * lib/gl_avltree_oset.h: New file.
8636         * lib/gl_avltree_oset.c: New file.
8637         * lib/gl_rbtree_oset.h: New file.
8638         * lib/gl_rbtree_oset.c: New file.
8639         * lib/gl_anytree_oset.h: New file.
8640
8641 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
8642
8643         * m4/mkancesdirs.m4: New file.
8644         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
8645         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
8646         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
8647         it.
8648
8649 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
8650
8651         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
8652         * lib/mkancesdirs.h: New files.
8653         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
8654         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
8655         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
8656         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
8657         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
8658         callers changed.  Revamp internals significantly, by not
8659         attempting to create directories that are temporarily more
8660         permissive than the final results.  Do not attempt to use
8661         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
8662         This removes some race conditions, fixes some bugs, and simplifies
8663         things.  Use new dirchownmod function to do owner and mode changes.
8664         * lib/mkdir-p.h: Likewise.
8665         * lib/modechange.c (octal_to_mode): New function.
8666         (struct mode_change): New member mentioned.
8667         (make_node_op_equals): New arg mentioned.  All callers changed.
8668         (mode_compile): Keep track of which mode bits the user has explicitly
8669         mentioned.
8670         (mode_adjust): New arg DIR, so that we implement the X op correctly.
8671         New arg PMODE_BITS, to keep track of which mode bits the user
8672         mentioned; it treats S_ISUID and S_ISGID speciall.
8673         All callers changed.
8674         * lib/modechange.h: Likewise.
8675
8676 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
8677
8678         * MODULES.html.sh: Add mkancestors.
8679         * modules/mkancesdirs: New module.
8680         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
8681         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
8682         The chdir-safer and afs files are now orphans; I'll remove them
8683         unless someone speaks up.
8684         Add lib/dirchownmod.c, lib/dirchownmod.h.
8685         (Depends-on): Remove alloca, chown, save-cwd, dirname.
8686         Add lchown, mkancesdirs.
8687         (Maintainer): Add self.
8688
8689 2006-07-15  Karl Berry  <karl@gnu.org>
8690
8691         * gnulib-tool: help message wording/arrangement.
8692
8693 2006-07-14  Simon Josefsson  <jas@extundo.com>
8694
8695         * doc/gnulib.texi (Libtool and Windows): New section.
8696
8697 2006-07-12  Simon Josefsson  <jas@extundo.com>
8698
8699         * modules/gendocs (License): Fix license, approved by Karl.
8700
8701 2006-07-12  Eric Blake  <ebb9@byu.net>
8702
8703         * MODULES.html.sh: Add gendocs.
8704
8705 2006-07-11  Eric Blake  <ebb9@byu.net>
8706
8707         * modules/fdl: New module, to install doc/fdl.texi.
8708         * MODULES.html.sh: Add new section for documentation modules.
8709         * gnulib-tool: Avoid space-tab.
8710         (--doc-base): New option, to manage files from doc.
8711
8712 2006-07-11  Eric Blake  <ebb9@byu.net>
8713
8714         * m4/absolute-header.m4: Fix comments to match recent change.
8715
8716 2006-07-11  Eric Blake  <ebb9@byu.net>
8717
8718         * gnulib-tool: List --doc-base before --tests-base.
8719
8720 2006-07-11  Derek R. Price  <derek@ximbiot.com>
8721
8722         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
8723
8724 2006-07-11  Bruno Haible  <bruno@clisp.org>
8725
8726         * README: Mention where to put documentation.
8727
8728 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8729
8730         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
8731
8732 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
8733
8734         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
8735         to stdint.m4.
8736
8737 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
8738
8739         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
8740         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
8741         "no/such/file/stdint.h" when there is no such file, so that
8742         the resulting C code can be parsed by dodgy compilers.
8743         Problems reported by Bob Proulx.
8744
8745 2006-07-10  Derek R. Price  <derek@ximbiot.com>
8746
8747         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
8748         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
8749         macros into the GNU _D_EXACT_NAMLEN.
8750         * lib/savedir.c:  Likewise.
8751         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
8752
8753 2006-07-10  Derek R. Price  <derek@ximbiot.com>
8754         and Paul Eggert  <eggert@cs.ucla.edu>
8755
8756         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
8757         * m4/savedir.m4:
8758         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
8759         macros into the GNU _D_EXACT_NAMLEN.
8760
8761 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
8762
8763         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
8764         around the absolute name, to work around a problem with the HP-UX
8765         11.23 native C compiler, reported by Bob Proulx.
8766
8767 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
8768
8769         * doc/maintain.texi, make-stds.texi: Sync from
8770         <http://savannah.gnu.org/projects/gnustandards>.
8771
8772 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
8773
8774         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
8775
8776 2006-07-09  Jim Meyering  <jim@meyering.net>
8777
8778         * m4/glob.m4: Remove a doubled word in a comment.
8779
8780 2006-07-09  Jim Meyering  <jim@meyering.net>
8781
8782         * lib/argp-pv.c: Remove a doubled word in a comment.
8783         * lib/check-version.c (check_version): Likewise.
8784         * lib/javacomp.c (compile_java_class): Likewise.
8785
8786 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
8787
8788         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
8789         for the benefit of people using Autoconf 2.60.  If you want to
8790         support older Autoconf versions you can copy m4/onceonly_2_57.m4
8791         (or m4/onceonly.m4, if pre-2.57) manually.
8792
8793 2006-07-08  Jim Meyering  <jim@meyering.net>
8794
8795         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
8796         comment.
8797         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
8798         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
8799         comment.
8800
8801 2006-07-08  Jim Meyering  <jim@meyering.net>
8802
8803         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
8804
8805 2006-07-07  Simon Josefsson  <jas@extundo.com>
8806
8807         * tests/test-crc.c: Change expected crc value, the test vector
8808         were probably computed using the old broken crc.c?
8809
8810 2006-07-06  Simon Josefsson  <jas@extundo.com>
8811
8812         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
8813         now the canonical place for the M4 file).
8814
8815         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
8816         from the sys_socket dependency now.
8817
8818         * modules/inet_pton (Files): Ditto.
8819
8820         * modules/inet_ntop (Files): Ditto.
8821
8822 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
8823
8824         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
8825         not gl_PREREQ_GETUSERSHELL.
8826
8827 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8828
8829         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
8830         with only one argument, for Autoconf 2.60.
8831         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
8832         expand to nothing, so add a shell command to avoid syntax error.
8833         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
8834
8835 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8836
8837         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
8838
8839 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
8840
8841         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
8842         no longer needed.  Check for isblank decl.
8843         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
8844         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
8845         of existence.
8846
8847 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
8848
8849         * lib/getloadavg.c: Use __VMS, not VMS.
8850         * lib/getopt.c: Likewise.
8851         * lib/getpagesize.h: Likewise.
8852         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
8853         and probably does not work.
8854
8855 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
8856
8857         * lib/.cppi-disable: Add wcwidth.
8858         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
8859         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
8860         (ISGRAPH): Remove.  All uses changed to isgraph.
8861         (FOLD) [!defined _LIBC]: Remove special case.
8862         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
8863         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
8864         HAVE_ISBLANK.
8865         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
8866         case.
8867
8868 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
8869
8870         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
8871         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
8872         brackets.  Other minor changes to suppress some compiler
8873         warnings.
8874
8875 2006-07-06  Derek R. Price  <derek@ximbiot.com>
8876         and Paul Eggert  <eggert@cs.ucla.edu>
8877
8878         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
8879         of invoking obsolescent AC_HEADER_DIRENT macro.
8880         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
8881         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
8882         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
8883         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
8884         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
8885         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
8886         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
8887         * m4/readdir.m4: Remove; no longer needed.
8888
8889 2006-07-06  Derek R. Price  <derek@ximbiot.com>
8890         and Paul Eggert  <eggert@cs.ucla.edu>
8891
8892         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
8893         Don't worry about this obsolete case any more.
8894         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
8895         directories.
8896         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
8897         worry about this obsolete case any more.
8898         * lib/fts.c: Likewise.
8899         * lib/getcwd.c: Likewise.
8900         * lib/glob.h: Likewise.
8901         * lib/savedir.c: Likewise.
8902
8903 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
8904
8905         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
8906         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
8907         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
8908         needed.
8909         All uses removed.
8910         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
8911         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
8912         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
8913         needed.
8914         * m4/getdate.m4 (gl_GETDATE): Likewise.
8915         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
8916         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
8917         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
8918         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
8919         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
8920         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
8921         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
8922         needed.
8923
8924 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
8925
8926         * lib/memcasecmp.c: Include <limits.h>.
8927         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
8928         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
8929         Don't assume isdigit succeeds only on '0' through '9'.
8930
8931 2006-07-05  Eric Blake  <ebb9@byu.net>
8932
8933         * modules/getaddrinfo (Depends-on): Add snprintf.
8934
8935 2006-07-05  Eric Blake  <ebb9@byu.net>
8936
8937         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
8938         to avoid 'header present but could not be compiled' on cygwin.
8939
8940 2006-07-05  Eric Blake  <ebb9@byu.net>
8941
8942         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
8943         missing from netdb.h.
8944         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
8945
8946 2006-07-05  Derek R. Price  <derek@ximbiot.com>
8947
8948         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
8949         no longer needed.
8950         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
8951         * m4/getdate.m4 (gl_GETDATE): Likewise.
8952         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
8953         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
8954         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
8955         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
8956         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
8957
8958 2006-07-05  Derek R. Price  <derek@ximbiot.com>
8959
8960         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
8961         All uses of is_space replaced by isspace.
8962         * lib/exit.h: Don't talk about STDC_HEADERS.
8963         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
8964         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
8965         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
8966         replaced by isprint etc.
8967         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
8968         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
8969         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
8970         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
8971         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
8972         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
8973
8974 2006-07-05  Bruno Haible  <bruno@clisp.org>
8975
8976         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
8977         the function exists, before testing against AIX.
8978         Reported by Martin Lambers <marlam@marlam.de>.
8979
8980 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
8981
8982         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
8983         From Mark D. Baushke.
8984
8985 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
8986
8987         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
8988         to the absolute name, not just one, to bypass Sun C 5.8's
8989         "warning: #include of /usr/include/... may be non-portable".
8990
8991 2006-07-04  Eric Blake  <ebb9@byu.net>
8992
8993         * modules/dirname-tests: New test module.
8994         * tests/test-dirname.c: New file, replacing dirname.c
8995         TEST_DIRNAME section that was recently deleted.
8996
8997 2006-07-04  Bruno Haible  <bruno@clisp.org>
8998
8999         Assume ANSI C header files and <ctype.h> functions.
9000         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
9001         (mbsnwidth): Use isprint, iscntrl instead.
9002
9003 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
9004
9005         Merge from coreutils.
9006         * MODULES.html.sh: Add xstrtold.
9007         * modules/xstrtold: New file.
9008         * modules/cycle-check (Files): Add lib/same-inode.h.
9009         * modules/dirname (Files): Add m4/double-slash-root.m4.
9010         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
9011         * modules/mkdir-p (Files): Add lib/same-inode.h.
9012         * modules/same (Files): Add lib/same-inode.h.
9013
9014 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
9015
9016         * m4/absolute-header.m4: Renamed from full-header-path.m4.
9017         This is to keep the terminology clean; POSIX talks about
9018         "absolute pathnames", not "full pathnames", but the GNU
9019         Coding Standards say to use "path" for something else;
9020         so use "absolute" to keep both sides happy.
9021         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
9022         Set gl_absolute_header, not gl_full_header_path.
9023         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
9024         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
9025         All uses changed.
9026
9027         Merge from coreutils.
9028
9029         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
9030
9031         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
9032         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
9033         want to require the building of c-strtod.o.
9034         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
9035         needs -lm directly.
9036         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
9037
9038         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
9039
9040         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
9041         --as-needed option if available.  Problem reported by Albert Chin in
9042         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
9043         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
9044         cc merely issues a bunch of annoying warnings for --as-needed
9045         (this problem was reported by Bob Proulx).  Also, try linking with
9046         -lm to detect a bug in binutils 2.16 (this problem was reported
9047         by Ralf Wildenhues).
9048
9049         2006-06-18  Jim Meyering  <jim@meyering.net>
9050
9051         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
9052         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
9053         macro.
9054         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
9055         also check for glibc-2.4's abort-inducing bug.
9056
9057         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
9058         Low-probability clean-up should be to use rmdir to get rid of
9059         the just-created directory, not unlink.
9060
9061         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
9062         configure fail, and request a bug report to inform us about it.
9063         Add a comment that, barring reports to the contrary, in 2007 we'll
9064         assume ftruncate is universally available.
9065
9066         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
9067
9068         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
9069
9070         2006-03-12  Jim Meyering  <jim@meyering.net>
9071
9072         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
9073         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
9074         * m4/same.m4 (gl_SAME): Likewise.
9075         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
9076
9077         2006-03-11  Eric Blake  <ebb9@byu.net>
9078
9079         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
9080         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
9081         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
9082         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
9083
9084 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
9085
9086         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
9087         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
9088         reported by Mark D. Baushke, one in
9089         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
9090
9091         Merge from coreutils.
9092
9093         * lib/.cppi-disable: Add stdint_.h.
9094         * lib/.cvsignore: Add stdint.h.
9095
9096         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
9097
9098         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
9099         both double and long double versions.
9100         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
9101         * lib/xstrtold.c: New file.
9102         * lib/xstrtod.h (xstrtold): New decl.
9103
9104         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
9105
9106         * lib/filemode.c (setst): Remove.
9107         (strmode): Rewrite to avoid setst.  This makes the code shorter,
9108         (arguably) clearer, and the generated code is a bit smaller on my
9109         Debian GNU/Linux stable x86 host.
9110
9111         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
9112
9113         * lib/filemode.c: Include "filemode.h" first, to test the interface.
9114         Assume that filemode.h includes sys/types.h and sys/stat.h.
9115         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
9116         (ftypelet): Reorder to put common cases first, for efficiency.
9117         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
9118         to do 'M'.
9119         (strmode): Renamed from mode_string, and now stores 12 bytes instead
9120         of 10, for compatibility with FreeBSD.  All callers changed.
9121         (filemodestring): Now stores 12 bytes instead of 10, and sets file
9122         types that can't be deduced solely from st_mode.  First arg is now a
9123         const pointer.
9124         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
9125         (strmode): Renamed from mode_string.
9126         (filemodestring): New decl.
9127         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
9128         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
9129         needed.
9130         (S_ISPORT, S_ISWHT): New macros, if not already defined.
9131
9132         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
9133
9134         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
9135         fsusage.h now does that.  Include fsusage.h first, to test interface.
9136         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
9137         at most one method (the old code could have generated decls that
9138         didn't conform to C89, not that this was ever exercised).
9139         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
9140
9141         2006-03-19  Jim Meyering  <jim@meyering.net>
9142
9143         Work even in a chroot where d_ino values for entries in "/"
9144         don't match the stat.st_ino values for the same names.
9145         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
9146         number, iterate through all entries again, using lstat instead.
9147         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
9148         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
9149
9150         * lib/getcwd.c (__getcwd): Clarify a comment.
9151         Use memcpy in place of a call to strcpy.
9152
9153         2006-03-12  Jim Meyering  <jim@meyering.net>
9154
9155         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
9156         matches that of the current directory (which we're about to chdir ".."
9157         out of), then save the dev-ino of the parent, instead.
9158
9159         * lib/same-inode.h (SAME_INODE): New file/macro.
9160         * lib/chdir-safer.c (SAME_INODE): Remove definition.
9161         Include "same-inode.h", instead.
9162         * lib/same.c: Likewise.
9163         * lib/cycle-check.h: Include "same-inode.h".
9164         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
9165         * lib/cycle-check.c (SAME_INODE): Remove definition.
9166         * lib/root-dev-ino.h: Include "same-inode.h".
9167
9168         2006-03-11  Eric Blake  <ebb9@byu.net>
9169
9170         * lib/same.c (same_name): s/base_name/last_component/
9171         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
9172         * lib/filenamecat.c (file_name_concat): Likewise.
9173
9174         2006-03-11  Eric Blake  <ebb9@byu.net>,
9175                     Paul Eggert  <eggert@cs.ucla.edu>
9176
9177         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
9178         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
9179         drive prefix.
9180         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
9181         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
9182         (last_component): New method.
9183         * lib/dirname.c (dir_len): Determine when drive letters need a
9184         subsequent slash.  Preserve // when it is special.
9185         (dir_name): Don't append dot when drive letter is absolute.
9186         [TEST_DIRNAME]: Move into a full-blown gnulib test.
9187         * lib/basename.c (base_name): New semantics - malloc the result.
9188         Preserve // when it is special.  Preserve relative files that look
9189         like drive letters.
9190         (base_len): Preserve // when it is special.
9191         (last_component): New method, similar to old base_name semantics.
9192         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
9193         base_name.  Strip redundant slashes from ///.
9194
9195 2006-07-03  Jim Meyering  <jim@meyering.net>
9196
9197         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
9198         macro is used before the first cycle_check call.
9199
9200 2006-07-03  Eric Blake  <ebb9@byu.net>
9201
9202         * modules/dirname (Depends-on): Add xstrndup.
9203
9204 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
9205
9206         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
9207         test cases, so that config.log is a bit easier to follow.
9208
9209 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
9210
9211         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
9212         both are 64 bits, since this seems to be the tradition, and this
9213         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
9214         we ever run into a host that prefers long long to long in this
9215         case, we'll need another configure-time test.  Problem reported by
9216         Jim Meyering.
9217
9218 2006-07-02  Eric Blake  <ebb9@byu.net>
9219
9220         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
9221
9222 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
9223
9224         * modules/inttypes (Depends-on): No longer depends on stdint.
9225         * modules/stdint (Description): Say more about assumptions.
9226         Say that the fast types might differ.  Say macros are used.
9227         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
9228         (Makefile.am): Revise list of substituted symbols to match
9229         new stdint.m4.
9230         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
9231         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
9232         * tests/test-stdint.c (verify_same_types)
9233         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
9234         the code conforms to C99/C89.
9235         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
9236         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
9237
9238 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
9239
9240         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
9241         but fix a bug, by requiring at least 64 bits.
9242         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
9243         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
9244         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
9245         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
9246
9247         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
9248         changes.  Make 2.59 a prerequisite.  Check and substitute for
9249         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
9250         inttypes.h.  Do not use special include files; just use the
9251         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
9252         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
9253         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
9254         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
9255         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
9256         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
9257         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
9258         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
9259         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
9260         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
9261         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
9262         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
9263         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
9264         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
9265         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
9266         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
9267         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
9268         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
9269         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
9270         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
9271         WINT_MAX.  Check for C99 conformance more strictly, by detecting
9272         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
9273         not check for things that C99 does not require, e.g., int8_t.  If
9274         a test isn't needed unless <stdint.h> isn't working, and is
9275         unlikely to be needed for any other reason, then don't do it
9276         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
9277         size_t, since we assume C89 freestanding at least.  Do not check
9278         for sig_atomic_t, wchar_t, or wint_t, since the code now does
9279         the right thing even if the types are not defined.  Instead use:
9280         (gl_STDINT_TYPE_PROPERTIES): New macro.
9281         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
9282         testing whether <sys/types.h> clashes, as Autoconf does this for
9283         us now.  All uses removed.
9284         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
9285         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
9286         (gl_CHECK_TYPE_SAME):
9287         Remove; no longer needed.
9288         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
9289         exists, since we'll return 0 anyway in that case.
9290         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
9291
9292 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
9293
9294         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
9295         possible collision with system files.
9296         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
9297         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
9298         WCHAR_MIN and WCHAR_MAX in this case.
9299         (<stddef.h>): Do not include; no longer needed.
9300         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
9301         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
9302         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
9303         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
9304         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
9305         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
9306         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
9307         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
9308         !defined(__c99))]: Include in this case too, since it's harmless
9309         now.
9310         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
9311         dangerous to do so.
9312         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
9313         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
9314         (_STDINT_MIN, _STDINT_MAX): New macros.
9315         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
9316         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
9317         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
9318         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
9319         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
9320         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
9321         macros, not typedefs; this simplifies things quite a bit.
9322         Use long int for all types narrower than int64_t.
9323         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
9324         Define in terms of long long int or int64_t or long int,
9325         not int64_t or int32_t.  This saves some compile-time testing.
9326         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
9327         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
9328         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
9329         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
9330         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
9331         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
9332         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
9333         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
9334         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
9335         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
9336         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
9337         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
9338         undef any previous version and define our own version, for
9339         simplicity and consistency with the new macros for types.
9340         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
9341         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
9342         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
9343         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
9344         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
9345         @WINT_T_SUFFIX@ to keep things simple here.
9346         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
9347         Simplify by assuming typical 8/16/32/64 host, since we're
9348         already doing that elsewhere anyway.
9349         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
9350         and assume long long int is 64 bits if available.  This
9351         speeds up 'configure'.
9352
9353 2006-07-01  Eric Blake  <ebb9@byu.net>
9354
9355         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
9356         Reported by Andreas Buening.
9357
9358 2006-07-01  Eric Blake  <ebb9@byu.net>
9359
9360         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
9361
9362 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
9363
9364         * lib/getaddrinfo.c: fixed typo
9365
9366 2006-06-29  Jim Meyering  <jim@meyering.net>
9367
9368         * modules/strftime (Maintainer): Add my name, since with the
9369         FPRINTFTIME changes strftime.c has forked from glibc.
9370
9371 2006-06-29  Eric Blake  <ebb9@byu.net>
9372
9373         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
9374
9375 2006-06-29  Eric Blake  <ebb9@byu.net>
9376
9377         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
9378
9379 2006-06-29  Eric Blake  <ebb9@byu.net>
9380
9381         * lib/stat_.h: New file.
9382
9383 2006-06-29  Eric Blake  <ebb9@byu.net>
9384
9385         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
9386         unused static function.
9387
9388 2006-06-29  Eric Blake  <ebb9@byu.net>
9389
9390         * doc/functions.texi (Function Portability): Document missing lstat
9391         on mingw.
9392
9393 2006-06-29  Eric Blake  <ebb9@byu.net>
9394
9395         * MODULES.html.sh: Add sys_stat.
9396         * modules/sys_stat: New module.
9397         * modules/mkstemp (Depends-on): Add sys_stat.
9398
9399 2006-06-29  Derek R. Price  <derek@ximbiot.com>
9400
9401         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
9402
9403 2006-06-29  Derek R. Price  <derek@ximbiot.com>
9404
9405         * m4/c-bs-a.m4: Removed.
9406
9407 2006-06-29  Derek R. Price  <derek@ximbiot.com>
9408
9409         * lib/strftime.c: Assume strftime() exists.
9410
9411 2006-06-29  Derek Price  <derek@ximbiot.com>
9412
9413         * modules/c-bs-a: Removed - \a is C89.
9414         * MODULES.html.sh: Remove c-bs-a.
9415
9416 2006-06-29  Bruno Haible  <bruno@clisp.org>
9417
9418         * modules/wcwidth (License): Change to LGPL.
9419
9420 2006-06-28  Simon Josefsson  <jas@extundo.com>
9421
9422         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
9423         on _WIN32.
9424
9425         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
9426         getnameinfo.
9427
9428 2006-06-28  Simon Josefsson  <jas@extundo.com>
9429
9430         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
9431
9432 2006-06-28  Simon Josefsson  <jas@extundo.com>
9433
9434         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
9435         functions there.  It will succeed on Windows XP, but on Windows
9436         2000 and (presumably) earlier, it will fail, and use the internal
9437         re-implementation.
9438         (use_win32_p): New function.
9439         (getaddrinfo): Use strtoul on servname, to support numeric ports.
9440         Support AI_NUMERICSERV to disable getservbyname.
9441         (getnameinfo): New function, only supports
9442         NI_NUMERICHOST|NI_NUMERICSERV for now.
9443
9444         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
9445         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
9446         getnameinfo.
9447
9448 2006-06-28  Eric Blake  <ebb9@byu.net>
9449
9450         * modules/wcwidth: New file.
9451         * modules/mbchar (Depends-on): Add wcwidth.
9452         * modules/mbswidth (Depends-on): Add wcwidth.
9453         * MODULES.html.sh: Add wcwidth.
9454
9455 2006-06-28  Eric Blake  <ebb9@byu.net>
9456
9457         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
9458         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
9459
9460 2006-06-28  Eric Blake  <ebb9@byu.net>
9461
9462         * lib/xvasprintf.h: Fix comments.
9463
9464 2006-06-28  Eric Blake  <ebb9@byu.net>
9465
9466         * lib/mbchar.h (wcwidth): Include wcwidth.h.
9467         * lib/mbswidth.c (wcwidth): Move from here...
9468         * lib/wcwidth.h: ...to this new file.
9469
9470 2006-06-28  Derek R. Price  <derek@ximbiot.com>
9471
9472         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
9473
9474         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
9475         it's obsolete.
9476         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
9477
9478 2006-06-28  Derek R. Price  <derek@ximbiot.com>
9479
9480         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
9481         Autoconf 2.60 says this stuff was obsolete.
9482
9483 2006-06-28  Bruno Haible  <bruno@clisp.org>
9484
9485         * modules/wcwidth (Files): Add m4/wchar_t.m4.
9486
9487 2006-06-28  Bruno Haible  <bruno@clisp.org>
9488
9489         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
9490         gt_TYPE_WCHAR_T.
9491
9492 2006-06-28  Bruno Haible  <bruno@clisp.org>
9493
9494         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
9495         declaration for wcwidth.
9496         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
9497
9498 2006-06-28  Bruno Haible  <bruno@clisp.org>
9499
9500         * lib/mkdtemp.c [MINGW]: Include <io.h>.
9501         (mkdir): Define using _mkdir.
9502
9503 2006-06-28  Bruno Haible  <bruno@clisp.org>
9504
9505         * lib/getaddrinfo.h: Fix POSIX URL.
9506         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
9507         _WIN32.
9508         (use_win32_p): Make static.
9509         (getaddrinfo): Reject service name if it is empty or does not consist
9510         solely of decimal digits, or if its value is > 65535.
9511         (getnameinfo): Remove useless casts.
9512
9513 2006-06-27  Simon Josefsson  <jas@extundo.com>
9514
9515         * modules/sys_select: New file, suggested by Bruno Haible, Paul
9516         Eggert and Martin Lambers.
9517
9518 2006-06-27  Simon Josefsson  <jas@extundo.com>
9519
9520         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
9521         Eggert and Martin Lambers.
9522
9523 2006-06-27  Bruno Haible  <bruno@clisp.org>
9524
9525         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
9526         result to 0, not to empty.
9527         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
9528
9529 2006-06-27  Bruno Haible  <bruno@clisp.org>
9530
9531         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
9532
9533 2006-06-26  Simon Josefsson  <jas@extundo.com>
9534
9535         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
9536         present.
9537
9538 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
9539
9540         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
9541         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
9542         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
9543
9544 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
9545
9546         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
9547
9548 2006-06-26  Bruno Haible  <bruno@clisp.org>
9549
9550         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
9551
9552 2006-06-26  Bruno Haible  <bruno@clisp.org>
9553
9554         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
9555
9556 2006-06-26  Bruno Haible  <bruno@clisp.org>
9557
9558         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
9559         SGI C compiler in pre-C99 mode.
9560         Suggested by Mark D. Baushke and Larry Jones.
9561
9562 2006-06-26  Bruno Haible  <bruno@clisp.org>
9563
9564         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
9565         WCHAR_MAX.
9566         Reported by Mark D. Baushke and Larry Jones.
9567
9568 2006-06-26  Bruno Haible  <bruno@clisp.org>
9569
9570         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
9571         in pre-C99 mode.
9572         Suggested by Mark D. Baushke and Larry Jones.
9573
9574 2006-06-23  Simon Josefsson  <jas@extundo.com>
9575             Bruno Haible  <bruno@clisp.org>
9576
9577         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
9578         Emit mostlyclean-local rule.
9579         (func_emit_tests_Makefile_am): Likewise.
9580         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
9581
9582 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
9583
9584         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
9585
9586 2006-06-23  Bruno Haible  <bruno@clisp.org>
9587
9588         * tests/test-stdint.c: Update to match ISO C 99 Technical
9589         Corrigendum 1.
9590
9591 2006-06-23  Bruno Haible  <bruno@clisp.org>
9592
9593         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
9594
9595 2006-06-23  Bruno Haible  <bruno@clisp.org>
9596
9597         * lib/stdint_.h: Treat IRIX like OpenBSD.
9598
9599 2006-06-23  Bruno Haible  <bruno@clisp.org>
9600
9601         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
9602         ISO C 99 Technical Corrigendum 1.
9603
9604 2006-06-22  Simon Josefsson  <jas@extundo.com>
9605
9606         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
9607         MinGW.
9608
9609 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
9610
9611         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
9612         needed.  Some compiler complained about some of them.  Problem reported
9613         by Larry Jones in
9614         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
9615
9616 2006-06-21  Simon Josefsson  <jas@extundo.com>
9617
9618         * tests/test-getaddrinfo.c: New file.
9619
9620         * modules/getaddrinfo-tests: New file.
9621
9622         * MODULES.html.sh: Add inet_pton.
9623
9624         * modules/inet_pton: New file.
9625
9626 2006-06-21  Simon Josefsson  <jas@extundo.com>
9627
9628         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
9629         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
9630         of using the (limited) gnulib implementation on Windows XP.
9631
9632         * m4/inet_pton.m4: New file.
9633
9634 2006-06-21  Simon Josefsson  <jas@extundo.com>
9635
9636         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
9637         variable.
9638
9639         * lib/socket_.h: Don't define WINVER.
9640
9641         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
9642         slightly modified to work in gnulib.
9643
9644 2006-06-21  Simon Josefsson  <jas@extundo.com>
9645
9646         * doc/gnulib.texi (Windows sockets): Add.
9647
9648 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
9649
9650         * lib/read-file.c (fread_file): Start with buffer allocation of
9651         0 bytes rather than 1 byte; this simplifies the code.
9652         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
9653         code to free buffer and save/restore errno.
9654         (internal_read_file): Remove unused local.
9655
9656 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
9657
9658         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
9659         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
9660         Problem reported by Denis Excoffier in
9661         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
9662
9663 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
9664
9665         * modules/sys_socket, modules/socklen: Include sys/types since
9666         FreeBSD 4.x's sys/socket.h needs it.
9667
9668 2006-06-19  Simon Josefsson  <jas@extundo.com>
9669
9670         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
9671
9672 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
9673
9674         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
9675
9676 2006-06-19  Bruno Haible  <bruno@clisp.org>
9677
9678         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
9679         and FULL_PATH_INTTYPES_H in angle brackets.
9680         Reported by Mark D. Baushke <mdb@gnu.org>.
9681
9682 2006-06-17  Eric Blake  <ebb9@byu.net>
9683
9684         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
9685         errno.
9686
9687 2006-06-17  Bruno Haible  <bruno@clisp.org>
9688
9689         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
9690         <sys/inttypes.h>.
9691
9692 2006-06-17  Bruno Haible  <bruno@clisp.org>
9693
9694         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
9695         whether errno is declared. Assume <errno.h> declares errno.
9696
9697 2006-06-17  Bruno Haible  <bruno@clisp.org>
9698
9699         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
9700
9701 2006-06-17  Bruno Haible  <bruno@clisp.org>
9702
9703         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
9704         problem on Solaris 2.5.1.
9705
9706 2006-06-16  Eric Blake  <ebb9@byu.net>
9707
9708         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
9709         * lib/unicodeio.c [!defined errno]: Likewise.
9710         * lib/strtol.c [!defined errno]: Likewise.
9711         * lib/strtod.c [!defined errno]: Likewise.
9712
9713 2006-06-15  Eric Blake  <ebb9@byu.net>
9714
9715         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
9716
9717 2006-06-15  Eric Blake  <ebb9@byu.net>
9718
9719         * config/srclist.txt (ssize_t.m4): Lose sync.
9720
9721 2006-06-15  Bruno Haible  <bruno@clisp.org>
9722
9723         * modules/stdint (Files): Include m4/full-header-path.m4,
9724         m4/size_max.m4, m4/wchar_t.m4.
9725         (Makefile.am): Many more substitutions.
9726         * modules/stdint-tests: New file.
9727         * tests/test-stdint.c: New file.
9728
9729 2006-06-15  Bruno Haible  <bruno@clisp.org>
9730
9731         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
9732         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
9733         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
9734         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
9735         gl_CHECK_TYPE_SAME): New macros.
9736
9737 2006-06-15  Bruno Haible  <bruno@clisp.org>
9738
9739         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
9740
9741 2006-06-15  Bruno Haible  <bruno@clisp.org>
9742
9743         * lib/stdint_.h: Rewritten to be fully auto-configured.
9744         Fixes bug on HP-UX/IA64.
9745
9746 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
9747
9748         * lib/getdate.y (__attribute__): Don't define if already defined.
9749         Problem reported by Larry Jones.
9750         * lib/utimens.c (__attribute__): Likewise.
9751
9752 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
9753
9754         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
9755         reported by Andreas Schwab.
9756
9757 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9758             Bruno Haible  <bruno@clisp.org>
9759
9760         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
9761         check for the declaration of strnlen and a run test that exposes the
9762         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
9763         rpl_strndup.
9764
9765 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9766             Bruno Haible  <bruno@clisp.org>
9767
9768         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
9769
9770 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9771
9772         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
9773         compile test, for Tru64 4.0D.
9774
9775 2006-05-28  Karl Berry  <karl@gnu.org>
9776
9777         * config/srclist.txt (printf-args.c): lose sync.
9778
9779 2006-05-26  Martin Lambers  <marlam@marlam.de>
9780
9781         * lib/getpass.c: Updates the test for the native W32 API, and adds
9782         missing includes, thus fixing compilation warnings.
9783
9784 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
9785
9786         * lib/exclude.c (exclude_fnmatch): New function.
9787         (excluded_file_name): Call exclude_fnmatch.
9788         * lib/exclude.h (excluded_file_name): New prototype
9789
9790 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
9791
9792         * lib/tempname.c (small_open, large_open): New macros.
9793         (__open, __open64) [!_LIBC]: Remove.
9794         (__gen_tempname): Use small_open and large_open instead of __open
9795         and __open64.  This fixes a portability bug on HP-UX 11.11i
9796         reported by Simon Wing-Tang in
9797         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
9798
9799 2006-05-24  Bruno Haible  <bruno@clisp.org>
9800
9801         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
9802         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
9803         Reported by Thorsten Maerz <torte@netztorte.de> via
9804         Aaron Stone <aaron@serendipity.cx>.
9805
9806 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
9807
9808         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
9809         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
9810         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
9811         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
9812         not really conditional on the cache.
9813         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
9814
9815 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
9816
9817         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
9818         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
9819         (my_usleep): Don't mishandle maximum value.
9820
9821 2006-05-19  Jim Meyering  <jim@meyering.net>
9822
9823         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
9824
9825 2006-05-17  Bruno Haible  <bruno@clisp.org>
9826
9827         Cygwin portability.
9828         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
9829
9830 2006-05-17  Bruno Haible  <bruno@clisp.org>
9831
9832         * lib/stdint_.h: Fix recognition of Cygwin.
9833
9834 2006-05-15  Bruno Haible  <bruno@clisp.org>
9835
9836         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
9837         on libtool patch by Ralf Wildenhues.
9838
9839 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
9840
9841         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
9842         test for C99 conformance; (bool) 0.5 is an integer constant
9843         expression, but (bool) -0.5 is not.  Problem reported by Fedor
9844         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
9845
9846 2006-05-11  Simon Josefsson  <jas@extundo.com>
9847
9848         * m4/xvasprintf.m4: Fix obvious typo.
9849
9850 2006-05-11  Jim Meyering  <jim@meyering.net>
9851
9852         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
9853         James Lemley.
9854
9855 2006-05-10  Simon Josefsson  <jas@extundo.com>
9856
9857         * lib/md4.c: Typo fix, update copyright years.
9858         (K1, K2): Don't use L because it turn computations into 64-bit on
9859         64-bit platforms.
9860
9861 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
9862
9863         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
9864         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
9865         unwanted sign propagation, e.g., on hosts with 64-bit int.
9866         There still are some problems with reeelly weird theoretical hosts
9867         (e.g., 33-bit int) but it's not worth worrying about now.
9868         * lib/sha1.c (rol): Likewise.
9869         (K1, K2, K3, K4): Remove unnecessary L suffix.
9870
9871 2006-05-10  Bruno Haible  <bruno@clisp.org>
9872
9873         * lib/des.c: Cast to avoid warnings.
9874
9875 2006-05-09  Bruno Haible  <bruno@clisp.org>
9876
9877         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
9878         (Depends-on): Depend also on xsize, stdarg.
9879         (configure.ac): Add gl_XVASPRINTF.
9880
9881 2006-05-09  Bruno Haible  <bruno@clisp.org>
9882
9883         * m4/xvasprintf.m4: New file.
9884
9885 2006-05-09  Bruno Haible  <bruno@clisp.org>
9886
9887         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
9888         (EOVERFLOW): Define fallback value.
9889         (xstrcat): New function.
9890         (xvasprintf): Recognize the special case of a string concatenation.
9891
9892 2006-05-08  Eric Blake  <ebb9@byu.net>
9893
9894         * gnulib-tool (func_version): Base copyright year on CVS date.
9895         (func_emit_copyright_notice): New function.
9896         (func_emit_lib_Makefile_am): Use it.
9897         (func_emit_tests_Makefile_am): Likewise.
9898         (func_import): Likewise.
9899
9900 2006-05-08  Bruno Haible  <bruno@clisp.org>
9901
9902         * modules/stdarg: New file.
9903         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
9904
9905 2006-05-08  Bruno Haible  <bruno@clisp.org>
9906
9907         * m4/stdarg.m4: New file, from GNU gettext.
9908
9909 2006-05-08  Bruno Haible  <bruno@clisp.org>
9910
9911         * config/srclist.txt (build-aux/config.rpath): different from latest
9912         release.
9913
9914 2006-05-08  Bruno Haible  <bruno@clisp.org>
9915
9916         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
9917
9918 2006-05-05  Jim Meyering  <jim@meyering.net>
9919
9920         * m4/warning.m4: New file, derived from bison's file by the same name.
9921
9922 2006-05-03  Bruno Haible  <bruno@clisp.org>
9923
9924         * lib/stdint_.h: Shorter URL.
9925         * lib/inttypes.h: Likewise.
9926
9927 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
9928
9929         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
9930
9931 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
9932
9933         * lib/verify.h: Document the internals better.  Most of this change
9934         was written by Bruno Haible.
9935
9936 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
9937
9938         * doc/verify.texi: New file, partly based on a proposal by
9939         Bruno Haible.
9940
9941 2006-05-02  Bruno Haible  <bruno@clisp.org>
9942
9943         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
9944         test from here...
9945         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
9946
9947 2006-04-29  Bruno Haible  <bruno@clisp.org>
9948
9949         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
9950         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
9951
9952 2006-04-29  Bruno Haible  <bruno@clisp.org>
9953
9954         * gnulib-tool: Make --update option actually work.
9955
9956 2006-04-29  Bruno Haible  <bruno@clisp.org>
9957
9958         * doc/gcd.texi: New file.
9959         * doc/gnulib.texi: Include it.
9960
9961 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
9962
9963         * lib/getdate.y (get_date): When adding relative date, start with the
9964         initial time, not with the result of the first mktime call.
9965
9966 2006-04-25  Bruno Haible  <bruno@clisp.org>
9967
9968         * gnulib-tool (func_import): Output the include directives in three
9969         blocks, sorted separately.
9970         Reported by Ben Pfaff <blp@cs.stanford.edu>.
9971
9972 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
9973
9974         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
9975         to define main with arguments, for C++.  Reported by Eric Blake.
9976         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
9977         Prefer 'int main ()' to 'int main (void)', for C++.
9978         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
9979         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
9980         for 'main', for C99 and C++.
9981
9982 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
9983
9984         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
9985         Don't assume that exit status -1 is valid.
9986         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
9987         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
9988         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
9989         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
9990         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
9991         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
9992         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
9993         functions can be used without declaring them, or that you can
9994         exit with status -1.
9995         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
9996
9997 2006-04-24  Karl Berry  <karl@gnu.org>
9998
9999         * config/srclist.txt (longdouble.m4): sync lost.
10000
10001 2006-04-24  Eric Blake  <ebb9@byu.net>
10002
10003         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
10004
10005 2006-04-24  Bruno Haible  <bruno@clisp.org>
10006
10007         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
10008         poll() implementation in AIX.
10009         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10010
10011 2006-04-24  Bruno Haible  <bruno@clisp.org>
10012
10013         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
10014         assigned exactly once.
10015
10016 2006-04-23  Claudio Fontana  <claudio@gnu.org>
10017             Bruno Haible  <bruno@clisp.org>
10018
10019         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
10020         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
10021         for AM_CPPFLAGS.
10022
10023 2006-04-23  Bruno Haible  <bruno@clisp.org>
10024
10025         * modules/copy-file: Depend on unistd.
10026         * modules/execute: Likewise.
10027         * modules/fatal-signal: Likewise.
10028         * modules/findprog: Likewise.
10029         * modules/mkdtemp : Likewise.
10030         * modules/pipe: Likewise.
10031         * modules/wait-process: Likewise.
10032
10033 2006-04-23  Bruno Haible  <bruno@clisp.org>
10034
10035         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
10036         condition was already detected.
10037         Reported by Ben Pfaff <blp@cs.stanford.edu>.
10038
10039 2006-04-23  Bruno Haible  <bruno@clisp.org>
10040
10041         * lib/copy-file.c: Include <unistd.h> unconditionally.
10042         * lib/execute.c: Likewise.
10043         * lib/fatal-signal.c: Likewise.
10044         * lib/findprog.c: Likewise.
10045         * lib/mkdtemp.c: Likewise.
10046         * lib/pipe.h: Likewise.
10047         * lib/pipe.c: Likewise.
10048         * lib/wait-process.h: Likewise.
10049
10050 2006-04-23  Bruno Haible  <bruno@clisp.org>
10051
10052         * gnulib-tool (func_usage): Fix --import description. Document
10053         --update.
10054         (func_import): Create temporary file in a temporary directory, if
10055         --dry-run is specified. Silence errors from 'grep' when there are no
10056         m4 files in $m4dir.
10057         (func_create_testdir): Silence errors from 'grep' when there are no
10058         m4 files in $m4dir.
10059         Reported by Karl Berry <karl@freefriends.org>.
10060
10061 2006-04-20  Bruno Haible  <bruno@clisp.org>
10062
10063         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
10064         one argument, so that the code will be portable to Autoconf 2.60.
10065         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
10066         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
10067         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
10068
10069 2006-04-19  Derek Price  <derek@ximbiot.com>
10070             Eric Blake  <ebb9@byu.net>
10071
10072         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
10073         rather than "/full/path.h".  Update comment to match.  Shorten &
10074         generalize m4_translit call via AS_TR_CPP.
10075
10076 2006-04-19  Derek Price  <derek@ximbiot.com>
10077             Eric Blake  <ebb9@byu.net>
10078
10079         * lib/inttypes.h: Correct grammar in comment.
10080
10081 2006-04-18  Derek Price  <derek@ximbiot.com>
10082             Paul Eggert  <eggert@cs.ucla.edu>
10083
10084         * modules/inttypes: New file.
10085         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
10086
10087 2006-04-18  Derek Price  <derek@ximbiot.com>
10088             Paul Eggert  <eggert@cs.ucla.edu>
10089
10090         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
10091         New files.
10092
10093 2006-04-18  Derek Price  <derek@ximbiot.com>
10094             Paul Eggert  <eggert@cs.ucla.edu>
10095
10096         * lib/inttypes.h: New file.
10097         * lib/strtoimax.c: Assume <inttypes.h>.
10098
10099 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
10100
10101         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
10102         isn't mounted.  Problem reported by Kir Kolyshkin.
10103
10104 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
10105
10106         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
10107         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
10108         Derek R. Price.
10109         * lib/regex.h (RE_DUP_MAX): Update comment to match current
10110         implementation.
10111
10112 2006-04-12  Eric Blake  <ebb9@byu.net>
10113
10114         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
10115         is now done automatically by the corresponding Autoconf macro.
10116
10117 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
10118
10119         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
10120         time_r.h.
10121
10122 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
10123
10124         Merge regex changes from libc, removing some of our
10125         POSIX-conformance changes that were rejected and redoing them in a
10126         less-intrusive way.
10127
10128         * lib/regcomp.c (re_compile_internal, init_dfa):
10129         Length arg is now size_t, not Idx.  All uses changed.
10130         (peek_token): Forward decl now says internal_function.
10131         (__re_error_msgid, __re_error_msgid_idx):
10132         Now static rather than extern with attribute_hidden.
10133         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
10134         For some reason libc prefers K&R style defns for external functions.
10135         (regerror) [!defined _LIBC]: Likewise.
10136         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
10137         (seek_collating_symbol_entry, lookup_collation_sequence_value):
10138         (build_range_exp, build_collating_symbol):
10139         Use K&R-style defn.
10140         (re_compile_fastmap): Use '\0' to memset, not 0.
10141         (utf8_sb_map): Make the calculations more obvious.
10142         (init_dfa, parse_bracket_exp, build_charclass_op):
10143         Call calloc and cast result, as glibc does.
10144         (init_word_char, fetch_token, peek_token, peek_token_bracket):
10145         (build_range_exp, build_collating_symbol):
10146         Now internal functions.
10147
10148         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
10149
10150         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
10151         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
10152         Don't depend on VMS; depend on __VMS instead, for POSIX
10153         namespace cleanness.
10154         (regoff_t): Define to ssize_t, not long int.
10155
10156         Remove the REG_ macros named below.  Instead, make the old names
10157         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
10158         __USE_GNU_REGEX.
10159         (REG_BACKSLASH_ESCAPE_IN_LISTS):
10160         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
10161         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
10162         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
10163         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
10164         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
10165         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
10166         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
10167         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
10168         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
10169         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
10170         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
10171         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
10172         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
10173         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
10174         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
10175         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
10176         (REG_NREGS):
10177         Remove.  All uses replaced by the old RE_* names.
10178         (RE_BACKSLASH_ESCAPE_IN_LISTS):
10179         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
10180         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
10181         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
10182         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
10183         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
10184         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
10185         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
10186         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
10187         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
10188         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
10189         Don't bother having these macros be independent of each others'
10190         values, since they no longer exist in the POSIX name space.
10191
10192         Rename the following member names back to their old names,
10193         unless !__USE_GNU_REGEX.  All uses changed back.
10194         (buffer): Renamed from re_buffer.
10195         (allocated): Renamed from re_allocated.
10196         (used): Renamed from re_used.
10197         (syntax): Renamed from re_syntax.
10198         (fastmap): Renamed from re_fastmap.
10199         (translate): Renamed from re_translate.
10200         (can_be_null): Renamed from re_can_be_null.
10201         (regs_allocated): Renamed from re_regs_allocated.
10202         (fastmap_accurate): Renamed from re_fastmap_accurate.
10203         (no_sub): Renamed from re_no_sub.
10204         (not_bol): Renamed from re_not_bol.
10205         (not_eol): Renamed from re_not_eol.
10206         (newline_anchor): Renamed from re_newline_anchor.
10207         (num_regs): Renamed from rm_num_regs.
10208         (start): Renamed from rm_start.
10209         (end): Renamed from rm_end.
10210
10211         (free_state): Move up a bit.
10212
10213         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
10214         #define to be empty.
10215         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
10216         when that is what is intended.
10217         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
10218         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
10219         (MAX): New macro.
10220         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
10221         All uses changed back to re_malloc, etc.  It's now the caller's
10222         responsibility to check for overflow; all callers changed.
10223         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
10224         (re_x2nrealloc): Remove.
10225         (free_state): Remove decl.
10226
10227         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
10228         (re_set_registers, re_exec):
10229         Use K&R-style defn.
10230
10231         2006-01-31  Roland McGrath  <roland@redhat.com>
10232
10233         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
10234         Reported by Mike Frysinger <vapier@gentoo.org>.
10235
10236         2006-01-15  Andreas Jaeger  <aj@suse.de>
10237
10238         [BZ #1950]
10239         * lib/regex_internal.c (re_string_reconstruct): Adjust for
10240         build_wcs_upper_buffer change.
10241         (build_wcs_upper_buffer): Change return type.
10242
10243         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
10244
10245         * lib/regex_internal.h: Include <stdint.h> if available.
10246
10247         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
10248
10249         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
10250
10251         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
10252
10253         * lib/regcomp.c: Adjust for changed secondary hash function.
10254
10255         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
10256
10257         * lib/regex.h: Pretty printing.
10258         Clean up namespace a bit.
10259
10260         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
10261
10262         * lib/regexec.c (update_cur_sifted_state, check_arrival,
10263         check_arrival_add_next_nodes): Avoid using uninitialized variable.
10264
10265         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
10266                     Ulrich Drepper  <drepper@redhat.com>
10267
10268         [BZ #1302]
10269         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
10270         changed.
10271         (bitset_word_t): Renamed from bitset_word.  All uses changed.
10272
10273         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
10274
10275         [BZ #281]
10276         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
10277         * lib/regcomp.c: Remove unnecessary uses of
10278         unsigned RE_TRANSLATE_TYPE.
10279         * lib/regex_internal.h: Likewise.
10280         * lib/regex_internal.c: Likewise.
10281         * lib/regexec.c: Likewise.
10282         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
10283
10284         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
10285
10286         * lib/regexec.c (find_recover_state): Remove unnecessary
10287         initialization.
10288         (transit_state_bkref): Make DFA a const pointer.
10289         (get_subexp): Likewise.
10290         (check_arrival): Likewise.
10291         (update_cur_sifted_state): Likewise.
10292         (re_search_internal): Likewise.
10293         (prune_impossible_nodes): Likewise.
10294         (acquire_init_state_context): Likewise.
10295         (proceed_next_node): Likewise.
10296         (set_regs): Likewise.
10297         (free_fail_stack_return): Likewise.
10298         (check_arrival_expand_ecl): Mark DFA parameter as const.
10299         (check_arrival_expand_ecl_sub): Likewise.
10300         (check_subexp_limits): Likewise.
10301         (sub_epsilon_src_nodes):  Likewise.
10302         (add_epsilon_src_nodes):  Likewise.
10303         (merge_state_array): Likewise.
10304         (update_regs): Likewise.
10305         (build_trtable): Likewise.
10306         (sift_states_backward): Mark MCTX parameter as const.
10307         (build_sifted_states): Likewise.
10308         (update_cur_sifted_state): Likewise.
10309         (sift_states_mkref): Likewise.
10310         (check_arrival_expand_ecl): Mark eclosure as const.
10311         (check_dst_limits_calc_pos_1): Likewise.
10312         * lib/regex_internal.h (re_match_context_t): Make dfa a const
10313         pointer.
10314
10315         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
10316
10317         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
10318         (transit_state_sb): Likewise.
10319         (transit_state_mb): Likewise.
10320         (sift_states_iter_mb): Likewise.
10321         (check_arrival_add_next_nodes): Likewise.
10322         (check_node_accept_bytes): Change first parameter to pointer-to-const.
10323         [_LIBC] (re_search_2_stub): Use mempcpy.
10324
10325         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
10326         mbrtowc for very simple UTF-8 case.
10327
10328         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
10329         a pointer-to-const.
10330         (re_acquire_state_context): Likewise.
10331         * lib/regex_internal.h: Adjust prototypes.
10332
10333         * lib/regex.c: Prevent using C++ compilers.
10334
10335         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
10336         (re_acquire_state_context): Likewise.
10337
10338 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
10339
10340         * modules/regex (Depends-on): Add ssize_t.
10341
10342 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
10343
10344         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
10345         translation table.
10346
10347 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
10348
10349         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
10350
10351 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
10352             Bruno Haible  <bruno@clisp.org>
10353
10354         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
10355         <sys/types.h> and <inttypes.h>.
10356
10357 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10358
10359         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
10360         `__error_t_defined', so argp.h will not typedef the former.
10361
10362 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
10363
10364         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
10365         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
10366         glibc names.  Even if glibc is changed to conform to POSIX, the
10367         traditional names will be available anyway, since regex depends on
10368         the extensions module.  Also, fix a longstanding typo in the
10369         implementation of Spencer ERE test #75 from grep 2.3.  Problems
10370         reported by Emanuele Giaquinta.  Also, change sense of cached
10371         variable, so that the message makes sense.
10372
10373 2006-03-24  Simon Josefsson  <jas@extundo.com>
10374
10375         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
10376         including some doc fixes.
10377         (base64_encode_alloc): Fix +1 bug on allocation failures.
10378
10379 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10380
10381         * lib/base64.c (base64_encode): Do not read past end of array with
10382         unsanitized input on systems with CHAR_BIT > 8.
10383
10384 2006-03-24  Eric Blake  <ebb9@byu.net>
10385
10386         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
10387
10388 2006-03-22  Karl Berry  <karl@gnu.org>
10389
10390         * config/srclist.txt (*setenv.[ch]): get from coreutils.
10391         * config/srclistvars.sh (COREUTILS): new var.
10392
10393 2006-03-17  Jim Meyering  <jim@meyering.net>
10394
10395         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
10396         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
10397
10398 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
10399
10400         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
10401         no longer needs it.  Instead, check that regoff_t is as least
10402         as wide as ptrdiff_t.
10403
10404         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
10405         so that our regex.h stays compatible with the installed regex.
10406         This is helpful for installers who configure --without-included-regex.
10407         Problem reported by Emanuele Giaquinta.
10408
10409 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
10410
10411         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
10412         Typedef to long int, not to off_, as POSIX will likely change
10413         in that direction.
10414
10415 2006-03-15  Eric Blake  <ebb9@byu.net>
10416
10417         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
10418
10419 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
10420
10421         * lib/argp-help.c (validate_uparams): Fix typo
10422         * lib/argp-parse.c (argp_default_options): Consistently begin help
10423         messages with a lowercase letter.
10424
10425 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
10426
10427         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
10428         overrun buffers and shouldn't be used (much as gets shouldn't be
10429         used).
10430         * lib/time_r.c (asctime_r, ctime_r): Likewise.
10431
10432 2006-03-08  Simon Josefsson  <jas@extundo.com>
10433
10434         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
10435         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10436
10437 2006-03-08  Simon Josefsson  <jas@extundo.com>
10438
10439         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
10440         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10441
10442 2006-03-08  Simon Josefsson  <jas@extundo.com>
10443
10444         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
10445         signal that configure disabled the device.
10446
10447 2006-03-08  Simon Josefsson  <jas@extundo.com>
10448
10449         * build-aux/maint.mk: Fix refresh-po, to handle no translated
10450         languages.
10451
10452 2006-03-07  Simon Josefsson  <jas@extundo.com>
10453
10454         * modules/getopt (Depends-on): Add unistd.
10455
10456         * modules/unistd: New file.
10457
10458 2006-03-07  Simon Josefsson  <jas@extundo.com>
10459
10460         * modules/gc-random: New file.
10461
10462 2006-03-07  Simon Josefsson  <jas@extundo.com>
10463
10464         * m4/unistd_h.m4: New file.
10465
10466 2006-03-07  Simon Josefsson  <jas@extundo.com>
10467
10468         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
10469         test to be side-effect free by storing the result in the cache
10470         variable gl_cv_lib_readline, and moving the assignment of
10471         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
10472         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10473
10474 2006-03-07  Simon Josefsson  <jas@extundo.com>
10475
10476         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
10477         error on missing devices (the functions will return an error).
10478
10479         * m4/gc.m4: Move random stuff to gc-random.m4
10480
10481 2006-03-07  Simon Josefsson  <jas@extundo.com>
10482
10483         * lib/unistd_.h: New file.
10484
10485 2006-03-07  Simon Josefsson  <jas@extundo.com>
10486
10487         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
10488
10489 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
10490
10491         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
10492         Problem reported by Juan Manuel Guerrero.
10493
10494 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
10495
10496         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
10497         the unistd module.
10498         * lib/getlogin_r.c: Likewise.
10499         * lib/getlogin_r.h: Likewise.
10500         * lib/glob.c: Likewise.
10501         * lib/pagealign_alloc.c: Likewise.
10502         * lib/unistd_.h: Remove; no longer needed.
10503
10504 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
10505
10506         * MODULES.html.sh (Support for systems lacking POSIX:2001):
10507         Add unistd.
10508         * modules/c-stack (Depends-on): Add unistd.
10509         * modules/getlogin_r: Likewise.
10510         * modules/glob: Likewise.
10511         * modules/pagealign_alloc: Likewise.
10512         * modules/unistd (Files): Remove lib/unistd_.h.
10513         (EXTRA_DIST): Remove.
10514         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
10515         need unistd_.h.
10516         (MOSTLYCLEANFILES): Remove unistd.h-t.
10517
10518 2006-03-03  Simon Josefsson  <jas@extundo.com>
10519
10520         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
10521
10522 2006-03-03  Simon Josefsson  <jas@extundo.com>
10523
10524         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
10525         libidn and bison.
10526
10527 2006-03-03  Simon Josefsson  <jas@extundo.com>
10528
10529         * build-aux/maint.mk: Add indent target.
10530
10531 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
10532
10533         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
10534         our replacement poll.h in any case, to avoid a differing
10535         declaration from a system header.  Seen on AIX.
10536
10537 2006-03-01  Simon Josefsson  <jas@extundo.com>
10538
10539         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
10540         <kasal@ucw.cz>.
10541
10542 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
10543
10544         * modules/gettime (Depends-on): Add extensions module.
10545         * modules/nanosleep (Depends-on): Likewise.
10546         * modules/settime (Depends-on): Likewise.
10547
10548 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
10549
10550         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
10551         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
10552         pedantically.
10553         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
10554         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
10555
10556         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
10557         not "==".  Reported by Ralf Wildenhues.
10558
10559 2006-03-01  Karl Berry  <karl@gnu.org>
10560
10561         * doc/Copyright/request-*: new files, synced from gnuorg.
10562
10563 2006-03-01  Karl Berry  <karl@gnu.org>
10564
10565         * config/srclist.txt (Copyright/*): new entries.
10566
10567 2006-02-28  Simon Josefsson  <jas@extundo.com>
10568
10569         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
10570
10571 2006-02-27  Simon Josefsson  <jas@extundo.com>
10572
10573         * lib/base64.h: Indent #define's.  From Jim Meyering
10574         <jim@meyering.net>.
10575
10576 2006-02-27  Jim Meyering  <jim@meyering.net>
10577
10578         Revert the change of 2006-02-24, so these files can continue
10579         to be sync'd from gettext.
10580         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
10581         of `config.h'.
10582
10583 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
10584
10585         * modules/intprops: New file.
10586         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
10587         Add intprops.
10588         * modules/getloadavg (Files): Remove lib/intprops.h.
10589         (Depends-on): Add intprops.
10590         * modules/human: Likewise.
10591         * modules/inttostr: Likewise.
10592         * modules/openat: Likewise.
10593         * modules/sig2str: Likewise.
10594         * modules/userspec: Likewise.
10595         * modules/utimecmp: Likewise.
10596         * modules/xnanosleep: Likewise.
10597         * modules/xstrtol: Likewise.
10598
10599 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
10600
10601         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
10602         * modules/lock-tests (TESTS): Use $(EXEEXT).
10603         * modules/tls-tests: Likewise.
10604         * modules/argp-tests: Likewise.
10605         (check_PROGRAMS): New var, replacing...
10606         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
10607
10608 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10609
10610         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
10611         `config.h'.
10612
10613 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
10614
10615         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
10616
10617 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10618
10619         Sync from coreutils.
10620         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
10621         gl_CHDIR_SAFER.
10622
10623 2006-02-22  Jim Meyering  <jim@meyering.net>
10624
10625         Sync from coreutils.
10626         * m4/chdir-safer.m4: New file.
10627
10628 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
10629
10630         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
10631         AT_FDCWD exceeds INT_MAX.
10632         * lib/openat.h (AT_FDCWD): Likewise.
10633
10634 2006-02-17  Eric Blake  <address@hidden>
10635
10636         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
10637
10638 2006-02-16  Simon Josefsson  <jas@extundo.com>
10639
10640         * modules/getaddrinfo (Depends-on): Add sys_socket.
10641
10642 2006-02-15  Simon Josefsson  <jas@extundo.com>
10643
10644         * build-aux/maint.mk: Add dsyntax-check rule.
10645
10646 2006-02-15  Eric Blake  <ebb9@byu.net>
10647
10648         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
10649         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
10650         'present but cannot compile' warnings on cygwin.
10651         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
10652         use ws2tcpip.h if sys/socket.h works.
10653         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
10654         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
10655
10656 2006-02-14  Simon Josefsson  <jas@extundo.com>
10657
10658         * modules/maintainer-makefile (Files): Rename.
10659
10660         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
10661         and (the local) Makefile.cfg to maint-cfg.mk.
10662
10663         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
10664         to the latter.
10665
10666         * modules/maintainer-makefile: New module.
10667
10668         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
10669         severaly stripped to make it possible to build it up from scratch
10670         with reliable tests.
10671
10672         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
10673         fixes to permit overriding the default actions when configure and
10674         makefile are not available.
10675
10676 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
10677
10678         Sync from coreutils.
10679         * modules/lstat (Depends-on): Don't depend on xalloc.
10680         (License): Change from GPL to LGPL, since this is now simply a
10681         replacement for a libc function.
10682
10683 2006-02-14  Jim Meyering  <jim@meyering.net>
10684
10685         Sync from coreutils.
10686
10687         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
10688         failure on deficient systems, and simplify gnulib lgpl dependencies.
10689         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
10690         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
10691
10692         * lib/xalloc-die.c: Remove unused definition of N_.
10693
10694 2006-02-14  Jim Meyering  <jim@meyering.net>
10695
10696         Sync from coreutils.
10697         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
10698         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
10699         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
10700         double-quote uses of that variable, to accommodate the rare case in
10701         which getmntent is available in none of the libraries checked.  This
10702         happens at least on FreeBSD 5.0.
10703
10704 2006-02-13  Simon Josefsson  <jas@extundo.com>
10705
10706         * gnulib-tool (Usage): Fix --import, from
10707         karl@freefriends.org (Karl Berry).
10708
10709 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
10710
10711         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
10712
10713 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
10714
10715         * lib/argp-namefrob.h: Restore changes accidentally lost during the
10716         "autoupdate" on 2005-12-12.
10717
10718 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
10719
10720         * modules/closeout (Depends-on): Remove atexit.
10721
10722 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
10723
10724         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
10725         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
10726
10727 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
10728
10729         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
10730         __EXTENSIONS__ if this causes compilation to fail.  Problem
10731         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
10732         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
10733
10734 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
10735
10736         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
10737         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
10738         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
10739         All uses changed.
10740
10741 2006-01-26  Simon Josefsson  <jas@extundo.com>
10742
10743         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
10744         prototype is visible on mingw32.
10745
10746         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
10747         for mingw32.
10748
10749         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
10750         mingw32).
10751
10752 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
10753
10754         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
10755         attempt to open for write; this always fails, at least on POSIX
10756         hosts.  This reinstates the 2006-01-09 change, which was
10757         inadvertently removed.
10758
10759 2006-01-26  Bruno Haible  <bruno@clisp.org>
10760
10761         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
10762         Reported by Paul Eggert.
10763
10764 2006-01-26  Bruno Haible  <bruno@clisp.org>
10765             Paul Eggert  <eggert@cs.ucla.edu>
10766
10767         * lib/stdbool_.h (_Bool)
10768         [(! (defined __cplusplus || defined __BEOS__)
10769           && !defined __GNUC__
10770           && !(defined __HP_cc || defined __xlc__
10771                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
10772                || defined __sgi))]:
10773         #define to signed char in these cases too; this simplifies
10774         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
10775         etc., separately) and makes it more conservative.
10776
10777 2006-01-25  Simon Josefsson  <jas@extundo.com>
10778
10779         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
10780         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
10781         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
10782
10783 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
10784
10785         * lib/argp-namefrob.h: Bugfix. Remove stray #
10786
10787 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
10788
10789         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
10790         so that we test the test.
10791         Check for yet another HP-UX cc bug involving *bool |= bool.
10792
10793 2006-01-25  Karl Berry  <karl@gnu.org>
10794
10795         * config/srclist.txt (vasnprintf.c): sync lost.
10796
10797 2006-01-25  Jim Meyering  <jim@meyering.net>
10798
10799         Sync from the stable (b5) branch of coreutils:
10800
10801         * lib/fts.c (fts_children): Don't let close() clobber errno from
10802         failed fchdir().
10803
10804         * lib/fts.c (fts_stat): When following a symlink-to-directory,
10805         don't necessarily interpret stat-fails+lstat-succeeds as indicating
10806         a dangling symlink.  That can also happen at least for ELOOP.
10807         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
10808         FYI, this bug predates the inclusion of fts.c in coreutils.
10809
10810         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
10811         in their own block, so pre-c99 compilers don't object.
10812
10813         Avoid the double-free (first in fts_read, second in fts_close) that
10814         would occur when an `active' directory is made inaccessible (e.g.,
10815         via chmod a-x) during a traversal.
10816         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
10817         before returning.  Reproduce this failure by
10818         mkdir -p a/b; cd a; chmod a-x . b
10819         Reported by Stavros Passas.
10820
10821 2006-01-25  Jim Meyering  <jim@meyering.net>
10822
10823         * lib/fileblocks.c: Remove more useless parentheses.
10824         * lib/readutmp.h: Likewise.
10825
10826 2006-01-25  Bruno Haible  <bruno@clisp.org>
10827
10828         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
10829         warnings.
10830         Reported by Paul Eggert.
10831
10832 2006-01-25  Bruno Haible  <bruno@clisp.org>
10833
10834         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
10835         rid of a trap command. For Solaris sh.
10836         Reported by Mark D. Baushke <mdb@gnu.org>.
10837
10838 2006-01-24  Simon Josefsson  <jas@extundo.com>
10839
10840         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
10841         Bruno.
10842
10843 2006-01-24  Karl Berry  <karl@gnu.org>
10844
10845         * config/srclist.txt (argp-namefrob.h): sync lost.
10846
10847 2006-01-24  Jim Meyering  <jim@meyering.net>
10848
10849         * modules/openat (Files): Add lib/intprops.h.
10850         From Mark D. Baushke.
10851
10852 2006-01-24  Jim Meyering  <jim@meyering.net>
10853
10854         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
10855         Reported by Mark D. Baushke.
10856
10857 2006-01-24  Jim Meyering  <jim@meyering.net>
10858
10859         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
10860
10861 2006-01-24  Bruno Haible  <bruno@clisp.org>
10862
10863         * modules/strnlen (Maintainer): Change from glibc to all.
10864
10865 2006-01-24  Bruno Haible  <bruno@clisp.org>
10866
10867         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
10868         Patch by Paul Eggert.
10869
10870 2006-01-24  Bruno Haible  <bruno@clisp.org>
10871
10872         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
10873         already has it.
10874         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
10875         2005-11-26.
10876
10877         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
10878         'signed char' to avoid problems with the built-in _Bool type.
10879         Reported by Paul Eggert on 2005-11-26.
10880
10881 2006-01-24  Bruno Haible  <bruno@clisp.org>
10882
10883         * gnulib-tool (func_import): Avoid constructing complicated sed
10884         expressions inside backquote.
10885         Report and solution by Mark D. Baushke <mdb@gnu.org>.
10886
10887 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
10888
10889         These changes imported from libc.
10890         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
10891         test and two separate function calls.
10892         * lib/strndup.c (__strndup): Add libc_hidden_def.
10893
10894 2006-01-23  Simon Josefsson  <jas@extundo.com>
10895
10896         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
10897         Remove the test_*_SOURCES variable: automake infers it by default.
10898         * modules/tls-tests: Likewise.
10899
10900 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
10901
10902         Work around porting bugs reported by Dieter in
10903         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
10904         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
10905         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
10906         Include "getopt.h" first, to check interface.
10907         (getenv): Declare only if defined HAVE_DECL_GETENV &&
10908         !HAVE_DECL_GETENV.
10909         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
10910         (__strndup): Revert to K&R-style function dfns, the glibc style.
10911         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
10912         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
10913         Include strnlen.h first, to get prototype properly.
10914         (strnlen): Renamed from __strnlen.
10915         Remove weak alias.
10916
10917 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
10918
10919         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
10920
10921 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
10922
10923         * config/srclist.txt: Adjust to reflect glibc reorganization.
10924         This affects only comments.
10925
10926 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
10927
10928          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
10929          Reported by Bruce Korb <bkorb@gnu.org>.
10930
10931 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
10932
10933         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
10934         to pacify gcc -Wswitch-default.
10935
10936 2006-01-22  Bruno Haible  <bruno@clisp.org>
10937
10938         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
10939         temporary buffer for sprintf, take into account the precision also
10940         for 'd', 'i', 'u', 'o', 'x', 'X'.
10941
10942 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
10943
10944         * modules/argp-tests: New module
10945         * tests/test-argp.c: New file
10946         * tests/test-argp-2.sh: New file
10947
10948 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
10949
10950         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
10951         (__argp_base_name): Removed
10952         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
10953         typo.
10954         (__argp_base_name): Provide macro definition or extern declaration
10955         depending on the configuration
10956
10957 2006-01-20  Simon Josefsson  <jas@extundo.com>
10958
10959         * modules/inet_ntop (Depends-on): Depend on sys_socket.
10960
10961 2006-01-20  Simon Josefsson  <jas@extundo.com>
10962
10963         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
10964
10965 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
10966
10967         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
10968         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
10969         Suggested by Bruno Haible.
10970
10971 2006-01-20  Karl Berry  <karl@gnu.org>
10972
10973         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
10974         until changes propagate, I guess.
10975
10976 2006-01-19  Simon Josefsson  <jas@extundo.com>
10977
10978         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
10979
10980 2006-01-19  Simon Josefsson  <jas@extundo.com>
10981
10982         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
10983
10984 2006-01-19  Simon Josefsson  <jas@extundo.com>
10985
10986         * gnulib-tool: Set check_PROGRAMS.
10987
10988         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
10989         modules/des-tests, modules/gc-arcfour-tests,
10990         modules/gc-arctwo-tests, modules/gc-des-tests,
10991         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
10992         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
10993         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
10994         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
10995         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
10996         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
10997         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
10998         test_*_SOURCES.
10999
11000 2006-01-18  Simon Josefsson  <jas@extundo.com>
11001
11002         * modules/socklen (Depends-on): Depend on sys_socket.
11003
11004 2006-01-18  Simon Josefsson  <jas@extundo.com>
11005
11006         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
11007         modules/des-tests, modules/gc-arcfour-tests,
11008         modules/gc-arctwo-tests, modules/gc-des-tests,
11009         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
11010         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
11011         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
11012         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
11013         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
11014         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
11015         $(EXEEXT) to automake TESTS variable, for mingw32.
11016
11017 2006-01-17  Simon Josefsson  <jas@extundo.com>
11018
11019         * modules/socklen (Include): Need sys/socket.h.
11020
11021 2006-01-17  Bruno Haible  <bruno@clisp.org>
11022
11023         * modules/ssize_t (Include): Add <sys/types.h>.
11024
11025 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
11026
11027         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
11028         it's not portable and it doesn't work with cross-compiles.
11029         Problem reported by Bruno Haible.  Fix missing-$ typo in
11030         'test "gl_cv_ignore_unused_libraries" ...' that prevented
11031         -zignore from being used with Sun's C compiler.
11032
11033 2006-01-12  Simon Josefsson  <jas@extundo.com>
11034
11035         * lib/base64.c: Fix warning, reported by Bruno Haible
11036         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
11037
11038 2006-01-12  Bruno Haible  <bruno@clisp.org>
11039
11040         * modules/ldd: New file.
11041         * build-aux/ldd.sh.in: New file.
11042         * MODULES.html.sh (Support for building libraries and executables): Add
11043         ldd.
11044
11045 2006-01-12  Bruno Haible  <bruno@clisp.org>
11046
11047         * m4/ldd.m4: New file.
11048
11049 2006-01-12  Bruno Haible  <bruno@clisp.org>
11050
11051         * gnulib-tool (func_import, func_create_testdir): Don't go into an
11052         endless loop while replacing $auxdir with build-aux.
11053
11054 2006-01-11  Simon Josefsson  <jas@extundo.com>
11055
11056         * lib/stdint_.h (SIZE_MAX): Add missing (.
11057
11058 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
11059
11060         Sync from coreutils.
11061         * lib/md5.c: Fix commentary typos.
11062         (alignof, UNALIGNED_P): No need for a GCC-specific version.
11063         * lib/md5.h (__attribute__): Remove; unused.
11064         * lib/sha1.c: Fix commentary to match md5 better.
11065         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
11066         so that we don't need to worry about alignment.  All uses changed.
11067         This merges the 2005-10-28 md5 change into sha1.
11068
11069 2006-01-11  Jim Meyering  <jim@meyering.net>
11070
11071         Sync from coreutils.
11072         * lib/md5.c (OP): Fix spacing.
11073
11074 2006-01-11  Bruno Haible  <bruno@clisp.org>
11075
11076         Ensure automatic ordering between gl_LOCK and gl_ARGP.
11077         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
11078         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
11079
11080 2006-01-11  Bruno Haible  <bruno@clisp.org>
11081
11082         Ensure automatic ordering between gl_LOCK and gl_ARGP.
11083         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
11084         the "early" section as well.
11085
11086 2006-01-11  Bruno Haible  <bruno@clisp.org>
11087
11088         Avoid "ar: no archive members specified" error on MacOS X.
11089         * gnulib-tool (func_modules_add_dummy): New function.
11090         (func_import, func_create_testdir): Invoke it.
11091
11092 2006-01-11  Bruno Haible  <bruno@clisp.org>
11093
11094         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
11095         with $auxdir in AC_CONFIG_FILES statements.
11096
11097 2006-01-11  Bruno Haible  <bruno@clisp.org>
11098
11099         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
11100         Initialize also noinst_HEADERS to empty.
11101
11102 2006-01-11  Bruno Haible  <bruno@clisp.org>
11103
11104         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
11105         variables.
11106         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
11107         autoreconf.
11108
11109 2006-01-11  Bruno Haible  <bruno@clisp.org>
11110
11111         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
11112         overridable by the user.
11113         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
11114
11115 2006-01-10  Simon Josefsson  <jas@extundo.com>
11116
11117         * modules/sys_socket: New file.
11118
11119 2006-01-10  Simon Josefsson  <jas@extundo.com>
11120
11121         * m4/sys_socket_h.m4: New file.
11122
11123 2006-01-10  Simon Josefsson  <jas@extundo.com>
11124
11125         * lib/socket_.h: New file.
11126
11127 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
11128
11129         * modules/readutmp (Maintainer): Add myself.
11130
11131 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
11132
11133         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
11134         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
11135         People who are still concerned with buggy memcmp implementations
11136         can invoke gl_FUNC_MEMCMP themselves.
11137
11138 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
11139
11140         * lib/regex_internal.h (BITSET_WORD_BITS):
11141         Work around a bug in 64-bit PGC (before version 6.1-2), where the
11142         preprocessor mishandles large unsigned values as if they were signed.
11143         Problem reported by Claudio Fontana in
11144         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
11145
11146 2006-01-10  Jim Meyering  <jim@meyering.net>
11147
11148         Avoid the double-free (first in fts_read, second in fts_close) that
11149         would occur when an `active' directory is made inaccessible (e.g.,
11150         via chmod a-x) during a traversal.
11151         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
11152         before returning.  Reproduce this failure by
11153         mkdir -p a/b; cd a; chmod a-x . b
11154         Reported by Stavros Passas.
11155
11156         Sync from coreutils.
11157         * lib/sha1.c: Tweak grammar in a comment.
11158
11159 2006-01-10  Jim Meyering  <jim@meyering.net>
11160
11161         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
11162         Patch by Joerg Sonnenberger.
11163
11164 2006-01-10  Bruno Haible  <bruno@clisp.org>
11165
11166         * modules/readutmp: Depend on module free.
11167         * modules/strtok_r: Depend on module restrict.
11168
11169 2006-01-10  Bruno Haible  <bruno@clisp.org>
11170
11171         * modules/gettext (configure.ac): Add an invocation of
11172         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
11173
11174 2006-01-10  Bruno Haible  <bruno@clisp.org>
11175
11176         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
11177         Reported by Werner Lemberg <wl@gnu.org>.
11178
11179 2006-01-10  Bruno Haible  <bruno@clisp.org>
11180
11181         * lib/localcharset.c: Update from GNU gettext.
11182
11183 2006-01-10  Bruno Haible  <bruno@clisp.org>
11184
11185         * lib/argp.h (__const): Remove macro. Use const instead.
11186         * lib/argp-fmtstream.h (__const): Likewise.
11187         * lib/glob_.h (__const): Remove macro.
11188         * lib/glob-libc.h: Use const instead of __const.
11189
11190 2006-01-10  Bruno Haible  <bruno@clisp.org>
11191
11192         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
11193         variable.
11194         Needed to avoid an automake error regarding the 'gettext' module.
11195
11196 2006-01-09  Simon Josefsson  <jas@extundo.com>
11197
11198         * modules/inet_ntop (Depends-on): Add restrict.
11199
11200 2006-01-09  Simon Josefsson  <jas@extundo.com>
11201
11202         * modules/gc-rijndael-tests (License): Put under LGPL.
11203
11204         * modules/gc-des-tests (License): Likewise.
11205
11206         * modules/gc-arcfour-tests (License): Likewise.
11207
11208         * modules/gc-arctwo-tests (License): Likewise.
11209
11210         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
11211
11212         * modules/gc-hmac-sha1-tests (Files): Likewise.
11213
11214         * modules/gc-hmac-md5-tests (License): Likewise.
11215
11216         * modules/gc-sha1-tests (License): Likewise.
11217
11218         * modules/gc-md5-tests (License): Likewise.
11219
11220         * modules/gc-md4-tests (License): Likewise.
11221
11222         * modules/gc-md2-tests (License): Likewise.
11223
11224         * modules/gc-tests (License): Likewise.
11225
11226         * modules/des-tests (License): Likewise.
11227
11228         * modules/md4-tests (License): Likewise.
11229
11230         * modules/md2-tests (License): Likewise.
11231
11232 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
11233
11234         Sync from coreutils:
11235
11236         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
11237         * modules/lib-ignore: New file.
11238         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
11239         chdir-safer.m4, lchmod.m4.
11240         * modules/openat: Add mkdirat.c, openat-priv.h.
11241
11242 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
11243
11244         Sync from coreutils.
11245         * m4/lib-ignore.m4: New file.
11246         * m4/lchmod.m4: New file.
11247
11248 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
11249
11250         Sync from coreutils.
11251         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
11252         for write access: POSIX says that must fail.
11253         * lib/fts.c (diropen): Likewise.
11254         * lib/save-cwd.c (save_cwd): Likewise.
11255         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
11256         well, for minor improvements on hosts that lack O_DIRECTORY.
11257         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
11258         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
11259         Fall back on chown if open failed with EACCES.
11260
11261         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
11262         Report an error at compile-time if only a 1-second nominal clock
11263         resolution is found.
11264
11265         * lib/lchmod.h: New file.
11266         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
11267         (make_dir_parents): Use lchown rather than chown, and
11268         lchmod rather than chmod.
11269
11270         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
11271         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
11272         "proc" reported by n0dalus.
11273
11274         * lib/mountlist.c: Include <limits.h>.
11275         (dev_from_mount_options)
11276         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
11277         New function.  It no longer assumes "dev=" has the System V meaning
11278         on Linux (since it doesn't).  It also parses "dev=" more carefully.
11279         (read_file_system_list)
11280         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
11281         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
11282         dev= in that case.
11283
11284         * lib/posixtm.h (PDS_PRE_2000): New macro.
11285         * lib/posixtm.c (year): Arg is now syntax_bits rather than
11286         allow_century.  All usages changed.  Reject dates outside the range
11287         1969-1999 if PDS_PRE_2000 is used.
11288
11289 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
11290
11291         Sync from coreutils.
11292         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
11293         (Time of day items): Mention the possibility of leap seconds.
11294         Problem reported by Dr. David Alan Gilbert.
11295
11296 2006-01-09  Jim Meyering  <jim@meyering.net>
11297
11298         Sync from coreutils.
11299
11300         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
11301
11302         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
11303
11304         * lib/modechange.c (mode_compile): Reject an invalid mode string
11305         that starts with an octal digit.  From Andreas Gruenbacher.
11306
11307         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
11308         and dup to open_safer and dup_safer, respectively.
11309         (openat_permissive): Fix typo in comment.
11310
11311         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
11312         "gettext.h"; either no longer needed or are guaranteed by openat.h.
11313         (_): Remove; no longer needed.
11314         (openat): Renamed from rpl_openat; no need for rpl_openat
11315         since openat.h renames openat for us.
11316         Replace most of the body with a call to openat_permissive,
11317         to avoid duplicate code.
11318         Port to (probably hypothetical) environments were mode_t is
11319         wider than int.
11320         (openat_permissive): Require mode arg, so that we can check
11321         types better.  Put it just after flags.  Change cwd failure
11322         indicator from pointer-to-bool to pointer-to-errno-value.
11323         All callers changed.
11324         Invoke openat_save_fail and/or openat_restore_fail if
11325         cwd_errno is null, so that openat can call us.
11326         (openat_permissive, fdopendir, fstatat, unlinkat):
11327         Simplify errno handling to avoid some duplicate code,
11328         as it's OK to set errno on success.
11329         * lib/openat.h: Revamp code so that function macros depend on
11330         __OPENAT_PREFIX only, not also on AT_FDCWD.
11331         (openat_ro): Remove.  Caller changed to use openat_permissive.
11332         (openat_permissive): Now a macro, if not a function.
11333         (openat_restore_fail, openat_save_fail): Now always functions,
11334         since mkdirat needs them even if __OPENAT_PREFIX is defined.
11335
11336         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
11337         and openat.c.
11338         * lib/mkdirat.c: Include openat-priv.h.
11339         Remove definitions of macros defined therein.
11340         * lib/openat.c: Likewise.
11341
11342         * lib/mkdirat.c (mkdirat): New file and function.
11343         * lib/openat.h (mkdirat): Declare.
11344
11345         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
11346
11347         * lib/openat.h (openat_permissive): Declare.
11348         (openat_ro): Define.
11349
11350         * lib/openat.c (EXPECTED_ERRNO): New macro.
11351         (openat_permissive): New function -- used in remove.c rewrite.
11352         (all functions): Set errno just before returning, only if there
11353         was an actual failure.
11354         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
11355
11356         Emulate openat-family functions using Linux's procfs, if possible.
11357         Idea and some code based on Ulrich Drepper's glibc changes.
11358
11359         * lib/openat.c: (BUILD_PROC_NAME): New macro.
11360         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
11361         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
11362         before falling back on save_cwd and restore_cwd.
11363         (fdopendir, fstatat, unlinkat): Likewise.
11364
11365         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
11366         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
11367
11368         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
11369         as second argument to va_arg.  Otherwise, some versions of gcc
11370         warn that `if this code is reached, the program will abort'.
11371
11372 2006-01-09  Jim Meyering  <jim@meyering.net>
11373
11374         Sync from coreutils.
11375         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
11376         Require openat-priv.h.
11377
11378 2006-01-09  Bruno Haible  <bruno@clisp.org>
11379
11380         * modules/strnlen (Include): Use strnlen.h.
11381
11382 2006-01-09  Bruno Haible  <bruno@clisp.org>
11383
11384         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
11385
11386 2006-01-09  Bruno Haible  <bruno@clisp.org>
11387
11388         * lib/sysexit_.h (EX_OK): New macro.
11389         Suggested by Martin Lambers <marlam@marlam.de>.
11390
11391 2006-01-09  Bruno Haible  <bruno@clisp.org>
11392
11393         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
11394         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
11395
11396 2006-01-09  Bruno Haible  <bruno@clisp.org>
11397
11398         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
11399         numbers.
11400
11401 2006-01-09  Bruno Haible  <bruno@clisp.org>
11402
11403         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
11404         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
11405         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
11406         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
11407
11408 2006-01-09  Bruno Haible  <bruno@clisp.org>
11409
11410         * build-aux/javacomp.sh.in: New file, moved from lib/.
11411         * modules/javacomp-script (Files): Update.
11412         (configure.ac): Add AC_CONFIG_FILES invocation.
11413         (EXTRA_DIST): Remove variable.
11414
11415         * build-aux/javaexec.sh.in: New file, moved from lib/.
11416         * modules/javaexec (Files): Update.
11417         (configure.ac): Add AC_CONFIG_FILES invocation.
11418         (EXTRA_DIST): Remove javaexec.sh.in.
11419
11420         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
11421         * modules/csharpcomp-script (Files): Update.
11422         (configure.ac): Add AC_CONFIG_FILES invocation.
11423         (EXTRA_DIST): Remove variable.
11424
11425         * build-aux/csharpexec.sh.in: New file, moved from lib/.
11426         * modules/csharpexec (Files): Update.
11427         (configure.ac): Add AC_CONFIG_FILES invocation.
11428         (EXTRA_DIST): Remove csharpexec.sh.in.
11429
11430 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
11431
11432         Sync from coreutils.
11433
11434         Add POSIX ACL support
11435         * lib/acl.h (copy_acl, set_acl): Add declarations.
11436         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
11437         systems other than Linux.
11438         (chmod_or_fchmod): New function: use fchmod when possible,
11439         and chmod otherwise.
11440         (file_has_acl): Add a POSIX ACL implementation, with a
11441         Linux-specific subcase.
11442         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
11443         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
11444         acls are unsupported.
11445         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
11446         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
11447         are unsupported.
11448
11449 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
11450
11451         Sync from coreutils.
11452         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
11453
11454 2006-01-07  Bruno Haible  <bruno@clisp.org>
11455
11456         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
11457         gl_EARLY.
11458
11459 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
11460
11461         * lib/strftime.c (tzname): Don't declare if it is already #defined.
11462         Problem reported for Mingw by Mark Junker.
11463
11464 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
11465
11466         * README: Gnulib normally doesn't generate a tarball.
11467
11468 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
11469
11470         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
11471         long int, not int, for nanosecond counts, so that people who are
11472         used to POSIX struct timespec won't be surprised.  Reported by Jim
11473         Meyering.
11474
11475 2005-12-28  Bruno Haible  <bruno@clisp.org>
11476
11477         * build-aux/config.rpath: Update from GNU gettext.
11478
11479 2005-12-16  Jim Meyering  <jim@meyering.net>
11480
11481         * modules/fprintftime: New module.
11482         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
11483
11484 2005-12-16  Jim Meyering  <jim@meyering.net>
11485
11486         * m4/fprintftime.m4: New file.
11487
11488 2005-12-16  Jim Meyering  <jim@meyering.net>
11489
11490         * lib/fprintftime.c, lib/fprintftime.h: New files.
11491
11492 2005-12-15  Simon Josefsson  <jas@extundo.com>
11493
11494         * modules/socklen (configure.ac): Fix M4 macro name, to align with
11495         new m4/socklen.m4.
11496
11497 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
11498
11499         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
11500         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
11501
11502 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
11503
11504         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
11505         * lib/argp-help.c (fill_in_uparams): Check if the constructed
11506         struct uparams is valid. Fall back to the default values if it is
11507         not.
11508
11509 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
11510
11511         * modules/argp (Files): Add argp-pin.c
11512         (Depends-on): dirname
11513         (lib_SOURCES): Add argp-pin.c
11514
11515 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
11516
11517         * m4/argp.m4:  Check if program_invocation_name and
11518         program_invocation_short_name are declared and define appropriate
11519         macros if they are not.
11520
11521 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
11522
11523         * lib/argp-help.c (__argp_base_name): New function
11524         (__argp_short_program_name): Rewrite using __argp_base_name
11525         * lib/argp-namefrob.h: Define program_invocation_name and
11526         program_invocation_short_name if requested
11527         (__argp_base_name): Add prototype
11528         * lib/argp-parse.c (argp_def): Use gettext wrappers
11529         (argp_default_parser): Use __argp_base_name
11530         * lib/argp-pin.c: New file. Defines program_invocation_name and
11531         program_invocation_short_name on systems that lack them.
11532
11533 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
11534
11535         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
11536         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
11537         porting problem reported by Georg Schwarz in
11538         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
11539
11540 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
11541
11542         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
11543         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
11544         porting problem reported by Georg Schwarz in
11545         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
11546
11547 2005-12-05  Bruno Haible  <bruno@clisp.org>
11548
11549         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
11550         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
11551         Reported by Mark Junker <mjscod@gmx.de>.
11552
11553 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
11554
11555         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
11556         Use implementation from Albert Chin, with some
11557         comments/corrections by Stepan Kasal and myself.
11558
11559 2005-12-02  Bruno Haible  <bruno@clisp.org>
11560
11561         * gnulib-tool (func_import): Accept GPLed build tool modules when
11562         --lgpl is given.
11563         * modules/csharpcomp-script: New file.
11564         * modules/csharpcomp: Depend on it.
11565         * modules/javacomp-script: New file.
11566         * modules/javacomp: Depend on it.
11567         Suggested by Simon Josefsson.
11568
11569 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
11570
11571         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
11572         statement, to work around an HP-UX 10.20 compiler bug reported by
11573         Peter O'Gorman.
11574
11575 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
11576
11577         * modules/savedir (Depends-on): Add openat.
11578
11579 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
11580
11581         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
11582         (uintmax_t) [defined uintmax_t]: Do not declare.
11583         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
11584         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
11585         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
11586         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
11587         sake of portability to weird hosts that C allows (though we don't
11588         know of any practical examples).
11589
11590         * lib/savedir.h (fdsavedir): New decl.
11591         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
11592         contains most of the former guts of savedir.
11593         (savedir): Use savedirstream.
11594         Include "openat.h".
11595
11596 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
11597
11598         * modules/obstack (Files): Add m4/ulonglong.m4.
11599         Problem reported by Davide Angelocola.
11600
11601 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
11602
11603         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
11604         coreutils no longer futzes with rounding modes.
11605
11606 2005-11-14  Jim Meyering  <jim@meyering.net>
11607
11608         * lib/mkstemp-safer.c: Include <config.h>, required for possible
11609         replacement of mkstemp.
11610
11611 2005-11-10  Simon Josefsson  <jas@extundo.com>
11612
11613         * lib/readline.c: Remove EOL.
11614
11615 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
11616
11617         * modules/gethrxtime (Depends-on): Add gettime.
11618
11619 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
11620
11621         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
11622         or gettimeofday; no longer needed.
11623
11624 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
11625
11626         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
11627         time business.
11628         (gethrxtime) [! (HAVE_NANOUPTIME
11629         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
11630         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
11631         our own approximation.
11632
11633 2005-11-08  Eric Blake  <ebb9@byu.net>
11634
11635         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
11636
11637 2005-11-08  Eric Blake  <ebb9@byu.net>
11638
11639         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
11640
11641 2005-11-04  Bruno Haible  <bruno@clisp.org>
11642
11643         * gnulib-tool: Implement --update mode.
11644
11645 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
11646
11647         Fix porting problem reported by Theodoros V. Kalamatianos.
11648         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
11649         Don't assume that futimes failing means we must fail.
11650
11651 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
11652
11653         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
11654         variables to suggest the intended function of the PATH_MAX check.
11655
11656 2005-10-30  Kean Johnston  <jkj@sco.com>
11657
11658         Trivial changes to support SCO systems.
11659         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
11660         as PATH_MAX.
11661         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
11662         where __ptr is null when no I/O is pending.
11663
11664 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
11665
11666         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
11667         leave errno alone.  Problem reported by Dmitry V. Levin.
11668
11669 2005-10-28  Simon Josefsson  <jas@extundo.com>
11670
11671         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
11672         Test more.
11673
11674         * tests/test-gc-md2.c, tests/test-md2.c: New files.
11675
11676         * modules/md2, modules/md2-tests: New files.
11677
11678 2005-10-28  Simon Josefsson  <jas@extundo.com>
11679
11680         * m4/inet_ntop.m4: More tests.
11681
11682         * m4/gc-md2.m4, md2.m4: New file.
11683
11684 2005-10-28  Simon Josefsson  <jas@extundo.com>
11685
11686         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
11687         "restrict" keywords, as per POSIX.  Protect the function
11688         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
11689         Don't use K&R prototypes.  Check the sprintf return values.
11690         Re-define EAFNOSUPPORT if not present.  Indent.
11691
11692         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
11693         suggested by Bruno Haible <bruno@clisp.org>.
11694
11695         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
11696
11697         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
11698
11699         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
11700         libgcrypt).
11701
11702         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
11703
11704         * lib/md2.h, lib/md2.c: New files.
11705
11706 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
11707
11708         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
11709         errno alone.  Problem reported by Frederic Jolliton.
11710
11711 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
11712
11713         * modules/verify (License): Change from GPL to LGPL.  This is a
11714         tiny module and there are apparently near-equivalents that are
11715         under the BSD license.
11716
11717 2005-10-24  Simon Josefsson  <jas@extundo.com>
11718
11719         * modules/sha1: Relicense to LGPL.
11720
11721 2005-10-24  Simon Josefsson  <jas@extundo.com>
11722
11723         * lib/md4.h: Shrink buffer size, now that we changed the type.
11724
11725 2005-10-23  Simon Josefsson  <jas@extundo.com>
11726
11727         * gnulib-tool (func_import): Fix --tests-base.
11728
11729 2005-10-22  Simon Josefsson  <jas@extundo.com>
11730
11731         * modules/arcfour (Depends-on): Need stdint.
11732
11733 2005-10-22  Simon Josefsson  <jas@extundo.com>
11734
11735         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
11736         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
11737
11738 2005-10-22  Simon Josefsson  <jas@extundo.com>
11739
11740         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
11741         suggested by Bruno Haible <bruno@clisp.org>.
11742
11743 2005-10-22  Simon Josefsson  <jas@extundo.com>
11744
11745         * lib/crc.h: Include stddef.h, for size_t.
11746
11747 2005-10-22  Simon Josefsson  <jas@extundo.com>
11748
11749         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
11750         arcfour_context struct (simplify test vector testing in GNU
11751         Shishi).
11752
11753 2005-10-21  Simon Josefsson  <jas@extundo.com>
11754
11755         * modules/des, modules/des-tests: New files.
11756
11757         * modules/gc-des, modules/gc-des-tests: New files.
11758
11759         * tests/test-des.c, tests/test-gc-des.c: New file.
11760
11761 2005-10-21  Simon Josefsson  <jas@extundo.com>
11762
11763         * modules/arctwo, modules/arctwo-tests: New files.
11764
11765         * tests/test-arctwo.c: New file.
11766
11767         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
11768
11769         * tests/test-gc-arctwo.c: New file.
11770
11771 2005-10-21  Simon Josefsson  <jas@extundo.com>
11772
11773         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
11774         Bruno Haible <bruno@clisp.org>.
11775
11776         * m4/gc-des.m4: New file.
11777
11778 2005-10-21  Simon Josefsson  <jas@extundo.com>
11779
11780         * m4/arctwo.m4: New file.
11781
11782         * m4/gc-arctwo.m4: New file.
11783
11784 2005-10-21  Simon Josefsson  <jas@extundo.com>
11785
11786         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
11787         block.
11788
11789 2005-10-21  Simon Josefsson  <jas@extundo.com>
11790
11791         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
11792         <bruno@clisp.org>.
11793
11794         * lib/hmac-sha1.c (hmac_sha1): Likewise.
11795
11796         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
11797         Bruno Haible <bruno@clisp.org>.
11798
11799         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
11800         <bruno@clisp.org>.
11801
11802 2005-10-21  Simon Josefsson  <jas@extundo.com>
11803
11804         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
11805
11806 2005-10-21  Simon Josefsson  <jas@extundo.com>
11807
11808         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
11809
11810 2005-10-21  Simon Josefsson  <jas@extundo.com>
11811
11812         * lib/des.h, lib/des.c: New files.
11813
11814         * lib/gc-gnulib.c: Support DES.c
11815
11816 2005-10-21  Simon Josefsson  <jas@extundo.com>
11817
11818         * lib/arctwo.h, lib/arctwo.c: New files.
11819
11820         * lib/gc-gnulib.c: Support ARCTWO.
11821
11822 2005-10-21  Simon Josefsson  <jas@extundo.com>
11823
11824         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
11825         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
11826
11827 2005-10-21  Simon Josefsson  <jas@extundo.com>
11828
11829         * gnulib-tool (func_import, func_create_testdir): Define automake
11830         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
11831         Makefile.am snippet),
11832         suggested by Bruno Haible <bruno@clisp.org>.
11833
11834         * modules/gc (Makefile.am): Use it.
11835
11836 2005-10-21  Bruno Haible  <bruno@clisp.org>
11837
11838         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
11839         patch.
11840
11841 2005-10-19  Simon Josefsson  <jas@extundo.com>
11842
11843         * tests/test-gc-rijndael.c: New file.
11844
11845         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
11846
11847 2005-10-19  Simon Josefsson  <jas@extundo.com>
11848
11849         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
11850         interface too.
11851
11852 2005-10-19  Simon Josefsson  <jas@extundo.com>
11853
11854         * tests/test-gc-arcfour.c: New file.
11855
11856         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
11857
11858 2005-10-19  Simon Josefsson  <jas@extundo.com>
11859
11860         * modules/gc-md4, modules/gc-md4-tests: New file.
11861
11862         * tests/test-gc-md4.c: New file.
11863
11864 2005-10-19  Simon Josefsson  <jas@extundo.com>
11865
11866         * m4/gc-md4.m4: New file.
11867
11868 2005-10-19  Simon Josefsson  <jas@extundo.com>
11869
11870         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
11871         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
11872         <kasal@ucw.cz>.
11873
11874 2005-10-19  Simon Josefsson  <jas@extundo.com>
11875
11876         * m4/gc-arcfour.m4: New file.
11877
11878         * m4/gc-rijndael.m4: New file.
11879
11880 2005-10-19  Simon Josefsson  <jas@extundo.com>
11881
11882         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
11883
11884 2005-10-19  Simon Josefsson  <jas@extundo.com>
11885
11886         * lib/gc-gnulib.c: Support ARCFOUR.
11887
11888 2005-10-19  Simon Josefsson  <jas@extundo.com>
11889
11890         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
11891         support.
11892
11893         * lib/gc.h: Add ECB enum type.
11894
11895         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
11896
11897 2005-10-18  Simon Josefsson  <jas@extundo.com>
11898
11899         * tests/test-md5.c: New file.
11900
11901         * modules/md5-tests: New file.
11902
11903 2005-10-18  Simon Josefsson  <jas@extundo.com>
11904
11905         * tests/test-md4.c: New file.
11906
11907         * modules/md4, modules/md4-tests: New files.
11908
11909 2005-10-18  Simon Josefsson  <jas@extundo.com>
11910
11911         * m4/md4.m4: New file.
11912
11913 2005-10-18  Simon Josefsson  <jas@extundo.com>
11914
11915         * lib/md4.h, lib/md4.c: New files, based on md5.?.
11916
11917 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
11918
11919         * gnulib-tool (func_create_testdir): Omit the second check whether
11920         BUILT_SOURCES in nonempty.
11921
11922 2005-10-17  Simon Josefsson  <jas@extundo.com>
11923
11924         * tests/test-rijndael.c: New file.
11925
11926 2005-10-17  Simon Josefsson  <jas@extundo.com>
11927
11928         * modules/sha1: Depend on stdint instead of md5.
11929
11930         * modules/md5: Depend on stdint, remove uint32_t.
11931
11932 2005-10-17  Simon Josefsson  <jas@extundo.com>
11933
11934         * modules/gc-sha1-tests: New file.
11935
11936         * tests/test-gc-sha1.c: New file.
11937
11938 2005-10-17  Simon Josefsson  <jas@extundo.com>
11939
11940         * m4/md5.m4: Remove call to uint32_t.m4.
11941
11942 2005-10-17  Simon Josefsson  <jas@extundo.com>
11943
11944         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
11945
11946         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
11947         md5.h.
11948
11949         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
11950
11951         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
11952
11953 2005-10-17  Simon Josefsson  <jas@extundo.com>
11954
11955         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
11956
11957 2005-10-17  Simon Josefsson  <jas@extundo.com>
11958
11959         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
11960
11961 2005-10-17  Simon Josefsson  <jas@extundo.com>
11962
11963         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
11964
11965         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
11966
11967 2005-10-17  Bruno Haible  <bruno@clisp.org>
11968
11969         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
11970         that it can also be used in a test.
11971
11972 2005-10-16  Bruno Haible  <bruno@clisp.org>
11973
11974         * gnulib-tool (func_emit_tests_Makefile_am): Also define
11975         TESTS_ENVIRONMENT, so that individual tests can augment it.
11976
11977         * gnulib-tool (func_create_testdir): Use an intermediate target for
11978         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
11979         macros, like $(ALLOCA_H), which cannot be passed through the command
11980         line.
11981
11982 2005-10-15  Simon Josefsson  <jas@extundo.com>
11983
11984         * modules/rijndael-tests: New file.
11985
11986         * modules/rijndael: New file.
11987
11988 2005-10-15  Simon Josefsson  <jas@extundo.com>
11989
11990         * m4/rijndael.m4: New file.
11991
11992 2005-10-15  Simon Josefsson  <jas@extundo.com>
11993
11994         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
11995
11996         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
11997
11998 2005-10-14  Simon Josefsson  <jas@extundo.com>
11999
12000         * tests/test-arcfour.c: New file.
12001
12002         * modules/arcfour, modules/arcfour-tests: New files.
12003
12004 2005-10-14  Simon Josefsson  <jas@extundo.com>
12005
12006         * m4/arcfour.m4: New file.
12007
12008 2005-10-14  Simon Josefsson  <jas@extundo.com>
12009
12010         * lib/arcfour.h, lib/arcfour.c: New files.
12011
12012 2005-10-14  Roland McGrath  <roland@redhat.com>
12013
12014         Import from libc.  [BZ #1331]
12015         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
12016         macro argument.
12017         Reported by Matej Vela <vela@debian.org>.
12018
12019 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
12020
12021         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
12022         include <wchar.h>; no longer needed.
12023
12024 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
12025
12026         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
12027
12028 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
12029         and  Ulrich Drepper  <drepper@redhat.com>
12030
12031         Import from libc.
12032         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
12033         instead of inline stream orientation test and two separate
12034         function calls.  Pay no attention to USE_IN_LIBIO.
12035
12036 2005-10-13  Simon Josefsson  <jas@extundo.com>
12037
12038         * modules/gc-hmac-md5-tests: New file.
12039
12040         * tests/test-gc-hmac-sha1.c: New file.
12041
12042         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
12043
12044         * modules/gc-hmac-md5-tests: New file.
12045
12046         * tests/test-gc-md5.c: New file.
12047
12048         * modules/gc-md5-tests: New file.
12049
12050 2005-10-13  Simon Josefsson  <jas@extundo.com>
12051
12052         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
12053         Move memory allocation outside of loop.
12054
12055 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
12056
12057         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
12058         intermediate directory is in a read-only file system.  Problem
12059         reported by Eric Blake.
12060
12061 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
12062
12063         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
12064
12065 2005-10-12  Simon Josefsson  <jas@extundo.com>
12066
12067         * tests/test-hmac-sha1.c: New file.
12068
12069         * modules/hmac-sha1-tests: New file.
12070
12071         * modules/hmac-sha1: New file.
12072
12073 2005-10-12  Simon Josefsson  <jas@extundo.com>
12074
12075         * modules/gc-sha1: New file.
12076
12077 2005-10-12  Simon Josefsson  <jas@extundo.com>
12078
12079         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
12080
12081         * tests/test-gc-pbkdf2-sha1.c: New file.
12082
12083 2005-10-12  Simon Josefsson  <jas@extundo.com>
12084
12085         * modules/gc-md5, modules/gc-hmac-md5: New files.
12086
12087         * modules/gc (Files): Remove md5, memxor and hmac files.
12088
12089 2005-10-12  Simon Josefsson  <jas@extundo.com>
12090
12091         * m4/gc-pbkdf2-sha1.m4: New file.
12092
12093         * m4/gc-hmac-sha1.m4: New file.
12094
12095         * m4/gc-sha1: New file.
12096
12097         * m4/hmac-sha1.m4: New file.
12098
12099 2005-10-12  Simon Josefsson  <jas@extundo.com>
12100
12101         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
12102
12103         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
12104
12105 2005-10-12  Simon Josefsson  <jas@extundo.com>
12106
12107         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
12108         suggested by Bruno Haible <bruno@clisp.org>.
12109
12110 2005-10-12  Simon Josefsson  <jas@extundo.com>
12111
12112         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
12113
12114 2005-10-12  Simon Josefsson  <jas@extundo.com>
12115
12116         * lib/gc-pbkdf2-sha1.c: New file.
12117
12118         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
12119
12120 2005-10-12  Simon Josefsson  <jas@extundo.com>
12121
12122         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
12123
12124         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
12125
12126 2005-10-12  Simon Josefsson  <jas@extundo.com>
12127
12128         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
12129         GC_USE_HMAC_MD5, respectively.
12130
12131         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
12132         (gc_md5): Fix typo.
12133
12134         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
12135
12136         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
12137
12138         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
12139
12140 2005-10-12  Bruno Haible  <bruno@clisp.org>
12141
12142         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
12143         Reported by Stepan Kasal <kasal@ucw.cz>.
12144
12145 2005-10-11  Simon Josefsson  <jas@extundo.com>
12146
12147         * tests/test-crc.c: New file.
12148
12149         * modules/crc, modules/crc-tests: New files.
12150
12151 2005-10-11  Simon Josefsson  <jas@extundo.com>
12152
12153         * m4/crc.m4: New file.
12154
12155 2005-10-11  Simon Josefsson  <jas@extundo.com>
12156
12157         * lib/gc.h: Add gc_hash and gc_hash_buffer.
12158
12159         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
12160
12161         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
12162
12163 2005-10-11  Simon Josefsson  <jas@extundo.com>
12164
12165         * lib/crc.h, lib/crc.c: New files.
12166
12167         * lib/gc.h (gc_hash_buffer): Add doc.
12168
12169 2005-10-11  Bruno Haible  <bruno@clisp.org>
12170
12171         * modules/c-strcasestr: New file.
12172         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
12173
12174 2005-10-11  Bruno Haible  <bruno@clisp.org>
12175
12176         * modules/c-strcase: New file.
12177         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
12178
12179 2005-10-11  Bruno Haible  <bruno@clisp.org>
12180
12181         * lib/strcasecmp.c: Include limits.h.
12182         (strcasecmp): Avoid integer overflow on exotic platforms.
12183         * lib/strncasecmp.c: Include limits.h.
12184         (strncasecmp): Avoid integer overflow on exotic platforms.
12185         Reported by Paul Eggert.
12186
12187 2005-10-11  Bruno Haible  <bruno@clisp.org>
12188
12189         * lib/c-strcasestr.h: New file, from GNU gettext.
12190         * lib/c-strcasestr.c: New file, from GNU gettext.
12191
12192 2005-10-11  Bruno Haible  <bruno@clisp.org>
12193
12194         * lib/c-strcase.h: New file, from GNU gettext.
12195         * lib/c-strcasecmp.c: New file, from GNU gettext.
12196         * lib/c-strncasecmp.c: New file, from GNU gettext.
12197
12198 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
12199
12200         * modules/mempcpy (License): GPL -> LGPL.
12201         * modules/strchrnul (License): Likewise.
12202         * modules/sysexits (License): Likewise.
12203
12204 2005-10-08  Simon Josefsson  <jas@extundo.com>
12205
12206         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
12207
12208 2005-10-07  Simon Josefsson  <jas@extundo.com>
12209
12210         * m4/memxor.m4: Remove gl_C_RESTRICT call.
12211
12212 2005-10-06  Simon Josefsson  <jas@extundo.com>
12213
12214         * tests/test-hmac-md5.c: New file.
12215
12216         * modules/hmac-md5-tests: New file.
12217
12218         * modules/hmac-md5: New file.
12219
12220 2005-10-06  Simon Josefsson  <jas@extundo.com>
12221
12222         * m4/hmac-md5.m4: New file.
12223
12224         * m4/memxor.m4: Require gl_C_RESTRICT.
12225
12226 2005-10-06  Simon Josefsson  <jas@extundo.com>
12227
12228         * lib/memxor.c (memxor): Avoid casts and warnings.
12229
12230 2005-10-06  Simon Josefsson  <jas@extundo.com>
12231
12232         * lib/hmac-md5.c: New file.
12233
12234         * lib/hmac.h: New file.
12235
12236 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
12237
12238         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
12239         promotes to int, not unsigned int, to catch the AIX 5.3
12240         compiler bug.
12241
12242 2005-10-05  Simon Josefsson  <jas@extundo.com>
12243
12244         * modules/memxor: New file.
12245
12246         * modules/iconv (Files): Move config.rpath to havelib, it is used
12247         there.
12248
12249         * modules/havelib (Files): Add config.rpath.
12250
12251 2005-10-05  Simon Josefsson  <jas@extundo.com>
12252
12253         * m4/memxor.m4: New file.
12254
12255 2005-10-05  Simon Josefsson  <jas@extundo.com>
12256
12257         * lib/memxor.c (memxor): Fix compiler error.
12258
12259         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
12260         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
12261
12262         * lib/memxor.h, lib/memxor.c: New files.
12263
12264         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
12265         we assume all systems have it, suggested by Jim Meyering
12266         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
12267         any systems lack sys/socket.h; mingw32 is known to lack it, but we
12268         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
12269         same reasons.
12270
12271 2005-10-05  Simon Josefsson  <jas@extundo.com>
12272
12273         * config/srclist.txt: Add glibc bug 1423 for md5.h.
12274
12275 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
12276
12277         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
12278         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
12279         needed, since the source code now assumes these .h files.
12280
12281 2005-10-05  Derek Price  <derek@ximbiot.com>
12282
12283         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
12284
12285 2005-10-05  Bruno Haible  <bruno@clisp.org>
12286
12287         * modules/stdint (License): Change to LGPL.
12288
12289 2005-10-04  Simon Josefsson  <jas@extundo.com>
12290
12291         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
12292         D. Baushke" <mdb@gnu.org>.
12293
12294 2005-10-04  Bruno Haible  <bruno@clisp.org>
12295
12296         * lib/verify.h (verify_true): Provide alternative definition for C++.
12297
12298 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
12299
12300         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
12301         (SSIZE_MAX): New macro, if not already defined.
12302         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
12303         than 2 GiB.
12304
12305 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
12306
12307         Sync from coreutils.
12308         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
12309         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
12310         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
12311         ULLONG_MAX doesn't work with 2.7.2.1.
12312
12313 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
12314
12315         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
12316         From Ben Pfaff.
12317
12318         * modules/exclude (Depends-on): Depend on verify.
12319         * modules/strtoimax (Depends-on): Likewise.
12320         * modules/utimecmp (Depends-on): Likewise.
12321
12322 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
12323
12324         * lib/exclude.c: Include verify.h.
12325         (verify): Remove.  All callers changed to use verify.h's version.
12326         * lib/strtoimax.c: Likewise.
12327         * lib/utimecmp.c: Likewis.e
12328
12329         Sync from coreutils.
12330         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
12331         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
12332         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
12333         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
12334         bother returning ENOSYS if settimeofday or stime fails; just let
12335         them return whatever errno they want to return.
12336         * lib/utimens.c: Include unistd.h, for dup2.
12337         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
12338         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
12339
12340 2005-10-02  Jim Meyering  <jim@meyering.net>
12341
12342         Sync from coreutils.
12343         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
12344         from glibc-2.2.5 that fails for read-only files.
12345
12346 2005-10-02  Jim Meyering  <jim@meyering.net>
12347
12348         Sync from coreutils.
12349         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
12350         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
12351         `#if HAVE_CONFIG_H'.
12352         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
12353         Remove AT_FDCWD test.
12354         Do not consume the fd unless successful.
12355         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
12356         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
12357         block, so that we don't even try to compile it if settimeofday is
12358         available.  This works around a compilation failure on OSF1 V5.1,
12359         due to stime requiring a `long int*' while tv_sec is `int'.
12360
12361 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
12362
12363         Sync from coreutils.
12364         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
12365         against `yes', rather than just testing for nonempty.
12366
12367 2005-10-01  Simon Josefsson  <jas@extundo.com>
12368
12369         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
12370         and Darwin.
12371
12372         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
12373         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
12374         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
12375         freeaddrinfo and gai_strerror are declared by the POSIX headers.
12376         Check if struct addrinfo is declared.
12377
12378 2005-10-01  Simon Josefsson  <jas@extundo.com>
12379
12380         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
12381         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
12382         AI_* and EAI_* definitions.  Protect function declarations.
12383
12384 2005-10-01  Jim Meyering  <jim@meyering.net>
12385
12386         Sync from coreutils.
12387
12388         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
12389         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
12390         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
12391         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
12392         in the inet and nsl libraries.  Required on Solaris 5.7.
12393
12394 2005-10-01  Jim Meyering  <jim@meyering.net>
12395
12396         Sync from coreutils.
12397         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
12398         in the inet and nsl libraries.  Required on Solaris 5.7.
12399
12400 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
12401
12402         * lib/getdelim.c (getdelim): Remove unused variables.
12403
12404 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
12405
12406         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
12407         so that the code works even with ancient cpp.  Portability problem
12408         with GCC 2.7.2.1 reported by Thomas M.Ott.
12409
12410 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
12411
12412         * modules/regex (Depends-on): Add strcase.
12413
12414         * modules/gethostname (Licence): Change from GPL to LGPL, since
12415         gethostname.c is a trivial implementation of a standard library
12416         function.
12417         * modules/poll (License): Change from GPL to LGPL, since it's
12418         derived from LGPL code.
12419
12420 2005-09-27  Jim Meyering  <jim@meyering.net>
12421
12422         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
12423         HAVE_CONFIG_H.
12424
12425         * lib/intprops.h (signed_type_or_expr__): Define.
12426         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
12427         for unsigned types.
12428
12429 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
12430
12431         * lib/verify.h (verify_expr): Remove, replacing with:
12432         (verify_true): New macro that returns true instead of void.
12433         (verify_type__): Remove.
12434         (verify): Use verify_true rather than verify_type__.
12435
12436 2005-09-26  Bruno Haible  <bruno@clisp.org>
12437
12438         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
12439         is necessary.
12440         (lib_SOURCES): Remove mbchar.c.
12441         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
12442         (Files): Add m4/mbrtowc.m4.
12443         * modules/mbiter: Likewise.
12444         * modules/mbuiter: Likewise.
12445
12446 2005-09-26  Bruno Haible  <bruno@clisp.org>
12447
12448         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
12449         compile mbchar.c if they are not both present.
12450         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
12451         * m4/mbiter.m4 (gl_MBITER): Likewise.
12452         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
12453         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
12454         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
12455
12456 2005-09-25  Jim Meyering  <jim@meyering.net>
12457
12458         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
12459         also uses socklen_t.
12460
12461 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
12462
12463         * lib/utimens.c (ENOSYS): Define if not already defined.
12464         (futimens): Support having a null PATH if the file descriptor
12465         is nonnegative.
12466
12467         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
12468         Remove.
12469         (__attribute): Define to empty unless GCC 3.1 or later.
12470         This works around a core dump on OpenBSD 3.4, which has GCC
12471         2.95.3, which dumps core when given __attribute__(()).  It also
12472         simplifies other tests, since we really don't want to bother with
12473         worrying about which ancient version of GCC supported what.
12474         Original problem reported by Yoann Vandoorselaere, with part of
12475         the fix suggested by Derek Price.
12476
12477 2005-09-24  Jim Meyering  <jim@meyering.net>
12478
12479         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
12480         so we can once again use a positive bitfield width of 1 -- now we
12481         don't have to explain why we were using a bitfield width of 2.
12482
12483 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
12484
12485         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
12486         and similarly for the other external symbols.  Problem reported
12487         by James Gallager.
12488
12489         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
12490         bug reported by Jim Meyering.
12491
12492         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
12493         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
12494         not needed, since socklen is a prerequisite module.
12495
12496 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
12497
12498         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
12499         Problem reported by Eric Blake.
12500         (getaddrinfo): Initialize se so that it's not garbage.
12501         Redo internal storage allocation so that it doesn't make unportable
12502         assumptions about alignment.
12503         Fix a memory leak.
12504
12505         * lib/utimens.c (futimens): Use futimesat if available.
12506         Prefer it to futimes since it doesn't have the futimes bug.
12507
12508         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
12509         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
12510         Instead, declare a function that returns a pointer to an array,
12511         and use verify_type__ to declare the size of the array.
12512         Problem and germ of a solution reported by Bruno Haible.
12513         (verify_type__): Use 2, not 1, for bitfield size, to avoid
12514         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
12515
12516 2005-09-23  Jim Meyering  <jim@meyering.net>
12517
12518         Sync from coreutils.
12519         Correct build failure (socklen_t not defined) on at least
12520         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
12521         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
12522
12523 2005-09-23  Jim Meyering  <jim@meyering.net>
12524
12525         * modules/getaddrinfo (Depends-on): Add socklen.
12526
12527 2005-09-23  Bruno Haible  <bruno@clisp.org>
12528
12529         * tests/test-verify.c: New file.
12530
12531 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
12532
12533         Sync from coreutils.
12534
12535         * modules/argmatch (Depends-on): Add verify.
12536         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
12537         unistd-safer.
12538         * modules/save-cwd (Depends-on): Likewise.
12539
12540         * modules/openat (Files): Add lib/openat-die.c.
12541         (Depends-on): Remove error, exitfail.
12542         Add dirname.
12543
12544         * modules/verify: New file.
12545         * MODULES.html.sh (Diagnostics <assert.h>): New section,
12546         with "verify" module.
12547
12548 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
12549
12550         Sync from coreutils.
12551
12552         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
12553         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
12554         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
12555         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
12556         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
12557         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
12558         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
12559         Don't bother checking for string.h, stdlib.h, unistd.h.
12560         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
12561         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
12562         module's job.
12563         * m4/jm-macros.m4 (gl_MACROS): Likewise.
12564         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
12565
12566         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
12567         (gl_GETDATE): Use it.
12568
12569         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
12570
12571 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
12572
12573         Sync from coreutils.
12574
12575         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
12576         stat-time.h.
12577         * lib/argmatch.h: Include verify.h
12578         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
12579         (ARGMATCH_ASSERT): Remove; unused.
12580         * lib/canonicalize.c: Assume STDC_HEADERS.
12581         * lib/exclude.c: Include "strcase.h".
12582         * lib/regex_internal.h [!defined _LIBC]: Likewise.
12583         * lib/getusershell.c: Include stdio--.h rather than stdio.h
12584         and stdio-safer.h.
12585         (getusershell): Call fopen, not fopen_safer.
12586         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
12587         Do not include unistd-safer.h.
12588         (save_cwd): Don't call fd_safer; no longer needed
12589         now that we include fcntl--.h.
12590
12591         * lib/getdate.y (relative_time): New type.
12592         (RELATIVE_TIME_0): New constant.
12593         (parser_control): Use relative_time instead of doing it ourselves.
12594         (%union): Add new relative_time rel member.
12595         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
12596         Now typeless.
12597         (relunit, relunit_snumber): Now of type rel.
12598         (zone, rel, relunit, get_date): Adjust to above changes.
12599
12600         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
12601         Do not include unistd-safer.h.
12602         (getloadavg): Don't call fd_safer; no longer needed
12603         now that we include fcntl--.h.
12604
12605         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
12606         (make_dir_parents): Treat ENOSYS like EEXIST.
12607
12608         Improve quality of diagnostics on restore_cwd failure.
12609         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
12610         (make_dir_parents): Last arg is now int * (for errno), not bool *.
12611         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
12612         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
12613         each time through the loop.  Do not diagnose restore_cwd failure;
12614         that is the caller's job (and perhaps the caller does not care).
12615
12616         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
12617         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
12618         If the file already exists but is not a directory, don't bother
12619         to try to make its parents.
12620         Close potential file descriptor leak if we can't chdir("/") (!).
12621         Don't always return true if chdir($PWD) fails; return true only
12622         if the requested action was done successfully (except for the
12623         chdir($PWD)).
12624         Don't log final directory unless we actually made it.
12625         Refactor to avoid duplicate code to fix up permissions.
12626         Don't attempt to fix up parent permissions if chdir($PWD) fails.
12627
12628         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
12629         to make it a bit faster and (I hope) clearer.
12630         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
12631         Fix bug in formats like %2N.
12632
12633         * lib/verify.h: New file.
12634
12635 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
12636
12637         Sync from coreutils.
12638         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
12639
12640 2005-09-22  Jim Meyering  <jim@meyering.net>
12641
12642         Sync from coreutils.
12643
12644         * m4/lstat.m4 (gl_FUNC_LSTAT):
12645         Use AC_LIBSOURCES to require lstat.c and lstat.h.
12646         Remove obsolete comment.
12647         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
12648         * m4/xstrtod.m4: Likewise.
12649
12650         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
12651
12652 2005-09-22  Jim Meyering  <jim@meyering.net>
12653
12654         Sync from coreutils.
12655
12656         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
12657
12658         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
12659         the .tm_year member, since otherwise gcc-4.0 would now warn about
12660         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
12661
12662         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
12663         order to avoid an unsuppressible warning from gcc on 64-bit systems.
12664
12665         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
12666         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
12667         when run in a time zone for which daylight savings time is in effect
12668         for the starting date.
12669
12670         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
12671         stop us from restricting permissions of just-created absolute-named
12672         directories.
12673         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
12674         to restore initial working directory.
12675         * lib/mkdir-p.c (make_dir_parents): New parameter:
12676         different_working_dir, to tell caller if/when we change the working
12677         directory and are unable to return to the initial one.
12678         * lib/mkdir-p.h (make_dir_parents): Update prototype.
12679         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
12680         `return false'.  This fixes a bug introduced on 2004-07-30.
12681
12682         * lib/openat.c (fdopendir): Be sure to close the supplied
12683         file descriptor before returning.  This makes our replacement
12684         implementation a little closer to Solaris's, where fdopendir
12685         ties the file descriptor to the returned DIR* pointer.
12686         * lib/openat.c (unlinkat): New function.
12687         * lib/openat.h (unlinkat): Add prototype.
12688         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
12689         (openat_restore_fail): Rename from openat_restore_die.
12690         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
12691
12692         Provide an alternative to exiting immediately upon save_cwd or
12693         restore_cwd failure.  Now, an application can arrange e.g.,
12694         to perform a longjump in that case.
12695         * lib/openat.c: Include dirname.h.
12696         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
12697         (rpl_openat, fdopendir, fstatat): Call openat_save_die
12698         and openat_restore_die rather than calling error directly.
12699         Don't include "error.h" or "exitfail.h"; they're no longer needed.
12700
12701         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
12702         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
12703         define.
12704
12705         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
12706         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
12707                             int utc, int nanoseconds);
12708         Background:
12709         date should not have to allocate a megabyte of virtual memory to
12710         handle a format argument like +%1048575T.  When implemented with
12711         strftime, it must allocate such a buffer, use strftime to fill it
12712         in, print it, then free it.
12713         With fprintftime, it simply prints everything and exits.
12714         With no need for memory allocation, that's one fewer way to fail.
12715         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
12716         optional field width, not before, so we accept %9:z, not %:9z.
12717         (my_strftime): Be sure to use L_('x') for literals.
12718
12719         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
12720         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
12721         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
12722         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
12723         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
12724         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
12725         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
12726         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
12727         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
12728         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
12729         * lib/xgethostname.c, lib/xreadlink.c:
12730         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
12731
12732         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
12733         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
12734         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
12735         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
12736         and don't include <sys/file.h>).
12737
12738 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
12739
12740         Sync from coreutils.
12741
12742         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
12743         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
12744         [!LDAV_DONE]: Avoid unused variable warning.
12745
12746 2005-09-21  Bruno Haible  <bruno@clisp.org>
12747
12748         * lib/unicodeio.h (unicode_to_mb): New declaration.
12749
12750 2005-09-20  Derek Price  <derek@ximbiot.com>
12751
12752         * lib/getaddrinfo.c: Don't include <netdb.h> included from
12753         getaddrinfo.h.
12754
12755 2005-09-20  Bruno Haible  <bruno@clisp.org>
12756
12757         * gnulib-tool: Remove trailing slashes from the values specified for
12758         --source-base, --m4-base, --tests-base, --aux-dir.
12759         Suggested by Simon Josefsson <jas@extundo.com>.
12760
12761 2005-09-20  Bruno Haible  <bruno@clisp.org>
12762
12763         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
12764         func_modules_to_filelist, func_import, func_create_testdir): Make all
12765         sorting results locale-independent, so that gnulib-cache.m4 doesn't
12766         change when gnulib-tool is invoked in a different locale.
12767
12768 2005-09-19  Simon Josefsson  <jas@extundo.com>
12769
12770         * m4/socklen.m4: Fix typo.
12771
12772 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12773
12774         Use a consistent style for including <config.h>.
12775         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
12776         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
12777         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
12778         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
12779         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
12780         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
12781         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
12782         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
12783         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
12784         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
12785         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
12786         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
12787         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
12788         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
12789         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
12790         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
12791         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
12792         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
12793         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
12794         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
12795         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
12796         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
12797         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
12798         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
12799         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
12800         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
12801         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
12802         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
12803         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
12804         lib/xstrtoumax.c, lib/yesno.c:
12805         Standardize inclusion of config.h.
12806         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
12807         lib/inttostr.h:  Removed inclusion of config.h from header files.
12808         * lib/inttostr.c:  Adjusted in-tree users.
12809         * lib/timespec.h: Remove superfluous warning to include config.h.
12810         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
12811         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
12812         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
12813         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
12814         config.h with HAVE_CONFIG_H.
12815
12816 2005-09-19  Jim Meyering  <jim@meyering.net>
12817
12818         * modules/pathmax (License): Change to LGPL.
12819
12820 2005-09-19  Derek Price  <derek@ximbiot.com>
12821
12822         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
12823
12824 2005-09-19  Bruno Haible  <bruno@clisp.org>
12825
12826         * gnulib-tool (import): Provide default for --tests-base.
12827
12828 2005-09-19  Bruno Haible  <bruno@clisp.org>
12829
12830         * doc/quote.texi: New file, extracted from gnulib.texi.
12831         * doc/ctime.texi: New file, extracted from gnulib.texi.
12832         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
12833         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
12834         * doc/gnulib.texi: Include them.
12835
12836 2005-09-18  Bruno Haible  <bruno@clisp.org>
12837
12838         Portability fix.
12839         * gnulib-tool (func_readlink): New function.
12840         (func_ln_if_changed): Use it.
12841
12842 2005-09-18  Bruno Haible  <bruno@clisp.org>
12843
12844         * gnulib-tool: Support --with-tests also with --import.
12845         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
12846         (func_import): Use variables $testsbase and $inctests. Emit a
12847         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
12848         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
12849         SUBDIRS += $testsdir.
12850         (func_create_testdir): Update.
12851
12852 2005-09-18  Bruno Haible  <bruno@clisp.org>
12853
12854         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
12855         instead of $dry_run.
12856         (func_cp_if_changed, func_mv_if_changed): Remove functions.
12857         (func_ln_if_changed): Don't handle dry-run here.
12858         (func_import): In dry-run mode, detect more precisely which actions
12859         would be performed, and don't use "...ing" verbs.
12860
12861 2005-09-18  Bruno Haible  <bruno@clisp.org>
12862
12863         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
12864         (func_import): Use join on two temporary files instead of three nested
12865         loops, in order to determine which files are new or old.
12866
12867 2005-09-18  Bruno Haible  <bruno@clisp.org>
12868
12869         * gnulib-tool (func_import): Comment out code that spits out the
12870         new files with --dry-run.
12871
12872 2005-09-18  Bruno Haible  <bruno@clisp.org>
12873
12874         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
12875
12876 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
12877
12878         * lib/stat-time.h: New file.
12879         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
12880         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
12881         in a different way.
12882         (timespec_cmp): New function.
12883         * lib/utimecmp.c: Include stat-time.h.
12884         (SYSCALL_RESOLUTION): Depend on whether various struct stat
12885         members exist, not on the obsolescent ST_MTIM_NSEC.
12886         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
12887
12888 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
12889
12890         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
12891
12892 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
12893
12894         * MODULES.html.sh (File system functions): Add stat-time.
12895         * modules/stat-time: New file.
12896         * modules/timespec (Files): Remove m4/st_mtim.m4; this
12897         is now done in a different way, by the stat-time module.
12898         * modules/utimecmp (Depends-on): Add stat-time.
12899
12900 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
12901
12902         * m4/st_mtim.m4: Remove.  Superseded by...
12903         * m4/stat-time.m4: New file.
12904         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
12905         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
12906
12907 2005-09-15  Derek Price  <derek@ximbiot.com>
12908
12909         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
12910
12911 2005-09-15  Derek Price  <derek@ximbiot.com>
12912
12913         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
12914         * lib/regex_internal.c: Ditto, using this...
12915         (__GNUC_PREREQ): ...new macro.
12916         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
12917         using...
12918         (__GNUC_PREREQ): ...this new macro.
12919
12920         * lib/strstr.h: Include string.h. Define strstr as a macro here.
12921
12922 2005-09-15  Derek Price  <derek@ximbiot.com>
12923             Paul Eggert  <eggert@cs.ucla.edu>
12924
12925         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
12926         changes, consolidating in...
12927         * lib/regex_internal.h: ...this file.
12928
12929 2005-09-13  Jim Meyering  <jim@meyering.net>
12930
12931         * lib/canon-host.c: Filter through gnu indent and reword comments
12932         slightly.
12933         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
12934
12935 2005-09-13  Derek Price  <derek@ximbiot.com>
12936
12937         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
12938         failure.
12939         Reported by Jim Meyering  <jim@meyering.net>.
12940
12941 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
12942
12943         * lib/base64.c: Typo.
12944         (base64_encode): Put b64str in initialized data section.
12945
12946 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
12947
12948         Merge glibc and coreutils changes into gnulib, plus a few
12949         extra fixes.
12950         * lib/md5.c: Use #error rather than a string.
12951         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
12952         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
12953         (__attribute__): Define to empty for non recent-GCC.
12954         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
12955         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
12956         Renamed from their non-__ counterparts, with new macros replacing
12957         them if not _LIBC.  Add __THROW attribute.
12958         (rol): Remove.
12959         (struct md5_ctx): Align buffer if using GCC.
12960         * lib/sha1.h (struct sha1_ctx): Likewise.
12961         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
12962         The old name was backwards.
12963         (NOTSWAP): Remove; not used.
12964         (rol): New macro, moved here from md5.h.
12965         (sha1_process_block): Remove a FIXME that doesn't make sense.
12966
12967 2005-09-12  Derek Price  <derek@ximbiot.com>
12968
12969         Return usable errors from canon-host.
12970         * lib/canon-host.h: New file.
12971         * lib/canon-host.c (canon_host): Wrap...
12972         (canon_host_r): ...this new function, which now relies exclusively on
12973         getaddrinfo.
12974         (ch_strerror): New function.
12975         (last_cherror): New global.
12976         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
12977         interface.
12978         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
12979         void *.
12980         (freeaddrinfo): Free ai->ai_canonname when set.
12981
12982 2005-09-12  Derek Price  <derek@ximbiot.com>
12983
12984         Make canon-host require getaddrinfo.
12985         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
12986         AC_LIBSOURCE canon-host.h.  Call...
12987         (gl_PREREQ_CANON_HOST): ...this new function, which requires
12988         gl_GETADDRINFO.
12989         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
12990
12991 2005-09-12  Derek Price  <derek@ximbiot.com>
12992
12993         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
12994         LGPL.
12995         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
12996
12997 2005-09-12  Derek Price  <derek@ximbiot.com>
12998
12999         * lib/gai_strerror.c: Include config.h when available.  Include
13000         getaddrinfo.h before other headers to test interface.
13001         Reported by Larry Jones <lawrence.jones@ugs.com>.
13002
13003 2005-09-12  Derek Price  <derek@ximbiot.com>
13004             Paul Eggert  <eggert@cs.ucla.edu>
13005
13006         * modules/glob (Files): Add glob-libc.h.
13007
13008 2005-09-12  Derek Price  <derek@ximbiot.com>
13009             Paul Eggert  <eggert@cs.ucla.edu>
13010
13011         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
13012         glob_.h, glob-libc.h.
13013         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
13014
13015 2005-09-12  Derek Price  <derek@ximbiot.com>
13016             Paul Eggert  <eggert@cs.ucla.edu>
13017
13018         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
13019         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
13020         protecting things that should be done only in gnulib contexts.
13021         * lib/glob_.h: New file, containing only the glob things needed for
13022         gnulib.
13023         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
13024         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
13025         (glob, globfree, glob_pattern_p): Now defined simply in terms of
13026         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
13027         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
13028         and to respect the namespace rules better.
13029
13030 2005-09-08  Simon Josefsson  <jas@extundo.com>
13031
13032         * modules/socklen: New file.
13033
13034 2005-09-08  Simon Josefsson  <jas@extundo.com>
13035
13036         * m4/socklen.m4: New file.
13037
13038 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
13039
13040         * modules/utimens (Files): Add m4/utimbuf.m4, since
13041         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
13042         Reported by Sergey Poznyakoff.
13043
13044 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
13045
13046         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
13047         definitions, since that's the preferred style in glibc.
13048         Fix a minor spacing issue, and update copyright notice to match
13049         glibc's.
13050
13051 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
13052
13053         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
13054
13055 2005-09-06  Simon Josefsson  <jas@extundo.com>
13056
13057         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
13058         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
13059
13060 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
13061
13062         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
13063         warning.
13064
13065 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
13066
13067         * config/srclist.txt: Add glibc bug 1302.
13068
13069 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
13070
13071         Change bitset word type from unsigned int to unsigned long int,
13072         as this has better performance on typical 64-bit hosts.
13073         Port bitset code to hosts with unusual word sizes.
13074         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
13075         (build_collating_symbol):
13076         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
13077         argument is a bitset.  This is merely a style issue, but it makes
13078         it clearer that an entire array is expected.
13079         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
13080         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
13081         Port to the case where bitset_word is not the same as unsigned int.
13082         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
13083         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
13084         Likewise.
13085         * lib/regexec.c (check_dst_limits_calc_pos_1,
13086         check_subexp_matching_top):
13087         (build_trtable, group_nodes_into_DFAstates):
13088         Likewise.
13089         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
13090         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
13091         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
13092         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
13093         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
13094         * lib/regcomp.c (optimize_subexps, lower_subexp):
13095         Work even if bitset_word has holes in its bitwise representation.
13096         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
13097         * lib/regexec.c (check_dst_limits_calc_pos_1,
13098         check_subexp_matching_top):
13099         Likewise.
13100         * lib/regex_internal.c (re_string_reconstruct):
13101         Don't assume UCHAR_MAX == 255.
13102         * lib/regex_internal.h (bitset_set_all): Likewise.
13103         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
13104         All uses changed.
13105         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
13106         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
13107         All uses changed.
13108         (BITSET_WORD_MAX): New macro.
13109         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
13110         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
13111         (bitset_empty, bitset_copy):
13112         Prefer sizeof (bitset) to multiplying it out ourselves.
13113         (bitset_not_merge): Remove; unused.
13114         (bitset_contain): Return bool, not unsigned int with one bit on.
13115         All callers changed.
13116         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
13117         alignment than re_node_set; do this by defining a new internal
13118         type struct dests_alloc and using it to allocate memory.
13119
13120 2005-09-05  Bruno Haible  <bruno@clisp.org>
13121
13122         * gnulib-tool (func_import): Fix comparison in handling of symbolic
13123         links.
13124
13125 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
13126
13127         * modules/size_max (Makefile.am): Add size_max.h
13128
13129 2005-09-04  Derek Price  <derek@ximbiot.com>
13130
13131         * gnulib-tool (func_import): Fix reversed $symbolic logic.
13132
13133 2005-09-03  Simon Josefsson  <jas@extundo.com>
13134
13135         * gnulib-tool: Fix typo.
13136
13137 2005-09-03  Simon Josefsson  <jas@extundo.com>
13138
13139         * config/srclist.txt: Add glibc bug 1293.
13140
13141 2005-09-03  Derek Price  <derek@ximbiot.com>
13142
13143         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
13144         From Larry Jones <lawrence.jones@ugs.com>.
13145
13146 2005-09-02  Simon Josefsson  <jas@extundo.com>
13147
13148         * modules/socklen: New file.
13149
13150 2005-09-02  Simon Josefsson  <jas@extundo.com>
13151
13152         * modules/havelib: New module.
13153
13154         * modules/gettext, modules/iconv, modules/lock, modules/readline:
13155         Use havelib.
13156
13157 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
13158
13159         Check for arithmetic overflow when calculating sizes, to prevent
13160         some buffer-overflow issues.  These patches are conservative, in the
13161         sense that when I couldn't determine whether an overflow was possible,
13162         I inserted a run-time check.
13163         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
13164         macros.
13165         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
13166         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
13167         (re_xnrealloc, re_x2nrealloc): New inline functions.
13168         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
13169         parse_bracket_exp):
13170         (build_equiv_class, build_charclass): Check for arithmetic overflow
13171         in size expression calculations.
13172         * lib/regex_internal.c (re_string_realloc_buffers):
13173         (build_wcs_upper_buffer, re_node_set_add_intersect):
13174         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
13175         (re_dfa_add_node, register_state): Likewise.
13176         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
13177         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
13178         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
13179         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
13180
13181 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
13182
13183         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
13184         m4/ulonglong.m4.  Problem reported by Martin Lambers.
13185
13186 2005-09-02  Bruno Haible  <bruno@clisp.org>
13187
13188         Support for lib vs. lib64 distinction on biarch platforms.
13189         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
13190         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
13191         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
13192
13193 2005-09-02  Bruno Haible  <bruno@clisp.org>
13194
13195         * gnulib-tool (import): In the other first-use case, provide defaults
13196         as well.
13197
13198 2005-09-02  Bruno Haible  <bruno@clisp.org>
13199
13200         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
13201         patches not yet found in the latest gettext release.
13202
13203 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
13204
13205         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
13206         to avoid a collision with bits/local_lim.h in glibc.
13207         All uses changed.  Problem reported by Dmitry V. Levin in
13208         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
13209
13210         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
13211         bugs in int versus size_t comparisons.
13212         (re_string_context_at): Fix bug where the code assumed that
13213         Idx is signed.
13214
13215         Use bool where appropriate.
13216         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
13217         All callers changed.
13218         (calc_eclosure_iter): Likewise, for ROOT arg.
13219         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
13220         (build_charclass_op): Likewise, for NON_MATCH arg.
13221         * lib/regex_internal.c (re_string_allocate, re_string_construct):
13222         (re_string_construct_common): Likewise, for ICASE arg.
13223         * lib/regexec.c (re_search_2_stub, re_search_stub):
13224         Likewise, for RET_LEN arg.
13225         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
13226         (set_regs): Likewise, for FL_BACKTRACK arg.
13227         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
13228         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
13229         (calc_eclosure_iter, parse_bracket_exp):
13230         Use bool for internal variables that are booleans.
13231         * lib/regexec.c (re_search_internal, check_matching,
13232         proceed_next_node):
13233         (set_regs, build_sifted_states, sift_states_bkref):
13234         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
13235         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
13236         (find_collation_sequence_value):
13237         Likewise.
13238         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
13239         (re_node_set_compare):
13240         Return bool, not int. All callers changed.
13241         * lib/regexec.c (check_halt_node_context, check_dst_limits):
13242         (build_trtable, check_node_accept): Likewise.
13243         * lib/regex_internal.h: Include stdbool.h.
13244
13245         Fix bugs uncovered when converting to bool.
13246         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
13247         failure instead of charging ahead blindly.
13248         * lib/regex_internal.c (register_state): Likewise.
13249         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
13250         for freeing internal storage.
13251         (group_nodes_into_DFA_states): Use unsigned int, not int, for
13252         bitset pieces used as boolean, to avoid undefined behavior
13253         on hosts that do int overflow checking.
13254
13255 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
13256
13257         * config/srclist.txt: Add glibc bugs 1285-1287.
13258
13259 2005-09-01  Jim Meyering  <jim@meyering.net>
13260
13261         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
13262         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
13263         Require gl_STAT_MACROS, too.
13264
13265 2005-09-01  Bruno Haible  <bruno@clisp.org>
13266
13267         * gnulib-tool (import): In the first-use case, provide defaults.
13268
13269 2005-09-01  Bruno Haible  <bruno@clisp.org>
13270
13271         * gnulib-tool (func_import): Remove the .tmp files.
13272
13273 2005-09-01  Bruno Haible  <bruno@clisp.org>
13274
13275         * gnulib-tool (func_import): Fix handling of symbolic links.
13276
13277 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
13278
13279         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
13280         old glibc regex code mishandles strings longer than 2**31 bytes.
13281         This patch fixes this when the regex code is used in gnulib
13282         (i.e., outside glibc).
13283
13284         This patch should not affect the use of the regex code inside
13285         glibc.  No doubt this problem also needs to be handled for glibc
13286         as well, but the result will be an incompatible change to the
13287         glibc ABI, and the old ABI will have to be supported too.  That
13288         can be the the subject for another patch.
13289
13290         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
13291         governing whether the rest of this patch is active.  By default,
13292         the macro is disabled and the patch has no effect.
13293         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
13294         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
13295         (struct re_pattern_buffer, re_search, re_search_2, re_match):
13296         (re_match_2, re_set_registers): Use the new types.
13297         * lib/regex_internal.h (Idx, re_hashval_t): New types.
13298         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
13299         New macros.
13300         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
13301         (re_string_context_at, bin_tree_t, re_dfastate_t):
13302         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
13303         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
13304         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
13305         (re_string_char_size_at, re_string_wchar_at):
13306         (re_string_elem_size_at):
13307         Use the new types and macros to port to 64-bit hosts.
13308         Use unsigned types for internal values, so that the code
13309         mostly works even for arrays larger than SSIZE_MAX.
13310         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
13311         (search_duplicated_node, calc_eclosure_iter, fetch_number):
13312         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
13313         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
13314         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
13315         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
13316         (calc_inveclosure, parse_dup_op, build_range_exp):
13317         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
13318         (fetch_number, create_token_tree, mark_opt_subexp):
13319         Likewise.
13320         * lib/regex_internal.c (re_string_construct_common,
13321         create_ci_newstate):
13322         (create_cd_newstate, re_string_allocate, re_string_construct):
13323         (re_string_realloc_buffers, build_wcs_upper_buffer):
13324         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
13325         (re_string_reconstruct, re_string_peek_byte_case):
13326         (re_string_fetch_byte_case, re_string_context_at):
13327         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
13328         (re_node_set_init_copy, re_node_set_add_intersect):
13329         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
13330         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
13331         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
13332         (re_acquire_state, re_acquire_state_context, register_state):
13333         Likewise.
13334         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
13335         search_cur_bkref_entry):
13336         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
13337         (re_search_internal, re_search_2_stub, re_search_stub)
13338         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
13339         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
13340         (update_cur_sifted_state, check_dst_limits):
13341         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
13342         (check_subexp_limits, sift_states_bkref, merge_state_array):
13343         (check_subexp_matching_top, get_subexp, get_subexp_sub):
13344         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
13345         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
13346         (expand_bkref_cache, check_node_accept_bytes):
13347         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
13348         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
13349         (acquire_init_state_context, check_halt_node_context):
13350         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
13351         (sift_states_backward, clean_state_log_if_needed):
13352         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
13353         (find_recover_state, transit_state_sb, transit_state_mb):
13354         (transit_state_bkref, build_trtable, match_ctx_clean):
13355         Likewise.
13356         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
13357         to work around an assumption that REG_MISSING is negative.
13358
13359         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
13360         (seek_collating_symbol_entry) [defined _LIBC]:
13361         (lookup_collation_sequence_value) [defined _LIBC]:
13362         (build_range_exp, build_collating_symbol) [defined _LIBC]:
13363         Use prototypes rather than old-style function definitions.
13364         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
13365         (transit_state_sb) [0]:
13366         (find_collation_sequence_value) [defined _LIBC]: Likewise.
13367
13368         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
13369         rm_eo.
13370
13371         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
13372         (optimize_subexps, lower_subexp):
13373         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
13374         since the signed shift might overflow.  Use 1u<<31 instead.
13375         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
13376         Likewise.
13377         * lib/regexec.c (check_dst_limits_calc_pos_1,
13378         check_subexp_matching_top): Likewise.
13379
13380         * lib/regcomp.c (optimize_subexps, lower_subexp):
13381         Use CHAR_BIT rather than 8, for clarity.
13382         * lib/regexec.c (check_dst_limits_calc_pos_1):
13383         (check_subexp_matching_top): Likewise.
13384         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
13385         have to worry about portability issues when shifting it left.
13386         Remove no-longer-needed test for table_size > 0.
13387         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
13388         in a word, as the resulting behavior is undefined.
13389         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
13390         in one case, a <= should have been an <, and in another case the
13391         whole test was missing.
13392         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
13393         the standard name CHAR_BIT.
13394         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
13395         this is not true on one's complement and signed-magnitude hosts.
13396
13397         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
13398         next_last_offset.
13399         (struct re_dfa_t): Remove unused member states_alloc.
13400         * lib/regcomp.c (init_dfa): Don't initialize unused members.
13401
13402 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
13403
13404         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
13405         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
13406         and large-file glibc and in 32-bit large-file Solaris.
13407
13408 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
13409
13410         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
13411         lengths fit in regoff_t; this isn't true if regoff_t is the same
13412         width as size_t.
13413         * lib/regex.c (re_search_internal): 5th arg is LAST_START
13414         (= START + RANGE) instead of RANGE.  This avoids overflow
13415         problems when regoff_t is the same width as size_t.
13416         All callers changed.
13417         (re_search_2_stub): Check for overflow when adding the
13418         sizes of the two strings.
13419         (re_search_stub): Check for overflow when adding START
13420         to RANGE; if it occurs, substitute the extreme value.
13421
13422 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
13423
13424         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
13425
13426 2005-08-31  Jim Meyering  <jim@meyering.net>
13427
13428         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
13429         a pointer-to-const.
13430         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
13431         (register_state): Likewise.
13432         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
13433         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
13434         (group_nodes_into_DFAstates): Likewise.
13435
13436 2005-08-31  Jim Meyering  <jim@meyering.net>
13437
13438         * check-module: Add a FIXME comment.
13439
13440 2005-08-31  Eric Blake  <ebb9@byu.net>
13441
13442         * modules/unistd-safer (Files): Add unistd--.h.
13443         * modules/stdio-safer (Files): Add stdio--.h.
13444
13445 2005-08-31  Derek Price  <derek@ximbiot.com>
13446
13447         * lib/getdelim.c (getdelim): Return EOF on EOF.
13448         Reported by Larry Jones <lawrence.jones@ugs.com>.
13449
13450 2005-08-31  Bruno Haible  <bruno@clisp.org>
13451
13452         Avoid unnecessary diffs in the generated lib/Makefile.am.
13453         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
13454         the generated files.
13455         (func_import): Don't set cmd.
13456
13457 2005-08-31  Bruno Haible  <bruno@clisp.org>
13458
13459         * lib/strstr.c: Include <stddef.h>, for NULL.
13460         * lib/strcasestr.c: Likewise.
13461         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
13462
13463 2005-08-31  Bruno Haible  <bruno@clisp.org>
13464
13465         * gnulib-tool: New option --macro-prefix.
13466         (func_import): Use macro_prefix.
13467         (import): Handle option --macro-prefix.
13468
13469 2005-08-31  Bruno Haible  <bruno@clisp.org>
13470
13471         * gnulib-tool (import): Rename most ac_* variables to cached_*.
13472         Also use new variables cached_lgpl, cached_libtool.
13473
13474 2005-08-31  Bruno Haible  <bruno@clisp.org>
13475
13476         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
13477         always instantiating them.
13478
13479 2005-08-31  Bruno Haible  <bruno@clisp.org>
13480
13481         * gnulib-tool (func_import): Read the previous cached settings
13482         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
13483         earlier added by gnulib but are now dropped. Warn when a gnulib file
13484         overwrites a non-gnulib file.
13485
13486 2005-08-31  Bruno Haible  <bruno@clisp.org>
13487
13488         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
13489         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
13490         projects that don't keep autogenerated files in CVS. Put into
13491         actioncmd only the specified modules, not the transitive closure.
13492
13493 2005-08-31  Bruno Haible  <bruno@clisp.org>
13494
13495         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
13496         Create directories that shall be filled.
13497         (import): Don't look for gl_* macros in configure.ac. Recurse across
13498         all directories containing a gnulib-cache.m4 files, if meaningful.
13499
13500 2005-08-31  Bruno Haible  <bruno@clisp.org>
13501
13502         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
13503         (import): Set seen_libtool when we see gl_LIBTOOL.
13504
13505 2005-08-31  Bruno Haible  <bruno@clisp.org>
13506
13507         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
13508         declaration macro definitions from generated gnulib.m4.
13509
13510 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
13511
13512         * lib/iconvme.h: Add prototype for iconv_alloc.
13513
13514 2005-08-29  Simon Josefsson  <jas@extundo.com>
13515
13516         * lib/iconvme.c: Fix errno.
13517
13518 2005-08-29  Bruno Haible  <bruno@clisp.org>
13519
13520         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
13521         that it works when the directory contains spaces.
13522
13523 2005-08-29  Bruno Haible  <bruno@clisp.org>
13524
13525         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
13526
13527 2005-08-29  Bruno Haible  <bruno@clisp.org>
13528
13529         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
13530         Emit more advice.
13531
13532 2005-08-29  Bruno Haible  <bruno@clisp.org>
13533         and Stepan Kasal  <kasal@ucw.cz>
13534
13535         * check-module: If more parameters are given, check each of them
13536         separately; add more exceptions, as noted by Jim Meyering.
13537         (check_module): New procedure.
13538         (%exempt_header): Now contains all exceptions.
13539
13540 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
13541
13542         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
13543
13544 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
13545
13546         * lib/iconvme.c: Split iconv_string into iconv_alloc.
13547
13548 2005-08-28  Bruno Haible  <bruno@clisp.org>
13549
13550         * m4/gnulib-tool.m4: New file.
13551
13552 2005-08-27  Jim Meyering  <jim@meyering.net>
13553
13554         * modules/unistd-safer (Files): Add pipe-safer.c.
13555         * modules/fcntl-safer (Files): Add creat-safer.c.
13556
13557 2005-08-27  Jim Meyering  <jim@meyering.net>
13558
13559         * m4/stdlib-safer.m4: New file.  From coreutils.
13560         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
13561         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
13562         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
13563         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
13564         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
13565
13566 2005-08-27  Jim Meyering  <jim@meyering.net>
13567
13568         * lib/fopen-safer.c: Merge minor changes from coreutils.
13569         * lib/dup-safer.c: Likewise.
13570         * lib/fd-safer.c: Likewise.
13571
13572         Merge from coreutils.
13573         * lib/stdio--.h: New file.
13574         * lib/stdlib--.h: New file.
13575         * lib/mkstemp-safer.c: New file.
13576
13577         GNU tar needs these.
13578         * lib/pipe-safer.c: New file.
13579         * lib/creat-safer.c: New file.
13580         * lib/fcntl--.h (creat): Define to creat_safer.
13581         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
13582         * lib/unistd--.h (pipe): Define to pipe_safer.
13583         * lib/unistd-safer.h: Declare pipe_safer.
13584
13585 2005-08-26  Simon Josefsson  <jas@extundo.com>
13586
13587         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
13588         Haible <bruno@clisp.org>.
13589
13590 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
13591
13592         * lib/regex_internal.h: Remove all references to
13593         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
13594         or better.
13595         (bitset_not, bitset_merge, bitset_not_merge):
13596         (bitset_mask, re_string_allocate, re_string_construct):
13597         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
13598         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
13599         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
13600         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
13601         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
13602         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
13603         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
13604         (re_acquire_state_context):
13605         Remove unnecessary forward decls.
13606         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
13607         Put __attribute at function definition,
13608         now that the function decl has been removed.
13609         * lib/regex_internal.c (re_string_peek_byte_case):
13610         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
13611         Likewise.
13612
13613 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
13614
13615         * m4/regex.m4: Add AC_PREREQ(2.50).
13616         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
13617
13618 2005-08-25  Simon Josefsson  <jas@extundo.com>
13619
13620         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
13621         __fsetlocking.
13622
13623 2005-08-25  Simon Josefsson  <jas@extundo.com>
13624
13625         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
13626         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
13627         GLIBC specific code.
13628
13629 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
13630
13631         Make regex safe for g++.  This fixes one real bug (an "err"
13632         that should have been "*err").  g++ problem reported by
13633         Sam Steingold.
13634         * lib/regex_internal.h (re_calloc): New macro, consistent with
13635         re_malloc etc.  All callers of calloc changed to use re_calloc.
13636         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
13637         not int.  All callers changed.
13638         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
13639         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
13640         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
13641         (find_recover_state): Change "err" to "*err"; this fixes what
13642         appears to be a real bug.
13643         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
13644         versus int.
13645
13646 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
13647
13648         * modules/regex (Depends-on): Add malloc, since the code
13649         assumes that !malloc(0) means failure.
13650
13651 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
13652
13653         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
13654
13655         alloca modernization/simplification for regex.
13656         * lib/regex.c: Remove portability cruft for alloca.  This no longer
13657         needs to be at the start of the file, and can be moved into
13658         regex_internal.h and simplified.
13659         * lib/regex_internal.h: Include <alloca.h>.
13660         (__libc_use_alloca) [!defined _LIBC]: New macro.
13661         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
13662         now works outside glibc.
13663
13664 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
13665
13666         * config/srclist.txt: Add glibc bugs 1241, 1245.
13667
13668 2005-08-25  Jim Meyering  <jim@meyering.net>
13669
13670         * lib/open-safer.c: Include <config.h>.
13671         Otherwise, we'd lose LARGEFILE support in any file using
13672         e.g. "fcntl--.h"
13673
13674 2005-08-25  Bruno Haible  <bruno@clisp.org>
13675
13676         * m4/minmax.m4: Require autoconf 2.52.
13677         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
13678         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
13679         alternatives of translit over the alphabet.
13680         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
13681
13682 2005-08-24  Simon Josefsson  <jas@extundo.com>
13683
13684         * tests/test-getpass.c: New file.
13685
13686 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
13687
13688         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
13689         for GNU regex features.
13690
13691 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
13692
13693         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
13694         * lib/regex.h (regerror): Likewise.
13695
13696         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
13697         requires this.  (The code never needed it.)
13698
13699         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
13700         All uses of recently-renamed identifiers changed to use the new,
13701         POSIX-compliant names.  The code will build and run just fine
13702         without these changes, but it's better to eat our own dog food
13703         and use the standard-conforming names.
13704
13705         * lib/regex.h: Fix a multitude of POSIX name space violations.
13706         These changes have an effect only for programs that define
13707         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
13708         do not change anything for programs compiled in the normal way.
13709         Also, there is no effect on the ABI.
13710
13711         (_REGEX_SOURCE): New macro.
13712         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
13713         defined and _GNU_SOURCE is not; this fixes a name space violation.
13714
13715         Rename the following macros to obey POSIX requirements.
13716         The old names are still visible as macros if _REGEX_SOURCE is defined.
13717         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
13718         RE_BACKSLASH_ESCAPE_IN_LISTS.
13719         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
13720         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
13721         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
13722         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
13723         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
13724         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
13725         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
13726         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
13727         (REG_INTERVALS): renamed from RE_INTERVALS.
13728         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
13729         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
13730         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
13731         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
13732         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
13733         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
13734         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
13735         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
13736         RE_UNMATCHED_RIGHT_PAREN_ORD.
13737         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
13738         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
13739         (REG_DEBUG): renamed from RE_DEBUG.
13740         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
13741         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
13742         unusual, since we can't clash with the POSIX REG_ICASE.
13743         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
13744         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
13745         (REG_NO_SUB): renamed from RE_NO_SUB.
13746         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
13747         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
13748         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
13749         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
13750         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
13751         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
13752         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
13753         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
13754         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
13755         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
13756         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
13757         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
13758         RE_SYNTAX_POSIX_MINIMAL_BASIC.
13759         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
13760         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
13761         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
13762         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
13763         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
13764         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
13765         (REG_FIXED): Renamed from REGS_FIXED.
13766         (REG_NREGS): Renamed from RE_NREGS.
13767
13768         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
13769         of other REG_* macros, since POSIX says the user is allowed to
13770         #undef these macros selectively.
13771
13772         (reg_errcode_t): Update comment stating what other tables need
13773         to be consistent.
13774
13775         Rename the following enum values to obey POSIX requirements.
13776         The old names are still visible as macros.
13777         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
13778         is not defined, since GNU is supposed to be a superset of POSIX as
13779         much as possible, and since we want reg_errcode_t to be a signed
13780         type for implementation consistency.
13781         (_REG_NOERROR): Renamed from REG_NOERROR.
13782         (_REG_NOMATCH): Renamed from REG_NOMATCH.
13783         (_REG_BADPAT): Renamed from REG_BADPAT.
13784         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
13785         (_REG_ECTYPE): Renamed from REG_ECTYPE.
13786         (_REG_EESCAPE): Renamed from REG_EESCAPE.
13787         (_REG_ESUBREG): Renamed from REG_ESUBREG.
13788         (_REG_EBRACK): Renamed from REG_EBRACK.
13789         (_REG_EPAREN): Renamed from REG_EPAREN.
13790         (_REG_EBRACE): Renamed from REG_EBRACE.
13791         (_REG_BADBR): Renamed from REG_BADBR.
13792         (_REG_ERANGE): Renamed from REG_ERANGE.
13793         (_REG_ESPACE): Renamed from REG_ESPACE.
13794         (_REG_BADRPT): Renamed from REG_BADRPT.
13795         (_REG_EEND): Renamed from REG_EEND.
13796         (_REG_ESIZE): Renamed from REG_ESIZE.
13797         (_REG_ERPAREN): Renamed from REG_ERPAREN.
13798         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
13799         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
13800         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
13801         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
13802
13803         (_REG_RE_NAME, _REG_RM_NAME): New macros.
13804         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
13805         changed.  But support the old name if the new one is not defined
13806         and if _REGEX_SOURCE.
13807
13808         Change the following member names in struct re_pattern_buffer.
13809         The old names are still supported if !_REGEX_SOURCE.
13810         The new names are always supported, regardless of _REGEX_SOURCE.
13811         (re_buffer): Renamed from buffer.
13812         (re_allocated): Renamed from allocated.
13813         (re_used): Renamed from used.
13814         (re_syntax): Renamed from syntax.
13815         (re_fastmap): Renamed from fastmap.
13816         (re_translate): Renamed from translate.
13817         (re_can_be_null): Renamed from can_be_null.
13818         (re_regs_allocated): Renamed from regs_allocated.
13819         (re_fastmap_accurate): Renamed from fastmap_accurate.
13820         (re_no_sub): Renamed from no_sub.
13821         (re_not_bol): Renamed from not_bol.
13822         (re_not_eol): Renamed from not_eol.
13823         (re_newline_anchor): Renamed from newline_anchor.
13824
13825         Change the following member names in struct re_registers.
13826         The old names are still supported if !_REGEX_SOURCE.
13827         The new names are always supported, regardless of _REGEX_SOURCE.
13828         (rm_num_regs): Renamed from num_regs.
13829         (rm_start): Renamed from start.
13830         (rm_end): Renamed from end.
13831
13832         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
13833         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
13834         Prepend __ to parameter names.
13835
13836         Undo yesterday's changes.
13837
13838 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
13839
13840         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
13841         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
13842         lib/regex.c.
13843
13844 2005-08-24  Jim Meyering  <jim@meyering.net>
13845
13846         Sync from coreutils.
13847         * m4/fcntl-safer.m4: New file.
13848
13849         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
13850         and object files for this module.
13851
13852 2005-08-24  Jim Meyering  <jim@meyering.net>
13853
13854         Sync from coreutils.
13855         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
13856
13857 2005-08-24  Jim Meyering  <jim@meyering.net>
13858
13859         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
13860         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
13861
13862 2005-08-24  Jim Meyering  <jim@meyering.net>
13863
13864         * modules/fcntl-safer: New module.
13865         * modules/fts (Depends-on): Add fcntl-safer.
13866         * MODULES.html.sh (File descriptor based Input/Output):
13867         Add fcntl-safer.
13868
13869 2005-08-24  Bruno Haible  <bruno@clisp.org>
13870
13871         Support for unit test modules.
13872         * modules/README: Mention tests modules.
13873         * modules/TEMPLATE-TESTS: New file.
13874         * gnulib-tool: New options --extract-tests-module, --with-tests and
13875         --tests-base (unused for the moment).
13876         (testsbase, inctests): New variables.
13877         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
13878         (func_verify_module): Exclude TEMPLATE-TESTS.
13879         (func_verify_nontests_module, func_verify_tests_module): New functions.
13880         (func_get_dependencies): Add implicit dependency for tests modules.
13881         (func_get_tests_module): New function.
13882         (func_modules_transitive_closure): When --with-tests was specified,
13883         include the unit tests as well, unless explicitly avoided.
13884         (func_emit_lib_Makefile_am): Ignore the tests modules here.
13885         (func_emit_tests_Makefile_am): New function.
13886         (func_create_testdir): When --with-tests was specified, emit a
13887         tests/ directory.
13888         * MODULES.html.sh (Future developments): Update.
13889
13890 2005-08-24  Bruno Haible  <bruno@clisp.org>
13891
13892         * modules/tls-tests: New file.
13893         * tests/test-tls.c: New file, from GNU gettext.
13894
13895 2005-08-24  Bruno Haible  <bruno@clisp.org>
13896
13897         * modules/lock-tests: New file.
13898         * tests/test-lock.c: New file, from GNU gettext.
13899
13900 2005-08-24  Bruno Haible  <bruno@clisp.org>
13901
13902         * lib/lock.h: Add multiple inclusion guard.
13903         * lib/tls.h: Add multiple inclusion guard.
13904
13905 2005-08-24  Bruno Haible  <bruno@clisp.org>
13906
13907         * gnulib-tool: Add support for the --aux-dir option to
13908         --create-testdir, --create-megatestdir, --test, --megatest.
13909         (func_create_testdir, func_create_megatestdir): Optionally emit a
13910         AC_CONFIG_AUX_DIR directive.
13911         (create-testdir, create-megatestdir, test, megatest): Provide a
13912         default value for $auxdir.
13913
13914 2005-08-24  Bruno Haible  <bruno@clisp.org>
13915
13916         * gnulib-tool (import): Use compound statement instead of subshell
13917         where possible.
13918
13919 2005-08-24  Bruno Haible  <bruno@clisp.org>
13920
13921         * gnulib-tool (import): Change --aux-dir default to "build-aux".
13922
13923 2005-08-24  Bruno Haible  <bruno@clisp.org>
13924
13925         * gnulib-tool (func_version): Update.
13926
13927 2005-08-24  Bruno Haible  <bruno@clisp.org>
13928
13929         * gnulib-tool (func_import, func_create_testdir,
13930         func_create_megatestdir): Quote all autoconf macro arguments.
13931
13932 2005-08-24  Bruno Haible  <bruno@clisp.org>
13933
13934         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
13935         option --force, because --force causes the aclocal.m4 of each
13936         subdirectory to be newer than the corresponding config.h.in.
13937
13938 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
13939
13940         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
13941         All contents moved to gl_REGEX.
13942         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
13943         assume that it does.
13944
13945 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
13946
13947         * lib/regex.h (REG_NOSYS)
13948         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
13949         Define, since POSIX requires it as of 2001.
13950         (_REG_ENOSYS)
13951         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
13952         New private symbol, used to keep the enum signed in all cases.
13953         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
13954         Youngman in
13955         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
13956
13957         * lib/regex_internal.c (re_string_skip_chars, register_state):
13958         (calc_state_hash):
13959         Remove forward decls; no longer needed now that we use prototypes.
13960         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
13961         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
13962         (clean_state_log_if_needed): Likewise.
13963
13964 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
13965
13966         * config/srclist.txt: Add glibc bugs 1231-1233.
13967
13968 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
13969
13970         Fix problems reported by Sam Steingold in
13971         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
13972         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
13973         assumed that reg_errcode_t is a signed type, which is not
13974         necessarily true if _XOPEN_SOURCE is not defined.
13975         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
13976         since some compilers warn about it otherwise.
13977
13978 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
13979
13980         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
13981         (init_word_char, create_initial_state, duplicate_node_closure):
13982         (fetch_token, peek_token_bracket, build_range_exp):
13983         (build_collating_symbol): Remove forward decls; no longer needed
13984         now that we use prototypes.
13985
13986         * lib/regcomp.c:
13987         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
13988         (re_compile_fastmap_iter, regcomp, regerror, regfree):
13989         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
13990         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
13991         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
13992         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
13993         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
13994         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
13995         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
13996         (build_range_exp, build_collating_symbol, parse_bracket_exp):
13997         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
13998         (build_charclass, build_charclass_op, fetch_number, create_tree):
13999         (create_token_tree, mark_opt_subexp, duplicate_tree):
14000         Use prototypes rather than old-style definitions.
14001
14002         * lib/regex_internal.c:
14003         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
14004         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
14005         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
14006         (re_string_reconstruct, re_string_peek_byte_case):
14007         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
14008         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
14009         (re_node_set_init_copy, re_node_set_add_intersect):
14010         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
14011         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
14012         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
14013         (re_acquire_state, re_acquire_state_context, register_state):
14014         (create_ci_newstate, create_cd_newstate, free_state):
14015         Likewise.
14016         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
14017         re_search_2):
14018         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
14019         (re_search_internal, prune_impossible_nodes):
14020         (acquire_init_state_context, check_matching, static):
14021         (check_halt_node_context, check_halt_state_context, proceed_next_node):
14022         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
14023         (update_regs, sift_states_backward, build_sifted_states):
14024         (clean_state_log_if_needed, merge_state_array):
14025         (update_cur_sifted_state, add_epsilon_src_nodes):
14026         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
14027         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
14028         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
14029         (find_recover_state, check_subexp_matching_top, transit_state_mb):
14030         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
14031         (check_arrival, check_arrival_add_next_nodes):
14032         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
14033         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
14034         (check_node_accept_bytes, check_node_accept, extend_buffers):
14035         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
14036         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
14037         (sift_ctx_init):
14038         Likewise.
14039
14040         * lib/regex_internal.h:
14041         (re_string_allocate, re_string_construct, re_string_reconstruct):
14042         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
14043         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
14044         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
14045         (re_string_context_at, re_string_peek_byte_case):
14046         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
14047         is defined, since we now use prototypes always.
14048
14049         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
14050         C89 or better.  All uses removed.
14051
14052 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
14053
14054         * config/srclist.txt: Add glibc bugs 1220-1227.
14055
14056 2005-08-20  Jim Meyering  <jim@meyering.net>
14057
14058         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
14059         of unused local, dfa.
14060
14061 2005-08-20  Bruno Haible  <bruno@clisp.org>
14062
14063         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
14064
14065 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
14066
14067         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
14068         (re_node_set_insert_last, re_dfa_add_node):
14069         Rename local variables to avoid GCC shadowing warnings.
14070
14071 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
14072
14073         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
14074         [defined lint]: Suppress bogus uninitialized-variable warnings.
14075
14076         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
14077         and let the caller return REG_ESPACE if out of space.  This
14078         removes an uninitialied-variable warning with GCC 4.0.1, and also
14079         avoids taking the address of a local variable.  All callers
14080         changed.
14081
14082 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
14083
14084         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
14085         $LIBCSRC/posix/regexec.c.
14086         Add glibc bug 1217 for regcomp.c.
14087
14088 2005-08-19  Jim Meyering  <jim@meyering.net>
14089
14090         * lib/regexec.c (proceed_next_node): Redo local variables to
14091         avoid GCC shadowing warnings.
14092
14093 2005-08-18  Bruno Haible  <bruno@clisp.org>
14094
14095         * lib/strstr.c (strstr): Fix return value in multibyte case.
14096         * lib/strcasestr.c (strcasestr): Likewise.
14097
14098 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
14099
14100         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
14101
14102 2005-08-17  Jim Meyering  <jim@meyering.net>
14103
14104         Make the %s format (seconds since the epoch) work for a negative
14105         number and when used with a zero-padded field width, e.g. %015s.
14106
14107         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
14108         label so that it precedes the code to set `digits'.  Otherwise,
14109         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
14110         print `00-22'.  Now, it prints `-0022', as it should.
14111
14112 2005-08-17  Bruno Haible  <bruno@clisp.org>
14113
14114         * modules/strstr (Files): Add m4/mbrtowc.m4.
14115         (Depends-on): Add mbuiter.
14116
14117 2005-08-17  Bruno Haible  <bruno@clisp.org>
14118
14119         * modules/strcasestr: New file.
14120         * MODULES.html.sh (String handling, based on ANSI C 89): Add
14121         strcasestr.
14122
14123 2005-08-17  Bruno Haible  <bruno@clisp.org>
14124
14125         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
14126
14127 2005-08-17  Bruno Haible  <bruno@clisp.org>
14128
14129         * modules/mbuiter: New file.
14130         * MODULES.html.sh (Extended multibyte and wide character utilities):
14131         Add mbuiter.
14132
14133 2005-08-17  Bruno Haible  <bruno@clisp.org>
14134
14135         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
14136         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
14137
14138 2005-08-17  Bruno Haible  <bruno@clisp.org>
14139
14140         * m4/strcasestr.m4: New file.
14141
14142 2005-08-17  Bruno Haible  <bruno@clisp.org>
14143
14144         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
14145         * lib/strstr.c: Completely rewritten, with multibyte locale support.
14146
14147 2005-08-17  Bruno Haible  <bruno@clisp.org>
14148
14149         * lib/strcasestr.h: New file.
14150         * lib/strcasestr.c: New file.
14151
14152 2005-08-17  Bruno Haible  <bruno@clisp.org>
14153
14154         * lib/strcasecmp.c: Use mbuiter.h.
14155
14156 2005-08-17  Bruno Haible  <bruno@clisp.org>
14157
14158         * lib/mbuiter.h: New file.
14159
14160 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
14161
14162         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
14163         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
14164         and gl_GETOPT are both invoked via different paths (as happens
14165         with GNU tar CVS because it uses both argp and getopt), the former
14166         wins.
14167
14168 2005-08-16  Bruno Haible  <bruno@clisp.org>
14169
14170         * modules/tls: New file.
14171         * MODULES.html.sh (Multithreading): Add tls.
14172
14173 2005-08-16  Bruno Haible  <bruno@clisp.org>
14174
14175         * modules/strnlen1: New file.
14176         * MODULES.html.sh (String handling): Add strnlen1.
14177
14178 2005-08-16  Bruno Haible  <bruno@clisp.org>
14179
14180         * modules/strcase (Files): Add m4/mbrtowc.m4.
14181         (Depends-on): Add strnlen1, mbchar.
14182
14183 2005-08-16  Bruno Haible  <bruno@clisp.org>
14184
14185         * modules/mbiter: New file.
14186         * MODULES.html.sh (Extended multibyte and wide character utilities):
14187         Add mbiter.
14188
14189 2005-08-16  Bruno Haible  <bruno@clisp.org>
14190
14191         * modules/mbfile: New file.
14192         * MODULES.html.sh (Extended multibyte and wide character utilities):
14193         Add mbfile.
14194
14195 2005-08-16  Bruno Haible  <bruno@clisp.org>
14196
14197         * modules/mbchar: New file.
14198         * MODULES.html.sh (Extended multibyte and wide character utilities):
14199         New section.
14200
14201 2005-08-16  Bruno Haible  <bruno@clisp.org>
14202
14203         * m4/tls.m4: New file, from GNU gettext.
14204
14205 2005-08-16  Bruno Haible  <bruno@clisp.org>
14206
14207         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
14208         always.
14209         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
14210
14211 2005-08-16  Bruno Haible  <bruno@clisp.org>
14212
14213         * m4/mbiter.m4: New file.
14214
14215 2005-08-16  Bruno Haible  <bruno@clisp.org>
14216
14217         * m4/mbfile.m4: New file.
14218
14219 2005-08-16  Bruno Haible  <bruno@clisp.org>
14220
14221         * m4/mbchar.m4: New file.
14222
14223 2005-08-16  Bruno Haible  <bruno@clisp.org>
14224
14225         * lib/tls.h: New file, from GNU gettext.
14226         * lib/tls.c: New file, from GNU gettext.
14227
14228 2005-08-16  Bruno Haible  <bruno@clisp.org>
14229
14230         * lib/strnlen1.h: New file.
14231         * lib/strnlen1.c: New file.
14232
14233 2005-08-16  Bruno Haible  <bruno@clisp.org>
14234
14235         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
14236         (mbi_init): Update.
14237         (mbi_avail, mbi_advance): Let the iteration end before the terminating
14238         NUL byte, not after it.
14239
14240 2005-08-16  Bruno Haible  <bruno@clisp.org>
14241
14242         * lib/strcase.h (strcasecmp): Add note in comments.
14243         * lib/strncasecmp.c: Use code from strcasecmp.c.
14244         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
14245         (strcasecmp): Work correctly in multibyte locales.
14246
14247 2005-08-16  Bruno Haible  <bruno@clisp.org>
14248
14249         * lib/mbiter.h: New file.
14250
14251 2005-08-16  Bruno Haible  <bruno@clisp.org>
14252
14253         * lib/mbfile.h: New file.
14254
14255 2005-08-16  Bruno Haible  <bruno@clisp.org>
14256
14257         * lib/mbchar.h: New file.
14258         * lib/mbchar.c: New file.
14259
14260 2005-08-16  Bruno Haible  <bruno@clisp.org>
14261
14262         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
14263         the valid ones. Makes the comparison operations transitive:
14264         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
14265         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
14266
14267 2005-08-15  Simon Josefsson  <jas@extundo.com>
14268
14269         * modules/ssize_t (License): Change to 'unlimited'.
14270
14271         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
14272
14273 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
14274
14275         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
14276         Add comments for each pending glibc patch.
14277
14278 2005-08-15  Bruno Haible  <bruno@clisp.org>
14279
14280         * lib/regex.h (__restrict_arr): Don't define to __restrict if
14281         __cplusplus is defined.
14282
14283 2005-08-14  Jim Meyering  <jim@meyering.net>
14284
14285         Sync from coreutils.
14286
14287         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
14288         Use the hash-table-based cycle-detection code not just when
14289         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
14290         Reported by James Youngman in
14291         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
14292         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
14293         FTS_TIGHT_CYCLE_CHECK.
14294         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
14295         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
14296         once again.
14297         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
14298         * lib/fts.c (fd_safer): Remove decl.
14299         Include fcntl--.h rather than unistd-safer.h
14300         (fts_safe_changedir): Don't call fd_safer; no longer needed
14301         now that we include fcntl--.h.
14302
14303 2005-08-12  Simon Josefsson  <jas@extundo.com>
14304
14305         * modules/getndelim2: Use ssize_t module.
14306         * modules/getnline: Likewise.
14307         * modules/safe-read: Likewise.
14308         * modules/xreadlink: Likewise.
14309
14310         * modules/ssize_t: New file.
14311
14312 2005-08-12  Simon Josefsson  <jas@extundo.com>
14313
14314         * m4/readline.m4: Look for termcap, curses or ncurses if required.
14315
14316 2005-08-12  Simon Josefsson  <jas@extundo.com>
14317
14318         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
14319         ssize_t.
14320
14321 2005-08-12  Simon Josefsson  <jas@extundo.com>
14322
14323         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
14324         readline, getdelim and check_version.
14325         (Support for systems lacking ISO C 99: Sizes of integer types):
14326         Add size_max.
14327
14328 2005-08-12  Bruno Haible  <bruno@clisp.org>
14329
14330         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
14331
14332 2005-08-11  Simon Josefsson  <jas@extundo.com>
14333
14334         * modules/readline: New file.
14335
14336         * modules/strnlen (Files): Add strnlen.h.
14337
14338 2005-08-11  Simon Josefsson  <jas@extundo.com>
14339
14340         * m4/readline.m4: New file.
14341
14342 2005-08-11  Simon Josefsson  <jas@extundo.com>
14343
14344         * lib/readline.h, readline.c: New file.
14345
14346 2005-08-11  Simon Josefsson  <jas@extundo.com>
14347
14348         * doc/gnulib.texi (Initial import, Finishing touches): Mention
14349         gl_AVOID.
14350
14351 2005-08-11  Bruno Haible  <bruno@clisp.org>
14352
14353         * lib/strnlen.h (strnlen): Change parameter name to match comment.
14354
14355 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
14356
14357         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
14358
14359 2005-08-10  Simon Josefsson  <jas@extundo.com>
14360
14361         * tests/test-iconvme.c: New file.
14362
14363 2005-08-10  Simon Josefsson  <jas@extundo.com>
14364
14365         * m4/strnlen.m4: New file.
14366
14367         * m4/strndup.m4: Don't check for strnlen declaration, done in
14368         strnlen.m4.
14369
14370 2005-08-10  Simon Josefsson  <jas@extundo.com>
14371
14372         * lib/strndup.c: Use strnlen.h.
14373
14374         * lib/strnlen.h: New file.
14375
14376 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
14377
14378         * README: Typos.
14379
14380 2005-08-02  Simon Josefsson  <jas@extundo.com>
14381
14382         * modules/readline: New file.
14383
14384 2005-08-02  Simon Josefsson  <jas@extundo.com>
14385
14386         * modules/getdelim: New file.
14387
14388         * modules/getline: Rewrite, don't use getndelim2.
14389
14390 2005-08-02  Simon Josefsson  <jas@extundo.com>
14391
14392         * m4/getline.m4: Separate out getdelim stuff into separate module.
14393
14394         * m4/getdelim.m4: New file.
14395
14396 2005-08-02  Simon Josefsson  <jas@extundo.com>
14397
14398         * lib/getline.h, getline.c: Rewrite.
14399
14400         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
14401
14402 2005-07-31  Bruno Haible  <bruno@clisp.org>
14403
14404         * lib/lock.h (gl_lock_initializer): New macro.
14405         (gl_lock_define_initialized): Use it.
14406         (gl_rwlock_initializer): New macro.
14407         (gl_rwlock_define_initialized): Use it.
14408         (gl_recursive_lock_initializer): New macro.
14409         (gl_recursive_lock_define_initialized): Use it.
14410
14411 2005-07-30  Karl Berry  <karl@gnu.org>
14412
14413         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
14414         Report from Ben Pfaff, regarding getopt.
14415
14416 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
14417
14418         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
14419         normal way.
14420         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
14421         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
14422         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
14423         (gl_GETOPT): Use the new macros.  Most of the implementation
14424         is moved to the new macros.  This is for programs like Emacs
14425         that don't want all the functionality of gl_GETOPT.
14426
14427 2005-07-26  Bruno Haible  <bruno@clisp.org>
14428
14429         * m4/lock.m4: Update from GNU gettext.
14430
14431 2005-07-26  Bruno Haible  <bruno@clisp.org>
14432
14433         * lib/lock.h: Update from GNU gettext.
14434         * lib/lock.c: Update from GNU gettext.
14435
14436 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
14437
14438         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
14439         obsolescent AC_TRY_RUN.  Include the default includes files, for
14440         'exit'.
14441
14442 2005-07-24  Bruno Haible  <bruno@clisp.org>
14443
14444         * modules/visibility: New file.
14445         * MODULES.html.sh (Misc): Add visibility.
14446
14447 2005-07-24  Bruno Haible  <bruno@clisp.org>
14448
14449         * m4/visibility.m4: New file.
14450
14451 2005-07-24  Bruno Haible  <bruno@clisp.org>
14452
14453         * doc/visibility.texi: New file.
14454
14455 2005-07-22  Bruno Haible  <bruno@clisp.org>
14456
14457         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
14458         $(ALLOCA_H), redundant through BUILT_SOURCES.
14459         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
14460         redundant through BUILT_SOURCES.
14461         * modules/byteswap (Makefile.am): Remove explicit dependency on
14462         $(BYTESWAP_H), redundant through BUILT_SOURCES.
14463         * modules/fnmatch (Makefile.am): Remove explicit dependency on
14464         $(FNMATCH_H), redundant through BUILT_SOURCES.
14465         * modules/getopt (Makefile.am): Remove explicit dependency on
14466         $(GETOPT_H), redundant through BUILT_SOURCES.
14467         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
14468         redundant through BUILT_SOURCES.
14469         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
14470         redundant through BUILT_SOURCES.
14471         * modules/stdbool (Makefile.am): Remove explicit dependency on
14472         $(STDBOOL_H), redundant through BUILT_SOURCES.
14473         * modules/stdint (Makefile.am): Remove explicit dependency on
14474         $(STDINT_H), redundant through BUILT_SOURCES.
14475         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
14476         Remove explicit dependency on $(SYSEXITS_H).
14477         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
14478
14479 2005-07-18  Simon Josefsson  <jas@extundo.com>
14480
14481         * lib/check-version.c (check_version): Accept identical versions too.
14482
14483 2005-07-18  Bruno Haible  <bruno@clisp.org>
14484
14485         * modules/lock: New file.
14486         * MODULES.html.sh (Multithreading): New section.
14487
14488 2005-07-18  Bruno Haible  <bruno@clisp.org>
14489
14490         * m4/lock.m4: New file, from GNU gettext.
14491
14492 2005-07-18  Bruno Haible  <bruno@clisp.org>
14493
14494         * lib/lock.h: New file, from GNU gettext.
14495         * lib/lock.c: New file, from GNU gettext.
14496
14497 2005-07-18  Bruno Haible  <bruno@clisp.org>
14498
14499         * lib/lock.h (gl_once_t): New type.
14500         (gl_once_define, gl_once): New macros.
14501         * lib/lock.c (fresh_once): New variable.
14502         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
14503         functions.
14504
14505 2005-07-16  Simon Josefsson  <jas@extundo.com>
14506
14507         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
14508         workaround, suggested by Bruno.
14509
14510 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
14511
14512         * modules/xalloc (Depends-on): Add xalloc-die.
14513         * modules/xvasprintf (Depends-on): Add xalloc-die.
14514
14515 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
14516
14517         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
14518         with a minor change.
14519
14520 2005-07-15  Bruno Haible  <bruno@clisp.org>
14521
14522         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
14523         When using lib/poll.c, define poll as rpl_poll.
14524
14525 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
14526
14527         * modules/argp (Depends-on): Remove unlocked-io.
14528
14529 2005-07-14  Derek Price  <derek@ximbiot.com>
14530
14531         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
14532         for glob symlink bug.
14533
14534 2005-07-14  Bruno Haible  <bruno@clisp.org>
14535
14536         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
14537         Instead, test for *_unlocked function declarations directly.
14538
14539 2005-07-11  Simon Josefsson  <jas@extundo.com>
14540
14541         * modules/size_max: New file.
14542
14543         * modules/xsize: Depend on size_max module for size_max.m4.
14544
14545 2005-07-11  Simon Josefsson  <jas@extundo.com>
14546
14547         * lib/size_max.h: New file.
14548
14549 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
14550
14551         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
14552         copyright symbol and the year.
14553         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
14554         (version_etc_va): Use parameterized copyright notice.
14555         Reword to conform to the current GNU coding standards.
14556
14557 2005-07-11  Karl Berry  <karl@gnu.org>
14558
14559         * doc/gnulib.texi (Quoting): new node.
14560         (Initial import): more info, from Patrice.
14561
14562 2005-07-11  Bruno Haible  <bruno@clisp.org>
14563
14564         * gnulib-tool (func_usage): Document option --avoid.
14565         (Command line options): Handle --avoid.
14566         (func_acceptable): New function.
14567         (func_modules_transitive_closure): Use it.
14568
14569 2005-07-11  Bruno Haible  <bruno@clisp.org>
14570
14571         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
14572         Reported by Jim Meyering.
14573
14574 2005-07-10  Bruno Haible  <bruno@clisp.org>
14575
14576         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
14577         Needed when size_t is smaller than 'unsigned int'.
14578         Reported by Paul Eggert.
14579
14580 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
14581
14582         * modules/argp (Depends-on): Add unlocked-io
14583
14584 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
14585
14586         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
14587         block of defines.
14588
14589 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
14590
14591         * config/srclist.txt: Comment out regcomp.c, since we have a porting
14592         fix now.
14593
14594 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
14595         and Paul Eggert  <eggert@cs.ucla.edu>
14596
14597         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
14598         in wint_t, not wchar_t.  Remove now-unnecessary cast.
14599
14600 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
14601
14602         * modules/regex (Files): Add lib/regex_internal.c,
14603         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
14604         (Depends-on): Add extensions.
14605         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
14606
14607 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
14608
14609         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
14610         pathconf.
14611         * m4/same.m4 (gl_SAME): Likewise.
14612         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
14613
14614         * m4/regex.m4: Adjust to new libc regex implementation.
14615         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
14616         all the .c and .h parts of (the new) regex.
14617         Quote the m4 stuff better.
14618         Check for RE_ICASE bug of old gnulib.
14619         Check for REG_STARTEND of recent libc.
14620         Rename local variables from jm_* to gl_*.
14621         Quote operand of "test -f".
14622         Say "recent enough" version of libc, not "version 2".
14623         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
14624         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
14625         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
14626         Remove check for btowc, isascii.
14627         Require AM_LANGINFO_CODESET.
14628
14629 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
14630
14631         * lib/regex.c, regex.h: Sync from libc.
14632         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
14633         * lib/regexec.c:
14634         New files, synced from libc, except that regex_internal.h
14635         currently has a small porting fix.
14636
14637 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
14638
14639         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
14640         regex_internal.c, regexec.c.
14641         Add regex_internal.h too, but as a comment, since the libc version
14642         is currently broken in gnulib mode.
14643
14644 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
14645
14646         Support programs like Emacs that use gnulib but not gettext.
14647         * MODULES.html.sh (Internationalization functions): Add gettext-h.
14648         * modules/gettext-h: New file.
14649         * modules/gettext (Files): Remove lib/gettext.h.
14650         (Depends-on): Add gettext-h.
14651         (Makefile.am): Remove lib_SOURCES.
14652         * modules/argmatch, modules/c-stack, modules/closeout:
14653         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
14654         * modules/execute, modules/file-type, modules/getaddrinfo:
14655         * modules/getopt, modules/human, modules/javacomp:
14656         * modules/javaexec, modules/mkdir-p, modules/obstack:
14657         * modules/openat, modules/pagealign_alloc, modules/pipe:
14658         * modules/quotearg, modules/regex, modules/rpmatch:
14659         * modules/unicodeio, modules/userspec, modules/version-etc:
14660         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
14661         * modules/xsetenv:
14662         Depend on gettext-h, not gettext.
14663
14664 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
14665
14666         * gnulib-tool (func_import): Add support for 'public domain' license.
14667         * modules/alloca, modules/atexit, modules/memmove:
14668         Now public domain, not GPL.
14669         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
14670         * modules/realloc, modules/strerror, modules/strtod:
14671         Now LGPL, not GPL.
14672
14673 2005-07-05  Bruno Haible  <bruno@clisp.org>
14674
14675         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
14676         autoconf CVS. Needed for mingw.
14677
14678 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
14679
14680         Remove the dependency of the strftime module on the tzset module.
14681         * modules/strftime (Depends-on): Remove dependency on tzset.
14682
14683 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
14684
14685         Remove the dependency of the strftime module on the tzset module.
14686         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
14687         gl_FUNC_TZSET_CLOBBER.
14688
14689 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
14690
14691         Remove the dependency of the strftime module on the tzset module.
14692         * lib/strftime.c (my_strftime)
14693         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
14694         Copy the input structure, to work around some of the bug with
14695         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
14696         Solaris releases, you should also use the tzset module, but we won't
14697         require it as a dependency any more since we don't want LGPLed code
14698         to depend on GPLed code.
14699
14700 2005-07-02  Jim Meyering  <jim@meyering.net>
14701
14702         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
14703         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
14704         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
14705         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
14706
14707 2005-07-02  Jim Meyering  <jim@meyering.net>
14708
14709         * lib/backupfile.c (backup_args): Change a `0' to NULL.
14710
14711 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
14712
14713         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
14714         declares only 'struct timespec;' (!).
14715
14716 2005-07-01  Jim Meyering  <jim@meyering.net>
14717
14718         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
14719         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
14720         * lib/save-cwd.c, tempname.c:
14721         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
14722         and don't include <sys/file.h>).
14723
14724 2005-06-29  Jim Meyering  <jim@meyering.net>
14725
14726         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
14727         type name.  Use the variable name instead.
14728         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
14729         Likewise.
14730
14731 2005-06-28  Simon Josefsson  <jas@extundo.com>
14732
14733         * modules/check-version (Files): Add check-version.m4.
14734
14735 2005-06-28  Simon Josefsson  <jas@extundo.com>
14736
14737         * m4/check-version.m4: New file, suggested by Jim Meyering
14738         <jim@meyering.net>.
14739
14740 2005-06-28  Simon Josefsson  <jas@extundo.com>
14741
14742         * lib/check-version.h, lib/check-version.c: New files.
14743
14744 2005-06-28  Simon Josefsson  <jas@extundo.com>
14745
14746         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
14747         collision with global variable.  Better indentation.  Don't
14748         increment buffer pointer beyond buffer end.  Based on comments
14749         from Paul Eggert <eggert@cs.ucla.edu>.
14750
14751         * lib/base64.h: Indent.
14752
14753 2005-06-28  Simon Josefsson  <jas@extundo.com>
14754
14755         * doc/gnulib.texi (Library version handling): New section.
14756
14757 2005-06-28  Jim Meyering  <jim@meyering.net>
14758
14759         * check-module (find_included_lib_files): Hard-code another
14760         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
14761         but modules/fts-lgpl (correctly) does not list those files.
14762
14763         * modules/canonicalize (Files): Add lib/pathmax.h.
14764
14765 2005-06-25  Simon Josefsson  <jas@extundo.com>
14766
14767         * modules/check-version: New file.
14768
14769 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
14770
14771         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
14772         initializer of struct addrinfo, as an indication that we don't
14773         care how many members the structure has.
14774
14775 2005-06-24  Derek Price  <derek@ximbiot.com>
14776         and Bruno Haible  <bruno@clisp.org>
14777
14778         Remove stat module & update lstat.
14779         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
14780         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
14781         * m4/stat.m4: Remove this file.
14782
14783 2005-06-24  Derek Price  <derek@ximbiot.com>
14784         and Bruno Haible  <bruno@clisp.org>
14785
14786         Remove stat module & update lstat.
14787         * lib/stat.c: Remove this file...
14788         (slash_aware_lstat): ...moving this content and its support...
14789         * lib/lstat.c (rpl_lstat): ...into here.
14790         * lib/lstat.h: New file.
14791
14792 2005-06-24  Derek Price  <derek@ximbiot.com>
14793         and Bruno Haible  <bruno@clisp.org>
14794
14795         Remove stat module & update lstat.
14796         * config/srclist.txt (libc sources): Remove stat.
14797
14798 2005-06-24  Derek Price  <derek@ximbiot.com>
14799         and Bruno Haible  <bruno@clisp.org>
14800
14801         Remove stat module & update lstat.
14802         * MODULES.html.sh (stat): Remove.
14803         * MODULES.html: Regenerated.
14804         * modules/lstat (Description): Correct function name.
14805         (Files): Add "lstat.h".
14806         (Depends-on): Remove stat, add xalloc, stat-macros.
14807         * modules/stat: Remove this file.
14808         (Include): Add "lstat.h", remove <sys/stat.h>.
14809
14810 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
14811
14812         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
14813         (ranged_convert): Don't save conversion in a temporary struct.
14814         This causes a warning with GCC 4.0.0, and anyway in the typical
14815         case it's not worth the extra 100 bytes or so of code.
14816         (ranged_convert, __mktime_internal): When calling a function via a
14817         pointer P, use P () rather than (*P) (), as we now assume C89 or
14818         better.
14819
14820 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
14821
14822         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
14823         "who -r" failed to give output.  Problem reported by Tim Waugh.
14824
14825         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
14826         (xcalloc): Use it to avoid needless tests.
14827         Problem reported by Jim Meyering.
14828
14829 2005-06-20  Derek Price  <derek@ximbiot.com>
14830
14831         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
14832         unnecessary for Autoconfs > 2.59c.
14833
14834 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14835
14836         * lib/argp.h (__option_is_short): Check upper limit of
14837         __key. Isprint() requires its argument to have the value
14838         of an unsigned char or EOF.
14839
14840 2005-06-16  Jim Meyering  <jim@meyering.net>
14841
14842         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
14843         when either N or S is zero.
14844
14845 2005-06-16  Derek Price  <derek@ximbiot.com>
14846
14847         * m4/bison.m4: Declare YACC & YFLAGS precious.
14848
14849 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
14850
14851         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
14852         multibyte string or pattern, fall back on unibyte matching.
14853         Problem reported by James Youngman.
14854
14855 2005-06-08  Bruno Haible  <bruno@clisp.org>
14856
14857         * modules/csharpcomp: New file.
14858         * MODULES.html.sh (C#): Add csharpcomp.
14859
14860 2005-06-08  Bruno Haible  <bruno@clisp.org>
14861
14862         * m4/csharpcomp.m4: New file, from GNU gettext.
14863
14864 2005-06-08  Bruno Haible  <bruno@clisp.org>
14865
14866         * lib/csharpcomp.h: New file, from GNU gettext.
14867         * lib/csharpcomp.c: New file, from GNU gettext.
14868         * lib/csharpcomp.sh.in: New file, from GNU gettext.
14869
14870 2005-06-08  Bruno Haible  <bruno@clisp.org>
14871
14872         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
14873         warning on mingw.
14874
14875 2005-06-07  Derek Price  <derek@ximbiot.com>
14876
14877         Sync from CVS.
14878         * lib/glob_.h: Indent nested #ifdef.
14879
14880 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
14881
14882         Sync from coreutils.
14883         Use "file name" when talking about file names, instead of "filename"
14884         or "path", as per the GNU coding standards.
14885         * lib/mkdir-p.c: Renamed from makepath.c.
14886         (make_dir_parents): Renamed from make_path.  All callers changed.
14887         * lib/mkdir-p.h: Likewise.  All includers changed.
14888         * lib/filenamecat.c: Renamed from path-concat.c.
14889         (file_name_concat): Renamed from path_concat.  All callers changed.
14890         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
14891         * lib/filenamecat.h: Likewise.  All includers changed.
14892         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
14893         in comments or local variable names.
14894         * lib/basename.c: Likewise.
14895         * lib/canonicalize.c, canonicalize.h: Likewise.
14896         * lib/dirname.c, dirname.h: Likewise.
14897         * lib/euidaccess.c: Likewise.
14898         * lib/exclude.c: Likewise
14899         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
14900         * lib/fsusage.c, fsuage.h: Likewise.
14901         * lib/fts.c, fts_.h: Likewise.
14902         * lib/getcwd.c: Likewise.
14903         * lib/getloadavg.c: Likewise.
14904         * lib/mkstemp.c: Likewise.
14905         * lib/mountlist.c, mountlist.h: Likewise.
14906         * lib/openat.c, openat.h: Likewise.
14907         * lib/readlink-stub.c: Likewise.
14908         * lib/readutmp.c, readutmp.h: Likewise.
14909         * lib/rename.c: Likewise.
14910         * lib/rmdir.c: Likewise.
14911         * lib/same.c: Likewise.
14912         * lib/savedir.c: Likewise.
14913         * lib/stripslash.c: Likewise.
14914         * lib/tempname.c: Likewise.
14915         * lib/xreadlink.c: Likewise.
14916         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
14917         All uses changed.
14918         * lib/exclude.h: Likewise.
14919
14920         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
14921         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
14922         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
14923         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
14924         * lib/pathmax.h: Include <limits.h> unconditionally, since other
14925         files have been getting away with it for years (MORE/BSD 4.3
14926         is extinct now).
14927         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
14928         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
14929
14930         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
14931         Define to 256, not 255, as per modern POSIX.
14932
14933 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
14934
14935         Sync from coreutils.
14936         Use "file name" when talking about file names, instead of "filename"
14937         or "path", as per the GNU coding standards.
14938         * MODULES.html.sh: mkdir-p renamed from makepath.
14939         filenamecat renamed from path-concat.
14940         * modules/filenamecat: Renamed from modules/path-concat.
14941         (Files): filenamecat.h and filenamecat.c renamed from
14942         path-concat.h and path-concat.c.
14943         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
14944         (Include): filenamecat.h, not path-concat.h.
14945         * modules/mkdir-p: Renamed from modules/makepath.
14946         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
14947         makepath.c.
14948         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
14949         (Include): mkdir-p.h, not makepath.h.
14950
14951 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
14952
14953         Sync from coreutils.
14954         * m4/mkdir-p.m4: Renamed from makepath.m4.
14955         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
14956         Rename files from makepath.c to mkdir-p.c, and from
14957         makepath.h to mkdir-p.h.
14958         * m4/filenamecat.m4: Renamed from path-concat.m4.
14959         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
14960         Rename files from path-concat.c to filenamecat.c,
14961         and from path-concat.h to filenamecat.h.
14962         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
14963         "file name" in local variables or comments.
14964         * m4/rename.m4: Likewise.
14965
14966 2005-06-01  Bruno Haible  <bruno@clisp.org>
14967
14968         * modules/csharpexec: New file.
14969         * MODULES.html.sh (C#): New section.
14970
14971 2005-06-01  Bruno Haible  <bruno@clisp.org>
14972
14973         * m4/csharp.m4: New file, from GNU gettext.
14974         * m4/csharpexec.m4: New file, from GNU gettext.
14975
14976 2005-06-01  Bruno Haible  <bruno@clisp.org>
14977
14978         * lib/csharpexec.h: New file, from GNU gettext.
14979         * lib/csharpexec.c: New file, from GNU gettext.
14980         * lib/csharpexec.sh.in: New file, from GNU gettext.
14981
14982 2005-05-31  Derek Price  <derek@ximbiot.com>
14983             Paul Eggert  <eggert@cs.ucla.edu>
14984
14985         Sync from cvs.
14986         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
14987
14988 2005-05-31  Derek Price  <derek@ximbiot.com>
14989             Paul Eggert  <eggert@cs.ucla.edu>
14990
14991         Sync from cvs.
14992         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
14993
14994 2005-05-29  Derek Price  <derek@ximbiot.com>
14995
14996         * config/srclist.txt (glob_.h, glob.c): Add these files.
14997
14998 2005-05-29  Derek Price  <derek@ximbiot.com>
14999
15000         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
15001         * modules/glob: New file.
15002         * modules/getlogin_r: Add link to POSIX spec in description.
15003
15004 2005-05-29  Derek Price  <derek@ximbiot.com>
15005             Paul Eggert  <eggert@cs.ucla.edu>
15006
15007         * m4/glob.m4: New file.
15008
15009 2005-05-29  Derek Price  <derek@ximbiot.com>
15010             Paul Eggert  <eggert@cs.ucla.edu>
15011
15012         * lib/glob_.h, lib/glob.c: New files.
15013
15014 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
15015
15016         * modules/fts (Files): Remove m4/inttypes-pri.m4.
15017         * modules/fts-lgpl (Depends-on): Remove gettext.
15018
15019 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
15020
15021         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
15022         and don't require gt_INTTYPES_PRI.
15023
15024 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
15025
15026         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
15027
15028         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
15029         the configuration hassle isn't worth it.
15030         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
15031         (LONGEST_MODIFIER, PRIuMAX): Remove.
15032
15033 2005-05-27  Bruno Haible  <bruno@clisp.org>
15034
15035         * lib/getlogin_r.h: Remove second include of <stddef.h>.
15036
15037 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
15038
15039         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
15040         _POSIX_PTHREAD_SEMANTICS for Solaris.
15041
15042 2005-05-25  Derek Price  <derek@ximbiot.com>
15043
15044         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
15045
15046 2005-05-25  Derek Price  <derek@ximbiot.com>
15047             Paul Eggert  <eggert@cs.ucla.edu>
15048
15049         * modules/getlogin_r, m4/getlogin_r.m4: New files.
15050         * lib/getlogin_r.c, getlogin_r.h: New files.
15051
15052 2005-05-25  Bruno Haible  <bruno@clisp.org>
15053             Derek Price  <derek@ximbiot.com>
15054
15055         * lib/getlogin_r.h: Simplify API documentation.
15056
15057 2005-05-23  Derek Price  <derek@ximbiot.com>
15058
15059         * modules/minmax (Files): Add m4/minmax.m4.
15060         (configure.ac): Add gl_MINMAX.
15061
15062 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
15063
15064         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
15065         so that unistd-safer.h (GPL'ed code) need not be included.
15066
15067 2005-05-22  Bruno Haible  <bruno@clisp.org>
15068
15069         * m4/minmax.m4: New file.
15070         Based on a patch by Derek Price <derek@ximbiot.com>.
15071
15072 2005-05-22  Bruno Haible  <bruno@clisp.org>
15073
15074         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
15075         (INT64_MIN): Fix definition.
15076         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
15077
15078         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
15079         NEED_SIGNED_INT_TYPES.
15080
15081         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
15082         HAVE_SYSTEM_INTTYPES.
15083
15084 2005-05-22  Bruno Haible  <bruno@clisp.org>
15085
15086         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
15087         Also include <sys/param.h> if it defines MIN, MAX.
15088         Based on a patch by Derek Price <derek@ximbiot.com>.
15089
15090 2005-05-21  Jim Meyering  <jim@meyering.net>
15091
15092         * modules/fts (Files): Add m4/inttypes-pri.m4.
15093         (Depends-on): Add lstat and remove gettext.  Alphabetize.
15094
15095 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
15096
15097         New fts module.
15098         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
15099         (setup_dir, free_dir): New functions.
15100         (enter_dir, leave_dir): Define trivial
15101         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
15102         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
15103         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
15104         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
15105         Move to fts-cycle.c.
15106         (fts_open): Use setup_dir.
15107         (fts_close): Use free_dir.
15108         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
15109         This adds a label and some gotos, but the alternatives were messier.
15110         Check for memory allocation failure when entering a dir.
15111         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
15112         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
15113         (FTS): New member fts_cycle, that is a union that contains the
15114         old active_dir_ht and cycle_state.  All uses changed to mention
15115         fts_cycle.ht and fts_cycle.state.
15116         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
15117         fts.c, with the following changes:
15118         (setup_dir, free_dir): New functions.
15119         (enter_dir): Now returns bool.  Return true if successful, false
15120         if memory exhausted.  All callers changed.
15121         Do not bother partly cleaning up on
15122         memory allocation failure; that is free_dir's job.
15123         However, free ad if hash_insert fails, to avoid memory leak.
15124         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
15125         fts->fts_options to see which union member to use.
15126
15127 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
15128
15129         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
15130         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
15131
15132 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
15133
15134         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
15135
15136 2005-05-20  Jim Meyering  <jim@meyering.net>
15137
15138         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
15139         Now a macro, to pacify GCC.
15140
15141 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
15142
15143         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
15144         of -1.
15145
15146 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
15147
15148         * lib/chown.c (rpl_chown): Return -1 on failure.
15149
15150 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
15151
15152         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
15153         Don't check for stddef.h.
15154         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
15155         don't use its results.
15156         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
15157         since we include them unconditionally.  Don't require
15158         AM_STDBOOL_H, since stdbool is a prerequisite.
15159         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
15160         since we assume C89 or better.
15161         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
15162         as we don't use their results.
15163         Don't check for fchdir, memmove, memset, strrchr, as we use
15164         them unconditionally.
15165         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
15166         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
15167
15168 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
15169
15170         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
15171         Include <stddef.h> unconditionally, since we assume C89 now.
15172         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
15173         * lib/fts.c: Include fts_.h first, to check interface.
15174         Do not include intprops.h; no longer needed.
15175         Include cycle-check.h and hash.h, since fts_.h no longer does.
15176         Remove unnecessary casts of closedir to void.
15177         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
15178         decide whether to decrement nlinks.
15179         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
15180         (FTS): Use struct hash_table * instead of Hash_table, so that
15181         we no longer need to include hash.h here.
15182
15183 2005-05-18  Jim Meyering  <jim@meyering.net>
15184
15185         * modules/dirfd (License): Change to LGPL.  Most of the code
15186         is already in the public domain.
15187
15188 2005-05-18  Jim Meyering  <jim@meyering.net>
15189
15190         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
15191         Reported by Yoann Vandoorselaere.
15192
15193 2005-05-17  Jim Meyering  <jim@meyering.net>
15194
15195         * m4/fts.m4: New file, from coreutils.
15196
15197 2005-05-17  Jim Meyering  <jim@meyering.net>
15198
15199         * lib/fts.c, lib/fts_.h: New files, from coreutils.
15200
15201 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
15202
15203         Sync from coreutils.
15204         * m4/unlinkdir.m4: New file.
15205
15206 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
15207
15208         Sync from coreutils.
15209         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
15210         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
15211         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
15212         White space changes only.
15213         * lib/makepath.c (make_path): Port to hosts where leading "//" is
15214         special.
15215         * lib/yesno.c: Include getline.h, not ctype.h.
15216         (yesno): Don't remove leading white space; POSIX doesn't allow it.
15217         Use getline to remove arbitrary restriction on response length.
15218
15219 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
15220
15221         * config/srclist-update: Spell out "Street" in FSF postal
15222         mail address; this is the style the FSF seems to prefer.
15223
15224         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
15225         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
15226         this updates FSF postal mail address.
15227
15228         Sync from coreutils.
15229         * modules/unlinkdir: New file.
15230         * modules/yesno (Depends-on): Add getline.
15231         * MODULES.html.sh (File system functions): Add unlinkdir.
15232
15233 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
15234
15235         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
15236         lib/strsep.h:
15237         Change the initial comment to refer to GPL, not LGPL.
15238         gnulib-tool will change it to LGPL as needed.
15239
15240         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
15241         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
15242         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
15243         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
15244         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
15245         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
15246         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
15247         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
15248         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
15249         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
15250         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
15251         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
15252         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
15253         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
15254         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
15255         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
15256         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
15257         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
15258         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
15259         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
15260         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
15261         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
15262         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
15263         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
15264         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
15265         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
15266         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
15267         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
15268         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
15269         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
15270         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
15271         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
15272         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
15273         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
15274         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
15275         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
15276         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
15277         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
15278         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
15279         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
15280         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
15281         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
15282         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
15283         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
15284         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
15285         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
15286         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
15287         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
15288         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
15289         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
15290         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
15291         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
15292         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
15293         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
15294         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
15295         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
15296         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
15297         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
15298         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
15299         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
15300         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
15301         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
15302         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
15303         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
15304         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
15305         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
15306         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
15307         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
15308         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
15309         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
15310         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
15311         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
15312         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
15313         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
15314         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
15315         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
15316         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
15317         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
15318         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
15319         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
15320         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
15321         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
15322         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
15323         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
15324         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
15325         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
15326         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
15327         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
15328         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
15329         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
15330         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
15331         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
15332         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
15333         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
15334         lib/yesno.c, lib/yesno.h:
15335         Update FSF postal mail address.
15336
15337 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
15338
15339         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
15340         tests/test-memmem.c, tests/test-stpncpy.c:
15341         Update FSF postal mail address.
15342
15343 2005-05-13  Bruno Haible  <bruno@clisp.org>
15344
15345         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
15346         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
15347         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
15348         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
15349         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
15350         Add support for 64-bit integers in the MSVC compiler.
15351
15352 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15353
15354         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
15355
15356 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
15357
15358         * gnulib-tool (func_import): Sort and uniquify recommended includes.
15359
15360 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
15361
15362         * doc/getdate.texi (General date syntax): Don't say that date
15363         date --iso-8601=ns generates acceptable dates; it doesn't yet.
15364         Problem reported by Nic Ferrier.
15365
15366 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
15367
15368         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
15369         specified in ai_socktype. Fix invalid ai_protocol
15370         check. ai_protocol is usually set to 0 or depending on
15371         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
15372         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
15373         ai_socktype / ai_protocol in the returned addrinfo structure.
15374
15375 2005-05-10  Simon Josefsson  <jas@extundo.com>
15376
15377         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
15378         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
15379
15380 2005-05-10  Karl Berry  <karl@gnu.org>
15381
15382         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
15383         (from http://www.gnu.org/licenses).
15384         * doc/COPYING.LIB: also rename to COPYING.LESSER.
15385         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
15386         fdl.texi suffices.
15387
15388 2005-05-10  Karl Berry  <karl@gnu.org>
15389
15390         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
15391         (COPYING.DOC): remove.
15392
15393         * config/srclist-update: new FSF address.
15394
15395 2005-05-10  Derek Price  <derek@ximbiot.com>
15396
15397         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
15398         possible.
15399
15400 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
15401             Bruno Haible  <bruno@clisp.org>
15402
15403         * modules/inet_ntop: New file.
15404         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
15405         inet_ntop.
15406
15407 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
15408             Bruno Haible  <bruno@clisp.org>
15409
15410         * m4/inet_ntop.m4: New file.
15411
15412 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
15413             Bruno Haible  <bruno@clisp.org>
15414
15415         * lib/inet_ntop.h: New file.
15416         * lib/inet_ntop.c: New file, from glibc with modifications.
15417
15418 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
15419
15420         * modules/time_r (License): Change to LGPL.
15421         * modules/extensions (License): Change to LGPL.  Actually,
15422         the license is more permissive than that, but currently gnulib-tool
15423         doesn't know how to handle more-permissive licenses.
15424
15425         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
15426         Problem reported by Dave Love.
15427
15428 2005-05-08  Jim Meyering  <jim@meyering.net>
15429
15430         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
15431         blank.
15432
15433 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
15434
15435         * modules/argmatch (Depends-on): Add stdbool.
15436         * modules/backupfile (Depends-on): Likewise.
15437         * modules/chdir-long (Depends-on): Likewise.
15438         * modules/closeout (Depends-on): Likewise.
15439         * modules/cycle-check (Depends-on): Likewise.
15440         * modules/dirname (Depends-on): Likewise.
15441         * modules/fnmatch (Depends-on): Likewise.
15442         * modules/fsusage (Depends-on): Likewise.
15443         * modules/fwriteerror (Depends-on): Likewise.
15444         * modules/getcwd (Depends-on): Likewise.
15445         * modules/getloadavg (Depends-on): Likewise.
15446         * modules/hard-locale (Depends-on): Likewise.
15447         * modules/makepath (Depends-on): Likewise.
15448         * modules/mountlist (Depends-on): Likewise.
15449         * modules/nanosleep (Depends-on): Likewise.
15450         * modules/posixtm (Depends-on): Likewise.
15451         * modules/quotearg (Depends-on): Likewise.
15452         * modules/readtokens (Depends-on): Likewise.
15453         * modules/readtokens0 (Depends-on): Likewise.
15454         * modules/readutmp (Depends-on): Likewise.
15455         * modules/save-cwd (Depends-on): Likewise.
15456         * modules/strftime (Depends-on): Likewise.
15457         * modules/userspec (Depends-on): Likewise.
15458         * modules/utimecmp (Depends-on): Likewise.
15459         * modules/xgetcwd (Depends-on): Likewise.
15460         * modules/xnanosleep (Depends-on): Likewise.
15461         * modules/xstrtod (Depends-on): Likewise.
15462         * modules/yesno (Depends-on): Likewise.
15463
15464 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
15465
15466         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
15467         needless checks.
15468
15469 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
15470
15471         Merge from coreutils.  Among other things,
15472         add bulletproofing for cases where stdin, stdout, or stderr are closed.
15473         * lib/fd-safer.c: New file.
15474         * lib/fcntl-safer.h, open-safer.c: Remove.
15475         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
15476         * lib/dup-safer.c: Include unistd-safer.h first.
15477         Don't include errno.h.
15478         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
15479         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
15480         * lib/file-type.c: Rely on file-type.h change.
15481         * lib/getloadavg.c: Include unistd-safer.h.
15482         (getloadavg): Use safer open.
15483         * lib/getusershell.c: Include "stdio-safer.h".
15484         (getusershell): Use safer fopen.
15485         * lib/long-options.c (long_options): Use NULL rather than 0.
15486         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
15487         'free'.
15488         * lib/modechange.c: Likewise.
15489         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
15490         (MODE_DONE): New constant.
15491         (struct mode_change): Remove 'next' member.
15492         (make_node_op_equals): New function; like the old one of the
15493         same name, except it allocates an array.
15494         (mode_compile, mode_create_from_ref): Use it.
15495         (mode_compile): Allocate result as an array, not a linked list.
15496         Parse octal string ourself, so that we catch mistakes like "+0".
15497         (mode_adjust): Arg is an array, not a linked list.
15498         * lib/modechange.c: Include stat-macros.h, xalloc.h.
15499         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
15500         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
15501         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
15502         Remove.  This is now stat-macros.h's job.
15503         (talloc): Remove.  All callers replaced by xalloc, so that
15504         our invokers don't have to worry about reporting memory failures.
15505         (make_node_op_equals): Remove.
15506         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
15507         New constants.
15508         (struct mode_change): Moved here from modechange.h.
15509         (mode_append_entry): Remove.
15510         (mode_compile): Remove MASKED_OPS arg, since it encouraged
15511         apps to have incorrect behavior.  Use simpler algorithm for head
15512         and tail.  Don't futz with umask; that's now the job of mode_adjust.
15513         Detect more invalid usages rather than having somewhat-random behavior.
15514         Don't insert an "a=" action, as that leads to incorrect behavior.
15515         (mode_compile, mode_create_from_ref): Return NULL on error instead
15516         of an enum, since now there's only one way to have an error.  All
15517         callers changed.
15518         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
15519         at the correct time.  Simplify calculation of "+u" and its ilk.
15520         Don't mishandle "+X".
15521         (mode_free): Remove "register" and localize decls.
15522         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
15523         (struct mode_change): Move to modechange.c; callers don't
15524         need to see this stuff.
15525         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
15526         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
15527         (mode_change, mode_adjust): Reflect the new signatures noted above.
15528         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
15529         that might redefine system include files.
15530         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
15531         (my_usleep): Use NULL rather than (void *) 0.
15532         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
15533         Use siginterrupt to specify that system calls should be interrupted.
15534         (rpl_nanosleep): Move initialization of suspended closer to call of
15535         my_usleep.
15536         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
15537         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
15538         (desirable_utmp_entry): New function.
15539         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
15540         using x2nrealloc, to simplify logic.
15541         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
15542         size calculation.  Do not assume utmp file is a regular file.
15543         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
15544         (READ_UTMP_CHECK_PIDS): New constant.
15545         * lib/save-cwd.c: Include unistd-safer.h.
15546         (save_cwd): Use fd_safer.
15547         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
15548         [!_LIBC] Include "stat-macros.h" instead.
15549         * lib/unistd-safer.h (fd_safer): New decl.
15550
15551 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
15552
15553         * modules/getloadavg (Depends-on): Add unistd-safer.
15554         * modules/getusershell (Depends-on): Add stdio-safer.
15555         * modules/lstat (Depends-on): Remove xalloc.
15556         * modules/mkstemp (Depends-on): Add stat-macros.
15557         * modules/modechange (Depends-on): Remove xstrtol.
15558         Add stat-macros, xalloc.
15559         * modules/save-cwd (Depends-on): Add unistd-safer.
15560         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
15561         * modules/unistd-safer (Files): Add lib/fd-safer.c
15562         (Makefile.am): Remove lib_SOURCES.
15563
15564         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
15565         Remove fcntl-safer; unistd-safer supersedes it.
15566
15567 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
15568
15569         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
15570         AC_HEADER_STAT.
15571         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
15572         (gl_PREREQ_CHOWN): Remove.
15573         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
15574         it.  Don't require AC_HEADER_STAT.
15575         (gl_PREREQ_LSTAT): Remove.
15576         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
15577         Don't require AC_HEADER_STAT.
15578         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
15579         (gl_PREREQ_RMDIR): Remove.
15580         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
15581         mention stat-macros.h or AC_HEADER_STAT, since we'll make
15582         the stat-macros module a prerequisite.
15583         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
15584         * m4/filemode.m4 (gl_FILEMODE): Likewise.
15585         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
15586         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
15587         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
15588         variable names.
15589         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
15590         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
15591         variable prefixes.
15592         * m4/fcntl-safer.m4: Remove.
15593         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
15594         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
15595         Invoke gl_PREREQ_FD_SAFER.
15596         (gl_PREREQ_FD_SAFER): New macro.
15597         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
15598         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
15599         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
15600         Remove duplicate call to AC_LIBOBJ(readutmp).
15601         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
15602
15603         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
15604         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
15605
15606 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
15607
15608         * MODULES.html.sh (Misc): Add byteswap.
15609
15610 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
15611
15612         * modules/getcwd (Depends-on): Add extensions.
15613         * modules/openat (Depends-on): Likewise.
15614
15615 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
15616
15617         * modules/byteswap: New file.
15618
15619 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
15620
15621         * m4/byteswap.m4: New file.
15622
15623 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
15624
15625         * lib/byteswap_.h: New file.
15626
15627 2005-04-25  Karl Berry  <karl@gnu.org>
15628
15629         * m4/gettext.m4: Update from GNU gettext 0.14.4.
15630
15631 2005-04-25  Albert Chin  <china@thewrittenword.com>
15632
15633         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
15634         Toolkit C bug.
15635
15636 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
15637
15638         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
15639         (func_ln_if_changed) Remove forcibly for no error message
15640         in case file does not exist.
15641
15642 2005-04-19  Simon Josefsson  <jas@extundo.com>
15643
15644         * gnulib-tool (Options): Make --symlink mean --symbolic.
15645
15646 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
15647
15648         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
15649
15650 2005-04-16  Simon Josefsson  <jas@extundo.com>
15651
15652         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
15653
15654 2005-04-15  Simon Josefsson  <jas@extundo.com>
15655
15656         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
15657
15658 2005-04-15  Simon Josefsson  <jas@extundo.com>
15659
15660         * gnulib-tool: Rename --symlink to --symbolic.
15661
15662 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
15663
15664         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
15665         symbolic links to files instead of copying/moving.  Add --aux-dir,
15666         specifying directory relative --dir where auxiliary build tools
15667         are placed.
15668
15669 2005-04-14  Bruno Haible  <bruno@clisp.org>
15670
15671         * modules/allocsa (License): Change to LGPL.
15672         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
15673
15674 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
15675
15676         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
15677         that "UTC +1 second" continues to work.  Problem reported
15678         by Dmitry V. Levin.
15679         (relunit_snumber): New rule.
15680         (relunit): Use it.
15681
15682 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
15683
15684         * lib/getdate.y (universal_time_zone_table): New constant.
15685         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
15686         universal_time_zone_table.
15687         (lookup_zone): Prefer universal_time_zone_table to
15688         local_time_zone_table, so that "GMT" time stamps are allowed in
15689         London during the summer.  Problem reported by Ian Abbott.
15690
15691 2005-04-12  Jim Meyering  <jim@meyering.net>
15692
15693         * lib/human.c (humblock): Set *options even when returning due to
15694         xstrtoumax conversion failure.  Thanks to a used-uninitialized
15695         warning from gcc-4.
15696
15697 2005-04-09  Jim Meyering  <jim@meyering.net>
15698
15699         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
15700         -Wuninitialized: initialize tm0.tm_year.
15701
15702 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
15703
15704         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
15705         count, since there's no maximum.  All uses changed.
15706         Add member dsts_seen.
15707         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
15708         not being INT_MAX.
15709         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
15710         Use pc_rels_seen to decide whther a date is absolute.
15711
15712         * lib/getdate.y (number): Don't overwrite year.
15713         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
15714         check.
15715
15716 2005-04-02  Simon Josefsson  <jas@extundo.com>
15717
15718         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
15719         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
15720
15721 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
15722
15723         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
15724         where no absolute path name can be longer than PATH_MAX.
15725
15726 2005-03-27  Jim Meyering  <jim@meyering.net>
15727
15728         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
15729
15730 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
15731
15732         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
15733         "one's complement" -> "ones' complement" in comment, as per Knuth.
15734         "value of type" -> "type or expression" in comment.
15735         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
15736
15737 2005-03-26  Jim Meyering  <jim@meyering.net>
15738
15739         Comment nits.
15740         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
15741         Correct typos: s/or/of/.
15742
15743 2005-03-26  Jim Meyering  <jim@meyering.net>
15744
15745         * modules/check-include-files: Move to ../ and rename to...
15746         * check-module: ...this.
15747
15748 2005-03-25  Jim Meyering  <jim@meyering.net>
15749
15750         * modules/xvasprintf (Files): Add xalloc.h.
15751
15752 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
15753
15754         * modules/gettext (Files): config/config.rpath ->
15755         build-aux/config.rpath
15756         * modules/iconv (Files): Likewise.
15757         Problem reported by Oskar Liljeblad.
15758
15759 2005-03-23  Jim Meyering  <jim@meyering.net>
15760
15761         * modules/check-include-files: New script to check for
15762         missing dependencies, multiple includes, etc.
15763
15764         * modules/c-strtold (Depends-on): Add xalloc.
15765         * modules/c-strtod (Depends-on): Add xalloc.
15766         * modules/hash (Depends-on): Add xalloc.
15767         (Files): Remove lib/xalloc.h.
15768
15769         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
15770         * modules/userspec (Files): Add lib/inttostr.h.
15771
15772 2005-03-23  Jim Meyering  <jim@meyering.net>
15773
15774         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
15775
15776 2005-03-22  Jim Meyering  <jim@meyering.net>
15777
15778         * modules/stat-macros: New module.
15779         * modules/canonicalize, modules/euidaccess, modules/file-type,
15780         * modules/filemode, modules/lchown, modules/makepath,
15781         * modules/rmdir, modules/stat: Depend on new stat-macros module
15782         rather than listing lib/stat-macros.h manually.
15783         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
15784
15785 2005-03-22  Jim Meyering  <jim@meyering.net>
15786
15787         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
15788
15789 2005-03-22  Bruno Haible  <bruno@clisp.org>
15790
15791         * config/srclist.txt: Replace target directory 'config' with
15792         'build-aux'.
15793         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
15794         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
15795         ../build-aux/.
15796
15797 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
15798
15799         * modules/chdir-long (Depends-on): Add mempcpy.
15800
15801         * modules/acl, modules/backupfile, modules/c-strtod,
15802         modules/c-strtold, modules/canon-host, modules/canonicalize,
15803         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
15804         modules/exclude, modules/exitfail, modules/file-type,
15805         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
15806         modules/getdate, modules/getline, modules/getpagesize,
15807         modules/getpass, modules/getugroups, modules/group-member,
15808         modules/hard-locale, modules/hash, modules/human, modules/idcache,
15809         modules/inttostr, modules/long-options, modules/makepath,
15810         modules/md5, modules/memcasecmp, modules/memcoll,
15811         modules/modechange, modules/mountlist, modules/path-concat,
15812         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
15813         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
15814         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
15815         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
15816         modules/strftime, modules/strndup, modules/strverscmp,
15817         modules/timespec, modules/unlocked-io, modules/userspec,
15818         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
15819         modules/yesno:
15820         Remove lib_SOURCES line from Makefile.am section, as this is now
15821         done automatically by the corresponding Autoconf macro.
15822
15823 2005-03-21  Jim Meyering  <jim@meyering.net>
15824
15825         Changes imported from coreutils.
15826
15827         * lib/cycle-check.c: Don't include xalloc.h.
15828
15829         * lib/path-concat.c: Don't include assert.h.
15830         (path_concat): Remove assertion that would have triggered
15831         for ABASE starting with more than one slash.
15832         Reported by Andreas Schwab.
15833
15834         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
15835         properly when ABASE is an absolute file name.
15836         Correct the description of this function.
15837         Include <assert.h>.
15838         Add an assertion and a test driver.
15839         This fixes a bug introduced on 2004-07-02.
15840         Andreas Schwab reported the resulting failure of cp --parents:
15841         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
15842
15843 2005-03-21  Jim Meyering  <jim@meyering.net>
15844
15845         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
15846         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
15847
15848 2005-03-21  Jim Meyering  <jim@meyering.net>
15849         and  Paul Eggert  <eggert@cs.ucla.edu>
15850
15851         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
15852         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
15853         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
15854         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
15855         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
15856         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
15857         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
15858         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
15859         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
15860         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
15861         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
15862         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
15863         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
15864         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
15865         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
15866         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
15867         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
15868         for these modules.
15869
15870 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
15871
15872         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
15873         (which shouldn't happen), generate nothing instead of returning 0
15874         immediately, so that nstrftime (NULL, ...) doesn't return 0.
15875
15876 2005-03-16  Bruno Haible  <bruno@clisp.org>
15877
15878         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
15879         HAVE_LONGLONG_64BIT.
15880
15881 2005-03-16  Bruno Haible  <bruno@clisp.org>
15882
15883         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
15884         HAVE_LONGLONG_64BIT.
15885
15886 2005-03-16  Bruno Haible  <bruno@clisp.org>
15887
15888         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
15889         HAVE_LONGLONG_64BIT.
15890
15891 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
15892
15893         * lib/strftime.c (my_strftime): Prepend space to format so that we can
15894         reliably distinguish strftime failure from empty output on POSIX
15895         hosts.
15896
15897 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
15898
15899         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
15900         (iconv_string): Don't guess a size-zero buffer, as that might cause
15901         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
15902         result would be 'too large', where 'too large' is (heuristically)
15903         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
15904         overflow concerns.  This will prevent some unwanted malloc failures
15905         when the inputs are very large.
15906
15907 2005-03-15  Karl Berry  <karl@gnu.org>
15908
15909         * config/srclist.txt (config.rpath): from gettext.
15910         * config/config.rpath: update.
15911
15912 2005-03-15  Bruno Haible  <bruno@clisp.org>
15913
15914         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
15915         to 'negate'.
15916
15917         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
15918         variable.
15919
15920         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
15921         results.
15922
15923 2005-03-14  Simon Josefsson  <jas@extundo.com>
15924
15925         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
15926         <fx@gnu.org>.
15927
15928 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
15929
15930         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
15931         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
15932         intprops.h.
15933         * lib/strtol.c: Likewise.
15934
15935 2005-03-14  Jim Meyering  <jim@meyering.net>
15936
15937         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
15938         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
15939         to be nonzero so that we (and caller) can detect the difference
15940         between a valid zero-length expansion and an error return, even
15941         when the underlying strftime fails before writing anything into
15942         that location.
15943
15944 2005-03-14  Bruno Haible  <bruno@clisp.org>
15945
15946         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
15947         Update from GNU gettext 0.14.3.
15948
15949 2005-03-10  Jim Meyering  <jim@meyering.net>
15950
15951         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
15952
15953 2005-03-10  Jim Meyering  <jim@meyering.net>
15954
15955         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
15956         so that this module works on systems without fchdir.
15957
15958 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
15959
15960         Factor int-properties macros into a single file, except for
15961         glibc-related files.
15962         * lib/intprops.h: New file.
15963         * lib/getloadavg.c: Include it instead of limits.h.
15964         (INT_STRLEN_BOUND): Remove.
15965         * lib/human.c: Include intprops.h.
15966         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
15967         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
15968         302/1000.
15969         * lib/inttostr.h: Include intprops.h instead of limits.h.
15970         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
15971         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
15972         for consistency with intprops.h.
15973         (time_t_is_integer, twos_complement_arithmetic): Use them.
15974         * lib/sig2str.h: Include <signal.h>, intprops.h.
15975         (INT_STRLEN_BOUND): Remove.
15976         * lib/strftime.c (TYPE_SIGNED): Remove.
15977         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
15978         * lib/strtol.c: Adjust comments to match intprops.h.
15979         * lib/userspec.c: Include intprops.h.
15980         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
15981         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
15982         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
15983         instead of rolling our own expressions.
15984         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
15985
15986         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
15987         instead of int.
15988         (my_strftime): Do not mishandle years close to INT_MAX, by doing
15989         the right thing even if adding 1900 would overflow.  Similarly
15990         for tm_mon + 1 and tm_yday + 1.
15991         Make %Y always equivalent to %C%y, and similarly for %G and %g.
15992         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
15993         (DO_SIGNED_NUMBER): New macro.
15994         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
15995
15996 2005-03-07  Bruno Haible  <bruno@clisp.org>
15997
15998         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
15999
16000 2005-03-07  Bruno Haible  <bruno@clisp.org>
16001
16002         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
16003
16004 2005-03-04  Derek R. Price  <derek@ximbiot.com>
16005
16006         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
16007         (func_import): Only replace files via --import when they have actually
16008         changed.
16009
16010 2005-03-03  Derek R. Price  <derek@ximbiot.com>
16011
16012         * m4/mmap-anon.m4: New file.
16013         * m4/pagealign_alloc.m4: New file.
16014
16015 2005-03-03  Derek R. Price  <derek@ximbiot.com>
16016             Bruno Haible  <bruno@clisp.org>
16017
16018         * modules/pagealign_alloc: New file.
16019         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
16020
16021 2005-03-03  Derek R. Price  <derek@ximbiot.com>
16022             Bruno Haible  <bruno@clisp.org>
16023
16024         * lib/pagealign_alloc.h: New file.
16025         * lib/pagealign_alloc.c: New file.
16026
16027 2005-03-03  Bruno Haible  <bruno@clisp.org>
16028
16029         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
16030         Use an all-permissive copyright notice, recommended by RMS.
16031
16032 2005-03-02  Bruno Haible  <bruno@clisp.org>
16033
16034         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
16035         of AIX, the replacement has to be done only after <string.h> is
16036         included, therefore not in config.h. stpncpy.h does the replacement,
16037         and stpncpy.c uses it.
16038
16039 2005-03-02  Bruno Haible  <bruno@clisp.org>
16040
16041         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
16042         stpncpy.c uses it.
16043
16044 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
16045
16046         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
16047         The workaround isn't strictly needed for POSIX conformance, and
16048         it's too much of a pain to configure and maintain.  We'll ask
16049         people to fix their kernels instead.
16050         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
16051         (NANOSLEEP_BUG_WORKAROUND): Remove.
16052         (xnanosleep): Remove the workaround.
16053
16054 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
16055
16056         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
16057         Reported by Derek Price.
16058         (Include): Add "timespec.h".
16059
16060         * modules/xnanosleep (Depends-on): Remove gethrxtime.
16061
16062 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
16063
16064         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
16065         to detect nanosleep bug.
16066
16067 2005-03-01  Bruno Haible  <bruno@clisp.org>
16068
16069         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
16070
16071 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
16072
16073         * modules/gethrxtime: New file.
16074         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
16075         (Depends-on): Add gethrxtime.
16076         (configure.ac): Add gl_XNANOSLEEP.
16077         (Makefile.am): Remove lib_SOURCES line.
16078
16079 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
16080
16081         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
16082         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
16083
16084 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
16085
16086         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
16087         * lib/timespec.h (gettime): Return void, since it always
16088         succeeds now.  All uses changed.
16089         * lib/gettime.c (gettime) Likewise.
16090         [HAVE_NANOTIME]: Prefer nanotime.
16091         Assume gettimeofday succeeds, as POSIX requires.
16092         Assime time () succeeds, since other code already does.
16093         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
16094         (timespec_subtract): Remove.
16095         (NANOSLEEP_BUG_WORKAROUND): New constant.
16096         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
16097         things considerably.  Use it only on GNU/Linux hosts, since the
16098         workaround shouldn't be needed elsewhere.
16099
16100 2005-02-24  Bruno Haible  <bruno@clisp.org>
16101
16102         * modules/gettext (Files): Add m4/glibc2.m4.
16103
16104 2005-02-24  Bruno Haible  <bruno@clisp.org>
16105
16106         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
16107         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
16108         * m4/progtest.m4:
16109         Update from GNU gettext 0.14.2.
16110         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
16111
16112 2005-02-24  Bruno Haible  <bruno@clisp.org>
16113
16114         * lib/localcharset.c: Update from GNU gettext 0.14.2.
16115         * lib/config.charset: Update from GNU gettext 0.14.2.
16116
16117 2005-02-24  Bruno Haible  <bruno@clisp.org>
16118
16119         * lib/gettext.h: Update from GNU gettext 0.14.2.
16120
16121 2005-02-23  Simon Josefsson  <jas@extundo.com>
16122
16123         * m4/iconvme.m4: New file.
16124
16125 2005-02-23  Jim Meyering  <jim@meyering.net>
16126
16127         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
16128         change.
16129         Thanks to Bruno Haible for catching it.
16130
16131 2005-02-22  Simon Josefsson  <jas@extundo.com>
16132
16133         * modules/iconvme: New file.
16134
16135         * MODULES.html.sh: Add iconvme.
16136
16137 2005-02-22  Simon Josefsson  <jas@extundo.com>
16138
16139         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
16140
16141 2005-02-22  Simon Josefsson  <jas@extundo.com>
16142
16143         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
16144
16145 2005-02-22  Jim Meyering  <jim@meyering.net>
16146
16147         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
16148         s/ifndef/ifdef/.
16149
16150 2005-02-20  Neil Conway  <neilc@samurai.com>
16151
16152         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
16153         returned by OSX/Darwin if the specified buffer is not large
16154         enough for the hostname.
16155
16156 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16157
16158         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
16159         pass it to _help, otherwise the latter coredumps trying to
16160         dereference state.root_argp.
16161
16162 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
16163
16164         * modules/chdir-long (Depends-on): Add memrchr.
16165         * modules/memrchr (Files): Add lib/memrchr.h.
16166         (Include): "memrchr.h".
16167
16168 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
16169
16170         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
16171
16172 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
16173
16174         * lib/memrchr.h: New file.
16175         * lib/chdir-long.c: Include it.
16176         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
16177         Don't bother including stddef.h.
16178
16179 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
16180
16181         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
16182         inclusion.
16183         Include <sys/types.h>, for dev_t.
16184         (ME_DUMMY, ME_REMOTE): Move from here....
16185         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
16186         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
16187         Dmitry V. Levin.
16188         Include mountlist.h first, to test the interface.
16189
16190 2005-01-29  Bruno Haible  <bruno@clisp.org>
16191
16192         * lib/progname.c (program_name): Initialize.
16193         Needed when linking statically on MacOS X.
16194
16195 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
16196
16197         Sync from coreutils.
16198         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
16199         (Depends-on): Add c-strtod.
16200         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
16201
16202 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
16203
16204         Sync from coreutils.
16205         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
16206
16207         Remove files that are specific to coreutils.
16208         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
16209
16210 2005-01-28  Bruno Haible  <bruno@clisp.org>
16211
16212         * modules/javacomp: New file.
16213         * MODULES.html.sh (Java): Add javacomp.
16214
16215 2005-01-28  Bruno Haible  <bruno@clisp.org>
16216
16217         * m4/javacomp.m4: New file, from GNU gettext.
16218
16219 2005-01-28  Bruno Haible  <bruno@clisp.org>
16220
16221         * lib/javacomp.sh.in: New file, from GNU gettext.
16222         * lib/javacomp.h: New file, from GNU gettext.
16223         * lib/javacomp.c: New file, from GNU gettext.
16224
16225 2005-01-26  Simon Josefsson  <jas@extundo.com>
16226
16227         * lib/gai_strerror.c: Use GPL in header.
16228
16229 2005-01-26  Bruno Haible  <bruno@clisp.org>
16230
16231         * modules/javaexec: New file.
16232         * MODULES.html.sh (Java): Add javaexec.
16233
16234 2005-01-26  Bruno Haible  <bruno@clisp.org>
16235
16236         * m4/javaexec.m4: New file, from GNU gettext.
16237
16238 2005-01-26  Bruno Haible  <bruno@clisp.org>
16239
16240         * lib/javaexec.sh.in: New file, from GNU gettext.
16241         * lib/javaexec.h: New file, from GNU gettext.
16242         * lib/javaexec.c: New file, from GNU gettext.
16243
16244 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16245
16246         * modules/lchown (Depends-on): Remove lchown.h
16247
16248 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16249
16250         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
16251         must be defined if the header file was not found, in order
16252         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
16253
16254 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16255
16256         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
16257         initializers for struct pentry_state.
16258         (__argp_error): Check return value of __asprintf
16259         (__argp_failure): Translate error message
16260
16261         * lib/argp-parse.c: Removed braces around the expansion of N_()
16262
16263 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
16264
16265         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
16266         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
16267         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
16268         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
16269         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
16270         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
16271         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
16272         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
16273         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
16274         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
16275         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
16276         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
16277         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
16278         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
16279         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
16280         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
16281         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
16282         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
16283         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
16284         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
16285         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
16286         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
16287         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
16288         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
16289         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
16290         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
16291         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
16292         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
16293         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
16294         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
16295         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
16296         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
16297         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
16298         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
16299         xstrtol.m4, xstrtoumax.m4, yesno.m4:
16300         Use an all-permissive copyright notice, recommended by RMS.
16301
16302 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
16303
16304         * modules/chdir-long (Depends-on): Remove mempcpy.
16305
16306 2005-01-21  Jim Meyering  <jim@meyering.net>
16307
16308         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
16309         same value as for Solaris 9.
16310
16311         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
16312         component length.  This included changing the parameter to be
16313         of type `char *' rather than `char const *'.
16314         * lib/chdir-long.h (chdir_long): Update prototype.
16315
16316         * lib/openat.c (fdopendir, fstatat): New functions.
16317         * lib/openat.h: Include headers required for use of DIR and struct
16318         stat.
16319         [AT_SYMLINK_NOFOLLOW]: Define.
16320         (fdopendir, fstatat): Add prototypes.
16321
16322 2005-01-21  Bruno Haible  <bruno@clisp.org>
16323
16324         * modules/classpath: New file.
16325         * MODULES.html.sh (Java): Add classpath.
16326
16327 2005-01-21  Bruno Haible  <bruno@clisp.org>
16328
16329         * lib/classpath.h: New file, from GNU gettext.
16330         * lib/classpath.c: New file, from GNU gettext.
16331
16332 2005-01-20  Simon Josefsson  <jas@extundo.com>
16333
16334         * modules/version-etc-fsf: New file.
16335
16336 2005-01-20  Simon Josefsson  <jas@extundo.com>
16337
16338         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
16339         * lib/version-etc.c: Remove version_etc_copyright.
16340         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
16341         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
16342
16343 2005-01-20  Simon Josefsson  <jas@extundo.com>
16344
16345         * lib/base64.h (isbase64): Add.
16346
16347         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
16348         using a unsigned prototype, don't inline.
16349         (base64_decode): Use it.
16350
16351 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
16352
16353         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
16354         it.
16355
16356 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
16357
16358         * lib/save-cwd.c (save_cwd): Remove code to support the case
16359         where fchdir is missing or flaky.
16360
16361 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
16362
16363         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
16364
16365 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
16366
16367         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
16368         AC_LIBSOURCES now does this.
16369         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
16370         with new ullong_max module.
16371
16372 2005-01-19  Bruno Haible  <bruno@clisp.org>
16373
16374         * modules/sh-quote: New file.
16375         * MODULES.html.sh (Executing programs): Add sh-quote.
16376
16377 2005-01-19  Bruno Haible  <bruno@clisp.org>
16378
16379         * lib/sh-quote.h: New file, from GNU gettext.
16380         * lib/sh-quote.c: New file, from GNU gettext.
16381
16382 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
16383
16384         Merge from coreutils.
16385         * m4/ullong_max.m4: New file.
16386         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
16387         (gl_MACROS): Assume localeconv exists.
16388
16389 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
16390
16391         Merge changes from coreutils, as described below in several
16392         changelogs dated today.
16393
16394         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
16395         (O_DIRECTORY): Remove; not needed here, since "." must be
16396         a directory.  All uses removed.
16397         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
16398         universal on Suns, and we also need to test for IRIX.
16399         Revamp code to use 'if' rather than '#if'.
16400         Avoid unnecessary comparison of cwd->desc to 0.
16401
16402         * lib/utimens.c (futimens): Robustify the previous patch, by checking
16403         for known valid error numbers rather than observed invalid ones.
16404
16405 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
16406
16407         * modules/ullong_max: New file.
16408
16409         * modules/chdir-long, modules/openat: New files.
16410         * modules/save-cwd (Depends-on): Depend on chdir-long.
16411         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
16412
16413 2005-01-18  Jim Meyering  <jim@meyering.net>
16414
16415         Merge from coreutils.
16416         * m4/chdir-long.m4, m4/openat.m4: New files.
16417         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
16418         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
16419         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
16420         is sane and DOES follow symlinks.  Besides, testing 20 different
16421         systems found no broken chown implementations.
16422         Prompted by a change in rsync's copy of this macro.
16423         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
16424
16425         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
16426
16427         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
16428         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
16429         NULL-means-set-to-current-time semantics.
16430         Remove temporary file immediately, rather than waiting
16431         for configure's at-exit trap code to do it.
16432
16433 2005-01-18  Jim Meyering  <jim@meyering.net>
16434
16435         * lib/version-etc.c (version_etc_copyright): Update copyright date.
16436
16437         * lib/utimens.c (futimens): Account for the fact that futimes
16438         can also fail with errno == ENOSYS or errno == ENOENT.
16439         Patch from Dmitry V. Levin.
16440
16441         Change the name of the robust chdir function from chdir to chdir_long.
16442         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
16443         (restore_cwd): Use chdir_long, not chdir.
16444         * lib/chdir-long.c: Renamed from chdir.c.
16445         * lib/chdir-long.h: Renamed from chdir.h.
16446         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
16447         Hurd.
16448
16449 2005-01-18  Bruno Haible  <bruno@clisp.org>
16450
16451         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
16452         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
16453         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
16454         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
16455         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
16456         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
16457         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
16458         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
16459         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
16460         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
16461         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
16462         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
16463         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
16464         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
16465         Use an all-permissive copyright notice, recommended by RMS.
16466
16467 2005-01-18  Bob Proulx  <bob@proulx.com>
16468
16469         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
16470         simplify offsetof() macro construct to avoid compile failure with
16471         native HP-UX 11.0 ANSI C compiler.
16472
16473 2005-01-17  Bruno Haible  <bruno@clisp.org>
16474
16475         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
16476         redundant because stpncpy.m4 takes care of it.
16477
16478 2005-01-17  Bruno Haible  <bruno@clisp.org>
16479
16480         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
16481
16482 2005-01-17  Bruno Haible  <bruno@clisp.org>
16483
16484         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
16485         used.
16486
16487 2005-01-17  Bruno Haible  <bruno@clisp.org>
16488
16489         * lib/fwriteerror.h (fwriteerror): Change specification to include
16490         fclose.
16491         * lib/fwriteerror.c: Include <stdbool.h>.
16492         (fwriteerror): At the end, close the file stream. Record whether
16493         stdout was already closed.
16494
16495 2005-01-17  Bruno Haible  <bruno@clisp.org>
16496
16497         * lib/execute.c (environ): Declare if needed.
16498         * lib/pipe.c (environ): Likewise.
16499         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
16500
16501 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16502
16503         * modules/argp: Depend on vsnprintf
16504
16505 2005-01-10  Jim Meyering  <jim@meyering.net>
16506
16507         * modules/closeout (Depends-on): Add atexit.
16508
16509 2005-01-06  Bruno Haible  <bruno@clisp.org>
16510
16511         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
16512
16513 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
16514
16515         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
16516         definitions to be after all include files, to avoid collisions.
16517         Problem reported by Bob Proulx.
16518
16519 2005-01-04  Jim Meyering  <jim@meyering.net>
16520
16521         Changes imported from coreutils.
16522         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
16523         as the mkstemp template, use a temporary directory and an
16524         8.3-friendly template to avoid trouble on systems like DJGPP.
16525         Reported by Juan M. Guerrero via Stepan Kasal.
16526         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
16527         close. Remove the temporary directory right away, rather than waiting
16528         for configure's at-exit trap code to do it.
16529         Suggestion from Stepan Kasal.
16530
16531 2005-01-01  Simon Josefsson  <jas@extundo.com>
16532
16533         * gnulib-tool: Print #include directives when --import'ing.
16534
16535 2004-12-28  Simon Josefsson  <jas@extundo.com>
16536
16537         * tests/test-base64.c: Include required header files.  Remove
16538         unused variables.
16539
16540 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
16541
16542         * modules/error (Depends-on): Remove gettext.
16543
16544 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
16545
16546         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
16547         not needed.  This removes a dependency on the gettext module.
16548         [defined _LIBC]: Do not include <libintl.h>; not needed.
16549
16550 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
16551
16552         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
16553         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
16554
16555 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
16556
16557         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
16558         HAVE_DECL_STRTOLD.
16559
16560 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
16561
16562         * modules/getdate (Depends-on): Remove alloca-opt.
16563
16564 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
16565
16566         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
16567
16568 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
16569
16570         * lib/argp-parse.c: Include <stddef.h>.
16571         (alignof, alignto): New macros.
16572         (parser_init): Don't assume that void * is aligned sufficiently
16573         for struct option.
16574
16575         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
16576         need to extend the stack.
16577         (YYINITDEPTH): New macro, so that the initial stack isn't overly
16578         large.
16579
16580 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16581
16582         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
16583
16584 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
16585
16586         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
16587         (2004-10-24) change.  Apparently this was a false alarm.
16588
16589         * modules/getdate: Depend on alloca-opt, not alloca.
16590
16591 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
16592
16593         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
16594         Remove now-obsolete comment about AIX.
16595         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
16596         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
16597         (YYMAXDEPTH): New macro.
16598
16599 2004-12-18  Simon Josefsson  <jas@extundo.com>
16600
16601         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
16602
16603 2004-12-18  Bruno Haible  <bruno@clisp.org>
16604
16605         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
16606
16607 2004-12-18  Bruno Haible  <bruno@clisp.org>
16608
16609         * lib/fatal-signal.c (fatal_signals): Make non-const.
16610         (init_fatal_signals): New function.
16611         (uninstall_handlers, install_handlers): Ignore signals that were set to
16612         SIG_IGN.
16613         (at_fatal_signal): Call init_fatal_signals.
16614         (init_fatal_signal_set): Likewise. Ignore signals that were set to
16615         SIG_IGN.
16616         Reported by Paul Eggert.
16617
16618 2004-12-18  Bruno Haible  <bruno@clisp.org>
16619
16620         * doc/alloca.texi: New file.
16621         * doc/alloca-opt.texi: New file.
16622
16623 2004-12-17  Jim Meyering  <jim@meyering.net>
16624
16625         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
16626         Otherwise, install-sh could exit with improper exit status when
16627         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
16628
16629 2004-12-16  Simon Josefsson  <jas@extundo.com>
16630
16631         * tests/test-base64.c: Add license.
16632
16633 2004-12-15  Stepan Kasal  <address@hidden>
16634
16635         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
16636
16637 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
16638
16639         * modules/getcwd (Files): Add m4/d-ino.m4.
16640         Suggested by Mark D. Baushke.
16641
16642 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
16643
16644         * lib/getdate.y (textint): New member "negative".
16645         (time_zone_hhmm): New function.
16646         Expect 14 shift-reduce conflicts, not 13.
16647         (o_colon_minutes): New rule.
16648         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
16649         (yylex): Set the "negative" member of signed numbers.
16650
16651 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
16652
16653         * doc/getdate.texi (Time of day items, Time zone items):
16654         Describe new formats +00:00, UTC+00:00.
16655
16656 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
16657
16658         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
16659         spurious "-l"s.  Problem reported by Stepan Kasal.
16660
16661 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
16662
16663         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
16664         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
16665
16666 2004-12-04  Simon Josefsson  <jas@extundo.com>
16667
16668         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
16669         Vandoorselaere <yoann@prelude-ids.org>.
16670
16671 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
16672
16673         Changes imported from coreutils.
16674         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
16675         exist.
16676         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
16677
16678 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
16679
16680         Changes imported from coreutils.
16681         * lib/hard-locale.c: Assume <locale.h> exists.
16682         Include "strdup.h".
16683         (GLIBC_VERSION): New macro.
16684         (hard_locale): Assume setlocale exists.
16685         Rewrite to avoid #ifdef.
16686         Use strdup rather than malloc + strcpy.
16687         * lib/human.c: Assume <locale.h> exists.
16688         (human_readable): Assume localeconv exists.
16689
16690 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
16691
16692         * modules/hard-locale (Depends-on): Add strdup.
16693
16694 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
16695
16696         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
16697         convert T2, not T.  (Imported from libc.)
16698
16699 2004-11-30  Simon Josefsson  <jas@extundo.com>
16700
16701         * modules/restrict (License): Change to LGPL.
16702
16703 2004-11-30  Simon Josefsson  <jas@extundo.com>
16704
16705         * m4/restrict.m4: Add copyright and copying conditions.
16706
16707 2004-11-30  Simon Josefsson  <jas@extundo.com>
16708
16709         * m4/base64.m4: New file.
16710
16711 2004-11-30  Simon Josefsson  <jas@extundo.com>
16712
16713         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
16714         base64.
16715
16716         * tests/test-base64.c: New file.
16717
16718         * modules/base64: New file.
16719
16720 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
16721
16722         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
16723         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
16724
16725         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
16726
16727 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
16728
16729         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
16730         (__getcwd.c): Don't restore errno; glibc doesn't.
16731         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
16732         first, falling back to our code only if its results look suspicious.
16733         Ensure that the resulting buffer is only as large as necessary.
16734
16735         * lib/readutmp.c: Include readutmp.h first.
16736         Include <errno.h>, since readutmp.h no longer does that.
16737         * lib/readutmp.h: Don't include <errno.h>,
16738         <sys/param.h>, <time.h>; not needed to establish interface.
16739         (errno): Remove decl.
16740         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
16741         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
16742         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
16743
16744 2004-11-28  Simon Josefsson  <jas@extundo.com>
16745
16746         * lib/base64.h, base64.c: New file.
16747
16748 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
16749
16750         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
16751
16752 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
16753
16754         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
16755         (Depends-on): Remove pathmax, same.  Add mempcpy.
16756         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
16757         (Makefile.am): Append getcwd.h to lib_SOURCES.
16758         (Include): Add getcwd.h.
16759         (Maintainer): Change from Jim Meyering to "all, glibc",
16760         since getdate now uses intended-for-glibc code.
16761         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
16762         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
16763
16764 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
16765
16766         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
16767         HP's ANSI C compiler.
16768         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
16769         Declaring int functions causes warnings on some modern systems and
16770         shouldn't be needed to compile on ancient ones.
16771         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
16772         defined.
16773
16774         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
16775         with the following changes.
16776         (__set_errno): Parenthesize properly.
16777         Include <stdbool.h>.
16778         (MIN, MAX, MATCHING_INO): New macros.
16779         (__getcwd): Define with prototype, not K&R form.
16780         Use heuristics to allocate default buffer on stack if possible.
16781         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
16782         behavior, and to avoid the PATH_MAX limit when computing
16783         ../../../../...
16784         Use MATCHING_INO to compare inode number to file.
16785         Check for arithmetic overflow in size calculations.
16786         Fix bug in reallocation of dot array that caused getcwd to fail
16787         on directories nested deeper than 75.
16788         Be more careful about saving errno on error.
16789         Do not use realloc; use only free+malloc, as this is a bit
16790         more flexible and avoids a needless copy operation.
16791         Do not inspect st_dev and st_ino for symbolic links; POSIX
16792         doesn't specify the latter.
16793         Check for closedir errors.
16794         Avoid needless casts.
16795         Use "#ifdef weak_alias" around weak_alias, to be like other
16796         glibc code.
16797         The following changes to getcwd.c have effect only when used in
16798         gnulib; they have no effect inside glibc proper.
16799         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
16800         as alloca isn't used.
16801         (alloca, __alloca): Likewise.
16802         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
16803         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
16804         unconditionally, as gnulib assumes C89 or better.
16805         Do not include <sys/param.h>.
16806         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
16807         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
16808         better.
16809         (NULL) [!defined NULL]: Remove; we assume C89 or better.
16810         Include <dirent.h> in a way that is compatible with modern Autoconf.
16811         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
16812         New macros, if not already defined.
16813         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
16814         Use "_LIBC", not "defined _LIBC", for consistency.
16815         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
16816         a mempcpy module.
16817         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
16818         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
16819         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
16820         credit only to Jim Meyering and adjust the copyright dates.
16821         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
16822         <stdlib.h>, <unistd.h>, "pathmax.h".
16823         Instead, include "xgetcwd.h" (first) and "getcwd.h".
16824         (INITIAL_BUFFER_SIZE): Remove.
16825         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
16826
16827 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
16828
16829         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
16830         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
16831         Use the _ONCE methods, for efficiency.
16832         Check for fcntl.h.  In test program, include <errno.h>
16833         and <fcntl.h> if available.  Remove old K&R cruft from
16834         test program.  Check for common errors in GNU/Linux,
16835         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
16836         don't do AC_LIBOBJ, as that's getcwd.m4's job.
16837         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
16838         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
16839         name accordingly.
16840         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
16841         accommodate new getcwd.c.
16842         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
16843         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
16844         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
16845         that's all we need now.
16846
16847 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16848
16849         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
16850         argp-parse.c depends on getopt internals, that means we should
16851         always use our getopt, to be on the safe side.
16852         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
16853         order not to spoil the result of an eventual previous invocation
16854         of gl_GETOPT_SUBSTITUTE.
16855
16856 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16857
16858         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
16859         redefinition warnings. To avoid them, include the defines
16860         in `#if !defined __need_getopt ... #endif'. The only place
16861         where __getopt_argv_const is used is in definitions
16862         of getopt_long and getopt_long_only below, which are as well
16863         protected by `#ifndef __need_getopt'.
16864         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
16865         __need_getopt after including <stdio.h> and <unistd.h> These
16866         headers might have defined it.
16867
16868 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
16869
16870         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
16871
16872 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
16873
16874         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
16875         (futimens): New function, which uses futimes if available.
16876         (futimens, utimens): Support timespec==NULL, with same semantics
16877         as utime and utimens.
16878         * lib/utimens.h (futimens): New decl.
16879
16880 2004-11-23  Jim Meyering  <jim@meyering.net>
16881
16882         * lib/getopt_.h: Remove trailing blanks.
16883
16884 2004-11-23  Jim Meyering  <jim@meyering.net>
16885
16886         * lib/__fpending.c: Add comment.
16887
16888 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
16889
16890         * modules/canonicalize (Depends-on): Add xreadlink.
16891         Problem reported by James Youngman.
16892
16893 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
16894
16895         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
16896         New macros.
16897         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
16898         optopt): Use them instead of invoking ## directly; otherwise, the
16899         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
16900
16901 2004-11-19  Bruno Haible  <bruno@clisp.org>
16902
16903         * lib/strtok_r.c: Move comments from here...
16904         * lib/strtok_r.h: ... to here.
16905
16906 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
16907
16908         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
16909         implementations that mishandle size_t overflow.
16910
16911 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
16912
16913         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
16914         might fail.  Problem reported by Yoann Vandoorselaere.
16915         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
16916         implementations that mishandle size_t overflow.
16917
16918 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
16919
16920         * modules/canon-host (Depends-on): Add strdup.
16921
16922 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
16923
16924         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
16925
16926 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
16927
16928         * lib/canon-host.c: Include "strdup.h".
16929         (canon_host): Use getaddrinfo if available, so that IPv6 works.
16930         Use strdup instead of malloc/strcpy to duplicate strings.
16931
16932         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
16933         (human_space_before_unit): New constant.
16934         * lib/human.c (human_readable): Support it.
16935
16936         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
16937         (xgetcwd): Set errno correctly when failing.
16938         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
16939         the failure is actually due to a PATH_MAX problem.
16940
16941         Further getopt changes to make it more likely that glibc will
16942         buy the changes back.
16943         * lib/getopt.c (POSIXLY_CORRECT): New constant.
16944         (getopt): Use it, so to preserve glibc semantic
16945         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
16946         when compiling for libc.
16947         * lib/getopt_.h (__getopt_argv_const): Bring it back.
16948         (getopt_long, getopt_long_only): Use it.
16949
16950         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
16951         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
16952         (getopt): Argv is now char * const *, as per standard.
16953         (_getopt_internal_r, _getopt_internal): Argv is now char **,
16954         not char *__getopt_argv_const *.
16955         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
16956         _getopt_long_only_r): Likewise.
16957         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
16958         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
16959         _getopt_long_r, _getopt_long_only_r): Likewise.
16960         * lib/getopt_.h (__getopt_argv_const): Remove.
16961         (getopt): Argv is now char * const *, as per standard.
16962
16963         * lib/getdate.y (tORDINAL): New token.
16964         (day, relunit): Allow it for relative times.
16965         (relative_time_table): Use tORDINAL for ordinals.
16966
16967 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
16968
16969         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
16970         Document that "second" isn't allowed as an ordinal number.
16971
16972 2004-11-16  Jim Meyering  <jim@meyering.net>
16973
16974         * modules/closeout (Depends-on): Add fpending.
16975
16976 2004-11-15  Jim Meyering  <jim@meyering.net>
16977
16978         * lib/closeout.c: Include "__fpending.h" once again.
16979         Include <stdbool.h>.
16980         (close_stdout): Don't fail just because stdout was closed initially,
16981         since some programs don't write to stdout in the normal course of
16982         operation (other than --version and --help), and we don't want this
16983         function to make e.g. `touch file >&-' fail.
16984         But do fail if it was closed and someone has tried to write to it.
16985         E.g., `printf foo >&-' must fail.
16986
16987 2004-11-13  Jim Meyering  <jim@meyering.net>
16988
16989         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
16990
16991 2004-11-12  Simon Josefsson  <jas@extundo.com>
16992
16993         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
16994         small doc fix is still pending.
16995
16996 2004-11-11  Simon Josefsson  <jas@extundo.com>
16997
16998         * modules/strtok_r: New file.
16999
17000         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
17001         strtok_r.
17002
17003 2004-11-11  Simon Josefsson  <jas@extundo.com>
17004
17005         * m4/strtok_r.m4: New file.
17006
17007         * m4/getopt.m4: Replace opterr.
17008
17009 2004-11-11  Simon Josefsson  <jas@extundo.com>
17010
17011         * lib/strtok_r.h, strtok_r.c: New file.
17012
17013 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
17014
17015         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
17016         of replacing opterr, getopt, etc.  This should handle the
17017         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
17018
17019 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
17020
17021         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
17022         we can stop lying to compilers about the constness of argv when we
17023         are compiled outside glibc.
17024         (getopt, getopt_long, getopt_long_only): Use it.
17025         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
17026         _getopt_internal, getopt): Likewise.
17027         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
17028         _getopt_long_only_r): Likewise.
17029         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
17030         _getopt_long_r, _getopt_long_only_r): Likewise.
17031
17032         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
17033         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
17034         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
17035         the other external symbols.
17036         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
17037         declaration, since the above renaming now works around collisions.
17038
17039 2004-11-11  Jim Meyering  <jim@meyering.net>
17040
17041         * lib/linebreak.c: Remove trailing blanks.
17042         * lib/alloca_.h: Likewise.
17043         * lib/acosl.c: Likewise.
17044         * lib/euidaccess.c: Likewise.
17045         * lib/allocsa.h: Likewise.
17046
17047 2004-11-10  Simon Josefsson  <jas@extundo.com>
17048
17049         * m4/getaddrinfo.m4: New file.
17050
17051 2004-11-10  Simon Josefsson  <jas@extundo.com>
17052
17053         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
17054
17055 2004-11-10  Simon Josefsson  <jas@extundo.com>
17056
17057         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
17058         getaddrinfo.
17059
17060         * modules/getaddrinfo: New file.
17061
17062 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
17063
17064         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
17065
17066 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
17067
17068         * lib/mktime.c (SHR): New macro, which is a portable
17069         substitute for >> that should work even on Crays.
17070         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
17071         Problem reported by Mark D. Baushke in
17072         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
17073         * lib/getdate.y (SHR): Likewise.
17074         (tm_diff): Use it.
17075         * lib/strftime.c (SHR): Likewise.
17076         (tm_diff): Use it.
17077         * lib/quotearg.c (struct quoting_options): Use unsigned int for
17078         quote_these_too, so that right shifts are well defined.  All uses
17079         changed.
17080
17081 2004-11-10  Jim Meyering  <jim@meyering.net>
17082
17083         Ensure that no close failure goes unreported.
17084         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
17085         return early when it seems there's nothing to flush.
17086         Don't include __fpending.h.
17087
17088 2004-11-10  Jim Meyering  <jim@meyering.net>
17089
17090         * modules/closeout (Depends-on): Remove fpending.
17091
17092 2004-11-10  Jim Meyering  <jim@meyering.net>
17093
17094         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
17095
17096 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
17097
17098         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
17099         gl_FUNC_STRFTIME.
17100         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
17101         and AC_REQUIRE when possible, to avoid duplicate checks.
17102         Check for <wchar.h>.
17103
17104 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
17105
17106         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
17107
17108 2004-11-09  Bruno Haible  <bruno@clisp.org>
17109
17110         * m4/sockpfaf.m4: New file.
17111
17112 2004-11-05  Bruno Haible  <bruno@clisp.org>
17113
17114         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
17115         Reported by Mark D. Baushke <mdb@cvshome.org>.
17116
17117 2004-11-04  Bruno Haible  <bruno@clisp.org>
17118
17119         2004-09-11  Bruno Haible  <bruno@clisp.org>
17120                 * allocsa.valgrind: New file.
17121         2004-02-06  Bruno Haible  <bruno@clisp.org>
17122                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
17123                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
17124                 Reported by Christopher Seip <chris.seip@hp.com>.
17125
17126 2004-11-04  Bruno Haible  <bruno@clisp.org>
17127
17128         * modules/allocsa (Files): Add lib/allocsa.valgrind.
17129         (Makefile.am): Distribute it.
17130
17131 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
17132
17133         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
17134         with errno == ERANGE if the buffer is too small.
17135         Problem reported by Mark D. Baushke.
17136
17137 2004-11-03  Albert Chin  <china@thewrittenword.com>
17138             Paul Eggert  <eggert@cs.ucla.edu>
17139
17140         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
17141         equivalent, substitute $ac_type for equivalent type rather than
17142         blindly using uint32_t *always* which won't work if uint32_t is not
17143         available.  Define _UINT32_T to work around typedef of uint32_t if
17144         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
17145         2.5.1.
17146
17147 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
17148
17149         * m4/jm-macros.m4: Sync from coreutils.
17150         (gl_MACROS): Check for mbrlen, for pathchk.
17151         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
17152
17153 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
17154
17155         * lib/xreadlink.c (MAXSIZE): New macro.
17156         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
17157         size does not exceed MAXSIZE.  Avoid cast.
17158         As suggested by Mark D. Baushke in
17159         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
17160         if readlink fails with buffer size just under MAXSIZE, try again
17161         with MAXSIZE.
17162
17163 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
17164
17165         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
17166
17167 2004-11-02  Derek R. Price  <derek@ximbiot.com>
17168         and  Paul Eggert  <eggert@cs.ucla.edu>
17169
17170         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
17171         (get_date): Overparenthesize to avoid GCC warning.
17172
17173 2004-11-02  Bruno Haible  <bruno@clisp.org>
17174
17175         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
17176         returns void.
17177
17178 2004-11-02  Bruno Haible  <bruno@clisp.org>
17179
17180         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
17181         function returns void.
17182
17183 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
17184
17185         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
17186         fflush_unlocked, flockfile, funlockfile, funlockfile,
17187         fputs_unlocked, putc_unlocked.
17188
17189 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
17190
17191         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
17192         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
17193         already declared.
17194
17195 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
17196
17197         * modules/getdate (Files): Add doc/getdate.texi.
17198         (Depends-on): Add setenv, xalloc.
17199
17200 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
17201
17202         * lib/getdate.y: Add support for TZ="foo" within a date string.
17203         Fix some bugs near time_t boundaries.  Reject dates with
17204         out-of-range components, e.g., "Sept 31".
17205         Include <stdlib.h>, "setenv.h", "xalloc.h".
17206         (ISDIGIT_LOCALE): Remove; unused.
17207         Note that the TZ and time functions used here are not reentrant.
17208         (mktime_ok, get_tz): New functions.
17209         (TZBUFSIZE): New constant.
17210         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
17211         This requires that we sometimes generate our own TZ="XXX..." setting.
17212
17213 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
17214
17215         * doc/getdate.texi: New file, from coreutils with modifications for
17216         the new TZ parsing.
17217
17218 2004-10-27  Derek R. Price  <derek@ximbiot.com>
17219
17220         * lib/mktime.c (not_equal_tm): Remove redundant check.
17221
17222 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
17223
17224         * modules/regex (lib_SOURCES): Add regex.c.
17225         Reported by James Youngman in
17226         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
17227
17228 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
17229
17230         * lib/getdate.y: Use Bison 1.875 features, and some minor
17231         code cleanups.  This change does not affect semantics.
17232         Don't include <stdlib.h>; no longer needed.
17233         Don't include unlocked-io.h; only the "#if TEST" code uses
17234         stdio, and performance isn't crucial there.
17235         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
17236         Bison 1.875 features as described below.
17237         All uses of "PC." replaced by "pc->".
17238         (YYSTYPE): Add a forward declaration.
17239         (yylex, yyerror): Use full prototypes in forward decls.
17240         Use "%pure-parser" rather than obsolescent "%pure_parser".
17241         Use %parse-param and %lex-param instead of obsolescent
17242         YYPARSE_PARAM and YYLEX_PARAM.
17243         (meridian_table, month_and_day_table, time_units_table,
17244         relative_time_table, time_zone_table, military_table,
17245         lookup_zone, lookup_word, get_date):
17246         Use NULL instead of 0 where appropriate.
17247         (to_hour): Avoid abort (), to avoid a dependency on
17248         stdlib.h.
17249         (yyerror, yylex): Now accepts parser_control * arg.
17250         (main) [TEST]: Use '\0' rather than 0 for char.
17251
17252 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
17253
17254         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
17255
17256 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
17257
17258         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
17259         It's now the caller's responsibility to handle the case where
17260         !HAVE_GETPAGESIZE && !defined getpagesize.
17261
17262         * lib/mktime.c (leapyear): Arg is long int, not int.
17263
17264 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
17265
17266         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
17267
17268 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
17269
17270         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
17271         missing.  Problem reported by James Youngman.
17272
17273 2004-10-16  Simon Josefsson  <jas@extundo.com>
17274
17275         * gnulib-tool: Fix comments.  Fix parse problem.
17276         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
17277
17278 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
17279
17280         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
17281         implementation of getopt_long.  Problem reported by Alexander Taler in:
17282         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
17283
17284 2004-10-15  Bruno Haible  <bruno@clisp.org>
17285
17286         * gnulib-tool: Untabify. Initialize supplied_libname.
17287         (func_usage): More homogenous output.
17288         (func_modules_transitive_closure, func_modules_to_filelist,
17289         func_emit_lib_Makefile_am): New functions.
17290         (func_import): New function, extracted from big case statement. Use
17291         func_get_license, func_modules_transitive_closure,
17292         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
17293         opt_lgpl. Don't use test -a, as it's not portable.
17294         (func_create_testdir): Use func_modules_transitive_closure,
17295         func_modules_to_filelist, func_emit_lib_Makefile_am.
17296
17297 2004-10-15  Bruno Haible  <bruno@clisp.org>
17298
17299         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
17300
17301 2004-10-15  Bruno Haible  <bruno@clisp.org>
17302
17303         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
17304         the portions belonging to each module.
17305         Suggested by Derek Robert Price <derek@ximbiot.com>.
17306
17307 2004-10-12  Simon Josefsson  <jas@extundo.com>
17308
17309         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
17310         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
17311         to real functions.
17312
17313 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
17314
17315         * modules/vsnprintf: New file.
17316
17317 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
17318
17319         * m4/vsnprintf.m4: New file.
17320
17321 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
17322
17323         * lib/vsnprintf.h: New file.
17324         * lib/vsnprintf.c: New file.
17325
17326 2004-10-11  Bruno Haible  <bruno@clisp.org>
17327
17328         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
17329         vsnprintf.
17330
17331 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
17332
17333         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
17334
17335 2004-10-07  Bruno Haible  <bruno@clisp.org>
17336
17337         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
17338         fits into the provided buffer.
17339
17340 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
17341
17342         * lib/diacrit.c, diacrit.h: Add GPL notice.
17343
17344         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
17345         notice.
17346         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
17347         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
17348         This avoids a potential constant-folding bug.
17349
17350 2004-10-05  Bruno Haible  <bruno@clisp.org>
17351
17352         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
17353         for the declaration of strsep.
17354
17355 2004-10-05  Bruno Haible  <bruno@clisp.org>
17356
17357         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
17358
17359 2004-10-04  Simon Josefsson  <jas@extundo.com>
17360
17361         * modules/memmem: New file.
17362         * tests/test-memmem.c: New file.
17363         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
17364
17365 2004-10-04  Simon Josefsson  <jas@extundo.com>
17366
17367         * m4/memmem.m4: New file.
17368
17369 2004-10-04  Simon Josefsson  <jas@extundo.com>
17370
17371         * lib/memmem.h: New file.
17372         * lib/memmem.c: New file, taken from glibc.
17373
17374 2004-10-04  Simon Josefsson  <jas@extundo.com>
17375
17376         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
17377         '#ifdef USE_UNLOCKED_IO'.
17378
17379 2004-10-04  Simon Josefsson  <jas@extundo.com>
17380
17381         * config/srclist.txt: Add memmem from glibc.
17382
17383 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
17384
17385         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
17386
17387         * modules/argmatch, modules/argp, modules/closeout, modules/error,
17388         modules/exclude, modules/getdate, modules/getline,
17389         modules/getndelim2, modules/getpass, modules/getpass-gnu,
17390         modules/getusershell, modules/linebuffer, modules/md5,
17391         modules/mountlist, modules/posixtm, modules/readtokens,
17392         modules/readutmp, modules/regex, modules/sha1,
17393         modules/version-etc, modules/yesno:
17394         Remove dependency on unlocked-io.
17395
17396 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
17397
17398         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
17399
17400         * m4/unlocked-io.m4: Add copyright notice.
17401         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
17402
17403 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
17404
17405         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
17406         * lib/xmalloc.c (xmemdup): Likewise.
17407         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
17408         XFREE): Remove these long-obsolescent macros.
17409         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
17410         * lib/xstrdup.c: Remove.
17411
17412         * lib/regex.c (re_comp): Cast gettext return value to char *,
17413         Problem reported by Martin Neitzel via Mark D. Baushke.
17414
17415 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
17416
17417         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
17418         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
17419         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
17420         regex.c, sha1.c, version-etc.c, yesno.c:
17421         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
17422         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
17423         the includer's responsibility.
17424
17425         Sync from coreutils.
17426
17427         * lib/modechange.c (mode_compile): Don't decrement a pointer that
17428         points to the start of a string, as the C Standard says the
17429         resulting behavior is undefined.
17430
17431         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
17432         simple -> simple_backups, numbered_existing ->
17433         numbered_existing_backups, numbered -> numbered_backups
17434         to avoid shadowing problems.  All uses changed.
17435         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
17436         * lib/backupfile.c (check_extension, numbered_backup):
17437         Rename locals to avoid shadowing 'basename'.
17438         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
17439         once.
17440
17441         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
17442         * lib/.cvsignore: Add getopt.h.
17443
17444 2004-10-04  Bruno Haible  <bruno@clisp.org>
17445
17446         * modules/README: New file.
17447         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
17448         not a module.
17449
17450 2004-10-02  Jim Meyering  <jim@meyering.net>
17451
17452         * lib/dirfd.h, getpagesize.h: Add copyright notice.
17453
17454 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
17455
17456         * modules/strsep: New file.
17457
17458 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
17459
17460         * m4/strsep.m4: New file.
17461
17462 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
17463
17464         * lib/strsep.h: New file.
17465         * lib/strsep.c: New file.
17466
17467 2004-10-01  Simon Josefsson  <jas@extundo.com>
17468
17469         * lib/snprintf.c (snprintf): Handle size==0.
17470
17471 2004-10-01  Simon Josefsson  <jas@extundo.com>
17472             Bruno Haible  <bruno@clisp.org>
17473
17474         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
17475         (snprintf): Declare 'args'.
17476
17477 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
17478
17479         * lib/snprintf.c: Remove comments as to why each header is needed.
17480
17481 2004-10-01  Bruno Haible  <bruno@clisp.org>
17482
17483         * MODULES.html.sh: Add strsep.
17484
17485 2004-09-30  Simon Josefsson  <jas@extundo.com>
17486
17487         * modules/snprintf: New file.
17488
17489 2004-09-30  Simon Josefsson  <jas@extundo.com>
17490
17491         * m4/snprintf.m4: New file.
17492
17493 2004-09-30  Simon Josefsson  <jas@extundo.com>
17494
17495         * lib/snprintf.h, lib/snprintf.c: New files.
17496
17497 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17498
17499         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
17500         (hol_entry_help): Never translate an empty string.
17501         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
17502         * lib/argp.h (OPTION_NO_TRANS): New option.
17503
17504 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
17505
17506         * modules/argp (Maintainer): Replace Simon Josefsson
17507         by Sergey Poznyakoff.
17508
17509 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
17510
17511         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
17512         changes merged back into glibc.
17513
17514 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
17515
17516         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
17517
17518 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
17519
17520         * lib/xvasprintf.c: Include xalloc.h.
17521         (xvasprintf): Use xalloc_die, not xmalloc_die.
17522
17523 2004-09-29  Bruno Haible  <bruno@clisp.org>
17524
17525         * modules/alloca-opt: New file, derived from modules/alloca.
17526         * modules/allocsa: Depend on alloca-opt instead of alloca.
17527         * modules/setenv: Likewise.
17528         * modules/vasnprintf: Likewise.
17529         * MODULES.html.sh: Add alloca-opt.
17530
17531 2004-09-28  Simon Josefsson  <jas@extundo.com>
17532
17533         * gnulib-tool: New parameter --lgpl, to asseert that modules are
17534         LGPL, and to replace license template from GPL to LGPL.
17535
17536 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
17537
17538         * modules/dummy: Change license to LGPL.
17539
17540 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
17541
17542         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
17543
17544 2004-09-24  Simon Josefsson  <jas@extundo.com>
17545
17546         * modules/minmax (License): Change from GPL to LGPL.
17547
17548 2004-09-23  Simon Josefsson  <jas@extundo.com>
17549
17550         * gnulib-tool (--import): Typo.
17551
17552 2004-09-23  Simon Josefsson  <jas@extundo.com>
17553
17554         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
17555
17556 2004-09-22  Bruno Haible  <bruno@clisp.org>
17557
17558         * modules/*: Add 'License' field.
17559         * gnulib-tool: Accept --extract-license option.
17560         (func_get_license): New function.
17561
17562 2004-09-21  Bruno Haible  <bruno@clisp.org>
17563
17564         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
17565         Reported by Simon Josefsson.
17566
17567 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
17568
17569         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
17570         gl_AC_TYPE_LONG_LONG.
17571
17572 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
17573
17574         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
17575
17576 2004-09-18  Simon Josefsson  <jas@extundo.com>
17577         and  Paul Eggert  <eggert@cs.ucla.edu>
17578
17579         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
17580         calls with autoreconf.  Define GL_LIB.
17581
17582 2004-09-14  Karl Berry  <karl@gnu.org>
17583
17584         * config/srclist.txt: unsync setenv.c, sigh.
17585
17586 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
17587
17588         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
17589         Problem reported by Bruno Haible in:
17590         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
17591
17592 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
17593
17594         * config/srclist.txt: Comment out argp-pvh.c.
17595
17596 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
17597
17598         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
17599         in case some system header has #define'd it.  Problem reported by
17600         Soeren D. Schulze in
17601         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
17602
17603 2004-09-09  Karl Berry  <karl@gnu.org>
17604
17605         * regex.[ch]: delete from the root.  These were supposed to be
17606                 synced with emacs cvs, but this has not happened for about
17607                 a year, and anyway nothing else uses emacs regex.[ch].
17608                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
17609                 lib/regex[.ch] is untouched.
17610
17611 2004-09-09  Bruno Haible  <bruno@clisp.org>
17612
17613         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
17614
17615 2004-09-09  Bruno Haible  <bruno@clisp.org>
17616
17617         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
17618         modifications.
17619         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
17620
17621 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
17622
17623         * modules/xvasprintf: New file.
17624         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
17625
17626 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
17627
17628         * lib/xvasprintf.h: New file.
17629         * lib/xvasprintf.c: New file.
17630         * lib/xasprintf.c: New file.
17631
17632 2004-09-08  Bruno Haible  <bruno@clisp.org>
17633
17634         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
17635
17636 2004-09-08  Bruno Haible  <bruno@clisp.org>
17637
17638         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
17639         length is > INT_MAX.
17640         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
17641         more.
17642
17643 2004-09-08  Bruno Haible  <bruno@clisp.org>
17644
17645         * lib/stdint_.h: New file, taken from GNU clisp.
17646
17647 2004-09-08  Bruno Haible  <bruno@clisp.org>
17648             Oskar Liljeblad  <oskar@osk.mine.nu>
17649
17650         * modules/stdint: New file.
17651         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
17652
17653 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
17654
17655         Import from coreutils.
17656         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
17657         strings on unbounded length.  alloca's performance benefits aren't
17658         that important here.
17659         (V_STRDUP): Remove.
17660         (parse_with_separator): New function, with most of the internals
17661         of the old parse_user_spec.  Allow user to omit both user and group,
17662         for compatibility with FreeBSD.
17663         Clone only the user name, not the entire spec.
17664         Do not set *uid, *gid unless entirely successful.
17665         Avoid memory leak in some failing cases.
17666         Fix regression for USER.GROUP reported by Dmitry V. Levin in
17667         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
17668         (parse_user_spec): Rewrite to use parse_with_separator.
17669
17670 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
17671
17672         * modules/userspec: Don't depend on alloca.
17673
17674 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
17675
17676         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
17677
17678 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
17679
17680         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
17681         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
17682         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
17683
17684 2004-08-16  Simon Josefsson  <jas@extundo.com>
17685
17686         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
17687         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
17688         Add --dry-run for --import.
17689         Let user provided command line parameters override configure.ac
17690         settings.
17691
17692 2004-08-12  Simon Josefsson  <jas@extundo.com>
17693
17694         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
17695         as discussed with Paul Eggert in threads rooted at
17696         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
17697         and
17698         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
17699         Before, the test was empty, and relied on ELIDE_CODE in source
17700         code.)
17701         (gl_PREREQ_GETOPT): New macro.
17702         (gl_GETOPT): Use them.
17703
17704 2004-08-12  Simon Josefsson  <jas@extundo.com>
17705
17706         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
17707         * lib/getopt_.h: Renamed from getopt.h.
17708
17709 2004-08-12  Simon Josefsson  <jas@extundo.com>
17710
17711         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
17712         Change default library name from libfoo to libgnu.
17713         Now, if you have a configure.ac that says:
17714                 gl_SOURCE_BASE(gl)
17715                 gl_M4_BASE(gl/m4)
17716                 gl_MODULES(error getopt etcetera)
17717                 gl_INIT
17718         you can import all you need by running:
17719                 ../gnulib/gnulib-tool --import
17720
17721         * modules/getopt (Files): Rename getopt.h to getopt_.h.
17722         (Makefile.am): Rewrite, use logic from argz.
17723         (Include): Use <getopt.h> instead of "getopt.h".
17724
17725 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
17726
17727         * modules/argp (Files): Add m4/unlocked-io.m4.
17728         (Depends-on): Add extensions.
17729
17730 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
17731
17732         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
17733         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
17734         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
17735         Check for program_invocation_name, program_invocation_short_name,
17736         flockfile, funlockfile, features.h, _getopt_long_only_r.
17737
17738 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
17739
17740         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
17741         its complicated substitute.
17742         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
17743         and program_invocation_name.
17744         (__argp_basename) [!_LIBC]: Remove; the only use was
17745         replaced by its body.
17746         (__argp_short_program_name): Change condition from
17747         !defined __argp_short_program_name to
17748         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
17749         to match argp-namefrob.h.
17750         (__argp_failure): Don't assume strerror_r returns char *.
17751         * lib/argp-parse.c (N_): Define unconditionally.
17752         (argp_default_options): Fill out initializers with 0 to avoid
17753         gcc warnings.
17754
17755 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
17756
17757         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
17758         getopt1.c.
17759
17760 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
17761
17762         Merge from coreutils.
17763
17764         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
17765
17766         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
17767         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
17768
17769 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
17770
17771         Merge from coreutils.
17772
17773         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
17774         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
17775         for Reliant Unix 5.43.
17776
17777         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
17778         (union fooround): Use uintmax_t, not long int.
17779         The rest is a merge from libc:
17780         [defined _LIBC]: Include <shlib-compat.h>.
17781         (_obstack) [defined _LIBC]: Remove after 2.3.4.
17782
17783         * lib/settime.c (settime): Recode to avoid warning with
17784         Sun Forte C 6U2.
17785
17786         * lib/strverscmp.c: Convert to UTF-8.
17787
17788 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
17789
17790         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
17791         m4/uintmax_t.m4.
17792
17793 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
17794
17795         * modules/xalloc-die: New file.
17796         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
17797
17798         * modules/md5 (Files): Add m4/uint32_t.m4.
17799         * modules/sha1: Renamed from modules/sha.
17800         (Files):
17801         Rename lib/sha.h to lib/sha1.h.
17802         Rename lib/sha.c to lib/sha1.c.
17803         Rename m4/sha.m4 to m4/sha1.m4.
17804         (lib_SOURCES): Likewise.
17805         (configure.ac): Rename gl_SHA to gl_SHA1.
17806         (Include): sha.h -> sha1.h.
17807
17808 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
17809
17810         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
17811         * m4/sha1.m4: Renamed from sha.m4.
17812         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
17813
17814 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
17815
17816         * lib/obstack.h (obstack_empty_p):
17817         Don't assume that chunk->contents is suitably aligned.
17818         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
17819         Likewise. Problem reported by Benno in
17820         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
17821
17822         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
17823         readable.  This could be improved further but it'd take some work.
17824
17825 2004-08-08  Simon Josefsson  <jas@extundo.com>
17826
17827         * modules/xgethostname (Depends-on): Remove exit and error (not
17828         used).
17829
17830         * modules/getpass-gnu: Add getpass.h.
17831         (Depends-on): Add stdbool.
17832         * modules/getpass: Add getpass.h.
17833
17834 2004-08-08  Simon Josefsson  <jas@extundo.com>
17835
17836         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
17837         Check getpass declaration.
17838
17839 2004-08-08  Simon Josefsson  <jas@extundo.com>
17840
17841         * lib/xgethostname.c: Don't include error.h (not used).
17842
17843         * lib/getpass.h: Add.
17844         * lib/getpass.c: Include getpass.h first.
17845
17846 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
17847
17848         * lib/xalloc-die.c: New file.
17849         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
17850         All uses removed.
17851         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
17852         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
17853         xalloc-die.c.
17854         (_, N_, xalloc_die): Move to xalloc-die.c.
17855         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
17856         so that we needn't mess with xalloc_msg_memory_exhausted.
17857
17858         * lib/sha1.h: Renamed from sha.h.
17859         (SHA1_H): Renamed from _SHA_H.
17860         (sha1_ctx): Renamed from sha_ctx.
17861         (sha1_init_ctx): Renamed from sha_init_ctx.
17862         (sha1_process_block): Renamed from sha_process_block.
17863         (sha1_process_bytes): Renamed from sha_process_bytes.
17864         (sha1_finish_ctx): Renamed from sha_finish_ctx.
17865         (sha1_read_ctx): Renamed from sha_read_ctx.
17866         (sha1_stream): Renamed from sha_stream.
17867         (sha1_buffer): Renamed from sha_buffer.
17868         * lib/sha1.c: Likewise; renamed from sha.c.
17869         Do not include <sys/types.h>.
17870         Include <stddef.h> rather than <stdlib.h>.
17871
17872 2004-08-08  Bruno Haible  <bruno@clisp.org>
17873
17874         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
17875         FILESYSTEM_PREFIX_LEN.
17876         * lib/progreloc.c: Likewise.
17877         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
17878
17879 2004-08-06  Simon Josefsson  <jas@extundo.com>
17880
17881         * modules/progname (Depends-on): Don't depend on stdbool.
17882
17883 2004-08-06  Simon Josefsson  <jas@extundo.com>
17884
17885         * modules/getsubopt: New file.
17886         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
17887         getsubopt.
17888
17889 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
17890
17891         More merge from coreutils.
17892
17893         * m4/utimens.m4, m4/utimecmp.m4: New files.
17894         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
17895         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
17896         prereq.m4, sha.m4: Import changes from coreutils.
17897
17898 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
17899
17900         More merge from coreutils.
17901         * modules/raise, modules/readtokens0, modules/utimens:
17902         * modules/utimecmp, module/xnanosleep: New files.
17903         * modules/strftime: Add lib/strftime.h.
17904         Change include from <time.h> to "strftime.h".
17905         * modules/yesno: Add lib/yesno.h.
17906         * modules/backupfile: Remove lib/addext.c.
17907         * modules/euidaccess: Add stat-macros.h.
17908         * modules/canonicalize, modules/euidaccess,
17909         modules/filemode, modules/lchown, modules/makepath,
17910         modules/rmdir, modules/stat: Likewise.
17911
17912 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
17913
17914         Merge from tar.
17915         * lib/argp-help.c (make_hol, hol_append): Don't assume that
17916         SIZE_MAX is a valid preprocessor constant.
17917         (__argp_basename): Change from "#ifndef _LIBC"
17918         to "#ifndef __argp_short_program_name", so that
17919         we don't compile these functions for tar.
17920
17921         More merges from coreutils.
17922         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
17923         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
17924         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
17925         * lib/addext.c: Remove; no longer needed.
17926         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
17927         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
17928         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
17929         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
17930         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
17931         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
17932         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
17933         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
17934         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
17935         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
17936         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
17937         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
17938         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
17939         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
17940         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
17941         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
17942         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
17943         Import changes from coreutils.
17944
17945 2004-08-05  Simon Josefsson  <jas@extundo.com>
17946
17947         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
17948
17949 2004-08-05  Simon Josefsson  <jas@extundo.com>
17950
17951         * m4/getsubopt.m4: New file.
17952
17953 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
17954
17955         Merge from coreutils.
17956
17957         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
17958         * m4/getcwd-path-max.m4: New files.
17959
17960         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
17961         FILESYSTEM_PREFIX_LEN ->
17962         FILE_SYSTEM_PREFIX_LEN.
17963         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
17964         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
17965         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
17966         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
17967
17968         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
17969         prerequisite modules now handle the DOS stuff.
17970         Don't check for unistd.h.
17971
17972 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
17973
17974         Merge from coreutils.
17975
17976         * lib/.gdb-history: Remove; this doesn't belong here.
17977
17978         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
17979         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
17980         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
17981         * lib/getcwd.c: New files.
17982
17983         * lib/dirname.h: Include <stdbool.h>.
17984         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
17985         for consistency with POSIX terminology.  All uses changed.
17986         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
17987         (strip_trailing_slashes): Use bool for booleans.
17988         * lib/stripslash.c (strip_trailing_slashes): Likewise.
17989
17990         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
17991         sometimes returns a positive errno value even when it succeeds.
17992         (print_errno_message) [!LIBC]: Fall back on strerror if
17993         __strerror_r fails.
17994
17995         * lib/path-concat.c (mempcpy): Don't define if a system header defines
17996         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
17997         (longest_relative_suffix): New function.
17998         (path_concat): Use it.  Assume first argument is not NULL.
17999         Port to DOS.  Omit redundant separators.
18000         Report an error instead of returning NULL.
18001         Use mempcpy instead of memcpy.
18002         (xpath_concat): Remove: not declared or used.
18003
18004         * lib/same.h: Include <stdbool.h>
18005         (same_name): Return bool, not int.
18006         * lib/same.c (same_name): Likewise.
18007         (errno): Don't declare; we assume C89 or better now.
18008
18009         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
18010         if not already defined.
18011
18012         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
18013         * lib/dup-safer.c (errno): Likewise.
18014
18015 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
18016
18017         Merge from coreutils.
18018         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
18019         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
18020         * modules/path-concat: Don't depend on strdup.
18021
18022 2004-08-03  Simon Josefsson  <jas@extundo.com>
18023
18024         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
18025         * lib/progname.h: Don't include stdbool.h.
18026
18027 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
18028
18029         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
18030         * MODULES.html.sh (func_all_modules): Remove fatal.
18031
18032 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
18033
18034         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
18035
18036 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
18037
18038         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
18039         working.
18040
18041 2004-08-02  Simon Josefsson  <jas@extundo.com>
18042
18043         * lib/getsubopt.h: New file, with comments from Bruno Haible.
18044         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
18045         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
18046
18047 2004-08-01  Simon Josefsson  <jas@extundo.com>
18048
18049         * lib/xgetdomainname.c: Include stdlib.h, for free().
18050
18051 2004-07-19  Bruno Haible  <bruno@clisp.org>
18052
18053         * MODULES.html.sh (func_all_modules): Add dummy.
18054
18055 2004-07-16  Simon Josefsson  <jas@extundo.com>
18056
18057         * modules/dummy: New file.
18058
18059 2004-07-16  Simon Josefsson  <jas@extundo.com>
18060
18061         * lib/dummy.c: New file.
18062
18063 2004-07-16  Bruno Haible  <bruno@clisp.org>
18064
18065         * lib/backupfile.h: Add extern "C" for C++.
18066         * lib/closeout.h: Likewise.
18067         * lib/copy-file.h: Likewise.
18068         * lib/findprog.h: Likewise.
18069         * lib/full-write.h: Likewise.
18070         * lib/pathname.h: Likewise.
18071         * lib/progname.h: Likewise.
18072         * lib/stpcpy.h: Likewise.
18073         * lib/stpncpy.h: Likewise.
18074         * lib/strcase.h: Likewise.
18075         * lib/strstr.h: Likewise.
18076         * lib/xalloc.h: Likewise.
18077
18078         * lib/mbswidth.h: Add extern "C" for C++.
18079         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
18080
18081 2004-07-13  Robert Millan  <robertmh@gnu.org>
18082
18083         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
18084
18085 2004-07-09  Simon Josefsson  <jas@extundo.com>
18086
18087         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
18088         failed without this.)
18089
18090 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
18091
18092         * modules/chown (Files): Add lib/fchown-stub.c, since
18093         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
18094
18095 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
18096
18097         * lib/fchown-stub.c: New file.
18098
18099 2004-06-24  Jim Meyering  <jim@meyering.net>
18100
18101         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
18102
18103 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
18104
18105         * modules/argz: Omit "#include".
18106
18107         * MODULES.html.sh (func_all_modules): Add calloc, to match
18108         2004-06-01 addition of calloc module.
18109
18110 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
18111
18112         * m4/argz.m4: New file, which is autoupdated from libtool.
18113
18114 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
18115
18116         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
18117         libtool.
18118
18119 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
18120
18121         * config/srclist-update: Don't insist on "USA." before the
18122         close-comment, as libtool omits the period and puts the */ on a
18123         separate line.
18124         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
18125         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
18126
18127 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
18128
18129         * modules/argz: New file.
18130         * MODULES.html.sh (func_all_modules): Add argz.
18131
18132 2004-06-12  Jim Meyering  <jim@meyering.net>
18133         and  Paul Eggert  <eggert@cs.ucla.edu>
18134
18135         * modules/hash (Files): Add lib/xalloc.h.
18136         * modules/pipe (Depends-on): Add wait-process.
18137         * modules/stat (Depends-on): Add xalloc.
18138         * modules/userspec (Files): Add lib/userspec.h.
18139         * modules/xstrto
18140
18141         Upgrade from gettext-0.13.
18142         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
18143         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
18144         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
18145
18146 2004-06-10  Jim Meyering  <jim@meyering.net>
18147
18148         * lib/calloc.c: New file.
18149
18150 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
18151
18152         * lib/getdate.y (yylex): Allow space between sign and number.
18153         Problem reported by Dan Jacobson.
18154
18155 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
18156
18157         Merge from coreutils CVS.
18158
18159         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
18160         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
18161         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
18162         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
18163         xstrtol.m4: Fix copyright date and/or serial number.
18164
18165         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
18166         See if we need an fchown replacement.
18167         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
18168         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
18169         and use the replacement function if we detect either defect.
18170
18171         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
18172         gl_UTIMECMP.
18173
18174 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
18175         and  Jim Meyering  <jim@meyering.net>
18176
18177         Merge from coreutils CVS.
18178
18179         * lib/stat-macros.h: New file, with contents from file-type.h
18180         and coreutils' system.h.
18181         * lib/file-type.c: Include "stat-macros.h".
18182         * lib/file-type.h (file_type): Move all macro definitions to new file,
18183         stat-macros.h.
18184
18185         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
18186         Wrap old code with this conditional.
18187         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
18188         function that does not dereference symlinks.
18189         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
18190
18191         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
18192         dependency problems.
18193         (xreadlink): Accept new arg SIZE, for efficiency.
18194         All decls and uses changed.
18195         * lib/xreadlink.h: Include <stddef.h>, for size_t.
18196
18197         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
18198         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
18199
18200         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
18201         sysexits.h.
18202
18203 2004-06-01  Jim Meyering  <jim@meyering.net>
18204
18205         * m4/calloc.m4: New file.
18206
18207 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
18208
18209         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
18210         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
18211         Also, fix a typo in a diagnostic.
18212
18213 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
18214
18215         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
18216         or AC_FUNC_REALLOC.
18217
18218 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
18219
18220         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
18221         macros to be defined.
18222         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
18223         the allocator returns NULL because the requested size is zero.
18224
18225 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
18226
18227         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
18228         var.  Add comment explaining why libc still defines it.  This
18229         merges the following patch from glibc:
18230         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
18231
18232 2004-05-20  Andreas Schwab  <schwab@suse.de>
18233
18234         * m4/free.m4: Replace free if it not known to work, not the other
18235         way round.
18236
18237 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
18238
18239         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
18240         present in glibc since revision 1.1 of this file.
18241         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
18242         obstack_alignment_mask, obstack_alloc, obstack_base,
18243         obstack_blank, obstack_blank_fast, obstack_chunk_size,
18244         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
18245         obstack_grow0, obstack_init, obstack_int_grow,
18246         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
18247         obstack_next_free, obstack_object_size, obstack_ptr_grow,
18248         obstack_ptr_grow_fast, obstack_room): Remove declarations of
18249         nonexistent functions.
18250
18251 2004-05-18  Karl Berry  <karl@gnu.org>
18252
18253         * config/srclist.txt: break link for vasnprintf.c.
18254
18255 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
18256
18257         Port obstack to the AS/400, where pointers are 16 bytes wide and
18258         you cannot cast an integer to a valid pointer.  This patch is
18259         currently waiting to be integrated into glibc; see
18260         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
18261
18262         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
18263         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
18264         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
18265         (struct obstack): temp member is now a union of a pointer and
18266         an integer, instead of an integer.  All integer uses changed.
18267         This does not affect the physical layout of struct obstack,
18268         except on hosts (like the AS/400) where the size or alignment of
18269         void * is greater than that of ptrdiff_t.
18270         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
18271         __STDC__)]: Store temporary in pointer member of union, not
18272         integer member.
18273         * lib/obstack.c: Include <stddef.h>, for offsetof.
18274         (struct fooalign): Remove; it doesn't need a name.
18275         (union fooround): Change double to long double, and add void *.
18276         (DEFAULT_ALIGNMENT): Use offsetof to compute.
18277         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
18278         not a macro.  Hence the values are always int; so remove all
18279         casts-to-int in uses.
18280
18281 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
18282
18283         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
18284         we can get this patch merged into glibc.
18285
18286 2004-05-17  Derek R. Price  <derek@ximbiot.com>
18287             Paul Eggert  <eggert@cs.ucla.edu>
18288
18289         * m4/argp: Depend on alloca.
18290
18291 2004-05-17  Derek R. Price  <derek@ximbiot.com>
18292             Paul Eggert  <eggert@cs.ucla.edu>
18293
18294         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
18295         freecoding.
18296
18297 2004-05-17  Bruno Haible  <bruno@clisp.org>
18298
18299         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
18300         precision that consists of a '.' followed by an empty digit string.
18301         Patch by Tor Lillqvist <tml@iki.fi>.
18302
18303 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
18304
18305         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
18306         for backward compatibility with older code.  We need our own
18307         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
18308         it under some other name, and our alloca.h will define it.
18309
18310 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
18311             Derek Price  <derek@ximbiot.com>
18312
18313         * lib/alloca.c: Include <alloca.h>, to get our interface.
18314         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
18315         include <alloca.h> first.  Use C89 prototype for alloca; this
18316         requires including <stddef.h> for size_t.  Use extern "C" if C++.
18317         Use #elif for simplicity, since we can assume C89 now.
18318         Don't try to source the system alloca.h since it will not be found
18319         and to prevent recursively including its replacement.
18320         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
18321         * lib/regex.c: Likewise.
18322
18323 2004-05-16  Derek Price  <derek@ximbiot.com>
18324             Paul Eggert  <eggert@cs.ucla.edu>
18325
18326         getline cleanup.  This changes the getndelim2 API: both order of
18327         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
18328         no delimiter).
18329
18330         * lib/getline.c: Don't include stddef.h or stdio.h, since our
18331         interface does that.
18332         (getline): Always use getdelim, so that we don't have two
18333         copies of this code.
18334         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
18335         if available.
18336         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
18337         (GETNDELIM2_MAXIMUM): New macro.
18338         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
18339         instead of the old practice of delim2==0.  All callers changed.
18340         Return -1 on overflow, instead of returning junk.
18341         Do not set *linesize unless allocation succeeds.
18342         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
18343         that we include sys/types.h.
18344         * lib/getnline.h: Likewise.
18345         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
18346         (getndelim2): Reorder arguments.
18347         * lib/getnline.c (getnline, getndelim):
18348         Don't discard the NMAX argument.
18349         (getnline): Invoke getndelim, to avoid code duplication.
18350         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
18351         of (size_t) -1 by callers of the getnline family.
18352
18353 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
18354
18355         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
18356         Check for gettimeofday.
18357         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
18358         Check for settimeofday, stime.
18359
18360 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
18361
18362         * lib/nanosleep.c (suspended): Change its type from int to
18363         sig_atomic_t volatile.
18364         (first_call): Make it private to rpl_nanosleep, and have it
18365         be zero initially as that's a bit faster.
18366         (my_usleep): Round up fractional times instead of truncating them,
18367         as this is the usual meaning for 'sleep'.
18368
18369         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
18370         doesn't work.
18371         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
18372         (ENOSYS): Define if not defined.
18373         (settime): Fall back on stime if it exists and settimeofday fails.
18374         But don't bother with fallbacks if a method fails with errno == EPERM.
18375
18376 2004-05-11  Jim Meyering  <jim@meyering.net>
18377
18378         Prior to this change, the save_cwd caller required read access to the
18379         current directory on most systems (ones with the fchdir function).
18380
18381         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
18382         fails, try write-only, and finally, resort to using xgetcwd.
18383
18384 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
18385
18386         * lib/obstack.c, obstack.h: Import changes from libc.
18387
18388 2004-04-28  Bruno Haible  <bruno@clisp.org>
18389
18390         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
18391         also implicitly appends .exe to executables.
18392         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
18393         accepts Windows pathnames.
18394         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
18395         Treat Cygwin like Windows, since it now accepts Windows pathnames.
18396         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
18397         Treat Cygwin like Windows, since it now accepts Windows pathnames.
18398         Reported by Derek Robert Price <derek@ximbiot.com>.
18399
18400 2004-04-21  Karl Berry  <karl@gnu.org>
18401
18402         * config/srclist.txt (localcharset.c): break sync.
18403
18404 2004-04-20  Paul Eggert  <eggert@twinsun.com>
18405
18406         * m4/host-os.m4: Add a copyright notice.
18407
18408 2004-04-20  Jim Meyering  <jim@meyering.net>
18409
18410         Change UTILS_ to gl_ in AC_DEFINE'd names.
18411         Change utils_- and jm_-prefixed variables, too.
18412         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
18413         UTILS_FUNC_MKDIR_TRAILING_SLASH.
18414         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
18415
18416         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
18417         Don't emit trailing blanks.
18418         Also rename jm_-prefixed variables to have gl_ prefix.
18419
18420         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
18421         Also rename jm_-prefixed variables to have gl_ prefix.
18422
18423         * m4/jm-macros.m4: Reflect the renamings.
18424         * m4/prereq.m4: Likewise.
18425
18426 2004-04-20  Jim Meyering  <jim@meyering.net>
18427
18428         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
18429         memory.
18430
18431 2004-04-20  Jim Meyering  <jim@meyering.net>
18432             Bruno Haible  <bruno@clisp.org>
18433
18434         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
18435         memory when realloc fails.
18436
18437 2004-04-19  Jim Meyering  <jim@meyering.net>
18438
18439         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
18440         now that readutmp.c may call `free (0)'.
18441
18442 2004-04-19  Bruno Haible  <bruno@clisp.org>
18443
18444         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
18445         * m4/inttypes_h.m4: Likewise.
18446         * m4/stdint_h.m4: Likewise.
18447         * m4/intmax_t.m4: Likewise.
18448         * m4/uintmax_t.m4: Likewise.
18449
18450 2004-04-18  Jim Meyering  <jim@meyering.net>
18451
18452         * m4/prereq.m4: Don't forbid jm_ prefix.
18453
18454         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
18455         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
18456         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
18457         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
18458         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
18459         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
18460         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
18461         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
18462         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
18463         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
18464         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
18465         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
18466         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
18467         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
18468         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
18469         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
18470         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
18471         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
18472         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
18473
18474 2004-04-18  Jim Meyering  <jim@meyering.net>
18475
18476         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
18477         failure, don't leak memory and do call END_UTMP_ENT.
18478
18479 2004-04-16  Jim Meyering  <jim@meyering.net>
18480
18481         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
18482         coreutils' stat program.
18483         (gl_PREREQ): Don't require jm_PREREQ_STAT.
18484
18485 2004-04-11  Paul Eggert  <eggert@twinsun.com>
18486
18487         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
18488         C89.
18489         (CHAR_BIT): Remove, since we assume C89.
18490         Include <stdint.h> if available, as per current Autoconf CVS advice.
18491
18492 2004-03-31  Jim Meyering  <jim@meyering.net>
18493
18494         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
18495         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
18496         * m4/xalloc.m4: Likewise.
18497
18498 2004-03-30  Paul Eggert  <eggert@twinsun.com>
18499
18500         Merge from coreutils.
18501
18502         * m4/inttostr.m4: New file.
18503         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
18504         Require AM_STDBOOL_H and gl_TIMESPEC instead.
18505         Require gl_CLOCK_TIME.
18506         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
18507
18508 2004-03-30  Paul Eggert  <eggert@twinsun.com>
18509
18510         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
18511         not bool, to be more consistent with Unix conventions.
18512         Suggested by Bruno Haible.
18513
18514         Merge from coreutils.
18515
18516         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
18517         * lib/umaxtostr.c: New files.
18518
18519         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
18520         the usual <time.h> dance.
18521         (get_date): Change signature to support fractional time stamps.
18522         All callers changed.
18523         * lib/getdate.y: Include "getdate.h" first, as we can now
18524         assume C89 and don't need to worry about 'const'.
18525         Similarly, include "unlocked-io.h" near start, not in middle.
18526         Include <limits.h>.
18527         (textint.value): Use long int rather than int.
18528         (textint.digits): Use size_t rather than int.
18529         (BILLION, LOG10_BILLION): New constants.
18530         (parser_control): New member rel_ns.  Members day_ordinal,
18531         time_zone, month, day, hour, minutes, rel_year, rel_month,
18532         rel_day, rel_hour, rel_minutes, rel_seconds
18533         are now long int, not int.  Member seconds is now struct timespec,
18534         not int.  New member timespec_seen.  Members dates_seen, days_seen,
18535         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
18536         not int.
18537         (%union.intval): Now long int, not int.
18538         New member timespec.
18539         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
18540         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
18541         (spec): Now is a timespec or an item list.
18542         (timespec, items): New nonterminals.
18543         (time, rel, relunit, number, get_date):
18544         Add support for fractional seconds.
18545         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
18546         (gmtime, localtime, mktime): Remove decls; not needed with C89.
18547         (to_hour): First arg is now long int, not int.
18548         (to_year): Returns long int, not int.
18549         Don't treat year -70 like 70.
18550         (tm_diff): Returns long int, not int.
18551         (lookup_word): Use bool instead of int when appropriate.
18552         (yylex): Use size_t for count, not int.
18553         Detect overflow when parsing large integer constants.
18554         Add support for fractions.
18555         (get_date): Make pointers 'const' if possible.
18556         Use more-portable code to detect integer overflow.
18557         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
18558         Don't use ctime; it's not reliable if the year has >4 digits.
18559
18560         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
18561         This is for compatibility with BSD.
18562
18563         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
18564         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
18565         From coreutils' system.h.
18566
18567         * lib/userspec.c: Don't include "posixver.h".
18568         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
18569         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
18570         compatible extension.  Simplify code by removing a boolean int
18571         that was always nonzero if a string was nonnull.
18572
18573 2004-03-30  Jim Meyering  <jim@meyering.net>
18574
18575         Merge from coreutils.
18576
18577         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
18578         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
18579         on some systems one must include <grp.h> before it.
18580         Reported by Christian Krackowizer.
18581
18582 2004-03-30  Jim Meyering  <jim@meyering.net>
18583
18584         Merge from coreutils.
18585
18586         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
18587
18588         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
18589         an empty input stream.
18590
18591         * lib/readtokens.c: Include <stdbool.h>.
18592         (readtoken): Use `size_t' rather than int/long.
18593         All callers adjusted.
18594         Use `bool' rather than `int' where appropriate.
18595         Use memset rather than an explicit loop.
18596         Use x2nrealloc rather than xrealloc.
18597         Allow the use of `\0' as a delimiter.
18598         (readtokens): Likewise.
18599         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
18600
18601 2004-03-30  Jim Meyering  <jim@meyering.net>
18602
18603         * m4/realloc.m4: Remove file, since now it does no more than
18604         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
18605         the `configure.ac' section of module/realloc.
18606         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
18607
18608 2004-03-30  Bruno Haible  <bruno@clisp.org>
18609
18610         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
18611         nonnull.
18612
18613 2004-03-29  Paul Eggert  <eggert@twinsun.com>
18614
18615         Merge changes to getloadavg.c from coreutils and Emacs.
18616
18617         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
18618         Define to an expression, not to the empty string.
18619         Include cloexec.h and xalloc.h.
18620         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
18621         Use set_cloexec_flag rather than rolling our own.
18622         * lib/cloexec.c, lib/cloexec.h: New files.
18623
18624 2004-03-29  Paul Eggert  <eggert@twinsun.com>
18625
18626         * m4/cloexec.m4: New file.
18627
18628 2004-03-18  Paul Eggert  <eggert@twinsun.com>
18629
18630         * lib/getopt.h: Sync with libc CVS.
18631
18632 2004-03-18  Paul Eggert  <eggert@twinsun.com>
18633             Bruno Haible  <bruno@clisp.org>
18634
18635         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
18636         mbswidth.
18637
18638 2004-03-18  Paul Eggert  <eggert@twinsun.com>
18639             Bruno Haible  <bruno@clisp.org>
18640
18641         * lib/mbswidth.h: Include <wchar.h> only if
18642         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
18643         <wchar.h>.
18644         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
18645
18646 2004-03-09  Paul Eggert  <eggert@twinsun.com>
18647
18648         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
18649         Sync with libc CVS.
18650         * lib/getopt_int.h: New file, also synced from libc.
18651
18652 2004-03-09  Paul Eggert  <eggert@twinsun.com>
18653
18654         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
18655         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
18656         Bring back getopt.c, getopt.h, getopt1.c.
18657
18658 2004-03-07  Paul Eggert  <eggert@twinsun.com>
18659
18660         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
18661         All uses changed.  Check for sa_sigaction member; this fixes
18662         a bug first reported by Jason Andrade in
18663         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
18664
18665 2004-03-07  Paul Eggert  <eggert@twinsun.com>
18666
18667         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
18668         '#if' expressions.  Unlike the code it replaces, it does not
18669         depend on (defined _SC_PAGESIZE).  However, it does depend on
18670         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
18671         first reported by Jason Andrade in
18672         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
18673
18674 2004-02-25  Simon Josefsson  <jas@extundo.com>
18675
18676         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
18677
18678 2004-02-25  Simon Josefsson  <jas@extundo.com>
18679
18680         * lib/strdup.h: New file.
18681         * lib/strdup.c: Include it.
18682         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
18683         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
18684
18685 2004-02-23  Karl Berry  <karl@gnu.org>
18686
18687         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
18688         (from fencepost.gnu.org:/gd/gnuorg).
18689
18690 2004-02-23  Karl Berry  <karl@gnu.org>
18691
18692         * config/srclistvars.sh (GNUORG) [karl]: redefine.
18693         * config/srclist.txt: add maintain/standards documents.
18694
18695 2004-02-18  Bruno Haible  <bruno@clisp.org>
18696
18697         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
18698         Reported by Derek Robert Price <derek@ximbiot.com>.
18699
18700 2004-02-16  Karl Berry  <karl@gnu.org>
18701
18702         * config/mkinstalldirs, install-sh: update from automake.
18703
18704 2004-02-06  Karl Berry  <karl@gnu.org>
18705
18706         * m4/po.m4: update from gettext 0.14.1.
18707
18708 2004-02-06  Karl Berry  <karl@gnu.org>
18709
18710         * lib/config.charset: update from gettext 0.14.1.
18711
18712 2004-02-05  Paul Eggert  <eggert@twinsun.com>
18713
18714         Add comments and code, prompted by suggestions from Bruno Haible
18715         for sh-quote.
18716         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
18717         describing the enum quoting_style values.
18718         * lib/quotearg.c (quotearg_alloc): New function.
18719         (quotearg_buffer_restyled): Treat lone { and } as special.
18720         Treat = as special.  Work around bug with older shells
18721         that "see" a '\' that is really the 2nd byte of a multibyte char.
18722         Quote empty string with shell_quoting_style.
18723
18724 2004-02-03  Bruno Haible  <bruno@clisp.org>
18725
18726         * m4/pipe.m4: New file, from GNU gettext.
18727
18728 2004-02-03  Bruno Haible  <bruno@clisp.org>
18729
18730         * lib/pipe.h: New file, from GNU gettext.
18731         * lib/pipe.c: New file, from GNU gettext.
18732
18733 2004-01-27  Bruno Haible  <bruno@clisp.org>
18734
18735         * m4/execute.m4: New file, from GNU gettext.
18736
18737 2004-01-27  Bruno Haible  <bruno@clisp.org>
18738
18739         * lib/execute.h: New file, from GNU gettext.
18740         * lib/execute.c: New file, from GNU gettext.
18741         * lib/w32spawn.h: New file, from GNU gettext.
18742
18743 2004-01-24  Paul Eggert  <eggert@twinsun.com>
18744
18745         Merge from diffutils.
18746
18747         * lib/file-type.c (file_type): Add typed memory objects.
18748         * lib/file-type.h (S_TYPEISTMO): New macro.
18749
18750         * lib/c-stack.h (c_stack_action): Remove argv argument.
18751         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
18752         (die): Don't calculate message unless segv_action returns.
18753         (get_stack_location, min_address_from_argv, max_address_from_argv,
18754         volatile stack_base, volatile_stack_size): Remove.
18755         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
18756         that every segmentation violation is a stack overflow.  (Ouch!)
18757         See Debian bug 136249 (still outstanding) for more info about why
18758         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
18759
18760 2004-01-24  Paul Eggert  <eggert@twinsun.com>
18761
18762         Exit-status fix from coreutils.
18763
18764         Use exit_failure consistently in place of EXIT_FAILURE,
18765         so that program exit statuses are consistent on failure.
18766
18767         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
18768         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
18769         * lib/argmatch.h: Comment fix to match the above.
18770         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
18771         Now a macro referring to exit_failure, instead of a separate
18772         variable.  Include "exitfail.h" to get it.
18773         * lib/xstrtol.h: Include "exitfail.h".
18774         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
18775
18776         * lib/long-options.c (parse_long_options): Use prototype
18777         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
18778         for clarity.
18779
18780 2004-01-21  Jim Meyering  <jim@meyering.net>
18781
18782         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
18783         so as not to conflict with a different-sized __mktime_internal
18784         function in GNU libc.
18785         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
18786         Problem building statically-linked `ls' reported by Michael Brunnbauer.
18787
18788 2004-01-20  Karl Berry  <karl@gnu.org>
18789
18790         * config/config.guess: update from config.
18791
18792         * config/srclistvars.sh: GNUWWWLICENSES for karl.
18793
18794 2004-01-20  Bruno Haible  <bruno@clisp.org>
18795
18796         Safer stack allocation.
18797         * lib/setenv.c: Include allocsa.h.
18798         (alloca): Remove fallback definition.
18799         (freea): Remove macro.
18800         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
18801         instead of freea.
18802
18803 2004-01-20  Bruno Haible  <bruno@clisp.org>
18804
18805         * m4/eealloc.m4: New file, from GNU gettext.
18806
18807 2004-01-20  Bruno Haible  <bruno@clisp.org>
18808
18809         * m4/allocsa.m4: New file, from GNU gettext.
18810
18811 2004-01-20  Bruno Haible  <bruno@clisp.org>
18812
18813         * lib/xallocsa.h: New file, from GNU gettext.
18814         * lib/xallocsa.c: New file, from GNU gettext.
18815
18816 2004-01-20  Bruno Haible  <bruno@clisp.org>
18817
18818         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
18819
18820 2004-01-20  Bruno Haible  <bruno@clisp.org>
18821
18822         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
18823         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
18824         specially.
18825
18826 2004-01-20  Bruno Haible  <bruno@clisp.org>
18827
18828         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
18829         patch.
18830
18831 2004-01-20  Bruno Haible  <bruno@clisp.org>
18832
18833         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
18834
18835 2004-01-20  Bruno Haible  <bruno@clisp.org>
18836
18837         * lib/eealloc.h: New file.
18838
18839 2004-01-20  Bruno Haible  <bruno@clisp.org>
18840
18841         * lib/binary-io.h: Avoid warnings on Cygwin.
18842
18843 2004-01-20  Bruno Haible  <bruno@clisp.org>
18844
18845         * lib/allocsa.h: New file, from GNU gettext.
18846         * lib/allocsa.c: New file, from GNU gettext.
18847
18848 2004-01-18  Karl Berry  <karl@gnu.org>
18849
18850         * doc/gpl.texi, doc/lgpl.texi: new files.
18851
18852 2004-01-18  Karl Berry  <karl@gnu.org>
18853
18854         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
18855         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
18856
18857 2004-01-15  Paul Eggert  <eggert@twinsun.com>
18858
18859         Merge from coreutils.
18860
18861         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
18862         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
18863         (gl_DEFAULT_POSIX2_VERSION): Move
18864         the documentation from 'configure' into 'config.hin',
18865         so that 'configure --help' isn't burdened by it and
18866         we don't have to worry about its formatting there.
18867         Reword the documentation so that it's more succinct
18868         and can be run together into a single paragraph.
18869         * m4/same.m4 (gl_SAME): Check for pathconf.
18870
18871 2004-01-15  Paul Eggert  <eggert@twinsun.com>
18872
18873         Merge from coreutils.
18874
18875         * lib/posixver.c: Include posixver.h.
18876
18877         * lib/same.c: Include <stdbool.h>, <limits.h>.
18878         (_POSIX_NAME_MAX): Define if not defined.
18879         (MIN): New macro.
18880         (same_name): If file names are silently truncated, report
18881         that the file names are the same if they are the same after
18882         the silent truncation.
18883
18884         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
18885         conversion function.
18886         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
18887         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
18888         longer needed.
18889
18890 2004-01-15  Jim Meyering  <jim@meyering.net>
18891
18892         Merge from coreutils.
18893
18894         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
18895         if no library is required.
18896         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
18897         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
18898         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
18899         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
18900         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
18901         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
18902         value, $ac_cv_search_crypt, if it's "none required".
18903         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
18904         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
18905         not gl_FUNC_GETLOADAVG.
18906         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
18907         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
18908
18909 2004-01-15  Jim Meyering  <jim@meyering.net>
18910
18911         Merge from coreutils.
18912
18913         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
18914         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
18915         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
18916
18917         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
18918         optional configure-time default.
18919
18920         * lib/version-etc.c (version_etc_copyright): Update copyright date.
18921
18922         * lib/xreadlink.c (xreadlink): Correct outdated comment.
18923
18924 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
18925
18926         Merge from coreutils.
18927
18928         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
18929         value, $ac_cv_search_nanosleep, if it's "none required".
18930
18931 2004-01-14  Paul Eggert  <eggert@twinsun.com>
18932
18933         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
18934         with like-named macro in fnmatch.c.
18935         (EXT): Use an internal constant instead.
18936
18937         Merge fnmatch patches from glibc.
18938         * lib/fnmatch.c (mbsinit): Remove define.
18939         Add libc_hidden_ver (__fnmatch, fnmatch).
18940         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
18941         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
18942
18943 2004-01-14  Karl Berry  <karl@gnu.org>
18944
18945         * config/install-sh: update from automake.
18946
18947 2004-01-13  Karl Berry  <karl@gnu.org>
18948
18949         * config/install-sh: update from automake.
18950
18951 2004-01-09  Karl Berry  <karl@gnu.org>
18952
18953         * config/install-sh: update from automake.
18954
18955 2004-01-05  Karl Berry  <karl@gnu.org>
18956
18957         * config/config.{sub,guess}: update from config.
18958
18959 2003-12-31  Karl Berry  <karl@gnu.org>
18960
18961         * config/depcomp: update from automake.
18962
18963 2003-12-14  Karl Berry  <karl@gnu.org>
18964
18965         * lib/config.charset: update from gettext-runtime.
18966
18967 2003-12-03  Paul Eggert  <eggert@twinsun.com>
18968
18969         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
18970         Bug reported by Alfred M. Szmidt.
18971
18972 2003-12-03  Bruno Haible  <bruno@clisp.org>
18973
18974         * m4/gettext.m4: Upgrade from gettext-0.13.
18975         * m4/po.m4: Upgrade from gettext-0.13.
18976         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
18977         * m4/intmax.m4: New file, from gettext-0.13.
18978         * m4/printf-posix.m4: New file, from gettext-0.13.
18979
18980 2003-11-29  Karl Berry  <karl@gnu.org>
18981
18982         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
18983
18984 2003-11-25  Paul Eggert  <eggert@twinsun.com>
18985             Bruno Haible  <bruno@clisp.org>
18986
18987         * lib/printf-parse.h: Don't include sys/types.h.
18988         (ARG_NONE): New macro.
18989         (char_directive): Change type of *arg_index fields to size_t.
18990         * lib/printf-parse.c: Don't include sys/types.h.
18991         (SSIZE_MAX): Remove macro.
18992         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
18993         Remove unnecessary overflow check.
18994         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
18995         fields.
18996
18997 2003-11-25  Bruno Haible  <bruno@clisp.org>
18998
18999         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
19000
19001 2003-11-25  Bruno Haible  <bruno@clisp.org>
19002
19003         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
19004         gt_TYPE_SSIZE_T.
19005
19006 2003-11-24  Paul Eggert  <eggert@twinsun.com>
19007
19008         * modules/alloca: Remove dependency on xalloc.
19009
19010 2003-11-24  Paul Eggert  <eggert@twinsun.com>
19011
19012         * lib/alloca.c: Remove dependency on xalloc module.
19013         (xalloc_die): Remove.
19014         (memory_full) [!defined emacs]: New macro.
19015         [!defined emacs]: Don't include xalloc.h.
19016         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
19017         address arithmetic overflows.  Change datatypes a bit to avoid
19018         unnecessary casts.
19019
19020 2003-11-22  Jim Meyering  <jim@meyering.net>
19021
19022         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
19023         s/size/size_t/.
19024
19025 2003-11-21  Karl Berry  <karl@gnu.org>
19026
19027         * config/config.{sub,guess}: update from config.
19028
19029 2003-11-18  Karl Berry  <karl@gnu.org>
19030
19031         * config/config.{sub,guess}: update from config.
19032
19033         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
19034
19035 2003-11-17  Paul Eggert  <eggert@twinsun.com>
19036
19037         * README: Mention that S+T cannot overflow if S is the size of
19038         an existing object and T is sufficiently small.
19039
19040 2003-11-17  Jim Meyering  <jim@meyering.net>
19041
19042         On systems without utime and without a utimes function capable of
19043         dealing with a NULL struct utimbuf* argument, this utime replacement
19044         could -- in unusual circumstances -- leak a file descriptor.
19045         * lib/utime.c: Include <unistd.h> and <errno.h>.
19046         (utime_null): Be sure to close `fd' and to preserve errno.
19047         Reported by Geoff Collyer via Arnold Robbins.
19048
19049 2003-11-17  Bruno Haible  <bruno@clisp.org>
19050
19051         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
19052         (Depends-on): Add xsize.
19053
19054 2003-11-17  Bruno Haible  <bruno@clisp.org>
19055
19056         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
19057
19058 2003-11-17  Bruno Haible  <bruno@clisp.org>
19059
19060         * lib/vasnprintf.c (alloca): Remove fallback definition.
19061         (freea): Remove definition.
19062         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
19063         Reported by Paul Eggert.
19064
19065 2003-11-16  Paul Eggert  <eggert@twinsun.com>
19066             Bruno Haible  <bruno@clisp.org>
19067
19068         Protect against address arithmetic overflow.
19069         * lib/printf-args.h: Include stddef.h.
19070         (arguments): Change type of field 'count' to size_t.
19071         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
19072         'unsigned int' where appropriate.
19073         * lib/printf-parse.h: Include sys/types.h.
19074         (char_directive): Change type of *arg_index fields to ssize_t.
19075         (char_directives): Change type of fields 'count', max_*_length to
19076         size_t.
19077         * lib/printf-parse.c: Include sys/types.h and xsize.h.
19078         (SSIZE_MAX): Define fallback value.
19079         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
19080         instead of 'int' where appropriate. Check a_allocated, d_allocated
19081         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
19082         * lib/vasnprintf.c: Include xsize.h.
19083         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
19084         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
19085         overflow. Avoid wraparound when converting a width or precision from
19086         decimal to binary.
19087
19088 2003-11-16  Bruno Haible  <bruno@clisp.org>
19089
19090         Update from GNU gettext.
19091         * lib/printf-parse.c: Generalize to it can be compiled for wide
19092         strings.
19093         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
19094         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
19095         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
19096         SNPRINTF): New macros.
19097         Don't include <alloca.h> if the file is used inside libintl.
19098         (local_wcslen): New function, for Solaris 2.5.1.
19099         (VASNPRINTF): Use it instead of wcslen.
19100
19101 2003-11-16  Bruno Haible  <bruno@clisp.org>
19102
19103         * lib/xsize.h (xmax): New function.
19104         (xsum, xsum3, xsum4): Declare as "pure" functions.
19105
19106 2003-11-12  Paul Eggert  <eggert@twinsun.com>
19107
19108         * modules/xalloc (Files): Undo latest change, since xalloc.h
19109         no longer needs SIZE_MAX or PTRDIFF_MAX.
19110
19111 2003-11-12  Paul Eggert  <eggert@twinsun.com>
19112
19113         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
19114         gl_PTRDIFF_MAX.
19115
19116 2003-11-12  Paul Eggert  <eggert@twinsun.com>
19117
19118         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
19119         "return", to pacify some unknown compiler.  Problem reported
19120         by Joerg Schilling.
19121
19122 2003-11-12  Paul Eggert  <eggert@twinsun.com>
19123
19124         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
19125         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
19126         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
19127         heuristic is just as accurate as far as we know, and it removes a
19128         dependency on size_max.m4 and ptrdiff_max.m4.
19129
19130 2003-11-11  Bruno Haible  <bruno@clisp.org>
19131
19132         * modules/xsize (Files): Add m4/size_max.m4.
19133         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
19134
19135 2003-11-11  Bruno Haible  <bruno@clisp.org>
19136
19137         * m4/size_max.m4: New file.
19138         * m4/ptrdiff_max.m4: New file.
19139         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
19140         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
19141         (gl_XALLOC): Invoke it.
19142
19143 2003-11-11  Bruno Haible  <bruno@clisp.org>
19144
19145         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
19146         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
19147         defined.
19148
19149 2003-11-10  Paul Eggert  <eggert@twinsun.com>
19150
19151         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
19152         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
19153         rejected some allocations of exactly SIZE_MAX - 2 bytes.
19154         From Bruno Haible.
19155         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
19156         not (size_t) -1, since it's defined here.
19157
19158 2003-11-09  Karl Berry  <karl@gnu.org>
19159
19160         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
19161
19162 2003-11-06  Paul Eggert  <eggert@twinsun.com>
19163
19164         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
19165         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
19166         Reject sizes of exactly SIZE_MAX bytes.
19167         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
19168         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
19169
19170 2003-11-05  Bruno Haible  <bruno@clisp.org>
19171
19172         * lib/xsize.h: Include limits.h, to avoid a possible collision with
19173         SIZE_MAX defined in <limits.h> on Solaris.
19174
19175 2003-11-04  Jim Meyering  <jim@meyering.net>
19176
19177         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
19178         variable names, rather than @VAR@.
19179         * modules/poll: Likewise.
19180
19181 2003-11-04  Bruno Haible  <bruno@clisp.org>
19182
19183         * modules/xsize: New file.
19184         * modules/linebreak: Depend on xsize.
19185         * MODULES.html.sh (func_all_modules): Add xsize.
19186
19187 2003-11-04  Bruno Haible  <bruno@clisp.org>
19188
19189         * m4/xsize.m4: New file.
19190
19191 2003-11-04  Bruno Haible  <bruno@clisp.org>
19192
19193         * lib/xsize.h: New file.
19194         * lib/linebreak.c: Include xsize.h.
19195         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
19196         argument for overflow.
19197         Suggested by Paul Eggert.
19198
19199 2003-11-03  Karl Berry  <karl@gnu.org>
19200
19201         * config/config.{guess,sub}: update from config.
19202
19203 2003-11-03  Jim Meyering  <jim@meyering.net>
19204
19205         * modules/userspec (lib_SOURCES): Add userspec.h.
19206         (Include): Add "userspec.h".
19207         Improve description.
19208
19209 2003-11-03  Jim Meyering  <jim@meyering.net>
19210
19211         * lib/userspec.c: Include "userspec.h".
19212         * lib/userspec.h: New file.
19213
19214 2003-11-03  Bruno Haible  <bruno@clisp.org>
19215
19216         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
19217
19218 2003-11-03  Bruno Haible  <bruno@clisp.org>
19219
19220         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
19221         available, to avoid (extremely rare) race condition.
19222         Suggested by Paul Eggert.
19223
19224 2003-11-02  Karl Berry  <karl@gnu.org>
19225
19226         * config/srclist.txt (vasprintf.c): sync broken, sigh.
19227
19228 2003-10-31  Paul Eggert  <eggert@twinsun.com>
19229
19230         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
19231         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
19232         (read_filesystem_list): Set and use me_type_malloced.
19233         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
19234         whatever the type happens to be), for brevity and consistency.
19235         Check for size calculation overflow on Alphas running OSF/1.
19236
19237 2003-10-31  Jim Meyering  <jim@meyering.net>
19238
19239         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
19240
19241         * lib/linebuffer.c: Include <string.h> for declaration of memset.
19242
19243 2003-10-30  Paul Eggert  <eggert@twinsun.com>
19244             Bruno Haible  <bruno@clisp.org>
19245
19246         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
19247         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
19248
19249 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
19250
19251         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
19252         netbsd*-gnu*.  Suggested by Robert Millan.
19253
19254 2003-10-29  Paul Eggert  <eggert@twinsun.com>
19255
19256         * modules/group-member: Depend on stdbool.
19257
19258 2003-10-29  Paul Eggert  <eggert@twinsun.com>
19259
19260         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
19261
19262 2003-10-29  Paul Eggert  <eggert@twinsun.com>
19263
19264         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
19265         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
19266         after the 'gnu' in these cases.  This fixes some bugs in the
19267         previous change, and is based on suggestions by Robert Millan.
19268
19269 2003-10-29  Paul Eggert  <eggert@twinsun.com>
19270
19271         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
19272         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
19273         no longer needed.
19274         * lib/quotearg.c (quotearg_n_options): Use it.
19275         * lib/group-member.c: Include <stdbool.h>.
19276         (free_group_info): Arg is now const *; don't free arg.
19277         (get_group_info): Now returns bool and accepts struct group_info *,
19278         rather than returning a malloc'ed struct group_info *.
19279         All uses changed.  Check for overflow in internal size calculation.
19280
19281         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
19282         rather than xmalloc/xrealloc.
19283         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
19284         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
19285         conformance bug: the old code used a pointer after freeing the
19286         storage that it addressed.
19287         * lib/hash.c (hash_initialize): Simplify the code by using
19288         xalloc_oversized rather than doing it by hand.
19289         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
19290         the buffer preserved.  Use free and xmalloc instead.
19291         * lib/quotearg.c (quotearg_n_options): Likewise.
19292         Use a simpler test for size overflow.  Don't use xalloc_oversized
19293         because unsigned int might be wider than size_t (!); this suggests
19294         that we should switch from unsigned int to size_t for slot numbers.
19295
19296 2003-10-28  Paul Eggert  <eggert@twinsun.com>
19297
19298         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
19299         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
19300         NetBSD kernels.  Requested by Richard Stallman.
19301
19302 2003-10-27  Paul Eggert  <eggert@twinsun.com>
19303
19304         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
19305         to allocate the returned structure.  Do not allocate a subarray,
19306         as x2nrealloc will do that.
19307         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
19308         instead of xnrealloc.
19309         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
19310
19311 2003-10-27  Bruno Haible  <bruno@clisp.org>
19312
19313         * lib/stdbool_.h: Better support for BeOS.
19314
19315 2003-10-26  Paul Eggert  <eggert@twinsun.com>
19316
19317         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
19318         now uses inline.
19319
19320 2003-10-26  Paul Eggert  <eggert@twinsun.com>
19321
19322         * lib/xalloc.h (xalloc_oversized): New static inline function, for
19323         callers that want to do their own size-overflow checking.  Include
19324         <stdbool.h>, since xalloc_oversized returns bool.
19325         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
19326         to use xalloc_oversized.
19327
19328         Add two functions x2realloc, x2nrealloc, for programs that grow
19329         arrays dynamically by doubling their sizes.
19330         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
19331         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
19332         New functions.
19333
19334         Port to C99 semantics for 'inline' of external functions.
19335         Bug reported by Bruno Haible.
19336         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
19337         with the old contents of xnmalloc.
19338         (xnmalloc, xmalloc): Use it.
19339         (xnrealloc_inline): New static inline function,
19340         with the old contents of xnrealloc.
19341         (xnrealloc, xrealloc): Use it.
19342
19343         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
19344         that.
19345
19346 2003-10-26  Karl Berry  <karl@gnu.org>
19347
19348         * config/srclist.txt (COPYING.DOC): no longer available from
19349         /gd/gnuorg; don't know where the ultimate source is.
19350
19351 2003-10-25  Paul Eggert  <eggert@twinsun.com>
19352
19353         Fix several address-calculation bugs in the hash modules,
19354         plus some minor code cleanup.
19355
19356         * lib/hash.h: Include <stdbool.h>, for bool.
19357         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
19358         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
19359         hash_get_n_entries, hash_get_max_bucket_length,
19360         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
19361         hash_rehash): Use size_t rather than unsigned.
19362         * lib/hash.c (struct hash_table, hash_get_n_buckets,
19363         hash_get_n_buckets_used, hash_get_n_entries,
19364         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
19365         hash_get_entries, hash_do_for_each, hash_string, is_prime,
19366         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
19367         Likewise.
19368         (SIZE_MAX): Define if not defined.
19369         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
19370         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
19371         hash_print):
19372         Use const * when possible.
19373         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
19374         (check_tuning): Fix bug: if tuning parameters were very close to
19375         0 or 1, rounding errors could have caused subscript violations.
19376         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
19377         (hash_initialize): Add 'fail:' label
19378         to free table and return NULL, and use it to simplify code.
19379         Use calloc rather than clearing the storage ourself.
19380         (hash_initialize, hash_rehash): Check for arithmetic overflow in
19381         buffer size calculations.
19382         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
19383         Include <stddef.h>, for size_t.
19384         * lib/hash-pjw.c (hash_pjw): Likewise.
19385         Switch to method described by Bruno Haible.
19386         Include <limits.h>, for CHAR_BIT.
19387         (SIZE_BITS): New macro.
19388
19389 2003-10-23  Paul Eggert  <eggert@twinsun.com>
19390
19391         * m4/getline.m4 (AM_FUNC_GETLINE):
19392         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
19393         hosts.  Problem reported by Derek Robert Price in
19394         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
19395         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
19396         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
19397
19398 2003-10-21  Paul Eggert  <eggert@twinsun.com>
19399
19400         * lib/getndelim2.c (getndelim2): When size calculation overflows,
19401         ceiling the allocation at NMAX bytes rather than silently
19402         discarding input bytes before NMAX is reached.  This makes
19403         a difference only if NMAX exceeds SIZE_MAX / 2.
19404
19405         * lib/obstack.c: Merge from glibc.
19406         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
19407         Add libc_hidden_def (_obstack_newchunk).
19408         (_obstack_free) [! defined _LIBC]: Remove.
19409         [defined _LIBC]: Make a strong alias from obstack_free, rather than
19410         a clone of the function body.
19411         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
19412         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
19413
19414         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
19415         glibc.
19416         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
19417         arg to memcpy.
19418
19419         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
19420         (obstack_ptr_grow_fast, obstack_int_grow_fast):
19421         Don't use lvalue casts, as GCC plans to remove support for them
19422         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
19423         was also present in the non-GCC version, indicating that this
19424         code had always been buggy and had never been widely used.
19425         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
19426         Use the fast variant of each macro, rather than copying the
19427         definiens of the fast variant; that way, we'll be more likely to
19428         catch future bugs in the fast variants.
19429
19430 2003-10-20  Bruno Haible  <bruno@clisp.org>
19431
19432         * modules/wait-process: New file.
19433         * MODULES.html.sh (func_all_modules): Add wait-process.
19434
19435 2003-10-20  Bruno Haible  <bruno@clisp.org>
19436
19437         * m4/wait-process.m4: New file.
19438
19439 2003-10-20  Bruno Haible  <bruno@clisp.org>
19440
19441         * lib/wait-process.h: New file, from GNU gettext.
19442         * lib/wait-process.c: New file, from GNU gettext.
19443
19444 2003-10-19  Jim Meyering  <jim@meyering.net>
19445
19446         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
19447         HPUX 10.20.
19448
19449 2003-10-18  Karl Berry  <karl@gnu.org>
19450
19451         * config/config.guess: update from config.
19452
19453 2003-10-16  Paul Eggert  <eggert@twinsun.com>
19454
19455         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
19456         (getgroups): First arg is int, not size_t.
19457         Don't let 'free' mangle errno.
19458
19459 2003-10-16  Paul Eggert  <eggert@twinsun.com>
19460
19461         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
19462
19463 2003-10-16  Karl Berry  <karl@gnu.org>
19464
19465         * config/config.{guess,sub}: update from config.
19466
19467 2003-10-16  Jim Meyering  <jim@meyering.net>
19468
19469         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
19470         memcpy.
19471
19472 2003-10-15  Paul Eggert  <eggert@twinsun.com>
19473
19474         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
19475         (SIZE_MAX): Remove.
19476         (new_exclude, add_exclude_file): Initial size no longer needs to
19477         be a power of 2.
19478         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
19479         our own address arithmetic overflow checking.
19480
19481         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
19482         (fnmatch): Do not alloca more than 2000 wide characters;
19483         instead, use malloc for large buffers.
19484         Check for address arithmetic overflow, and return -1
19485         with errno set to ENOMEM in that case.
19486         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
19487         (NEW_PATTERN): Do not alloca more than 8000 bytes;
19488         instead, return -1.  Check for address arithmetic overflow.
19489
19490 2003-10-14  Paul Eggert  <eggert@twinsun.com>
19491
19492         Handle invalid suffixes and overflow independently, so that
19493         callers can treat them independently as needed.  Fix some bugs in
19494         suffix handling, e.g., "100k@" was not diagnosed as an invalid
19495         suffix for a human-readable blocksize.  The major caller-visible
19496         change is the addition of a new
19497         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
19498         that both overflow and suffix chars were found.
19499
19500         * lib/human.c (humblock): Don't check separately for invalid suffix
19501         char; that is xstrtoumax's job (now that its bug is fixed).
19502         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
19503         INTMAX_MAX]: New macros.
19504         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
19505         TYPE_MAXIMUM): New macros.
19506         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
19507         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
19508         if overflow occurs, as it's what __strtol does and it's more useful
19509         in practice.
19510         (__xstrtol): If __strtol reports some error other than ERANGE,
19511         reflect it to the caller as LONGINT_INVALID.  If it reports
19512         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
19513         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
19514         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
19515         value.
19516         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
19517         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
19518         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
19519         [defined UINTMAX_MAX]: New macros.
19520
19521 2003-10-14  Bruno Haible  <bruno@clisp.org>
19522
19523         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
19524
19525 2003-10-14  Bruno Haible  <bruno@clisp.org>
19526
19527         * m4/sig_atomic_t: New file, from GNU gettext.
19528         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
19529
19530 2003-10-14  Bruno Haible  <bruno@clisp.org>
19531
19532         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
19533         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
19534         Also use volatile where needed.
19535
19536 2003-10-12  Paul Eggert  <eggert@twinsun.com>
19537
19538         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
19539         Change maintainer from Bruno Haible to 'all'.
19540
19541 2003-10-12  Paul Eggert  <eggert@twinsun.com>
19542
19543         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
19544
19545 2003-10-12  Paul Eggert  <eggert@twinsun.com>
19546
19547         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
19548         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
19549         and define in terms of the other primitives.
19550         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
19551         (SIZE_MAX): Define if not already defined.
19552         (array_size_overflow): New function.
19553         (xalloc_die): Abort instead of exiting if 'error' returns.
19554         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
19555         (xmalloc, xrealloc): Use them.
19556         (xcalloc): Check for address arithmetic overflow.
19557         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
19558         a bit faster than strcpy.
19559
19560 2003-10-10  Simon Josefsson  <jas@extundo.com>
19561
19562         * modules/argp (Depends-on): Add restrict and strcase.
19563
19564 2003-10-10  Simon Josefsson  <jas@extundo.com>
19565
19566         * m4/argp.m4: Add AC_C_INLINE.
19567
19568 2003-10-08  Paul Eggert  <eggert@twinsun.com>
19569
19570         Merge getpass from libc, plus a few fixes.
19571
19572         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
19573         Include <stdbool.h>.
19574         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
19575         __fsetlocking to empty.
19576         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
19577         do include <bits/libc-lock.h>.
19578         Do not include <fcntl.h>; not needed.
19579         [_LIBC]: Include <wchar.h>.
19580         (NOTCANCEL_MODE): New macro.
19581         (flockfile, funlockfile) [_LIBC]: New macros.
19582         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
19583         [!_LIBC]: New macros.
19584         (call_fclose): New function.
19585         (getpass): Use it.  Save tty stream separately; this simplifies the
19586         code and makes it more reliable if stdin happens to equal stdout.
19587         Invoke __fsetlocking on tty.
19588         Handle thread cancellation if needed.
19589         Namespace cleanup (use __tcgetattr, __getline).
19590         Use bool for Booleans.
19591         [USE_IN_LIBIO]: Handle wide streams.
19592         [!_LIBC]: Unconditionally do the fseek, since we don't know what
19593         stream might go where.
19594
19595         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
19596         doesn't have to include <stdio.h> before us.
19597         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
19598         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
19599         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
19600         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
19601         if not declared, so that we can use getpass.c code from libc without
19602         rewriting it.
19603         (flockfile, ftrylockfile, funlockfile): New macros.
19604
19605 2003-10-08  Paul Eggert  <eggert@twinsun.com>
19606
19607         * modules/getpass: Depend on stdbool.
19608
19609 2003-10-08  Paul Eggert  <eggert@twinsun.com>
19610
19611         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
19612
19613 2003-10-07  Karl Berry  <karl@gnu.org>
19614
19615         * config/config.{guess,sub}: update from config.
19616
19617 2003-10-06  Jim Meyering  <jim@meyering.net>
19618             Bruno Haible  <bruno@clisp.org>
19619
19620         This lets translators provide better translations for the
19621         "Written by ..." part of --version output.
19622         * lib/version-etc.h: Include stdarg.h.
19623         (version_etc_copyright): Declare as readonly.
19624         (version_etc): Make this function variadic with a NULL-terminated list
19625         of author name strings.
19626         (version_etc_va): New declaration.
19627         * lib/version-etc.c: Include stdarg.h, stdlib.h.
19628         (version_etc_copyright): Declare as readonly.
19629         (version_etc_va): New function. Provide a different translatable string
19630         for each possible number of authors < 10. Abbreviate when there are 10
19631         authors or more.
19632         (version_etc): Make this function variadic. Call version_etc_va.
19633         Suggestion from Gary V. Vaughan.
19634
19635         * lib/long-options.h (parse_long_options): Change prototype: the
19636         authors string is moved to the end and becomes variadic.
19637         * lib/long-options.c: Include stdarg.h.
19638         (parse_long_options): Make this function variadic, too.
19639         Call version_etc_va, not version_etc.
19640
19641 2003-10-06  Bruno Haible  <bruno@clisp.org>
19642
19643         * modules/version-etc-2: Remove file.
19644         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
19645
19646 2003-10-06  Bruno Haible  <bruno@clisp.org>
19647
19648         * modules/fatal-signal: New file.
19649         * MODULES.html.sh (func_all_modules): Add fatal-signal.
19650
19651 2003-10-06  Bruno Haible  <bruno@clisp.org>
19652
19653         * m4/fatal-signal.m4: New file.
19654         * m4/signalblocking.m4: New file, from GNU gettext.
19655
19656 2003-10-06  Bruno Haible  <bruno@clisp.org>
19657
19658         * lib/version-etc-2.h: Remove file.
19659         * lib/version-etc-2.c: Remove file.
19660
19661 2003-10-06  Bruno Haible  <bruno@clisp.org>
19662
19663         * lib/fatal-signal.h: New file, from GNU gettext.
19664         * lib/fatal-signal.c: New file, from GNU gettext.
19665
19666 2003-10-05  Paul Eggert  <eggert@twinsun.com>
19667
19668         * README: Rework advice for preventing empty .o files.
19669         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
19670         not <sys/types.h>.
19671
19672 2003-10-04  Karl Berry  <karl@gnu.org>
19673
19674         * lib/argp*: update from libc.
19675
19676 2003-10-04  Karl Berry  <karl@gnu.org>
19677
19678         * config/config.{guess,sub}: update from config.
19679
19680 2003-10-02  Bruno Haible  <bruno@clisp.org>
19681
19682         * modules/lchown (Include): Add lchown.h.
19683         * modules/time_r (Include): Use "..." syntax.
19684         * modules/xgetdomainname (Include): Add xgetdomainname.h.
19685
19686 2003-10-01  Simon Josefsson  <jas@extundo.com>
19687
19688         * MODULES.html.sh (func_all_modules): Move gethostname from section
19689         'based on' to section 'lacking' POSIX:2001.
19690
19691 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
19692
19693         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
19694         to output mode on the same stream.
19695
19696 2003-09-29  Paul Eggert  <eggert@twinsun.com>
19697
19698         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
19699         Fix arg typo in previous patch.
19700
19701 2003-09-28  Jim Meyering  <jim@meyering.net>
19702
19703         * lib/error.c: Correct cpp indentation.
19704
19705 2003-09-27  Paul Eggert  <eggert@twinsun.com>
19706
19707         * modules/free: New file.
19708
19709 2003-09-27  Paul Eggert  <eggert@twinsun.com>
19710
19711         * m4/free.m4: New file.
19712
19713 2003-09-27  Paul Eggert  <eggert@twinsun.com>
19714
19715         * lib/minmax.h (MIN, MAX)
19716         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
19717         Omit the special code that used __typeof__, since we worry that
19718         it could be more trouble than it's worth.  See:
19719         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
19720         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
19721
19722         * lib/free.c: New file.
19723
19724 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
19725
19726         Trivial fixes to Makefile.am parts of module listings.
19727         * modules/strstr: Append strstr.h to lib_SOURCES.
19728         * modules/strcase: Likewise, for strcase.h.
19729
19730 2003-09-27  Karl Berry  <karl@gnu.org>
19731
19732         * config/mkinstalldirs: update from automake.
19733
19734 2003-09-26  Paul Eggert  <eggert@twinsun.com>
19735
19736         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
19737         (error_tail): Do not loop, reallocating temporary buffer, since
19738         the output cannot contain more wide characters than the input
19739         contains bytes, the size must be big enough already.  This avoids
19740         one potential size overflow calculation.  Check for size overflow
19741         when calculating temporary buffer size.  Free temporary buffer
19742         when done, if it was allocated with malloc; this plugs a memory
19743         leak.  Remove casts from void * to pointers, that are no longer
19744         needed now that we're assuming C89 or better.
19745
19746         Merge error changes from glibc.
19747
19748         * lib/error.c, error.h: Update copyright notice header to match glibc.
19749         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
19750         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
19751         Disable cancellation while printing error.
19752         * lib/error.h: Prepend __ to parameter names.
19753
19754 2003-09-26  Jim Meyering  <jim@meyering.net>
19755
19756         * lib/error.c (error_tail): Move some declarations
19757         into inner scope where the local variables are used.
19758
19759 2003-09-26  Bruno Haible  <bruno@clisp.org>
19760
19761         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
19762         stpncpy().
19763         Don't define stpncpy through config.h; it's now done through stpncpy.h.
19764
19765 2003-09-26  Bruno Haible  <bruno@clisp.org>
19766
19767         * lib/stpncpy.h (gnu_stpncpy): New declaration.
19768         (stpncpy): Define as alias for gnu_stpncpy.
19769         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
19770
19771 2003-09-25  Simon Josefsson  <jas@extundo.com>
19772
19773         * lib/xgetdomainname.h: New file.
19774         * lib/xgetdomainname.c: New file.
19775
19776 2003-09-25  Simon Josefsson  <jas@extundo.com>
19777             Bruno Haible  <bruno@clisp.org>
19778
19779         * modules/getdomainname: New file.
19780         * modules/xgetdomainname: New file.
19781         * MODULES.html.sh (func_all_modules): Add getdomainname,
19782         xgetdomainname.
19783
19784 2003-09-25  Simon Josefsson  <jas@extundo.com>
19785             Bruno Haible  <bruno@clisp.org>
19786
19787         * m4/getdomainname.m4: New file.
19788
19789 2003-09-25  Simon Josefsson  <jas@extundo.com>
19790             Bruno Haible  <bruno@clisp.org>
19791
19792         * lib/getdomainname.h: New file.
19793         * lib/getdomainname.c: New file.
19794
19795 2003-09-25  Karl Berry  <karl@gnu.org>
19796
19797         * lib/argp-fmtstream.c, argp-help.c: update from libc.
19798
19799 2003-09-25  Karl Berry  <karl@gnu.org>
19800
19801         * config/install-sh: update from automake.
19802
19803 2003-09-25  Bruno Haible  <bruno@clisp.org>
19804
19805         * modules/version-etc-2: New file, from modules/version-etc with
19806         modifications.
19807         * MODULES.html.sh (func_all_modules): Add version-etc-2.
19808
19809 2003-09-25  Bruno Haible  <bruno@clisp.org>
19810
19811         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
19812         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
19813
19814 2003-09-24  Simon Josefsson  <jas@extundo.com>
19815
19816         * modules/xgethostname: Add xgethostname.h.
19817
19818 2003-09-24  Paul Eggert  <eggert@twinsun.com>
19819
19820         * lib/linebuffer.c (freebuffer): Don't free the argument, just
19821         the buffer associated with the argument.  Bug reported by
19822         Simon Josefsson.
19823
19824 2003-09-24  Paul Eggert  <eggert@twinsun.com>
19825
19826         * README: Document assumptions that 'int' is at least 32 bits
19827         wide, that integer arithmetic is 2's complement without overflow,
19828         that there are no holes in integer values, that adding sizes of
19829         two nonoverlapping objects can't overflow, and that all-bits-zero
19830         yields scalar zero.  Fix spelling and capitalization typos.
19831
19832 2003-09-19  Karl Berry  <karl@gnu.org>
19833
19834         * lib/argp.h: update from libc.
19835
19836 2003-09-17  Paul Eggert  <eggert@twinsun.com>
19837
19838         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
19839         to avoid spurious warnings like "AC_RUN_IFELSE was called before
19840         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
19841
19842 2003-09-17  Paul Eggert  <eggert@twinsun.com>
19843
19844         * gnulib-tool: Use "test -h", not "test -L", for portability
19845         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
19846         (tags_regexp): Remove, since \| doesn't conform to POSIX.
19847         (sed_extract_prog): Issue s commands one-by-one, rather than
19848         using \| in one s command.
19849
19850 2003-09-16  Paul Eggert  <eggert@twinsun.com>
19851
19852         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
19853         input error, instead of returning NULL the next time we are called
19854         (and therefore losing track of errno).
19855
19856 2003-09-16  Bruno Haible  <bruno@clisp.org>
19857
19858         * gnulib-tool (func_create_testdir): Warn about duplicated
19859         dependencies.
19860
19861 2003-09-15  Paul Eggert  <eggert@twinsun.com>
19862
19863         * modules/argmatch, modules/fatal, modules/obstack,
19864         modules/xalloc, modules/xgethostname: Sort dependencies by
19865         importance, not alphabetically.
19866
19867 2003-09-15  Paul Eggert  <eggert@twinsun.com>
19868
19869         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
19870         fails, so that the caller gets the proper errno.
19871
19872         * lib/readutmp.c (read_utmp): Likewise.
19873         Check for fstat error.  Close stream and free storage
19874         when failing.
19875
19876 2003-09-14  Karl Berry  <karl@gnu.org>
19877
19878         * config/srclist.txt (strdup.c): disable for c89 changes.
19879
19880 2003-09-14  Jim Meyering  <jim@meyering.net>
19881
19882         * lib/getloadavg.c: Correct cpp indentation.
19883         * lib/strdup.c: Likewise.
19884         * lib/vasnprintf.c: Likewise.
19885
19886 2003-09-14  Bruno Haible  <bruno@clisp.org>
19887
19888         * modules/fwriteerror: New file.
19889         * MODULES.html.sh (func_all_modules): Add fwriteerror.
19890
19891 2003-09-14  Bruno Haible  <bruno@clisp.org>
19892
19893         * lib/fwriteerror.h: New file.
19894         * lib/fwriteerror.c: New file.
19895
19896 2003-09-12  Paul Eggert  <eggert@twinsun.com>
19897
19898         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
19899         modules/xgethostname, modules/xalloc: Depend on exit.
19900
19901 2003-09-12  Paul Eggert  <eggert@twinsun.com>
19902
19903         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
19904
19905         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
19906         and AC_MINIX, too, so that their extensions are available.
19907
19908         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
19909         This macro has been superseded by gl_BACKUPFILE.
19910
19911         More patches to assume C89 or better.
19912
19913         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
19914
19915         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
19916         unconditionally.
19917         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
19918         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
19919         Include <string.h>, <stdlib.h> unconditionally.
19920         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
19921         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
19922         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
19923         headers or for string.h.
19924         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
19925         or strtoul.
19926
19927         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
19928         headers.
19929         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
19930         * m4/userspec.m4 (gl_USERSPEC): Likewise.
19931         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
19932         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
19933         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
19934         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
19935         memcpy, memset.
19936         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
19937         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
19938         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
19939         strtol.
19940         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
19941         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
19942         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
19943         strtoul.
19944
19945 2003-09-12  Paul Eggert  <eggert@twinsun.com>
19946
19947         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
19948         * lib/obstack.c [!defined _LIBC]: Likewise.
19949         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
19950         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
19951         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
19952
19953         More changes to assume C89 or better.
19954
19955         * lib/error.c (error_tail): Assume vprintf.
19956
19957         * lib/argmatch.c (getenv): Remove decl.
19958         * lib/progreloc.c (get_full_program_name): Define via prototype.
19959         * lib/setenv.c (clearenv): Likewise.
19960         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
19961         needed.
19962         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
19963         (malloc, memcpy): Remove decls.
19964         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
19965         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
19966         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
19967         (memcpy): Remove macro.
19968         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
19969         (__P): Remove.  All uses removed.
19970         (PTR): Remove.  All uses changed to void *.
19971         (CHAR_BIT, NULL): Remove.
19972         (spaces, zeros, memset_space, memset_zero)
19973         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
19974         Remove.
19975         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
19976         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
19977         Define with prototype.
19978         Remove now-unnecessary prototype decl.
19979         (extra_args_spec): Assume ANSI C.  All uses changed.
19980         (extra_args_spec_iso): Remove.
19981         (my_strftime, emacs_strftimeu): Define via prototype.
19982         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
19983         unconditionally.
19984         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
19985         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
19986         (strtoul, strtol): Remove decls.
19987         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
19988         LONG_MAX): Remove.
19989         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
19990         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
19991         (LOCALE_PARAM_PROTO): New macro.
19992         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
19993         (INTERNAL (strtol), strtol): Define with a prototype.
19994         (PARAMS): Remove.  All uses removed.
19995         * lib/tempname.c: Include <string.h> unconditionally.
19996         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
19997         * lib/xgethostname.c (main): Define with a prototype.
19998         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
19999         Include <stdlib.h> unconditionally.
20000         (calloc, malloc, realloc, free): Remove decls.
20001         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
20002         Include <stdlib.h> unconditionally.  Sort include file names.
20003         (strtod): Remove.
20004         (xstrtod): Define with a prototype.
20005         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
20006         (strtol, strtoul): Remove decls.
20007
20008 2003-09-11  Paul Eggert  <eggert@twinsun.com>
20009
20010         More patches to assume C89 or better.
20011         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
20012         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
20013         string.h, memchr, STDC_HEADERS.
20014
20015 2003-09-11  Paul Eggert  <eggert@twinsun.com>
20016
20017         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
20018         Include <stdlib.h>, <string.h> unconditionally.
20019         Remove now-unnecessary cast to char *.
20020         * lib/strnlen.c: Include <string.h> unconditionally.
20021         * lib/yesno.c (yesno): Define with a prototype.
20022
20023 2003-09-11  Bruno Haible  <bruno@clisp.org>
20024
20025         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
20026
20027 2003-09-10  Jim Meyering  <jim@meyering.net>
20028
20029         * lib/error.c: Correct indentation of cpp directives.
20030
20031 2003-09-10  Bruno Haible  <bruno@clisp.org>
20032
20033         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
20034         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
20035         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
20036         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
20037         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
20038         <stdlib.h> and <string.h> checks.
20039         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
20040         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
20041
20042 2003-09-10  Bruno Haible  <bruno@clisp.org>
20043
20044         * lib/strcspn.c: Include <string.h> unconditionally.
20045         * lib/strpbrk.c: Include <string.h> unconditionally.
20046         * lib/strstr.c: Include <string.h> unconditionally.
20047         * lib/unicodeio.c: Include <string.h> unconditionally.
20048         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
20049         * lib/unsetenv.c: Likewise.
20050         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
20051         * lib/yesno.c: Include <stdlib.h> unconditionally.
20052         (rpmatch): Add prototype.
20053
20054 2003-09-09  Paul Eggert  <eggert@twinsun.com>
20055
20056         More patches to assume C89 or better.
20057         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
20058         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
20059         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
20060         or for string.h.
20061         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
20062         stdlib.h.
20063         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
20064         C headers.
20065         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
20066         string.h.
20067         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
20068         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
20069         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
20070         or for string.h.
20071         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
20072         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
20073         C headers.
20074         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
20075         memcpy.
20076         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
20077         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
20078         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
20079         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
20080         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
20081         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
20082         string.h, free.
20083         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
20084         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
20085         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
20086         C headers, or for string.h.
20087         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
20088         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
20089         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
20090         headers, memory.h, stdlib.h, string.h, strings.h.
20091         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
20092         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
20093         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
20094         strchr.
20095         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
20096         headers, memory.h, string.h.
20097         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
20098         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
20099         free.
20100         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
20101         headers.
20102         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
20103         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
20104         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
20105         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
20106         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
20107
20108 2003-09-09  Paul Eggert  <eggert@twinsun.com>
20109
20110         More K&R removal.
20111
20112         * lib/acosl.c (main): Use a prototype.
20113         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
20114         tanl.c: Likewise.
20115
20116         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
20117
20118         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
20119         (getopt, etopt_long, getopt_long_only, _getopt_internal)
20120         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
20121         with a prototype.
20122         * lib/getopt.c (const): Remove macro.
20123         Include <string.h> unconditionally.
20124         (my_index): Remove; all uses changed to strchr.
20125         (strlen): Remove decl.
20126         (exchange): Remove forward decl; no longer needed.
20127         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
20128         Define with prototype.
20129         * lib/getopt1.c (const): Remove macro.
20130         (getopt_long, getopt_long_only, main): Define with prototype.
20131
20132         * lib/getugroups.c: Include <string.h> unconditionally.
20133
20134         * lib/getusershell.c: Include <stdlib.h> unconditionally.
20135         (getusershell, setusershell, endusershell, readname, main):
20136         Define with prototypes.
20137
20138         * lib/group-member.c: Include group-member.h first.
20139         Include <stdlib.h> unconditionally.
20140
20141         * lib/hard-locale.c: Include hard-locale.h first.
20142         Include <stdlib.h>, <string.h> unconditionally.
20143
20144         * lib/hash.c (free, malloc): Remove decls.
20145         Include <stdlib.h> unconditionally.
20146
20147         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
20148         (getenv): Do not declare.
20149
20150         * lib/idcache.c: Include <string.h> unconditionally.
20151
20152         * lib/long-options.c: Include long-options.h first, to test interface.
20153         Include <stdlib.h> unconditionally.
20154
20155         * lib/makepath.c: Include makepath.h first, to test interface.
20156         Include <stdlib.h> and <string.h> unconditionally.
20157
20158         * lib/linebuffer.c: Include <stdlib.h>.
20159         (free): Remove decl.
20160
20161         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
20162         stddef.h. rpl_malloc returns void *, not char *.
20163         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
20164         prototype.
20165
20166         * lib/md5.h: Include <limits.h> unconditionally.
20167         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
20168         (__P): Remove; all uses removed.
20169         * lib/md5.c: Include "md5.h" first.
20170         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
20171         md5_buffer, md5_process_bytes, md5_process_block):
20172         Define with prototypes.
20173         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
20174         * lib/sha.c: Include "sha.h" first.
20175         Include <stdlib.h>, <string.h> unconditionally.
20176
20177         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
20178         * lib/memcmp.c (__ptr_t): Likewise.
20179         * lib/memrchr.c (__ptr_t): Likewise.
20180         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
20181         Include <string.h> unconditionally.
20182         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
20183         * lib/memchr.c: Include <stdlib.h> unconditionally.
20184         * lib/memchr.c (LONG_MAX): Remove.
20185         * lib/memrchr.c (LONG_MAX): Likewise.
20186         * lib/memchr.c (__memchr): Define via a prototype.
20187         * lib/memrchr.c (__memrchr): Likewise.
20188         * lib/memcmp.c (__P): Remove, and remove all uses.
20189         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
20190         Remove forward decls; no longer needed.
20191         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
20192         Use types required by C89 in prototype.
20193
20194         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
20195         * lib/savedir.c: Likewise.
20196         * lib/mkdir.c (free): Remove decl.
20197         * lib/rmdir.c (rmdir): Define with a prototype.
20198         * lib/savedir.c: Include savedir.h first, to test interface.
20199
20200         * lib/mktime.c (STDC_HEADERS): Remove.
20201         Include <stdlib.h>, <string.h> unconditionally.
20202
20203         * lib/modechange.c: Include <stdlib.h> unconditionally.
20204         (malloc): Remove decl.
20205
20206         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
20207         (free): Remove decl.
20208
20209         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
20210         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
20211         (This type really should be intptr_t, but that's a C99ism.)
20212         (_obstack_memcpy): Remove: all uses changed to memcpy.
20213         Include <string.h> unconditionally.
20214         (struct obstack): Assume __STDC__ for types of members
20215         chunkfun, freefun, extra_arg.
20216         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
20217         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
20218         obstack_begin, obstack_specify_allocation,
20219         obstack_specify_allocation_with_arg, obstack_chunkfun,
20220         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
20221         Remove unprototyped decls and the macros that use them.
20222         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
20223         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
20224         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
20225         (defined __STDC__ && __STDC__)]:
20226         Remove nonprototyped code.
20227         Include <stdlib.h> unconditionally.
20228         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
20229         _obstack_allocated_p, _obstack_free, obstack_free,
20230         _obstack_memory_used, print_and_abort):
20231         Define using prototypes.
20232         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
20233         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
20234         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
20235         obstack_next_free, obstack_object_size, obstack_room) [0]:
20236         Remove unused, unprototyped code.
20237
20238         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
20239
20240         * lib/physmem.c (physmem_total, physmem_available, main): Define
20241         with prototypes.
20242
20243         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
20244         (main): Define with a prototype.
20245
20246         * lib/posixver.c (getenv): Remove decl.
20247
20248         * lib/putenv.c (malloc): Returns void *, not char *.
20249         Include <string.h> unconditionally.
20250         (strchr, memcpy, NULL): Do not define.
20251
20252         * lib/readtokens.c: Include readtokens.h first, to test interface.
20253         Include <stdlib.h>, <string.h> unconditionally.
20254         (init_tokenbuffer): Define with a prototype.
20255
20256         * lib/regex.c (PARAMS): Remove.  All uses removed.
20257         All uses of _RE_ARGS removed, too.
20258         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
20259         unconditionally.
20260         (bzero): Assume memset exists.
20261         (memcmp, memcpy, NULL): Remove.
20262         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
20263         char, or assignments to local vars of type signed char.
20264         (init_syntax_once, PREFIX(extract_number_and_incr),
20265         PREFIX(print_partial_compiled_pattern),
20266         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
20267         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
20268         PREFIX(regex_grow_registers), PREFIX(regex_compile),
20269         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
20270         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
20271         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
20272         wcs_compile_range, byte_compile_range, truncate_wchar,
20273         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
20274         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
20275         count_mbs_length, wcs_re_match_2_internal,
20276         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
20277         PREFIX(alt_match_null_string_p),
20278         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
20279         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
20280         regfree, PREFIX(extract_number)): Define with prototype.  Remove
20281         now-unnecessary declaration, if any.
20282         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
20283         regcomp, regexec):
20284         Remove now-unnecessary casts among pointer types.
20285         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
20286
20287         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
20288         (free): Remove decl.
20289
20290         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
20291
20292         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
20293         (free): Remove decl.
20294
20295         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
20296         * lib/xgetcwd.c: Likewise.
20297
20298         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
20299         (free): Remove decl.
20300
20301         * lib/strchrnul.c (strchrnul): Define with a prototype.
20302         Fix bug: c_in was not converted to char before searching.
20303
20304         The following changes are not K&R related:
20305
20306         * lib/group-member.h: Include <sys/types.h>, so that this file is
20307         self-contained.
20308         * lib/makepath.h: Likewise.
20309
20310         * lib/getusershell.c (readname, default_index, line_size, readname):
20311         Use size_t, not int, for sizes.
20312         (readname): If the size overflows, report an error instead of
20313         looping forever.
20314
20315 2003-09-09  Paul Eggert  <eggert@twinsun.com>
20316
20317         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
20318         libc.
20319
20320 2003-09-09  Paul Eggert  <eggert@twinsun.com>
20321
20322         * README: New section: portability guidelines.
20323
20324 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
20325
20326         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
20327         C89 spec.
20328
20329 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
20330
20331         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
20332
20333 2003-09-08  Paul Eggert  <eggert@twinsun.com>
20334
20335         Assume C89 or better; remove K&R cruft.
20336         A few of these changes were first proposed by Derek Robert Price
20337         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
20338
20339         * lib/addext.c: Include <string.h> unconditionally.
20340         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
20341         Don't declare getenv or malloc.
20342
20343         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
20344         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
20345         (NULL): Remove.
20346         (find_stack_direction, alloca): Use prototypes.
20347
20348         * lib/atexit.c (atexit): Define using a prototype.
20349
20350         * lib/basename.c, dirname.c, stripslash.c:
20351         Include <string.h> unconditionally.
20352
20353         * lib/bcopy.c: Include <stddef.h>.
20354         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
20355
20356         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
20357
20358         * lib/error.h (error, error_at_line, error_print_progname)
20359         [! (defined (__STDC__) && __STDC__)]: Remove decls.
20360         * lib/error.c: Include error.h first, to check interface.
20361         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
20362         (VA_START): Remove; all uses changeed to va_start.
20363         (exit, strerror): Remove decls.
20364         (error_print_progname): Prototype uncondionally.
20365         Don't include <errno.h>; no longer needed.
20366         (private_strerror): Remove.
20367         (error_tail): Always define.
20368         (error, error_at_line): Assume C89 or better; always use prototypes.
20369         * lib/fatal.c: Include "fatal.h" first, to test interface.
20370         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
20371         (VA_START): Remove; all uses changed to va_start.
20372         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
20373         this case.
20374         (exit): Remove decl.
20375         (fatal): Prototype unconditionally.  Assume va_start works.
20376         Abort at end, to pacify gcc.
20377
20378         * lib/euidaccess.c (main): Define with a prototype.
20379
20380         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
20381
20382         * lib/exitfail.c: Include <stdlib.h> unconditionally.
20383
20384         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
20385         prototypes.
20386         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
20387         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
20388         (getenv): Remove decl.
20389         (fnmatch): Define using a prototype.
20390         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
20391         (FCT): Define using a prototype.
20392
20393         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
20394
20395         * lib/gethostname.c: Include <stddef.h>.
20396         (gethostname): Define with prototype.  Length is size_t, not int.
20397
20398 2003-09-08  Paul Eggert  <eggert@twinsun.com>
20399
20400         Assume C89 or better; remove K&R cruft.
20401         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
20402         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
20403         string.h, getenv, malloc.
20404         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
20405         headers.
20406         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
20407         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
20408         do not check for strerror.
20409         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
20410         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
20411         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
20412         do not check for doprnt or vprintf.
20413         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
20414         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
20415
20416 2003-09-08  Paul Eggert  <eggert@twinsun.com>
20417
20418         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
20419         getversion.c should have been removed then, but was accidentally
20420         preserved.
20421
20422         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
20423         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
20424
20425 2003-09-08  Karl Berry  <karl@gnu.org>
20426
20427         * config/config.sub, config.guess, srclistvars.sh: update from savannah
20428                 config, forget about prep.
20429
20430         * config/depcomp, missing: update from automake.
20431
20432 2003-09-07  Paul Eggert  <eggert@twinsun.com>
20433
20434         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
20435         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
20436
20437 2003-09-07  Paul Eggert  <eggert@twinsun.com>
20438
20439         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
20440         copy_tm_result.  Bug reported by Simon Josefsson in
20441         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
20442
20443 2003-09-06  Paul Eggert  <eggert@twinsun.com>
20444
20445         * m4/time_r.m4: New file.
20446         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
20447         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
20448         is. Check for timegm declaration.
20449         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
20450         Do not check for gmtime_r.
20451         Replace mktime if __mktime_internal does not exist and if mktime
20452         hasn't been replaced already.
20453
20454 2003-09-06  Paul Eggert  <eggert@twinsun.com>
20455
20456         * lib/time_r.c, lib/time_r.h: New files.
20457
20458         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
20459         __localtime_r.
20460         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
20461         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
20462
20463         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
20464         __gmtime_r.
20465         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
20466         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
20467         Include <time_r.h>.
20468
20469         * lib/timegm.c: Switch to glibc implementation, with the following
20470         changes:
20471         [defined HAVE_CONFIG_H]: Include <config.h>.
20472         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
20473         (__mktime_internal) [!defined _LIBC]: New decl.
20474         (__gmtime_r) [!defined _LIBC]: New macro and function.
20475         (timegm): Use a prototype, since gnulib assumes C89.
20476         Do not bother declaring tmp to be const, as it's not really usefu.
20477         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
20478         (timegm): Declare only if HAVE_DECL_TIMEGM.
20479
20480 2003-09-06  Paul Eggert  <eggert@twinsun.com>
20481
20482         * MODULES.html.sh (func_all_modules): Add time_r.
20483         * modules/time_r: New file.
20484         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
20485         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
20486
20487 2003-09-03  Paul Eggert  <eggert@twinsun.com>
20488
20489         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
20490         Bug reported by Lute Kamstra in
20491         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
20492
20493         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
20494         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
20495         course with correspondingly smaller numbers for tomorrow and
20496         yesterday.  From Tadayoshi Funaba.  Originally installed into
20497         sh-utils on 1999-08-07, but the patch got lost (I guess during the
20498         coreutils merge?).
20499
20500 2003-08-31  Simon Josefsson  <jas@extundo.com>
20501
20502         * modules/timegm: New file.
20503         * MODULES.html.sh (func_all_modules): Add timegm.
20504
20505 2003-08-31  Simon Josefsson  <jas@extundo.com>
20506
20507         * m4/timegm.m4: New file.
20508
20509 2003-08-31  Simon Josefsson  <jas@extundo.com>
20510
20511         * lib/timegm.h: New file.
20512         * lib/timegm.c: New file.  Based on
20513         wget-1.8.2/src/http.c:mktime_from_utc.
20514
20515 2003-08-31  Karl Berry  <karl@gnu.org>
20516
20517         * lib/argp.h: update from libc.
20518
20519 2003-08-28  Bruno Haible  <bruno@clisp.org>
20520
20521         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
20522         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
20523         followed by '#define fnmatch fnmatch_posix' gives an error.
20524
20525 2003-08-28  Bruno Haible  <bruno@clisp.org>
20526
20527         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
20528         warning on QNX, which defines O_BINARY to 000000.
20529
20530 2003-08-27  Jim Meyering  <jim@meyering.net>
20531
20532         * m4/mkstemp.m4: Require that the system mkstemp be able to create
20533         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
20534         would fail after 32.  Reported by Danny Levinson.  Details here:
20535         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
20536
20537 2003-08-24  Bruno Haible  <bruno@clisp.org>
20538
20539         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
20540         MSVC7 <stdio.h> is included later.
20541
20542 2003-08-22  Simon Josefsson  <jas@extundo.com>
20543
20544         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
20545
20546 2003-08-20  Karl Berry  <karl@gnu.org>
20547
20548         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
20549
20550 2003-08-20  Bruno Haible  <bruno@clisp.org>
20551
20552         * modules/progname: New file.
20553         * MODULES.html.sh (func_all_modules): Add progname.
20554
20555 2003-08-20  Bruno Haible  <bruno@clisp.org>
20556
20557         * lib/progname.h: New file, from GNU gettext.
20558         * lib/progname.c: New file, from GNU gettext.
20559         * lib/progreloc.c: New file, from GNU gettext.
20560
20561 2003-08-19  Jim Meyering  <jim@meyering.net>
20562
20563         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
20564         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
20565
20566 2003-08-19  Bruno Haible  <bruno@clisp.org>
20567
20568         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
20569         more.
20570
20571 2003-08-19  Bruno Haible  <bruno@clisp.org>
20572
20573         * lib/xstrdup.c: Assume <string.h> exists.
20574
20575 2003-08-18  Paul Eggert  <eggert@twinsun.com>
20576
20577         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
20578         in makefile rules.
20579
20580 2003-08-18  Jim Meyering  <jim@meyering.net>
20581
20582         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
20583         * m4/lib-ld.m4: Likewise.
20584
20585 2003-08-18  Jim Meyering  <jim@meyering.net>
20586
20587         * lib/setenv.h: Indent nested cpp directive.
20588         * lib/vasnprintf.c: Remove trailing blanks.
20589
20590 2003-08-17  Simon Josefsson  <jas@extundo.com>
20591
20592         * modules/xstrndup: New file.
20593         * MODULES.html.sh (func_all_modules): Add xstrndup.
20594
20595 2003-08-17  Simon Josefsson  <jas@extundo.com>
20596
20597         * modules/argp: Fix autoconf macro name. Add more dependencies.
20598
20599 2003-08-17  Simon Josefsson  <jas@extundo.com>
20600
20601         * m4/xstrndup.m4: New file.
20602
20603 2003-08-17  Simon Josefsson  <jas@extundo.com>
20604
20605         * m4/argp.m4: New file.
20606
20607 2003-08-17  Simon Josefsson  <jas@extundo.com>
20608             Bruno Haible  <bruno@clisp.org>
20609
20610         * lib/xstrndup.h: New file.
20611         * lib/xstrndup.c: New file.
20612
20613 2003-08-17  Bruno Haible  <bruno@clisp.org>
20614
20615         * modules/strndup (Files, Include): Add lib/strndup.h.
20616
20617 2003-08-17  Bruno Haible  <bruno@clisp.org>
20618
20619         * modules/euidaccess (Files): Add lib/euidaccess.h.
20620
20621 2003-08-17  Bruno Haible  <bruno@clisp.org>
20622
20623         * lib/strndup.h: New file.
20624
20625 2003-08-17  Bruno Haible  <bruno@clisp.org>
20626
20627         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
20628         like AC_GNU_SOURCE.
20629         * modules/extensions (configure.ac): Comment out the invocation of
20630         gl_USE_SYSTEM_EXTENSIONS.
20631
20632 2003-08-16  Paul Eggert  <eggert@twinsun.com>
20633
20634         Merges from coreutils, etc.
20635         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
20636         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
20637         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
20638         fixing a typo.
20639         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
20640         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
20641
20642 2003-08-16  Paul Eggert  <eggert@twinsun.com>
20643
20644         Document merge from coreutils.
20645         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
20646         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
20647         * modules/utime: Add m4/utimes-null.m4.
20648
20649 2003-08-16  Paul Eggert  <eggert@twinsun.com>
20650
20651         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
20652         space, undoing this 2003-08-12 change:
20653         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
20654
20655 2003-08-16  Paul Eggert  <eggert@twinsun.com>
20656
20657         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
20658         strtoul.c from libc, undoing this 2003-08-12 change:
20659         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
20660
20661 2003-08-16  Jim Meyering  <jim@meyering.net>
20662
20663         Merges from coreutils.
20664         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
20665         prefix.  Adjust cache variables similarly.  Create 500 rather than
20666         just 300 files, to exercise bug on Darwin6.5, too.
20667         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
20668         $missing_dir.
20669         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
20670         AM_SYS_POSIX_TERMIOS.
20671         Reported by mkc@mathdogs.com.
20672         Also change use of $am_cv_sys_posix_termios
20673         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
20674         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
20675         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
20676         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
20677         in /proc/mounts until it finds one with matching device number.  This
20678         is unnecessary when the FILE argument *is* a mount point.  No stat call
20679         is necessary in that case.  So, disable the statvfs-testing code on
20680         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
20681         as RedHat bug# 84846.
20682         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
20683         to 1MB, so as not to render systems with no stack size limit (e.g.,
20684         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
20685         Include <unistd.h>.  On some systems,
20686         it is required for the definition of _SC_PAGESIZE.
20687
20688 2003-08-16  Jim Meyering  <jim@meyering.net>
20689
20690         Merge from coreutils.
20691         * lib/xstrtoimax.c: #else #if -> #elif.
20692         * lib/xstrtoumax.c: Likewise.
20693
20694 2003-08-16  Jim Meyering  <jim@meyering.net>
20695
20696         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
20697         * m4/utimes.m4: Removed.
20698         * m4/utimes-null.m4: Renamed from utimes.m4.
20699
20700         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
20701         to 1MB, so as not to render systems with no stack size limit (e.g.,
20702         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
20703         Include <unistd.h>.  On some systems,
20704         it is required for the definition of _SC_PAGESIZE.
20705
20706 2003-08-16  Jim Meyering  <jim@meyering.net>
20707         and Paul Eggert  <eggert@cs.ucla.edu>
20708
20709         Merges from coreutils, etc.
20710
20711         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
20712         using the latest version from cvs.  This avoids problems with #line
20713         directives using a vendor (Sun) compiler.
20714         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
20715         Don't set GETGROUPS_LIB here; now it's
20716         done via getgroups.m4's wrapper function.
20717         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
20718         rather than just in sh-util/configure.in, so that the
20719         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
20720         same.
20721         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
20722         AC_FUNC_GETLOADAVG where to find getloadavg.c.
20723         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
20724         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
20725         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
20726         Remove code that is now done by the newly-required macros.
20727         Append $(EXEEXT) to DF_PROG.
20728         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
20729         Do not invoke or require the following here,
20730         since prereq.m4 or some gnulib .m4 now does this for us:
20731         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
20732         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
20733         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
20734         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
20735         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
20736         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
20737         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
20738         AC_FUNC_OBSTACK.
20739         Do not replace the following functions, as this is now the job
20740         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
20741         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
20742         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
20743         atexit getpass, strdup, getpagesize.
20744         Replace 'raise'.
20745         Do not check for the following functions, as this is now the job
20746         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
20747         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
20748         setregid.
20749         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
20750         Check for sys/sysctl.h.
20751         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
20752         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
20753         of checking for ssize_t ourselves.
20754
20755         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
20756         Require every macro that gnulib/modules/* suggests for us.
20757         (jm_PREREQ_ADDEXT): New macro.
20758         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
20759         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
20760
20761         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
20762         (gl_PHYSMEM): Use it.
20763         Also check for `table' function.
20764         Check for new headers and functions.
20765         Add check for sys/sysmp.h.
20766         With suggestions from Kaveh Ghazi.
20767         Ignore headers that are present but cannot be compiled.  This
20768         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
20769         C 5.4.
20770
20771 2003-08-15  Paul Eggert  <eggert@twinsun.com>
20772
20773         Document merge from coreutils.
20774         * modules/userspec: Depend on posixver.
20775         * modules/strftime: Depend on tzset.
20776
20777 2003-08-15  Paul Eggert  <eggert@twinsun.com>
20778
20779         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
20780         rather than tab, after '#' in shell-script copyright notices.
20781         Suggested by Bruno Haible.
20782
20783 2003-08-15  Paul Eggert  <eggert@twinsun.com>
20784
20785         * config/srclist-update: Use three spaces, rather than tab, after '#'
20786         in shell-script copyright notices.  Suggested by Bruno Haible.
20787         Remove unnecessary parenthesization in regular expression.
20788
20789 2003-08-15  Jim Meyering  <jim@meyering.net>
20790
20791         Merge from coreutils.
20792         * lib/xgethostname.c: Include <stdlib.h>.
20793         (xghostname): Don't exit for anything other than memory-related
20794         failure; just return NULL.
20795         * lib/userspec.c: Include "posixver.h".
20796         (parse_user_spec): Accept `.' as a separator only
20797         in pre-POSIX-200112 mode.
20798         * lib/strtoimax.c: Use #elif rather than #else #if.
20799         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
20800         Remove function, now that we can rely on a working tzset function.
20801         [!_LIBC]: Ensure that the required autoconf test has been run.
20802         [!defined _NL_CURRENT && HAVE_STRFTIME]:
20803         Use underlying_strftime for %r.
20804         * lib/sha.c: Merge in some clean-up and optimization changes from
20805         glibc.
20806         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
20807         Ensure that it is a multiple of 64.
20808         Rearrange loop exit tests so as to avoid performing an
20809         additional fread after encountering an error or EOF.
20810         * lib/realloc.c: Update copyright date.
20811
20812 2003-08-15  Jim Meyering  <jim@meyering.net>
20813         and Paul Eggert  <eggert@twinsun.com>
20814
20815         Merge from coreutils.
20816         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
20817         member but strut utmpx does not.  Needed for AIX 4.3.3.
20818         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
20819
20820 2003-08-15  Jim Meyering  <jim@meyering.net>
20821         and Paul Eggert  <eggert@cs.ucla.edu>
20822
20823         Merges from coreutils, etc.
20824         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
20825         Require gl_FUNC_TZSET_CLOBBER.
20826         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
20827         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
20828         members.
20829
20830 2003-08-14  Paul Eggert  <eggert@twinsun.com>
20831
20832         Help the merge from coreutils.
20833         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
20834         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
20835         * m4/tzset.m4: Use it too.
20836
20837 2003-08-14  Paul Eggert  <eggert@twinsun.com>
20838
20839         * modules/tzset: New file.
20840
20841 2003-08-14  Jim Meyering  <jim@meyering.net>
20842
20843         Merges from coreutils.
20844         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
20845         variable names, rather than @FNMATCH_H@.
20846         * modules/alloca: Likewise for $(ALLOCA_H).
20847
20848         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
20849         the three copies of the literal target, `fnmatch.h'.
20850         * modules/alloca (alloca.h): Likewise.
20851
20852 2003-08-14  Jim Meyering  <jim@meyering.net>
20853
20854         Merge from coreutils.
20855         * m4/tzset.m4: New file.
20856         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
20857         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
20858         otherwise, AIX 5.1 systems would end up using the latter.
20859         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
20860         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
20861         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
20862         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
20863
20864 2003-08-14  Jim Meyering  <jim@meyering.net>
20865
20866         Merge from coreutils.
20867         * lib/obstack.h: Whitespace changes.
20868         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
20869         and xcalloc return values.
20870         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
20871         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
20872         hang on OSF/1 5.1 for DIR on both local and remote file systems.
20873         Reported by (and fix confirmed by) Nelson H. F. Beebe.
20874         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
20875         error from mntctl.
20876         Use mntctl's return value to drive the entry-processing loop, since
20877         we can't rely on the value of the vmt_length member in the last
20878         entry.  On some systems doing so could result in exhausting
20879         virtual memory.  Based in part on a patch from Mike Jetzer.
20880
20881 2003-08-14  Jim Meyering  <jim@meyering.net>
20882         and Paul Eggert  <eggert@twinsun.com>
20883
20884         Merges from coreutils, plus other fixes.
20885         * lib/physmem.c: Merge in portability changes from gcc/libiberty
20886         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
20887         for credits and details.  Thanks to Kaveh Ghazi for helping
20888         to keep these files in sync.
20889         (ARRAY_SIZE): Define it.
20890         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
20891         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
20892         (memcasecmp): Don't assume size_t fits in unsigned int.
20893         Remove casts and duplicate code.
20894         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
20895         (memcpy): Remove definition.
20896         Merge in some clean-up and optimization changes from glibc.
20897         [BLOCKSIZE]: Move definition to top of file.
20898         Ensure that it is a multiple of 64.
20899         Rearrange loop exit tests so as to avoid performing an
20900         additional fread after encountering an error or EOF.
20901         * lib/md5.h (md5_uintptr): Define.
20902         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
20903         return to the initial working directory.  Preserve errno
20904         for caller.
20905         * lib/idcache.c: Include "xalloc.h".
20906         (xmalloc, xrealloc): Remove decls.
20907         (getuser): Remove casts no longer required in C89.
20908         * lib/human.c: Include stdio.h, for sprintf.
20909         * lib/group-member.c: Include "xalloc.h".
20910         (xmalloc, xrealloc): Remove decls.
20911         (get_group_info): Remove casts no longer required in C89.
20912         * lib/getusershell.c (readname): Remove casts no longer required in
20913         C89.
20914         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
20915         * lib/getline.c: Whitespace fix, from coreutils.
20916
20917 2003-08-13  Paul Eggert  <eggert@twinsun.com>
20918
20919         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
20920         Check for isascii.
20921
20922         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
20923         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
20924         Undo previous (whitespace-only) change.
20925
20926 2003-08-13  Paul Eggert  <eggert@twinsun.com>
20927
20928         * lib/exclude.c: Include <ctype.h>
20929         (IN_CTYPE_DOMAIN): New macro.
20930         (is_space): New fn.
20931         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
20932         and empty lines.
20933
20934         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
20935         Undo previous (whitespace-only) change.
20936
20937 2003-08-13  Paul Eggert  <eggert@twinsun.com>
20938
20939         * config/srclist-update: Change update back to the old behavior,
20940         leaving whitespace alone.  Use one 'sed' command rather than a
20941         pipeline.
20942         (fixlicense): Now a variable, not a function.
20943         (remove_trailing_blanks): Remove.
20944         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
20945         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
20946         Undo previous (whitespace-only) change.
20947
20948 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20949
20950         Merge from coreutils.
20951         * modules/euidaccess: Add lib_SOURCES, include for new
20952         file euidaccess.h
20953
20954 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20955
20956         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
20957         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
20958         Normalize leading white space and remove trailing white space.
20959
20960         Merge from coreutils
20961         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
20962
20963         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
20964         0.12.1.  These files are now being upgraded automatically by
20965         ../config/srclist-update.
20966
20967 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20968
20969         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
20970         Normalize leading white space and remove trailing white space.
20971         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
20972         notice, as per ../config/srclist-update.
20973
20974         Merge from coreutils.
20975         * lib/euidaccess.h: New file.
20976         * lib/euidaccess.c: Include it.
20977         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
20978         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
20979         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
20980
20981 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20982
20983         * config/srclist-update: Add copyright notice.
20984         (remove_id_lines, remove_trailing_blanks): New constants.
20985         (fixfile): Use them to normalize spacing a bit in copied files.
20986         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
20987         Normalize leading white space and remove trailing white space.
20988
20989         * config/texinfo.tex: Sync with texinfo.
20990
20991         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
20992         strtoul.c from libc, to merge coreutils whitespace changes.
20993
20994         * config/srclist.txt: Get the following m4 files from gettext:
20995         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
20996         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
20997         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
20998         wint_t.m4.
20999
21000 2003-08-12  Karl Berry  <karl@gnu.org>
21001
21002         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
21003         been made.
21004
21005 2003-08-11  Paul Eggert  <eggert@twinsun.com>
21006
21007         * modules/gnu-source, m4/gnu-source.m4:
21008         Remove; we're assuming Autoconf 2.54 or later now.
21009         Suggested by Bruno Haible.
21010         * MODULES.html.sh (func_all_modules): Remove gnu-source.
21011
21012 2003-08-11  Bruno Haible  <bruno@clisp.org>
21013
21014         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
21015
21016 2003-08-11  Bruno Haible  <bruno@clisp.org>
21017
21018         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
21019         (vasnprintf): Use it instead of wcslen.
21020
21021 2003-08-11  Bruno Haible  <bruno@clisp.org>
21022
21023         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
21024         value to ensure that _Bool promotes to int. Use #define for _Bool when
21025         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
21026
21027 2003-08-10  Karl Berry  <karl@gnu.org>
21028
21029         * lib/regex.h: update from libc (whitespace fix).
21030
21031 2003-08-09  Paul Eggert  <eggert@twinsun.com>
21032
21033         Merge some files from coreutils.  These changes were
21034         originally made by Jim Meyering.
21035         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
21036         many older Unixes require this.
21037         * lib/alloca.c (alloca): Remove cast to argument of free;
21038         no longer needed in C89.
21039         * lib/alloca_.h, regex.h: Fix white space to match
21040         what GNU indent does.
21041
21042 2003-08-09  Paul Eggert  <eggert@twinsun.com>
21043
21044         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
21045         apparently Emacs's Unicode mode got confused before my 2003-08-05
21046         checkin.
21047
21048 2003-08-08  Paul Eggert  <eggert@twinsun.com>
21049
21050         * m4/extensions.m4: New file.
21051         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
21052         Require gl_USE_SYSTEM_EXTENSIONS.
21053         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
21054         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
21055
21056 2003-08-08  Paul Eggert  <eggert@twinsun.com>
21057
21058         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
21059         * modules/extensions, modules/gnu-source: New files.
21060         * modules/timespec, modules/unlocked-io: Depend on extensions.
21061
21062 2003-08-07  Paul Eggert  <eggert@twinsun.com>
21063
21064         * modules/restrict: New file.
21065         * MODULES.html.sh (func_all_modules): Add restrict.
21066         * modules/regex: Depend on restrict.
21067
21068 2003-08-07  Paul Eggert  <eggert@twinsun.com>
21069
21070         * m4/restrict.m4: New file.
21071         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
21072
21073 2003-08-07  Bruno Haible  <bruno@clisp.org>
21074
21075         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
21076         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
21077
21078 2003-08-07  Bruno Haible  <bruno@clisp.org>
21079
21080         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
21081         makes the module 'getndelim2' compatible with the module 'getline'.
21082
21083 2003-08-05  Paul Eggert  <eggert@twinsun.com>
21084
21085         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
21086         byte with "\201" to avoid glitches when editing that source file
21087         with multi-gnome-terminal.
21088
21089 2003-08-05  Paul Eggert  <eggert@twinsun.com>
21090
21091         * lib/bumpalloc.h: Remove.
21092
21093 2003-08-05  Paul Eggert  <eggert@twinsun.com>
21094
21095         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
21096         * modules/bumpalloc: Remove.
21097
21098 2003-08-04  Paul Eggert  <eggert@twinsun.com>
21099
21100         * lib/getloadavg.c: Change copyright notice and spacing to conform to
21101         GNU coding style.
21102
21103         Merge from coreutils.
21104         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
21105         1. From glibc.
21106         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
21107         from Karl Berry, implemented by Jim Meyering.
21108         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
21109         from Dmitry V. Levin.
21110         Remove anachronistic cast of xrealloc.
21111         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
21112         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
21113         type. Otherwise, it wouldn't compile with at least /bin/cc on
21114         ymp-cray-unicos9.0.2.X.
21115         Combine two mostly-identical uses of alloca into one.
21116         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
21117
21118 2003-08-04  Dave Love  <d.love@dl.ac.uk>
21119
21120         [From Emacs.]
21121
21122         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
21123         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
21124         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
21125         obsolete NLIST_NAME_UNION.
21126         [__GNU__]: Undef BSD and FSCALE.
21127         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
21128
21129 2003-08-03  Paul Eggert  <eggert@twinsun.com>
21130
21131         * lib/stdbool_.h (_Bool): Make it signed char, instead of
21132         an enum type, so that it's guaranteed to promote to int.  See:
21133         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
21134
21135 2003-08-03  Karl Berry  <karl@gnu.org>
21136
21137         * config/depcomp: update from automake.
21138
21139 2003-07-31  Paul Eggert  <eggert@twinsun.com>
21140
21141         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
21142         (strerror): Don't assume that a printable int fits in 14 bytes.
21143
21144 2003-07-31  Bruno Haible  <bruno@clisp.org>
21145
21146         * modules/getpass-gnu: New file.
21147         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
21148
21149 2003-07-31  Bruno Haible  <bruno@clisp.org>
21150
21151         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
21152
21153 2003-07-24  Karl Berry  <karl@gnu.org>
21154
21155         * config/missing: update from automake.
21156
21157 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
21158             Bruno Haible  <bruno@clisp.org>
21159
21160         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
21161         * lib/getline.c (getline, getdelim): Likewise.
21162         Remove _GNU_SOURCE define; now it's defined in config.h through
21163         m4/getline.m4.
21164
21165 2003-07-23  Karl Berry  <karl@gnu.org>
21166
21167         * config/config.sub: update from prep.
21168
21169 2003-07-22  Paul Eggert  <eggert@twinsun.com>
21170
21171         * modules/xalloc (Depends-on): Add exitfail.
21172         * modules/xmemcoll: Likewise.
21173
21174 2003-07-22  Paul Eggert  <eggert@twinsun.com>
21175
21176         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
21177         over-parenthesization in macros.
21178
21179         Sync with coreutils.
21180
21181         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
21182         required by C99.
21183
21184         Use `exit_failure' for xalloc and xmemcoll instead of their own
21185         private exit-failure variables.
21186         * lib/xalloc.h (xalloc_exit_failure): Remove.
21187         * lib/xmalloc.c: Likewise.  Include exitfail.h.
21188         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
21189         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
21190         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
21191         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
21192
21193 2003-07-20  Jim Meyering  <jim@meyering.net>
21194
21195         * modules/closeout (Depends-on): Add exitfail.
21196         Suggestion from Bruno Haible.
21197
21198 2003-07-19  Karl Berry  <karl@gnu.org>
21199
21200         * config/config.sub: update from prep.
21201
21202 2003-07-18  Paul Eggert  <eggert@twinsun.com>
21203
21204         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
21205         Remove.
21206         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
21207         to test that it can stand by itself.  Include "exitfail.h".
21208         Clients should set exit_failure instead.
21209         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
21210
21211 2003-07-18  Bruno Haible  <bruno@clisp.org>
21212
21213         * modules/getndelim2: New file.
21214         * modules/getline: Share files with module getndelim2.
21215         * modules/getnline: Depend on getndelim2 instead of sharing files with
21216         it. Add getnline.c to lib_SOURCES.
21217         * MODULES.html.sh (func_all_modules): Add getndelim2.
21218
21219 2003-07-18  Bruno Haible  <bruno@clisp.org>
21220
21221         * m4/getndelim2.m4: New file.
21222         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
21223         invoke gl_PREREQ_GETNDELIM2.
21224         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
21225         gl_PREREQ_GETNDELIM2.
21226         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
21227         gl_GETNDELIM2.
21228
21229 2003-07-18  Bruno Haible  <bruno@clisp.org>
21230
21231         * lib/getndelim2.h: New file.
21232         * lib/getndelim2.c: Make into a module of its own. Include config.h,
21233         getndelim2.h.
21234         (getndelim2): Make non-static. Change return type to ssize_t.
21235         * lib/getline.h: Change argument names.
21236         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
21237         * lib/getnline.c: Include getndelim2.h.
21238
21239 2003-07-18  Andreas Schwab  <schwab@suse.de>
21240
21241         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
21242
21243 2003-07-17  Karl Berry  <karl@gnu.org>
21244
21245         * config/config.sub: update from prep.
21246
21247 2003-07-17  Bruno Haible  <bruno@clisp.org>
21248
21249         * modules/getnline: New file.
21250         * modules/getline: Add lib/getndelim2.c to source file list.
21251         * MODULES.html.sh (func_all_modules): Add getnline.
21252
21253 2003-07-17  Bruno Haible  <bruno@clisp.org>
21254
21255         * m4/getnline.m4: New file.
21256
21257 2003-07-17  Bruno Haible  <bruno@clisp.org>
21258
21259         * m4/Makefile.am.in: Remove file.
21260         * m4/Makefile.am: Remove file.
21261         * m4/Makefile.in: Remove file.
21262
21263 2003-07-17  Bruno Haible  <bruno@clisp.org>
21264
21265         * lib/getnline.h: New file.
21266         * lib/getnline.c: New file.
21267         * lib/getndelim2.c: New file, extracted from getline.c.
21268         (getndelim2): Renamed from getdelim2, with added nmax argument.
21269         * lib/getline.c: Include getndelim2.c.
21270         (getdelim2): Moved out to getndelim2.c.
21271         (getline, getdelim): Update.
21272
21273 2003-07-17  Bruno Haible  <bruno@clisp.org>
21274
21275         * lib/Makefile.am: Remove file.
21276         * lib/Makefile.in: Remove file.
21277
21278 2003-07-17  Bruno Haible  <bruno@clisp.org>
21279
21280         * configure.in: Remove file.
21281         * Makefile.in: Remove file.
21282
21283 2003-07-17  Bruno Haible  <bruno@clisp.org>
21284
21285         * MODULES.html.sh: Put the </BODY> right before </HTML>.
21286
21287 2003-07-16  Karl Berry  <karl@gnu.org>
21288
21289         * config/srclist-update: was running fixlicense twice, which caused
21290                 texinfo.tex to be nullified for some reason.  Simplify,
21291                 $gplsrc is no longer needed as far as I can see?
21292
21293 2003-07-16  Jim Meyering  <jim@meyering.net>
21294
21295         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
21296
21297 2003-07-15  Paul Eggert  <eggert@twinsun.com>
21298
21299         * config/srclist.txt: Get the following files from gettext-runtime/intl
21300         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
21301         ref-del.sin.  From Bruno Haible.
21302         * config/srclist-update (fixfile): Change grep pattern again, since the
21303         previous fix didn't work (there was another trailing $).  Use
21304         '[$]' to escape the $s.
21305
21306 2003-07-15  Karl Berry  <karl@gnu.org>
21307
21308         * lib/vasnprintf.c: update from gettext.
21309
21310 2003-07-15  Karl Berry  <karl@gnu.org>
21311
21312         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
21313         gets expanded when surrounded by '$'.
21314
21315 2003-07-15  Jim Meyering  <jim@meyering.net>
21316
21317         * modules/save-cwd: Don't depend on error.  From Derek Price.
21318
21319 2003-07-15  Jim Meyering  <jim@meyering.net>
21320
21321         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
21322
21323 2003-07-14  Simon Josefsson  <jas@extundo.com>
21324
21325         * modules/mempcpy: New file.
21326         * MODULES.html.sh (func_all_modules): Add mempcpy.
21327
21328 2003-07-14  Simon Josefsson  <jas@extundo.com>
21329
21330         * m4/mempcpy.m4: New file.
21331
21332 2003-07-14  Simon Josefsson  <jas@extundo.com>
21333
21334         * lib/mempcpy.h: New file.
21335         * lib/mempcpy.c: New file.
21336
21337 2003-07-14  Paul Eggert  <eggert@twinsun.com>
21338
21339         * modules/getdate, modules/posixtm: Depend on mktime.
21340
21341 2003-07-14  Paul Eggert  <eggert@twinsun.com>
21342
21343         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
21344         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
21345         unicodeio.c, unicodeio.h, unlocked-io.h:
21346         Switch from LGPL to GPL.
21347
21348 2003-07-14  Paul Eggert  <eggert@twinsun.com>
21349
21350         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
21351         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
21352         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
21353         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
21354         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
21355         updated automatically by ../config/srclist-update.  This changes
21356         their license from LPGL to GPL.
21357
21358 2003-07-14  Paul Eggert  <eggert@twinsun.com>
21359
21360         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
21361         assumed to refer to the root of the most recent stable gettext version.
21362         * config/srclistvars.sh: Add defaults for eggert.
21363         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
21364         Match "This program" as well as "The program".  This is needed
21365         for gettext.
21366
21367 2003-07-14  Jim Meyering  <jim@meyering.net>
21368
21369         Don't emit diagnostics.  Let callers do that.
21370         * lib/save-cwd.c: Don't include "error.h".
21371         (save_cwd): Don't call error.  Ensure that errno is valid
21372         when returning nonzero.
21373
21374         * lib/save-cwd.h (restore_cwd): Update prototype.
21375         * lib/save-cwd.c (restore_cwd): Remove two parameters.
21376         Simplify.  Don't call error upon failure.  Let callers do that.
21377         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
21378         when auditing is enabled.  But don't bother updating the #if.
21379
21380 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
21381
21382         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
21383         it breaks C++ compilation.
21384         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
21385
21386 2003-07-10  Simon Josefsson  <jas@extundo.com>
21387
21388         * modules/strchrnul (Makefile.am): Add strchrnul.h.
21389
21390 2003-07-10  Jim Meyering  <jim@meyering.net>
21391
21392         * m4/clock_time.m4: Remove trailing blank.
21393         * m4/intmax_t.m4: Likewise.
21394
21395 2003-07-10  Jim Meyering  <jim@meyering.net>
21396
21397         * lib/vasnprintf.c: Remove trailing blanks.
21398         Make cpp indentation consistent.
21399
21400 2003-07-09  Paul Eggert  <eggert@twinsun.com>
21401
21402         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
21403         posixver.c, strftime.c, strnlen.c, strverscmp.c:
21404         Switch from LGPL to GPL.
21405
21406 2003-07-09  Paul Eggert  <eggert@twinsun.com>
21407
21408         * config/srclist.txt: Sort sublists.  Add
21409         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
21410         that differ from gnulib for one reason or another; we'd like this list
21411         to be smaller but for now let's document what we have.
21412
21413 2003-07-08  Paul Eggert  <eggert@twinsun.com>
21414
21415         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
21416         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
21417         and sweeter "eval x=$x".
21418         * config/srclist.txt: Get lib/argp* from glibc.
21419
21420 2003-07-07  Paul Eggert  <eggert@twinsun.com>
21421
21422         * lib/mktime.c: Fix some boundary cases and remove need for floating
21423         point.
21424
21425         Issue a compile-time diagnostic if time_t is floating point, or if
21426         two's complement arithmetic is not in effect, or if arithmetic
21427         right shift does not propagate the sign.  These assumptions were
21428         all in the original code but they weren't checked.
21429
21430         (TIME_T_MIDPOINT, verify): New macros.
21431         (__isleap): Remove; it has integer overflow problems.
21432         (leapyear): New function, without those problems.
21433         (ydhms_tm_diff): Remove; splitting into two parts.
21434         (ydhms_diff): New function, containing the arithmetic part of
21435         the old ydhms_tm_diff function.  Issue a compile-time
21436         diagnostic if we are not using C99 integer division.
21437         Avoid casts when possible.
21438         (guess_time_tm): New function, containing the checking part of
21439         the old ydhms_tm_diff function.  Return the new value, rather than
21440         the difference between it and the old.  Accept a new argument T
21441         so that *T specifies the old value.  Check for overflow in the result.
21442
21443         (__mktime_internal): Use a time_t offset, not a long int offset.
21444         This undoes the 2003-06-04 change, which is no longer needed now
21445         that we have better overflow checking.
21446         (localtime_offset): Likewise.
21447
21448         (__mktime_internal): Avoid harmful overflow on hosts where time_t
21449         and long are 64-bit but int is only 32-bit.
21450         (ydhms_diff): Use long int to store year1 and yday1.
21451         Issue a compile-time diagnostic if long int is not wide enough.
21452
21453         (__mktime_internal): Use long int to store adjusted year and yday.
21454         Use plain C rather than preprocessor commands, if that doesn't
21455         affect efficiency.
21456         Check for overflow (and try to repair) after each probe
21457         rather than checking only at the very end.  This avoids some bugs
21458         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
21459         does not equal GMT offset at maximum time).
21460         Use integer to check for overflow rather than floating point; this
21461         is more portable to non-IEEE hosts, and is a tad faster.
21462         When we detect that we are oscillating between two values,
21463         don't check whether tm_isdst has the requested value, since
21464         we already know the answer.  When tm_isdst has the wrong value,
21465         use a different heuristic to find the right one, based on the
21466         extreme values actually observed in practice in tz2003a,
21467         rather than the (overly optimistic) "previous 3 calendar quarters".
21468
21469         (not_equal_tm, print_tm, check_result): Use "const T" rather than
21470         "T const" to accommodate glibc style.
21471         (check_result): Use less-confusing report format.  "long" -> "long int.
21472         (main): Likewise.
21473         Don't loop if the iteration overflows time_t.
21474         Allow a negative step in the iteration.
21475
21476 2003-07-06  Karl Berry  <karl@gnu.org>
21477
21478         * config/depcomp: update from automake.
21479         * config/config.sub: update from prep.
21480
21481 2003-07-03  Karl Berry  <karl@gnu.org>
21482
21483         * config/config.guess: update from prep.
21484
21485 2003-07-01  Paul Eggert  <eggert@twinsun.com>
21486
21487         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
21488         xreadlink.c now includes it unconditionally.
21489
21490 2003-07-01  Paul Eggert  <eggert@twinsun.com>
21491
21492         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
21493         having it depend on HAVE_SYS_TYPES_H.
21494
21495 2003-07-01  Bruno Haible  <bruno@clisp.org>
21496
21497         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
21498         <sys/types.h> should be sufficient.
21499         Reported by Paul Eggert.
21500
21501 2003-06-26  Karl Berry  <karl@gnu.org>
21502
21503         * config/depcomp: update from automake.
21504
21505 2003-06-26  Bruno Haible  <bruno@clisp.org>
21506
21507         * modules/human: Depend on module stdbool.
21508
21509 2003-06-25  Bruno Haible  <bruno@clisp.org>
21510
21511         * modules/readlink: New file.
21512         * modules/xreadlink: Depend on it.
21513         * MODULES.html.sh (func_all_modules): Add readlink.
21514
21515 2003-06-25  Bruno Haible  <bruno@clisp.org>
21516
21517         * m4/readlink.m4: New file.
21518
21519 2003-06-25  Bruno Haible  <bruno@clisp.org>
21520
21521         * lib/readlink.c: New file.
21522
21523 2003-06-22  Karl Berry  <karl@gnu.org>
21524
21525         * config/srclist.txt: update mkinstalldirs from automake.
21526         * config/mkinstalldirs: update.
21527
21528 2003-06-22  Bruno Haible  <bruno@clisp.org>
21529
21530         Portability to mingw32.
21531         * m4/ssize_t.m4: New file, from GNU gettext.
21532         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
21533         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
21534
21535 2003-06-22  Bruno Haible  <bruno@clisp.org>
21536
21537         * modules/safe-read: Add m4/ssize_t.m4.
21538         * modules/xreadlink: Add m4/ssize_t.m4.
21539
21540 2003-06-20  Bruno Haible  <bruno@clisp.org>
21541
21542         Assume C89, so PARAMS isn't needed.
21543         * lib/unicodeio.h (PARAMS): Remove.
21544         * lib/unicodeio.c: Don't use PARAMS.
21545
21546 2003-06-18  Karl Berry  <karl@gnu.org>
21547
21548         * config/config.{guess,sub}: update from prep.
21549
21550 2003-06-18  Jim Meyering  <jim@meyering.net>
21551
21552         Merge changes from coreutils.
21553         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
21554         Remove explicit declarations of xmalloc and realloc.
21555         Include xalloc.h.
21556         (read_utmp): Remove anachronistic cast of xmalloc.
21557
21558 2003-06-17  Paul Eggert  <eggert@twinsun.com>
21559
21560         Assume C89, so PARAMS isn't needed.
21561         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
21562         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
21563         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
21564         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
21565         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
21566         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
21567         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
21568         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
21569         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
21570         lib/xstrtod.h, lib/xstrtol.h: Likewise.
21571         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
21572         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
21573         no longer needed. Anyway, config.h should always be included before any
21574         other file.
21575
21576 2003-06-11  Simon Josefsson  <jas@extundo.com>
21577
21578         * modules/sysexits: New file.
21579         * MODULES.html.sh (func_all_modules): Add sysexits.
21580
21581 2003-06-11  Simon Josefsson  <jas@extundo.com>
21582
21583         * lib/sysexit_.h: New file.
21584
21585 2003-06-11  Derek Price  <derek@ximbiot.com>
21586
21587         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
21588         necessary.
21589
21590 2003-06-11  Bruno Haible  <bruno@clisp.org>
21591
21592         * m4/sysexits.m4: New file.
21593
21594 2003-06-10  Simon Josefsson  <jas@extundo.com>
21595
21596         * lib/argp.h: New file, from glibc.
21597         * lib/argp-ba.c: New file, from glibc.
21598         * lib/argp-eexst.c: New file, from glibc.
21599         * lib/argp-fmtstream.c: New file, from glibc.
21600         * lib/argp-fmtstream.h: New file, from glibc.
21601         * lib/argp-fs-xinl.c: New file, from glibc.
21602         * lib/argp-help.c: New file, from glibc.
21603         * lib/argp-namefrob.h: New file, from glibc.
21604         * lib/argp-parse.c: New file, from glibc.
21605         * lib/argp-pv.c: New file, from glibc.
21606         * lib/argp-pvh.c: New file, from glibc.
21607         * lib/argp-xinl.c: New file, from glibc.
21608
21609 2003-06-10  Simon Josefsson  <jas@extundo.com>
21610
21611         * modules/strchrnul: New file.
21612
21613 2003-06-10  Simon Josefsson  <jas@extundo.com>
21614
21615         * modules/argp: New file.
21616
21617 2003-06-10  Simon Josefsson  <jas@extundo.com>
21618
21619         * m4/strchrnul.m4: New file.
21620
21621 2003-06-10  Simon Josefsson  <jas@extundo.com>
21622
21623         * lib/strchrnul.h: New file.
21624         * lib/strchrnul.c: New file.
21625
21626 2003-06-10  Bruno Haible  <bruno@clisp.org>
21627
21628         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
21629
21630 2003-06-07  Karl Berry  <karl@gnu.org>
21631
21632         * config/config.{guess,sub}: update from prep.
21633
21634 2003-06-07  Jim Meyering  <jim@meyering.net>
21635
21636         * modules/strtod: Use $(...) notation, not @...@ for
21637         AC_REPLACE'd variables.
21638         * modules/localcharset: Likewise.
21639
21640 2003-06-07  Jim Meyering  <jim@meyering.net>
21641
21642         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
21643         in place of my name in the copyright comment.
21644         Remove definition and uses of __P.
21645
21646         From coreutils.
21647         * lib/stat.c: Don't declare xmalloc explicitly.
21648         Instead, include "xalloc.h".
21649         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
21650         xrealloc, and xcalloc return values.
21651         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
21652         Improve comment.
21653         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
21654
21655 2003-06-07  Bruno Haible  <bruno@clisp.org>
21656
21657         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
21658         avoid AC_CONFIG_LINKS.
21659         * modules/fnmatch (Makefile.am): Use explicit creation rule for
21660         fnmatch.h, to avoid AC_CONFIG_LINKS.
21661         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
21662
21663 2003-06-07  Bruno Haible  <bruno@clisp.org>
21664
21665         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
21666         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
21667         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
21668         directory.
21669         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
21670         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
21671         directory.
21672
21673 2003-06-06  Jim Meyering  <jim@meyering.net>
21674
21675         Merge from coreutils.
21676         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
21677         Consolidate declarations and initializations of *_base* locals.
21678
21679         Merge from coreutils.
21680         This avoids a core dump on systems without GNU putenv,
21681         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
21682         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
21683         (unsetenv): New static function, from GNU libc.
21684         (rpl_putenv): Use it.
21685
21686         * lib/modechange.c: Remove trailing blanks.
21687
21688         Merge from coreutils.
21689         * lib/fsusage.c: Remove declaration of statfs.
21690         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
21691
21692         * lib/posixtm.c: Include <stdbool.h> unconditionally.
21693
21694 2003-06-06  Jim Meyering  <jim@meyering.net>
21695
21696         * lib/stdbool_.h: Renamed from stdbool.h.in.
21697
21698 2003-06-06  Jim Meyering  <jim@meyering.net>
21699             Bruno Haible  <bruno@clisp.org>
21700
21701         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
21702         Adjust Makefile.am snippet not to redirect directly to target.
21703         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
21704
21705 2003-06-05  Paul Eggert  <eggert@twinsun.com>
21706
21707         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
21708         mismatch, look in future quarters as well as past.  This fixes a
21709         bug when processing fall-backwards gaps immediately after a long
21710         period of daylight-saving time.
21711
21712         * lib/mktime.c: Assume freestanding C89 or better.
21713         (HAVE_LIMITS_H): Remove.  Assume it's 1.
21714         (__P): Remove; not used.
21715         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
21716         (mktime, not_equal_tm, print_tm, check_result,
21717         main): Use prototypes.  Use const * where appropriate.
21718         (main): Fix typo in testing code that uncovered by above changes.
21719         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
21720
21721 2003-06-04  Paul Eggert  <eggert@twinsun.com>
21722
21723         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
21724         locale.h, localeconv.  This merges changes from coreutils.
21725
21726         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
21727         It can be removed after the next Autoconf is released.
21728         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
21729         needed.
21730
21731 2003-06-04  Paul Eggert  <eggert@twinsun.com>
21732
21733         * lib/mktime.c: Fix Debian bug 177940
21734         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
21735         (localtime_offset): Now long int, not time_t, because we want it
21736         to be guaranteed to be signed.  All uses changed.
21737         (__mktime_internal): If overflow would occur when adding offset,
21738         don't add it.
21739
21740         Merge 'human' changes from coreutils.  Rewrite to support
21741         locale-specific notations like thousands separators.
21742         * lib/human.c: Simplify authorship notice.
21743         Include human.h immediately after config.h.
21744         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
21745         <limits.h>: Do not include, since human.h does.
21746         (SIZE_MAX, UINTMAX_MAX): New macros.
21747         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
21748         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
21749         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
21750         (power_letter): Renamed from suffixes.
21751         (generate_suffix_backwards): Remove.
21752         (adjust_value): Now takes int style (because of human.h changes)
21753         and long double value (for greater precision on some platforms).
21754         (group_number): New function.
21755         (human_readable): Use it.  Use integer options, not enum.
21756         Put the options before the sizes in the arg list.
21757         Support all the new options.
21758         The old human_readable function has been removed;
21759         use inttostr.h instead.
21760         (human_readable, default_block_size, humblock):
21761         Use uintmax_t, not int, for block sizes.
21762         (human_readable_inexact, block_size_types): Remove.
21763         (block_size_opts): New constant.
21764         (human_options): Renamed from human_block_size, with new signature
21765         that allows block sizes up to UINTMAX_MAX.  All callers changed.
21766         * lib/human.h: Add copyright and authorship notice.
21767         Include <limits.h> and <stdbool.h> unconditionally.
21768         (PARAMS): Remove.  All uses removed.
21769         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
21770         (enum human_inexact_style): Remove tag; now a nameless enum.
21771         (human_floor, human_ceiling, human_round_to_even): Now have
21772         values 2, 0, 1 rather than -1, 1, 0.
21773         (human_group_digits, human_suppress_point_zero, human_autoscale,
21774         human_base_1024, human_SI, human_B): New constants.
21775         (human_readable_inexact, human_block_size): Remove.
21776         (human_readable): Size args are now uintmax_t, not int.
21777         (human_options): New decl.
21778
21779         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
21780         unnecessary now that we assume C89 or better.  This change
21781         imported from coreutils.
21782
21783         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
21784         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
21785         in the 2003-05-30 sync from glibc.
21786
21787         .h files should stand alone, but we shouldn't include <sys/types.h>
21788         if we can get away with just <stddef.h>.
21789
21790         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
21791         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
21792         rather than <sys/types.h>, as we merely need size_t.
21793         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
21794         to get size_t.
21795         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
21796         Include <stdio.h>, to get FILE.
21797         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
21798         memcasecmp.h has included <stddef.h> and all we need is size_t.
21799         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
21800         our interface, instead of including <sys/types.h>
21801
21802 2003-06-04  Paul Eggert  <eggert@twinsun.com>
21803
21804         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
21805         now, as glibc mktime is buggy on non-glibc systems.
21806
21807 2003-06-03  Karl Berry  <karl@gnu.org>
21808
21809         * config/config.sub: update from prep.
21810
21811 2003-06-02  Paul Eggert  <eggert@twinsun.com>
21812
21813         [from coreutils]
21814         Fix some minor time-related bugs with POSIX time arguments.
21815         Some valid time stamps were being rejected (notably -1, and
21816         time stamps before 1900 on 64-bit hosts).  And some invalid
21817         time stamps were being accepted, e.g. September 31.
21818
21819         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
21820         that we can return (time_t) -1 successfully.
21821         * lib/posixtm.c: Likewise.
21822         [HAVE_STDBOOL_H]: Include <stdbool.h>.
21823         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
21824         (t): Remove static var.
21825         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
21826         of static var.  All uses changed.
21827         (year): Do not reject years before 1900; they can occur with
21828         64-bit time_t.
21829         (posix_time_parse): Do not check for out-of-range components;
21830         that is now the caller's responsibility, since our checks were
21831         only approximations.
21832         (posixtime): Use mktime to check for out-of-range components,
21833         since it knows them exactly.
21834         If mktime returns (time_t) -1, check whether an error actually occurred
21835         by invoking localtime on -1.
21836         (main) [TEST_POSIXTIME]: Check for input data errors, and report
21837         posixtime failures better.
21838         Improve the test data (in comments only).
21839
21840 2003-06-02  Karl Berry  <karl@gnu.org>
21841
21842         * config/mkinstalldirs (version): new variable.
21843         (--version): new option.
21844         (usage): improve message.
21845
21846 2003-05-30  Karl Berry  <karl@gnu.org>
21847
21848         * lib/mktime.c: update from libc.
21849
21850 2003-05-30  Bruno Haible  <bruno@clisp.org>
21851
21852         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
21853         * config/config.rpath: Upgrade to gettext-0.12.1.
21854
21855 2003-05-30  Bruno Haible  <bruno@clisp.org>
21856
21857         * m4/gettext.m4: Upgrade to gettext-0.12.1.
21858         * m4/nls.m4: New file, from gettext-0.12.1.
21859         * m4/po.m4: New file, from gettext-0.12.1.
21860         * m4/progtest.m4: Upgrade to gettext-0.12.1.
21861
21862 2003-05-30  Bruno Haible  <bruno@clisp.org>
21863
21864         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
21865         * lib/localcharset.h: Likewise.
21866         * lib/localcharset.c: Likewise.
21867
21868 2003-05-29  Karl Berry  <karl@gnu.org>
21869
21870         * config/config.rpath: update from gettext.
21871
21872 2003-05-28  Paul Eggert  <eggert@twinsun.com>
21873
21874         Assume the headers required for C89 freestanding compilers.
21875         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
21876         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
21877         * m4/human.m4 (gl_HUMAN): Likewise.
21878         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
21879         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
21880         * m4/userspec.m4 (gl_USERSPEC): Likewise.
21881         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
21882         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
21883         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
21884
21885 2003-05-28  Paul Eggert  <eggert@twinsun.com>
21886
21887         Assume the headers required for C89 freestanding compilers.
21888         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
21889         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
21890         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
21891         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
21892         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
21893         define, since <limits.h> is guaranteed to do that.
21894         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
21895         * lib/exclude.c: Include <stdbool.h> unconditionally.
21896         * lib/tempname.c: Include <stddef.h> unconditionally.
21897         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
21898         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
21899         <stddef.h> does that.
21900         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
21901         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
21902         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
21903         needed.
21904         * lib/xstrtol.c: Likewise.
21905         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
21906         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
21907
21908         * lib/addext.c (addext): Use assignment rather than cast, to avoid
21909         warnings on some platforms.
21910
21911         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
21912         arbitrarily.
21913
21914 2003-05-26  Jim Meyering  <jim@meyering.net>
21915
21916         Merge in a change from coreutils:
21917         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
21918         that is guaranteed to be `no'.  Use `no_such_member' to indicate
21919         that condition, rather than `-1' which is slightly misleading.
21920         Change the name of the cache variable to have the gl_ prefix.
21921         Prompted by a patch from Richard Dawe for DJGPP.
21922
21923 2003-05-24  Karl Berry  <karl@gnu.org>
21924
21925         * config/config.guess: update from prep.
21926
21927 2003-05-22  Karl Berry  <karl@gnu.org>
21928
21929         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
21930
21931 2003-05-20  Karl Berry  <karl@gnu.org>
21932
21933         * config/config.guess: update from prep.
21934
21935 2003-05-18  Karl Berry  <karl@gnu.org>
21936
21937         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
21938         might actually be set by the user.
21939
21940         * config/depcomp, install-sh, mdate-sh: update from automake.
21941
21942 2003-05-17  Bruno Haible  <bruno@clisp.org>
21943
21944         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
21945         invalid expansion for AC_EGREP_CPP.
21946         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
21947         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
21948         Suggested by Akim Demaille <akim@epita.fr> in
21949         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
21950
21951 2003-05-12  Jim Meyering  <jim@meyering.net>
21952
21953         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
21954         the space-padded-by-default conversion specifiers, %e, %k, %l.
21955
21956 2003-05-12  Bruno Haible  <bruno@clisp.org>
21957
21958         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
21959         the string is longer than 4 KB.
21960
21961 2003-05-11  Karl Berry  <karl@gnu.org>
21962
21963         * config/config.{guess,sub}: update from prep.
21964
21965 2003-05-09  Bruno Haible  <bruno@clisp.org>
21966
21967         * modules/error: Add m4/strerror_r.m4 to file list.
21968
21969 2003-05-03  Bruno Haible  <bruno@clisp.org>
21970
21971         Upgrade to Unicode-4.0.
21972         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
21973         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
21974         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
21975         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
21976         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
21977         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
21978         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
21979         Change width of U+E0100..U+E01EF from 1 to 0.
21980
21981 2003-04-25  Jim Meyering  <jim@meyering.net>
21982
21983         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
21984         of type size_t, not int.
21985
21986 2003-04-25  Bruno Haible  <bruno@clisp.org>
21987
21988         * lib/copy-file.c: Include <stddef.h>, for size_t.
21989
21990 2003-04-21  Paul Eggert  <eggert@twinsun.com>
21991
21992         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
21993         code which expansion is under static control.  Patch imported from
21994         Akim Demaille's patch to Bison; see
21995         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
21996
21997 2003-04-14  Bruno Haible  <bruno@clisp.org>
21998
21999         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
22000
22001 2003-04-11  Jim Meyering  <jim@meyering.net>
22002
22003         Merge changes from Coreutils.
22004
22005         2003-03-22  Jim Meyering  <jim@meyering.net>
22006
22007         * lib/strftime.c (widen): Cast alloca return value to proper type.
22008
22009         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
22010
22011         From GNU libc.
22012         * lib/strftime.c (my_strftime): Handle very large width
22013         specifications for numeric values correctly.  Improve checks for
22014         overflow.
22015
22016         2003-01-19  Jim Meyering  <jim@meyering.net>
22017
22018         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
22019         definitions.
22020         (nl_get_alt_digit) [! defined my_strftime]: Define.
22021         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
22022         _nl_get_alt_digit and _nl_get_walt_digit.
22023
22024         * lib/strftime.c (my_strftime): Merge in locale-related changes from
22025         libc. These changes have no effect outside of _LIBC.
22026
22027 2003-04-10  Bruno Haible  <bruno@clisp.org>
22028
22029         * modules/findprog: New file.
22030         * MODULES.html.sh (func_all_modules): Add it.
22031
22032 2003-04-10  Bruno Haible  <bruno@clisp.org>
22033
22034         * m4/findprog.m4: New file.
22035         * m4/eaccess.m4: New file.
22036
22037 2003-04-10  Bruno Haible  <bruno@clisp.org>
22038
22039         * lib/findprog.h: New file, from GNU gettext.
22040         * lib/findprog.c: New file, from GNU gettext.
22041
22042 2003-04-05  Jim Meyering  <jim@meyering.net>
22043
22044         Merge changes from Coreutils.
22045
22046         * lib/exclude.h (PARAMS): Remove definition and uses.
22047         * lib/exclude.c: Remove uses of `PARAMS'.
22048
22049         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
22050         Add test-cases for DOS filenames. Declare program_name.
22051         (main): Set up program_name.  Patch by Rich Dawe.
22052
22053         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
22054         error from mntctl.
22055         Use mntctl's return value to drive the entry-processing loop, since
22056         we can't rely on the value of the vmt_length member in the last
22057         entry.  On some systems doing so could result in exhausting
22058         virtual memory.  Based in part on a patch from Mike Jetzer.
22059
22060 2003-04-04  Bruno Haible  <bruno@clisp.org>
22061
22062         * modules/linebreak: New file.
22063         * MODULES.html.sh (func_all_modules): Add it.
22064
22065 2003-04-04  Bruno Haible  <bruno@clisp.org>
22066
22067         * m4/linebreak.m4: New file.
22068
22069 2003-04-04  Bruno Haible  <bruno@clisp.org>
22070
22071         * lib/linebreak.h: New file, from GNU gettext.
22072         * lib/linebreak.c: New file, from GNU gettext with slight
22073         modifications.
22074         * lib/lbrkprop.h: New file, from GNU gettext.
22075
22076 2003-04-03  Bruno Haible  <bruno@clisp.org>
22077
22078         * modules/utf8-ucs4: New file.
22079         * modules/utf16-ucs4: New file.
22080         * modules/ucs4-utf8: New file.
22081         * modules/ucs4-utf16: New file.
22082         * MODULES.html.sh (func_all_modules): Add them.
22083
22084 2003-04-03  Bruno Haible  <bruno@clisp.org>
22085
22086         * m4/utf-ucs4.m4: New file.
22087         * m4/ucs4-utf.m4: New file.
22088
22089 2003-04-03  Bruno Haible  <bruno@clisp.org>
22090
22091         * lib/utf8-ucs4.h: New file, from GNU gettext.
22092         * lib/utf16-ucs4.h: New file, from GNU gettext.
22093         * lib/ucs4-utf8.h: New file, from GNU gettext.
22094         * lib/ucs4-utf16.h: New file, from GNU gettext.
22095
22096 2003-04-02  Bruno Haible  <bruno@clisp.org>
22097
22098         * modules/binary-io: New file.
22099         * MODULES.html.sh (func_all_modules): Add it.
22100
22101 2003-04-02  Bruno Haible  <bruno@clisp.org>
22102
22103         * lib/binary-io.h: New file, from GNU gettext.
22104
22105 2003-04-01  Bruno Haible  <bruno@clisp.org>
22106
22107         * modules/pathname: New file.
22108         * MODULES.html.sh (func_all_modules): Add it.
22109
22110 2003-04-01  Bruno Haible  <bruno@clisp.org>
22111
22112         * lib/pathname.h: New file, from GNU gettext.
22113         * lib/concatpath.c: New file, from GNU gettext.
22114
22115 2003-03-30  Bruno Haible  <bruno@clisp.org>
22116
22117         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
22118
22119 2003-03-30  Bruno Haible  <bruno@clisp.org>
22120
22121         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
22122         function chown() doesn't exist.
22123
22124 2003-03-28  Bruno Haible  <bruno@clisp.org>
22125
22126         * modules/copy-file: New file.
22127         * MODULES.html.sh (func_all_modules): Add it.
22128
22129 2003-03-28  Bruno Haible  <bruno@clisp.org>
22130
22131         * m4/copy-file.m4: New file.
22132
22133 2003-03-28  Bruno Haible  <bruno@clisp.org>
22134
22135         * lib/copy-file.h: New file, from GNU gettext.
22136         * lib/copy-file.c: New file, from GNU gettext.
22137
22138 2003-03-18  Jim Meyering  <jim@meyering.net>
22139
22140         * lib/quote.c (quote_n): Fix typo in comment.
22141
22142 2003-03-18  Bruno Haible  <bruno@clisp.org>
22143
22144         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
22145         checking.
22146         * m4/onceonly_2_57.m4: Likewise.
22147
22148 2003-03-17  Bruno Haible  <bruno@clisp.org>
22149
22150         * m4/onceonly.m4: Require autoconf 2.54 or newer.
22151         (m4_quote): Remove macro.
22152         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
22153
22154 2003-03-14  Jim Meyering  <jim@meyering.net>
22155
22156         Merge changes from Coreutils.
22157         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
22158         to be const, in order to avoid warnings.
22159         (obstack_room): Likewise.
22160         (obstack_empty_p): Likewise.
22161
22162 2003-03-14  Bruno Haible  <bruno@clisp.org>
22163
22164         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
22165         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
22166
22167 2003-03-13  Paul Eggert  <eggert@twinsun.com>
22168
22169         Merge changes from Bison.
22170         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
22171         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
22172         when compiling Bison 1.875's `bitset bset = obstack_alloc
22173         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
22174         * lib/hash.c: Include <stdbool.h> unconditionally.
22175
22176 2003-03-13  Paul Eggert  <eggert@twinsun.com>
22177
22178         * m4/onceonly.m4 (m4_quote): New macro.
22179         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
22180         Quote AC_FOREACH variable-expansions properly.
22181
22182 2003-03-13  Paul Eggert  <eggert@twinsun.com>
22183
22184         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
22185
22186 2003-03-09  Paul Eggert  <eggert@twinsun.com>
22187
22188         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
22189         Reported by Bruce Becker; see:
22190         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
22191
22192 2003-03-03  Paul Eggert  <eggert@twinsun.com>
22193             Bruno Haible  <bruno@clisp.org>
22194
22195         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
22196         Reported by John Hughes, see
22197         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
22198
22199 2003-02-20  Bruno Haible  <bruno@clisp.org>
22200
22201         * MODULES.html.sh (func_all_modules): Add poll.
22202
22203 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
22204
22205         * modules/poll: New file.
22206
22207 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
22208
22209         * lib/poll_.h: New file.
22210         * lib/poll.c: New file.
22211
22212 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
22213
22214         * m4/poll.m4: New file.
22215
22216 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
22217
22218         * modules/mathl: New file.
22219
22220 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
22221
22222         * lib/mathl.h: New file.
22223         * lib/acosl.c: New file.
22224         * lib/asinl.c: New file.
22225         * lib/atanl.c: New file.
22226         * lib/ceill.c: New file.
22227         * lib/cosl.c: New file.
22228         * lib/expl.c: New file.
22229         * lib/floorl.c: New file.
22230         * lib/frexpl.c: New file.
22231         * lib/ldexpl.c: New file.
22232         * lib/logl.c: New file.
22233         * lib/sincosl.c: New file.
22234         * lib/sinl.c: New file.
22235         * lib/sqrtl.c: New file.
22236         * lib/tanl.c: New file.
22237         * lib/trigl.c: New file.
22238         * lib/trigl.h: New file.
22239
22240 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
22241
22242         * m4/mathl.m4: New file.
22243
22244 2003-02-18  Bruno Haible  <bruno@clisp.org>
22245
22246         * MODULES.html.sh (func_all_modules): Add mathl.
22247
22248 2003-02-17  Bruno Haible  <bruno@clisp.org>
22249
22250         * modules/mkdtemp: New module.
22251         * MODULES.html.sh (func_all_modules): Add it.
22252
22253 2003-02-17  Bruno Haible  <bruno@clisp.org>
22254
22255         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
22256
22257 2003-02-17  Bruno Haible  <bruno@clisp.org>
22258
22259         * lib/mkdtemp.h: New file, from GNU gettext.
22260         * lib/mkdtemp.c: New file, from GNU gettext.
22261
22262 2003-02-02  Jim Meyering  <jim@meyering.net>
22263
22264         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
22265         e.g. glibc-2.2.93.
22266
22267 2003-01-31  Bruno Haible  <bruno@clisp.org>
22268
22269         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
22270         'rpl_rename'.
22271         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
22272         'rpl_strnlen'.
22273         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
22274         'rpl_strtod'.
22275         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
22276         'rpl_utime'.
22277
22278 2003-01-31  Bruno Haible  <bruno@clisp.org>
22279
22280         * lib/rename.c: #undef rename before defining rpl_rename.
22281         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
22282
22283 2003-01-30  Bruno Haible  <bruno@clisp.org>
22284
22285         * modules/vasnprintf, modules/vasprintf: New modules.
22286         * MODULES.html.sh (func_all_modules): Add them.
22287
22288 2003-01-30  Bruno Haible  <bruno@clisp.org>
22289
22290         * m4/signed.m4: New file, from GNU gettext.
22291         * m4/longdouble.m4: New file, from GNU gettext.
22292         * m4/wchar_t.m4: New file, from GNU gettext.
22293         * m4/wint_t.m4: New file, from GNU gettext.
22294         * m4/vasnprintf.m4: New file.
22295         * m4/vasprintf.m4: New file.
22296
22297 2003-01-30  Bruno Haible  <bruno@clisp.org>
22298
22299         * lib/printf-args.h: New file, from GNU gettext.
22300         * lib/printf-args.c: New file, from GNU gettext.
22301         * lib/printf-parse.h: New file, from GNU gettext.
22302         * lib/printf-parse.c: New file, from GNU gettext.
22303         * lib/vasnprintf.h: New file, from GNU gettext.
22304         * lib/vasnprintf.c: New file, from GNU gettext.
22305         * lib/asnprintf.c: New file, from GNU gettext.
22306         * lib/vasprintf.h: New file, from GNU gettext with modifications.
22307         * lib/vasprintf.c: New file, from GNU gettext.
22308         * lib/asprintf.c: New file, from GNU gettext.
22309
22310 2003-01-29  Bruno Haible  <bruno@clisp.org>
22311
22312         * modules/stpncpy: New module.
22313         * MODULES.html.sh (func_all_modules): Add it.
22314
22315 2003-01-29  Bruno Haible  <bruno@clisp.org>
22316
22317         * m4/stpncpy.m4: New file.
22318
22319 2003-01-29  Bruno Haible  <bruno@clisp.org>
22320
22321         * lib/stpncpy.h: New file, from GNU gettext with modifications.
22322         * lib/stpncpy.c: New file, from GNU gettext with modifications.
22323
22324 2003-01-28  Bruno Haible  <bruno@clisp.org>
22325
22326         * modules/c-ctype: New module.
22327         * MODULES.html.sh (func_all_modules): Add it.
22328
22329 2003-01-28  Bruno Haible  <bruno@clisp.org>
22330
22331         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
22332         Paul Eggert.
22333         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
22334         Paul Eggert.
22335
22336 2003-01-27  Bruno Haible  <bruno@clisp.org>
22337
22338         * modules/xsetenv: New module.
22339         * MODULES.html.sh (func_all_modules): Add it.
22340
22341 2003-01-27  Bruno Haible  <bruno@clisp.org>
22342
22343         * lib/xsetenv.h: New file, from GNU gettext.
22344         * lib/xsetenv.c: New file, from GNU gettext.
22345
22346 2003-01-23  Jim Meyering  <jim@meyering.net>
22347
22348         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
22349         from working on systems without dirfd (at least Irix and OSF1/Tru64).
22350
22351 2003-01-23  Bruno Haible  <bruno@clisp.org>
22352
22353         * modules/minmax: New module.
22354         * MODULES.html.sh (func_all_modules): Add it.
22355
22356 2003-01-23  Bruno Haible  <bruno@clisp.org>
22357
22358         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
22359         Eggert.
22360
22361 2003-01-22  Bruno Haible  <bruno@clisp.org>
22362
22363         * modules/exit: New module.
22364         * MODULES.html.sh (func_all_modules): Add it.
22365
22366 2003-01-22  Bruno Haible  <bruno@clisp.org>
22367
22368         * lib/exit.h: New file, from GNU gettext.
22369
22370 2003-01-19  Bruno Haible  <bruno@clisp.org>
22371
22372         * gnulib-tool: Recognize option --extract-maintainer.
22373         (func_get_maintainer): New function.
22374         * modules/*: Add Maintainer entry.
22375
22376 2003-01-16  Jim Meyering  <jim@meyering.net>
22377
22378         * m4/regex.m4: The `regex' struct is both input and output.
22379         Initialize it before each use.  Patch by Tim Waugh.
22380
22381 2003-01-16  Bruno Haible  <bruno@clisp.org>
22382
22383         * MODULES.html.sh: Add a table of contents. Add the module name as
22384         leftmost column. Add hyperlinks.
22385
22386 2003-01-15  Bruno Haible  <bruno@clisp.org>
22387
22388         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
22389
22390 2003-01-15  Bruno Haible  <bruno@clisp.org>
22391
22392         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
22393         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
22394         suffix.
22395
22396 2003-01-15  Bruno Haible  <bruno@clisp.org>
22397
22398         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
22399
22400 2003-01-15  Bruno Haible  <bruno@clisp.org>
22401
22402         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
22403         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
22404
22405 2003-01-14  Jim Meyering  <jim@meyering.net>
22406
22407         * lib/same.c (same_name): Tweak a comment.
22408
22409 2003-01-14  Bruno Haible  <bruno@clisp.org>
22410
22411         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
22412         when a string comparison is sufficient.
22413
22414 2003-01-14  Bruno Haible  <bruno@clisp.org>
22415
22416         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
22417         'unsigned int'.
22418
22419 2003-01-14  Bruno Haible  <bruno@clisp.org>
22420
22421         * lib/hash-pjw.c: Add comment about low quality of this function.
22422
22423 2003-01-13  Bruno Haible  <bruno@clisp.org>
22424
22425         * modules/stpcpy: Distribute lib/stpcpy.h.
22426         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
22427
22428 2003-01-13  Bruno Haible  <bruno@clisp.org>
22429
22430         * modules/*: Add a description.
22431         * modules/strpbrk: Fix Makefile.am snippet.
22432         * modules/strtoimax: Fix dependencies.
22433         * modules/strtoumax: Likewise.
22434
22435 2003-01-13  Bruno Haible  <bruno@clisp.org>
22436
22437         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
22438         * modules/alloca (Makefile.am): All object files depend on alloca.h.
22439         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
22440
22441 2003-01-13  Bruno Haible  <bruno@clisp.org>
22442
22443         * gnulib-tool (func_create_testdir): Store config/* files in the main
22444         directory.
22445         * config.rpath: Move to ...
22446         * config/config.rpath: ... here.
22447         * modules/gettext: Contains config/config.rpath, not config.rpath.
22448         * modules/iconv: Likewise.
22449
22450 2003-01-12  Paul Eggert  <eggert@twinsun.com>
22451
22452         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
22453         to avoid collisions with libcurses and libreadline.
22454
22455         * m4/getstr.m4: Remove.
22456         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
22457
22458 2003-01-12  Paul Eggert  <eggert@twinsun.com>
22459
22460         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
22461         to avoid collisions with libcurses and libreadline.
22462
22463         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
22464         * lib/getstr.h, getstr.c: Remove.
22465         * lib/getline.c: Include "getline.h", to check interface.
22466         Move body of old getstr.c here: this defines MIN_CHUNK and
22467         declares getdelim2, which is renamed from getstr.
22468         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
22469
22470         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
22471         All uses changed.
22472         * lib/linebuffer.h: Likewise.
22473         (readline): Remove backward-compatibility macro.
22474
22475 2003-01-12  Paul Eggert  <eggert@twinsun.com>
22476
22477         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
22478         to avoid collisions with libcurses and libreadline.
22479         * getstr: Remove.
22480         * MODULES.html.sh: Remove getstr.
22481         * modules/getline: Depend on unlocked-io, not getstr.
22482
22483 2003-01-12  Jim Meyering  <jim@meyering.net>
22484
22485         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
22486
22487 2003-01-10  Bruno Haible  <bruno@clisp.org>
22488
22489         * modules/alloca: Change Makefile.am requirements. Simplify Include
22490         requirements. Add lib/alloca_.h to file list.
22491
22492 2003-01-10  Bruno Haible  <bruno@clisp.org>
22493
22494         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
22495
22496 2003-01-10  Bruno Haible  <bruno@clisp.org>
22497
22498         * lib/alloca_.h: New file.
22499         * lib/getdate.y: Unconditionally include alloca.h.
22500         * lib/makepath.c: Likewise.
22501         * lib/setenv.c: Likewise.
22502         * lib/userspec.c: Likewise.
22503
22504 2003-01-09  Karl Berry  <karl@gnu.org>
22505
22506         * MODULES.html.sh: include `dirname $0` in PATH, to find
22507         gnulib-tool.
22508
22509 2003-01-09  Bruno Haible  <bruno@clisp.org>
22510
22511         * modules/stdbool: Change configure.ac, Makefile.am requirements.
22512         Simplify Include requirements. Add lib/stdbool.h.in to file list.
22513
22514 2003-01-09  Bruno Haible  <bruno@clisp.org>
22515
22516         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
22517
22518 2003-01-09  Bruno Haible  <bruno@clisp.org>
22519
22520         * lib/stdbool.h.in: New file.
22521
22522 2003-01-09  Bruno Haible  <bruno@clisp.org>
22523
22524         * gnulib-tool (func_all_modules): Ignore files ending in ~.
22525         * MODULES.html.sh: Likewise.
22526
22527 2003-01-08  Jim Meyering  <jim@meyering.net>
22528
22529         * lib/full-write.c: Undefine and define-away `const' after inclusion
22530         of errno.h, not before.  Suggestion from Bruno Haible.
22531
22532 2003-01-08  Bruno Haible  <bruno@clisp.org>
22533
22534         * modules/full-read: Depend on full-write.
22535
22536 2003-01-08  Bruno Haible  <bruno@clisp.org>
22537
22538         * lib/safe-read.c: Include specification header first, to ensure its
22539         selfcontainedness.
22540         * lib/full-write.c: Likewise.
22541
22542 2003-01-07  Jim Meyering  <jim@meyering.net>
22543
22544         * lib/full-write.c: Rework so that it may serve to define full_read,
22545         too.
22546         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
22547
22548 2003-01-07  Bruno Haible  <bruno@clisp.org>
22549
22550         * lib/strtoimax.c: Include <stdint.h> as an alternative to
22551         <inttypes.h>.
22552         * lib/xstrtol.h: Likewise.
22553         * lib/xstrtoimax.c: Likewise.
22554         * lib/xstrtoumax.c: Likewise.
22555         * lib/human.h: Likewise.
22556
22557         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
22558         on systems that have <inttypes.h> but not <stdint.h>.
22559
22560 2003-01-07  Bruno Haible  <bruno@clisp.org>
22561
22562         * MODULES.html.sh: Add copyright notice.
22563         (missed_files): Omit CVS directory entries.
22564         (func_module): Make it work with sed-3.02.
22565         * MODULES.txt: Remove file.
22566
22567 2003-01-06  Jim Meyering  <jim@meyering.net>
22568
22569         * lib/version-etc.c: Update year in translatable copyright string.
22570
22571 2003-01-03  Karl Berry  <karl@gnu.org>
22572
22573         * config/config.{guess,sub}: update from prep.
22574
22575 2003-01-02  Karl Berry  <karl@gnu.org>
22576
22577         * doc/COPYING.DOC: belatedly updated to 1.2.
22578
22579 2003-01-01  Karl Berry  <karl@gnu.org>
22580
22581         * gnulib-tool (func_verify_module): report module name $module in
22582         error message, not $1.
22583         * gnulib-tool (create-testdir): don't complain if destdir couldn't
22584         be created, only if it doesn't exist.
22585         * gnulib-tool (last_checkin_date): don't expand the $Date here.
22586
22587 2002-12-31  Paul Eggert  <eggert@twinsun.com>
22588
22589         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
22590
22591 2002-12-31  Paul Eggert  <eggert@twinsun.com>
22592
22593         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
22594         memcmp if strcoll doesn't work.
22595
22596 2002-12-31  Bruno Haible  <bruno@clisp.org>
22597
22598         * lib/utime.c (utime_null): No need to call ftruncate if the file was
22599         nonempty.
22600
22601 2002-12-31  Bruno Haible  <bruno@clisp.org>
22602
22603         * lib/memcoll.c (STRCOLL): New macro.
22604         (memcoll): Use it.
22605
22606 2002-12-31  Bruno Haible  <bruno@clisp.org>
22607
22608         * lib/localcharset.h: New file.
22609         * lib/localcharset.c: Include it.
22610         * lib/unicodeio.c: Likewise.
22611
22612 2002-12-31  Bruno Haible  <bruno@clisp.org>
22613
22614         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
22615         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
22616
22617 2002-12-31  Bruno Haible  <bruno@clisp.org>
22618
22619         * lib/getline.h: Include <stddef.h>, for size_t.
22620
22621         * lib/unicodeio.h: Include <stddef.h>, for size_t.
22622         * lib/unicodeio.c: Don't include <stddef.h>.
22623
22624 2002-12-31  Bruno Haible  <bruno@clisp.org>
22625
22626         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
22627         HAVE_TM_ZONE.
22628
22629 2002-12-24  Karl Berry  <karl@gnu.org>
22630
22631         * config/config.guess: update from prep.
22632
22633 2002-12-24  Bruno Haible  <bruno@clisp.org>
22634
22635         General infrasructure.
22636         * m4/README: Rewritten.
22637         * m4/onceonly.m4: New file.
22638         * m4/onceonly_2_57.m4: New file.
22639
22640         Module atexit.
22641         * m4/atexit.m4: New file.
22642
22643         Module strtod.
22644         * m4/strtod.m4: New file.
22645
22646         Module strtol.
22647         * m4/strtol.m4: New file.
22648
22649         Module strtoul.
22650         * m4/strtoul.m4: New file.
22651
22652         Module memchr.
22653         * m4/memchr.m4: New file.
22654
22655         Module memcmp.
22656         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
22657         (jm_FUNC_MEMCMP): Invoke it.
22658
22659         Module memcpy.
22660         * m4/memcpy.m4: New file.
22661
22662         Module memmove.
22663         * m4/memmove.m4: New file.
22664
22665         Module memset.
22666         * m4/memset.m4: New file.
22667
22668         Module strcspn.
22669         * m4/strcspn.m4: New file.
22670
22671         Module strpbrk.
22672         * m4/strpbrk.m4: New file.
22673
22674         Module strstr.
22675         * m4/strstr.m4: New file.
22676
22677         Module strerror.
22678         * m4/strerror.m4: New file.
22679
22680         Module mktime.
22681         * m4/mktime.m4: Renamed from jm-mktime.m4.
22682         (gl_PREREQ_MKTIME): New macro.
22683         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
22684
22685         Module malloc.
22686         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
22687         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
22688         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
22689
22690         Module realloc.
22691         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
22692         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
22693         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
22694
22695         Module strftime.
22696         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
22697         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
22698         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
22699         gl_TM_GMTOFF.
22700         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
22701
22702         Module xalloc.
22703         * m4/xalloc.m4: New file.
22704
22705         Module alloca.
22706         * m4/alloca.m4: New file.
22707
22708         Module putenv.
22709         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
22710         (jm_FUNC_PUTENV): Invoke it.
22711
22712         Module setenv.
22713         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
22714         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
22715         when invoked twice.
22716         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
22717         gt_FUNC_SETENV.
22718
22719         Module memrchr.
22720         * m4/memrchr.m4: New file.
22721
22722         Module stpcpy.
22723         * m4/stpcpy.m4: New file.
22724
22725         Module strcase.
22726         * m4/strcase.m4: New file.
22727
22728         Module strdup.
22729         * m4/strdup.m4: New file.
22730
22731         Module strnlen.
22732         * m4/strnlen.m4: New file.
22733
22734         Module strndup.
22735         * m4/strndup.m4: New file.
22736
22737         Module xstrtod.
22738         * m4/xstrtod.m4: New file.
22739
22740         Module xstrtol.
22741         * m4/xstrtol.m4: New file.
22742
22743         Module getdate.
22744         * m4/getdate.m4: New file.
22745
22746         Module unlocked-io.
22747         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
22748         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
22749         * m4/jm-glibc-io.m4n: Remove file.
22750
22751         Module long-options.
22752         * m4/long-options.m4: New file.
22753
22754         Module md5.
22755         * m4/md5.m4: New file.
22756
22757         Module sha.
22758         * m4/sha.m4: New file.
22759
22760         Module getstr.
22761         * m4/getstr.m4: New file.
22762
22763         Module getline.
22764         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
22765         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
22766         <sys/types.h>, for size_t. Use the function name gnu_getline, not
22767         simply getline. Infoke gl_PREREQ_GETLINE.
22768
22769         Module obstack.
22770         * m4/obstack.m4: New file.
22771
22772         Module hash.
22773         * m4/hash.m4: New file.
22774
22775         Module readtokens.
22776         * m4/readtokens.m4: New file.
22777
22778         Module strverscmp.
22779         * m4/strverscmp.m4: New file.
22780
22781         Module stdbool.
22782         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
22783         OSF/1.
22784
22785         Module strtoll.
22786         * m4/strtoll.m4: New file.
22787
22788         Module strtoull.
22789         * m4/strtoull.m4: New file.
22790
22791         Module strtoimax.
22792         * m4/strtoimax.m4: New file.
22793
22794         Module strtoumax.
22795         * m4/strtoumax.m4: New file.
22796
22797         Module xstrtoimax.
22798         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
22799         jm_AC_PREREQ_XSTRTOIMAX.
22800         Moved the strtol prerequisites to strtol.m4.
22801         Moved the strtoll prerequisites to strtoll.m4.
22802         Moved the strtoimax prerequisites to strtoimax.m4.
22803
22804         Module xstrtoumax.
22805         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
22806         jm_AC_PREREQ_XSTRTOUMAX.
22807         Moved the strtoul prerequisites to strtoul.m4.
22808         Moved the strtoull prerequisites to strtoull.m4.
22809         Moved the strtoumax prerequisites to strtoumax.m4.
22810
22811         Module chown.
22812         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
22813         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
22814
22815         Module dup2.
22816         * m4/dup2.m4: New file.
22817
22818         Module ftruncate.
22819         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
22820         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
22821
22822         Module getgroups.
22823         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
22824         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
22825
22826         Module gettimeofday.
22827         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
22828         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
22829         gl_PREREQ_GETTIMEOFDAY.
22830
22831         Module mkdir.
22832         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
22833         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
22834
22835         Module mkstemp.
22836         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
22837         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
22838         jm_AC_TYPE_UINTMAX_T.
22839         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
22840
22841         Module stat.
22842         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
22843         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
22844
22845         Module lstat.
22846         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
22847         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
22848
22849         Module timespec.
22850         * m4/timespec.m4 (gl_TIMESPEC): New macro.
22851         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
22852         * m4/st_mtim.m4: Indentation.
22853
22854         Module nanosleep.
22855         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
22856         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
22857         gl_PREREQ_NANOSLEEP.
22858
22859         Module regex.
22860         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
22861         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
22862         (gl_REGEX): New macro.
22863
22864         Module rename.
22865         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
22866         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
22867
22868         Module rmdir.
22869         * m4/rmdir.m4: New file.
22870
22871         Module utime.
22872         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
22873         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
22874         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
22875
22876         Module dirname.
22877         * m4/dirname.m4: New file.
22878
22879         Module getopt.
22880         * m4/getopt.m4: New file.
22881
22882         Module unistd-safer.
22883         * m4/unistd-safer.m4: New file.
22884
22885         Module fnmatch.
22886         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
22887         declaration.
22888         (gl_PREREQ_FNMATCH_EXTRA): New macro.
22889         (gl_FUNC_FNMATCH_POSIX): New macro.
22890         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
22891         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
22892         simply fnmatch.
22893
22894         Module exclude.
22895         * m4/exclude.m4: New file.
22896
22897         Module human.
22898         * m4/human.m4: New file.
22899
22900         Module acl.
22901         * m4/acl.m4: Nop.
22902
22903         Module backupfile.
22904         * m4/backupfile.m4: New file.
22905         * m4/d-ino.m4: Indentation.
22906
22907         Module fsusage.
22908         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
22909         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
22910         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
22911
22912         Module dirfd.
22913         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
22914         requirements.
22915
22916         Module euidaccess.
22917         * m4/euidaccess.m4: New file.
22918
22919         Module file-type.
22920         * m4/file-type.m4: New file.
22921
22922         Module fileblocks.
22923         * m4/fileblocks.m4: New file.
22924
22925         Module filemode.
22926         * m4/filemode.m4: New file.
22927
22928         Module isdir.
22929         * m4/isdir.m4: New file.
22930
22931         Module lchown.
22932         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
22933         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
22934
22935         Module makepath.
22936         * m4/makepath.m4: New file.
22937
22938         Module modechange.
22939         * m4/modechange.m4: New file.
22940
22941         Module mountlist.
22942         * m4/mountlist.m4: New file.
22943         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
22944         Indentation.
22945
22946         Module path-concat.
22947         * m4/path-concat.m4: New file.
22948
22949         Module pathmax.
22950         * m4/pathmax.m4: New file.
22951
22952         Module same.
22953         * m4/same.m4: New file.
22954
22955         Module save-cwd.
22956         * m4/save-cwd.m4: New file.
22957
22958         Module savedir.
22959         * m4/savedir.m4: New file.
22960
22961         Module xgetcwd.
22962         * m4/xgetcwd.m4: New file.
22963         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
22964
22965         Module xreadlink.
22966         * m4/xreadlink.m4: New file.
22967
22968         Module safe-read.
22969         * m4/safe-read.m4: New file.
22970
22971         Module safe-write.
22972         * m4/safe-write.m4: New file.
22973
22974         Module closeout.
22975         * m4/closeout.m4: New file.
22976
22977         Module stdio-safer.
22978         * m4/stdio-safer.m4: New file.
22979
22980         Module getpass.
22981         * m4/getpass.m4: New file.
22982
22983         Module getugroups.
22984         * m4/getugroups.m4: New file.
22985
22986         Module group-member.
22987         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
22988         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
22989
22990         Module idcache.
22991         * m4/idcache.m4: New file.
22992
22993         Module userspec.
22994         * m4/userspec.m4: New file.
22995
22996         Module gettime.
22997         * m4/clock_time.m4: New file.
22998         * m4/gettime.m4: New file.
22999
23000         Module settime.
23001         * m4/settime.m4: New file.
23002
23003         Module posixtm.
23004         * m4/posixtm.m4: New file.
23005
23006         Module gethostname.
23007         * m4/gethostname.m4: New file.
23008
23009         Module canon-host.
23010         * m4/canon-host.m4: New file.
23011
23012         Module gettext.
23013         * m4/codeset.m4: New file, from gettext-0.11.5.
23014         * m4/gettext.m4: New file, from gettext-0.11.5.
23015         * m4/glibc21.m4: New file, from gettext-0.11.5.
23016         * m4/iconv.m4: New file, from gettext-0.11.5.
23017         * m4/intdiv0.m4: New file, from gettext-0.11.5.
23018         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
23019         * m4/inttypes.m4: New file, from gettext-0.11.5.
23020         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
23021         * m4/isc-posix.m4: New file, from gettext-0.11.5.
23022         * m4/lcmessage.m4: New file, from gettext-0.11.5.
23023         * m4/lib-ld.m4: New file, from gettext-0.11.5.
23024         * m4/lib-link.m4: New file, from gettext-0.11.5.
23025         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
23026         * m4/progtest.m4: New file, from gettext-0.11.5.
23027         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
23028         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
23029         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
23030
23031         Module localcharset.
23032         * m4/localcharset.m4: New file.
23033
23034         Module hard-locale.
23035         * m4/hard-locale.m4: New file.
23036
23037         Module mbswidth.
23038         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
23039         onceonly macros.
23040         * m4/mbrtowc.m4: Add comment.
23041
23042         Module memcasecmp.
23043         * m4/memcasecmp.m4: New file.
23044
23045         Module memcoll.
23046         * m4/memcoll.m4: New file.
23047
23048         Module unicodeio.
23049         * m4/unicodeio.m4: New file.
23050
23051         Module rpmatch.
23052         * m4/rpmatch.m4: New file.
23053
23054         Module yesno.
23055         * m4/yesno.m4: New file.
23056
23057         Module exitfail.
23058         * m4/exitfail.m4: New file.
23059
23060         Module c-stack.
23061         * m4/c-stack.m4 (gl_C_STACK): New macro.
23062         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
23063
23064         Module error.
23065         * m4/error.m4 (gl_ERROR): New macro.
23066         (jm_PREREQ_ERROR): Use onceonly macros.
23067
23068         Module fatal.
23069         * m4/fatal.m4: New file.
23070
23071         Module getloadavg.
23072         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
23073         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
23074
23075         Module getpagesize.
23076         * m4/getpagesize.m4: New file.
23077
23078         Module getusershell.
23079         * m4/getusershell.m4: New file.
23080
23081         Module physmem.
23082         * m4/physmem.m4: New file.
23083
23084         Module posixver.
23085         * m4/posixver.m4: New file.
23086
23087         Module quotearg.
23088         * m4/quotearg.m4: New file.
23089
23090         Module quote.
23091         * m4/quote.m4: New file.
23092
23093         Module readutmp.
23094         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
23095
23096         Module sig2str.
23097         * m4/sig2str.m4: New file.
23098
23099         Other.
23100         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
23101         ulonglong.m4.
23102         * m4/intmax_t.m4: New file.
23103         * m4/d-type.m4: Indentation.
23104         * m4/jm-macros.m4: Update.
23105         * m4/prereq.m4 (jm_PREREQ): Update.
23106         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
23107         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
23108         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
23109         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
23110         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
23111         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
23112         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
23113         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
23114         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
23115         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
23116         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
23117         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
23118         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
23119         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
23120         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
23121         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
23122         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
23123         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
23124         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
23125
23126 2002-12-24  Bruno Haible  <bruno@clisp.org>
23127
23128         * MODULES.txt: Update according to m4/ changes.
23129
23130         Module gettext.
23131         * config.rpath: New file, from gettext-0.11.5.
23132
23133         * modules/*: New module descriptions.
23134         * gnulib-tool: New file.
23135         * MODULES.html.sh: New file.
23136
23137 2002-12-21  Karl Berry  <karl@gnu.org>
23138
23139         * doc/fdl.texi: update to version 1.2.
23140
23141 2002-12-19  Karl Berry  <karl@gnu.org>
23142
23143         * config/config.guess: update from prep.
23144
23145 2002-12-18  Bruno Haible  <bruno@clisp.org>
23146
23147         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
23148         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
23149
23150 2002-12-17  Bruno Haible  <bruno@clisp.org>
23151
23152         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
23153         stdlib.h, string.h.
23154
23155 2002-12-17  Bruno Haible  <bruno@clisp.org>
23156
23157         * lib/canon-host.c (strdup): Remove unused declaration.
23158
23159         * lib/fsusage.c: Include full_read.h.
23160         (get_fs_usage): Use full_read instead of safe_read.
23161
23162         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
23163
23164 2002-12-12  Karl Berry  <karl@gnu.org>
23165
23166         * config/config.guess: update from prep.
23167
23168 2002-12-11  Bruno Haible  <bruno@clisp.org>
23169
23170         * m4/setenv.m4: New file, from gettext-0.11.5.
23171
23172 2002-12-11  Bruno Haible  <bruno@clisp.org>
23173
23174         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
23175         not unsetenv().
23176         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
23177         modifications:
23178
23179         2002-12-11  Bruno Haible  <bruno@clisp.org>
23180
23181                 * setenv.c (alloca): Fall back to malloc.
23182                 (freea): New macro.
23183                 (setenv): Use freea() to free memory allocated with alloca().
23184
23185         2002-11-13  Bruno Haible  <bruno@clisp.org>
23186
23187                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
23188                 function declarations.
23189                 * unsetenv.c (unsetenv): Likewise.
23190
23191         2002-03-04  Bruno Haible  <bruno@clisp.org>
23192
23193                 Portability to AIX 4.3.3.
23194                 * unsetenv.c: New file, extracted from setenv.c.
23195                 * setenv.c: Move the unsetenv() function to unsetenv.c.
23196
23197         2001-12-20  Bruno Haible  <bruno@clisp.org>
23198
23199                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
23200                 use malloc instead. For SunOS 4.
23201
23202         2001-12-11  Bruno Haible  <bruno@clisp.org>
23203
23204                 * setenv.c: Declare alloca.
23205                 (compar_fn_t): New typedef.
23206                 (KNOWN_VALUE, STORE_VALUE): Use it.
23207
23208         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
23209         setenv.h.
23210
23211 2002-12-10  Paul Eggert  <eggert@twinsun.com>
23212
23213         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
23214         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
23215         Choose values that are less likely to collide with system fnmatch
23216         options.
23217         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
23218         defined (e.g., a pure POSIX system).
23219         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
23220         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
23221
23222 2002-12-06  Paul Eggert  <eggert@twinsun.com>
23223
23224         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
23225         a pain in practice to deal with generated m4 files.  This change
23226         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
23227
23228         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
23229         and jm-glibc-io.m4, as they are no longer a special case.
23230         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
23231         kludge and the auto-generation stuff.  Check only whether the
23232         functions are declared, not whether they exist, since older hosts
23233         that don't declare the functions can't use the optimization anyway.
23234
23235 2002-12-06  Jim Meyering  <jim@meyering.net>
23236
23237         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
23238
23239         Merge in changes from libc's misc/error.c, in preparation
23240         for the merge of gnulib's changes back into libc.
23241
23242         * lib/error.c (_): Define only if not already defined.
23243         Move definition to follow all #include directives.
23244         Include unlocked-io.h only if !_LIBC.
23245         [_LIBC]: Include <libio/libioP.h>.
23246         [USE_IN_LIBIO]: Include <libio/iolibio.h>
23247         (fflush): Tweak definition to use INTUSE.
23248         (putc): Define.
23249
23250 2002-12-05  Paul Eggert  <eggert@twinsun.com>
23251
23252         * lib/alloca.c [defined emacs]: Include "lisp.h".
23253         (xalloc_die) [defined emacs]: New macro.
23254         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
23255         [! defined emacs]: Include <xalloc.h>.
23256         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
23257         (pointer): Typedef to POINTER_TYPE *.
23258         (malloc): Remove decl; we now always use xmalloc.
23259         (alloca): Use old-style definition, since Emacs needs this.
23260         Check for arithmetic overflow when computing combined size.
23261
23262 2002-12-04  Paul Eggert  <eggert@twinsun.com>
23263
23264         Do not generate unlocked-io.h automatically, since it's easier to
23265         maintain it by hand.
23266
23267         * lib/unlocked-io.h: New file, from GNU diffutils,
23268         but with proper copyright notice and attribution.
23269         * lib/gen-uio: Remove.
23270         * lib/Makefile.am: Add copyright notice.
23271         (libfetish_a_SOURCES): Add unlocked-io.h.
23272         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
23273         (DISTCLEANFILES, io_functions): Remove macros.
23274         (EXTRA_DIST): Remove gen_uio.
23275         (unlocked-io.h): Remove rule.
23276
23277 2002-12-04  Jim Meyering  <jim@meyering.net>
23278
23279         Reflect the fact that stat.c and lstat.c are no longer generated.
23280         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
23281         (DISTCLEANFILES): Likewise.
23282         (EXTRA_DIST): Likewise.
23283         (all_local): Don't depend on stat.c or lstat.c.
23284         (stat.c, lstat.c): Remove rules.
23285         (EXTRA_DIST): Remove xstat.in.
23286
23287         * lib/xstat.in: Remove file.  Contents moved into stat.c.
23288         * lib/stat.c: New file.  Contents mostly from xstat.in.
23289         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
23290         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
23291
23292         * lib/safe-read.c: Rework so that it may serve to define safe_write,
23293         too.
23294         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
23295
23296 2002-12-03  Jim Meyering  <jim@meyering.net>
23297
23298         * lib/safe-read.c, safe-write.c: Change variable names and comments,
23299         but not semantics, to minimize the differences between these two files.
23300         (safe_read): Change comment to mention SAFE_READ_ERROR.
23301
23302         * lib/safe-read.c (IS_EINTR): Define.
23303         (safe_read): Use IS_EINTR in place of in-function cpp directives.
23304
23305 2002-12-02  Jim Meyering  <jim@meyering.net>
23306
23307         * lib/safe-read.c (EINTR): Define.
23308         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
23309         (INT_MAX): Provide fallback.
23310         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
23311
23312         * lib/safe-read.h (SAFE_READ_ERROR): Define.
23313
23314 2002-12-02  Bruno Haible  <bruno@clisp.org>
23315
23316         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
23317         Define, taken from safe-read.c.
23318         (INT_MAX): Provide fallback.
23319         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
23320         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
23321
23322         * lib/safe-read.c (EINTR): Remove definition.
23323         (safe_read): Don't use EINTR if it is absent.
23324
23325 2002-12-01  Jim Meyering  <jim@meyering.net>
23326
23327         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
23328         zero.
23329         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
23330
23331 2002-11-27  Paul Eggert  <eggert@twinsun.com>
23332
23333         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
23334         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
23335         with `if (! (value < limit)) abort ();', for readability.
23336
23337 2002-11-26  Karl Berry  <karl@gnu.org>
23338
23339         * lib/strdup.c: copy from libc again, with jim's ok.
23340         * lib/.cppi-disable: re-add strdup.c
23341
23342 2002-11-25  Karl Berry  <karl@gnu.org>
23343
23344         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
23345         instead of "strtol.c".
23346
23347 2002-11-25  Karl Berry  <karl@gnu.org>
23348
23349         * config/install-sh: update from automake for variable quoting, $0 in
23350         error msgs, etc.
23351
23352         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
23353         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
23354         entry.
23355
23356 2002-11-25  Jim Meyering  <jim@meyering.net>
23357
23358         * lib/mktime.c: Sync from libc, now that it has the latest fix.
23359
23360 2002-11-24  Karl Berry  <karl@gnu.org>
23361
23362         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
23363         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
23364
23365 2002-11-24  Jim Meyering  <jim@meyering.net>
23366
23367         Update from coreutils:
23368
23369         * lib/mktime.c: Merge in changes from libc.
23370
23371         Avoid a link-time failure on some Linux systems.
23372         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
23373         (otherwise).
23374         (__mon_yday): Declare with the STATIC attribute.
23375         (__mktime_internal): Likewise.
23376         Based on a report from Greg Schafer.
23377
23378 2002-11-23  Jim Meyering  <jim@meyering.net>
23379
23380         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
23381         Use `unsigned', not `int', as type of index.
23382
23383         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
23384
23385         * lib/fsusage.c: Remove unneeded parentheses around operands of
23386         `defined'.
23387
23388 2002-11-22  Paul Eggert  <eggert@twinsun.com>
23389
23390         * lib/quotearg.h: Allow multiple inclusion by surrounding with
23391         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
23392         so that we can be included first.
23393         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
23394         * lib/quotearg.c: Include quotearg.h immediately after config.h.
23395         No need to include stddef.h or sys/types.h any more.
23396         Surround local include files with "", not "<>".
23397         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
23398         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
23399         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
23400         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
23401         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
23402         (ISPRINT): Remove; no longer needed now that we assume C89.
23403
23404         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
23405         Preserve errno.
23406
23407         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
23408         quotearg_char): Use SIZE_MAX rather than
23409         (size_t) -1 when we are talking about "infinity".
23410
23411         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
23412
23413 2002-11-22  Paul Eggert  <eggert@twinsun.com>
23414
23415         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
23416         hint that one should use `if (! x) abort ();' rather than `assert
23417         (x);', and anyway it's one less thing to worry about configuring.
23418         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
23419         hash_rehash, hash_insert): Use abort rather than assert.
23420
23421 2002-11-22  Bruno Haible  <bruno@clisp.org>
23422
23423         * lib/safe-read.h: Assume C89. Add comments.
23424         (safe_read): Change return type to size_t.
23425         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
23426         byte counts > SSIZE_MAX correctly.
23427         * lib/safe-write.h: New file.
23428         * lib/safe-write.c: New file.
23429         * lib/full-read.h: New file.
23430         * lib/full-read.c: New file.
23431         * lib/full-write.h: Assume C89. Add comments.
23432         * lib/full-write.c: Include safe-write.h.
23433         (full_write): Rewritten to use safe_write.
23434         Suggested by Jim Meyering and Paul Eggert.
23435
23436 2002-11-21  Jim Meyering  <jim@meyering.net>
23437
23438         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
23439
23440         Merge in changes from the coreutils.
23441
23442         2002-09-25  Paul Eggert  <eggert@twinsun.com>
23443         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
23444         <stdint.h>.
23445         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
23446         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
23447         int.  Work more efficiently if X is the same width as uintmax_t.
23448         Do not compare X to -1, to avoid bogus compiler warning.
23449         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
23450         Don't assume that f_frsize and f_bsize are the same type.
23451
23452         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
23453         warning on FreeBSD.
23454
23455         * lib/makepath.c (make_path): Restore umask *before* creating the final
23456         component.
23457         (make_path): Minor reformatting.
23458
23459         * lib/xmalloc.c: Adjust to work with new autoconf macros,
23460         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
23461         HAVE_MALLOC/HAVE_REALLOC.
23462
23463         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
23464         dummy ones.  At least on GNU/Linux systems, `auto' means something
23465         else.
23466         From Michael Stone.
23467
23468 2002-11-21  Bruno Haible  <bruno@clisp.org>
23469
23470         Remove case insensitive option matching.
23471         * lib/argmatch.h (argcasematch): Remove declaration.
23472         (ARGCASEMATCH): Remove macro.
23473         (__xargmatch_internal): Remove case_sensitive argument.
23474         (XARGMATCH): Update.
23475         (XARGCASEMATCH): Remove macro.
23476         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
23477         case_sensitive argument.
23478         (argcasematch): Remove function.
23479         (__xargmatch_internal): Remove case_sensitive argument.
23480         (main): Use XARGMATCH instead of XARGCASEMATCH.
23481
23482         * lib/xmalloc.c: Change compile-time error message. Add comment about
23483         required autoconf version.
23484
23485 2002-11-20  Paul Eggert  <eggert@twinsun.com>
23486
23487         Merge argmatch cleanups from Bison.  Assume C89.
23488
23489         * lib/argmatch.c: Include config.h here, not in argmatch.h.
23490         Include stdlib.h, for EXIT_FAILURE.
23491         Always include <string.h>, since we assume C89.
23492         (EXIT_FAILURE): Remove pre-C89 bug workaround.
23493         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
23494         Include <stddef.h> instead, since it's all we need for size_t.
23495         (PARAMS): Remove.  All uses removed.
23496         (ARRAY_CARDINALITY): Do not bother to #undef.
23497         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
23498         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
23499         Remove unnecessary parentheses.
23500         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
23501         Insert necessary parentheses.
23502         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
23503         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
23504
23505 2002-11-19  Bruno Haible  <bruno@clisp.org>
23506
23507         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
23508         * lib/mbswidth.h: Include <stddef.h>, for size_t.
23509
23510         * lib/mbswidth.h (PARAMS): Remove macro.
23511         (mbswidth, mbsnwidth): Use ANSI C function declarations.
23512         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
23513
23514         * lib/gcd.h (PARAMS): Remove macro.
23515         (gcd): Use ANSI C function declarations.
23516         * lib/gcd.c (gcd): Likewise.
23517
23518 2002-11-15  Bruno Haible  <bruno@clisp.org>
23519
23520         * lib/strcspn.c: Include <stddef.h>.
23521         (strcspn): Use ANSI C function declaration. Change return type to
23522         size_t. Use NULL.
23523         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
23524         (strpbrk): Use NULL.
23525         * lib/strpbrk.h (PARAMS): Remove macro.
23526         (strpbrk): Use ANSI C function declaration.
23527         * lib/strstr.c: Don't include <sys/types.h>.
23528         * lib/strstr.h (PARAMS): Remove macro.
23529         (strstr): Use ANSI C function declarations.
23530
23531 2002-11-14  Karl Berry  <karl@gnu.org>
23532
23533         * config/mkinstalldirs: `do' on separate line, instead of
23534         `for var; do'.
23535
23536 2002-11-06  Bruno Haible  <bruno@clisp.org>
23537
23538         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
23539         * lib/gcd.c (gcd): Likewise.
23540
23541 2002-11-05  Bruno Haible  <bruno@clisp.org>
23542
23543         * lib/gcd.h: New file, from gettext-0.11.5.
23544         * lib/gcd.c: New file, from gettext-0.11.5.
23545
23546 2002-11-05  Bruno Haible  <bruno@clisp.org>
23547
23548         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
23549         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
23550         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
23551         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
23552
23553         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
23554         <libintl.h>.
23555         * lib/makepath.c: Include gettext.h instead of <locale.h> and
23556         <libintl.h>.
23557
23558         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
23559         * lib/human.c: Include gettext.h instead of <libintl.h>.
23560         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
23561         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
23562         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
23563         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
23564         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
23565         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
23566         (textdomain): Remove definition.
23567         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
23568
23569         * lib/long-options.c: Remove include of <libintl.h> and definition of
23570         _.
23571         * lib/same.c: Remove include of <libintl.h> and definition of _.
23572
23573 2002-11-04  Owen Taylor  <otaylor@redhat.com>
23574
23575         * lib/config.charset: A few additions for Solaris.
23576
23577 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
23578
23579         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
23580         * lib/localcharset.c (locale_charset): Declare as extern "C".
23581
23582 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
23583
23584         * lib/config.charset: msdos in uk_UA uses CP1125.
23585
23586 2002-11-04  Bruno Haible  <bruno@clisp.org>
23587
23588         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
23589         * lib/strcase.h: New file, from GNU gettext-0.11.5.
23590         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
23591         * lib/strstr.h: New file, from GNU gettext-0.11.5.
23592         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
23593
23594 2002-11-04  Bruno Haible  <bruno@clisp.org>
23595
23596         * lib/localcharset.c (locale_charset): Don't return an empty string.
23597
23598 2002-11-04  Bruno Haible  <bruno@clisp.org>
23599
23600         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
23601         aliases.
23602
23603 2002-11-04  Bruno Haible  <bruno@clisp.org>
23604
23605         * lib/config.charset: Update for newest glibc. Add canonical names
23606         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
23607
23608 2002-11-04  Bruno Haible  <bruno@clisp.org>
23609
23610         * lib/config.charset: Add support for NetBSD.
23611
23612 2002-11-04  Bruno Haible  <bruno@clisp.org>
23613
23614         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
23615
23616 2002-11-01  Bruno Haible  <bruno@clisp.org>
23617
23618         * configure.in: Add AC_CONFIG_AUX_DIR call.
23619         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
23620         test/Makefile.
23621         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
23622
23623 2002-09-28  Karl Berry  <karl@gnu.org>
23624
23625         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
23626         installed automake until the next release, since changes have been
23627         made.
23628
23629 2002-09-25  Karl Berry  <karl@gnu.org>
23630
23631         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
23632         * lib/getopt*: copy from libc/posix.
23633         * lib/gettext.h: copy from gettext.
23634         * lib/.cppi-disable: add strdup.c, gettext.h.
23635
23636 2002-09-25  Karl Berry  <karl@gnu.org>
23637
23638         * config/srclist.txt: enable gettext.h check.
23639         * config/config.{guess,sub}: update from prep.
23640         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
23641                 from automake 1.6.3.
23642         See srclist*.
23643
23644 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
23645
23646         * regex.c (PATFETCH): Remove the translating fetch.
23647         (PATFETCH_RAW): Rename to PATFETCH.
23648         (set_image_of_range): New fun.
23649         (SET_RANGE_TABLE_WORK_AREA): Use it.
23650         (regex_compile): Don't translate the pattern chars so eagerly.
23651         Only do it when inserting an `exactn' bytecode or when handling
23652         a char-range.
23653         (mutually_exclusive_p): Avoid empty statement.
23654
23655 2002-07-06  Jim Meyering  <meyering@lucent.com>
23656
23657         * m4/README: Don't mention Makefile.am.in.
23658         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
23659
23660 2002-07-01  Jim Meyering  <meyering@lucent.com>
23661
23662         * lib/c-stack.c: Include sys/time.h.
23663         From Volker Borchert.
23664
23665 2002-06-26  Paul Eggert  <eggert@twinsun.com>
23666
23667         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
23668
23669 2002-06-26  Paul Eggert  <eggert@twinsun.com>
23670
23671         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
23672         New macro.  Use it uniformly instead of
23673         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
23674         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
23675         reported by Vin Shelton.
23676
23677 2002-06-22  Paul Eggert  <eggert@twinsun.com>
23678
23679         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
23680         Do not assume SA_SIGINFO behavior.
23681         Bug reported by Jim Meyering on NetBSD 1.5.2.
23682
23683 2002-06-22  Jim Meyering  <meyering@lucent.com>
23684
23685         * m4/c-stack.m4: New file, from diffutils-2.8.2.
23686         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
23687
23688         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
23689         now that configure.ac uses AC_GNU_SOURCE.
23690         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
23691         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
23692
23693         Update to latest tools.  Suggestions from Paul Eggert.
23694         * m4/stdbool.m4: New file, from diffutils-2.8.2.
23695         * m4/gnu-source.m4: Update from diffutils-2.8.2.
23696         * m4/fnmatch.m4: Likewise.
23697         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
23698         to AC_HEADER_STDBOOL
23699
23700 2002-06-22  Jim Meyering  <meyering@lucent.com>
23701
23702         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
23703         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
23704
23705 2002-06-22  Jim Meyering  <meyering@lucent.com>
23706
23707         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
23708
23709         * lib/exitfail.c, exitfail.h: Likewise.
23710         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
23711
23712         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
23713         of fnmatch.h.
23714         (EXTRA_DIST): Add fnmatch_loop.c.
23715         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
23716
23717         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
23718         * lib/fnmatch.c: Update from diffutils-2.8.2.
23719         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
23720         * lib/fnmatch.h: Remove file.
23721
23722 2002-06-21  Jim Meyering  <meyering@lucent.com>
23723
23724         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
23725         * m4/mbrtowc.m4: Likewise.
23726
23727         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
23728         * m4/mbswidth.m4: Reflect name change:
23729         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
23730         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
23731
23732         * m4/lib-link.m4: Update from gettext-0.11.2.
23733         * m4/gettext.m4: Likewise.
23734
23735         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
23736         From Alfred M. Szmidt.
23737
23738 2002-06-18  Paul Eggert  <eggert@twinsun.com>
23739
23740         * lib/file-type.h: Report an error if neither S_ISREG nor
23741         S_IFREG is defined, instead of using a test specific to glibc
23742         2.2.  This should be safe, since POSIX requires S_ISREG and
23743         Unix Version 7 had S_IFREG.  We don't need to check for
23744         <sys/types.h> since we don't use any symbols that it defines.
23745
23746 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
23747
23748         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
23749         $@-t, so that each temporary file name is unique and valid in the first
23750         8 characters, for operation under DOS.
23751
23752 2002-06-15  Paul Eggert  <eggert@twinsun.com>
23753
23754         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
23755
23756 2002-06-15  Jim Meyering  <meyering@lucent.com>
23757
23758         Work even with DJGPP 2.03, which lacks support for symlinks.
23759         From Richard Dawe.
23760         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
23761         is defined.
23762         * lib/lchown.c (S_ISLNK): Likewise.
23763
23764 2002-06-15  Jim Meyering  <meyering@lucent.com>
23765
23766         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
23767         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
23768         have been included before this file.
23769
23770 2002-06-14  Jim Meyering  <meyering@lucent.com>
23771
23772         * lib/file-type.h: Use the version from diffutils-2.8.2.
23773         * lib/file-type.c: Likewise.
23774
23775 2002-06-07  Jim Meyering  <meyering@lucent.com>
23776
23777         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
23778         They're needed at least for NetBSD 1.5.2.
23779         ($statxfs_includes): Include those same headers.
23780         ($statxfs_includes): Include sys/vfs.h if available.
23781         ($statxfs_includes): Likewise for sys/statvfs.h.
23782         Check for the following members in both structs statfs and statvfs:
23783         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
23784
23785 2002-06-01  Jim Meyering  <meyering@lucent.com>
23786
23787         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
23788         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
23789
23790 2002-05-28  Jim Meyering  <meyering@lucent.com>
23791
23792         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
23793         Reported by Volker Borchert.
23794
23795 2002-05-27  Jim Meyering  <meyering@lucent.com>
23796
23797         Fix a problem seen only on nonconforming systems whereby ls.c's
23798         use of localtime, and then of gettimeofday would cause trouble:
23799         the localtime call used to initialize rpl_gettimeofday's save
23800         mechanism would clobber ls's current local time information so
23801         that in any long listing the first file would always be listed
23802         with date 1970-01-01.  Analysis by Volker Borchert.
23803
23804         * lib/gettimeofday.c (localtime): Undefine.
23805         (rpl_localtime): New function.
23806
23807 2002-05-27  Jim Meyering  <meyering@lucent.com>
23808
23809         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
23810         localtime.
23811
23812         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
23813         use the replacement function; it wouldn't resolve at link time.
23814         Reported by Volker Borchert.
23815
23816 2002-05-22  Jim Meyering  <meyering@lucent.com>
23817
23818         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
23819         file-type.h.
23820         * lib/file-type.h: New file.
23821         * lib/file-type.c (file_type): New file/function.  Extracted from
23822         diffutils.
23823
23824 2002-04-30  Jim Meyering  <meyering@lucent.com>
23825
23826         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
23827
23828 2002-04-29  Paul Eggert  <eggert@twinsun.com>
23829
23830         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
23831
23832 2002-04-29  Paul Eggert  <eggert@twinsun.com>
23833
23834         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
23835         Do not check for alloca.h (no longer used) or stdbool.h (was never
23836         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
23837
23838 2002-04-29  Paul Eggert  <eggert@twinsun.com>
23839
23840         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
23841
23842 2002-04-29  Jim Meyering  <meyering@lucent.com>
23843
23844         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
23845         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
23846         Use AC_FUNC_STRNLEN here instead.
23847
23848         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
23849         With autoconf-2.53a, it's part of AC_PROG_CC.
23850
23851 2002-04-28  Paul Eggert  <eggert@twinsun.com>
23852
23853         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
23854         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
23855
23856 2002-04-28  Paul Eggert  <eggert@twinsun.com>
23857
23858         * lib/sig2str.h, lib/sig2str.c: New files.
23859         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
23860
23861 2002-04-28  Paul Eggert  <eggert@twinsun.com>
23862
23863         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
23864         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
23865         of 127, since 64 is the largest conceivable number for ancient
23866         nonstandard hosts.
23867         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
23868
23869 2002-04-28  Jim Meyering  <meyering@lucent.com>
23870
23871         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
23872
23873 2002-04-24  Jim Meyering  <meyering@lucent.com>
23874
23875         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
23876         (jm_PREREQ): Use it.
23877
23878         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
23879         mach/mach.h fcntl.h.
23880         Check for this function: setlocale.
23881
23882 2002-04-24  Jim Meyering  <meyering@lucent.com>
23883
23884         * lib/gettext.h: New file, from Gettext.
23885         * lib/Makefile.am (INCLUDES): Remove -I../intl.
23886         (libfetish_a_SOURCES): Add gettext.h.
23887
23888 2002-04-16  Jim Meyering  <meyering@lucent.com>
23889
23890         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
23891         ut_pid, ut_id, ut_exit.
23892
23893 2002-04-16  Jim Meyering  <meyering@lucent.com>
23894
23895         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
23896         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
23897         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
23898
23899 2002-04-12  Jim Meyering  <meyering@lucent.com>
23900
23901         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
23902         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
23903         existence of the getmntinfo function.  Needed for Darwin 5.3.
23904
23905         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
23906         This is necessary at least on Darwin 5.3.
23907
23908         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
23909         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
23910         strnlen.o in the library, and that makes some versions of ranlib
23911         object.
23912
23913 2002-04-12  Jim Meyering  <meyering@lucent.com>
23914
23915         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
23916
23917 2002-04-09  Jim Meyering  <meyering@lucent.com>
23918
23919         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
23920         to be more precise.  Rather than saying we're checking whether the
23921         function `works', say what we're testing.
23922         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
23923         Reported by Bruno Haible.
23924
23925 2002-03-10  Jim Meyering  <meyering@lucent.com>
23926
23927         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
23928         Suggestion from Santiago Vila.
23929
23930 2002-03-08  Jim Meyering  <meyering@lucent.com>
23931
23932         * lib/rename.c: Mention that this wrapper is needed also on
23933         mips-dec-ultrix4.4 systems.
23934
23935 2002-03-02  Jim Meyering  <meyering@lucent.com>
23936
23937         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
23938         not HAVE_CLOCK_SETTIME.
23939
23940 2002-02-27  Paul Eggert  <eggert@twinsun.com>
23941
23942         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
23943         Check for clock_settime.
23944
23945 2002-02-27  Paul Eggert  <eggert@twinsun.com>
23946
23947         * lib/nanosleep.h: Rename to....
23948         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
23949
23950         * lib/gettime.c: New file.
23951         * lib/settime.c: New file.
23952         * lib/stime.c: Remove.
23953
23954         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
23955         timespec.h.  Remove nanosleep.h.
23956
23957 2002-02-25  Paul Eggert  <eggert@twinsun.com>
23958
23959         * m4/acl.m4: New file.
23960         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
23961         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
23962
23963 2002-02-25  Paul Eggert  <eggert@twinsun.com>
23964
23965         * lib/acl.c, lib/acl.h: New files.
23966         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
23967
23968 2002-02-24  Jim Meyering  <meyering@lucent.com>
23969
23970         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
23971         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
23972         cause trouble.  Reported by Nelson Beebe.
23973
23974 2002-02-23  Paul Eggert  <eggert@twinsun.com>
23975
23976         * lib/path-concat.c (xpath_concat): Reorder code to pacify
23977         compilers that don't know that xalloc_die never returns.
23978
23979 2002-02-20  Jim Meyering  <meyering@lucent.com>
23980
23981         * lib/getdate.c: Regenerate using bison-1.33.
23982
23983 2002-02-17  Jim Meyering  <meyering@lucent.com>
23984
23985         * config/config.guess (main): Don't use `head -1'; it's no longer
23986         portable. Use `sed 1q' instead.
23987
23988 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
23989
23990         * m4/codeset.m4: Upgrade to gettext-0.11.
23991         * m4/gettext.m4: Upgrade to gettext-0.11.
23992         * m4/glibc21.m4: Upgrade to gettext-0.11.
23993         * m4/iconv.m4: Upgrade to gettext-0.11.
23994         * m4/isc-posix.m4: Upgrade to gettext-0.11.
23995         * m4/lcmessage.m4: Upgrade to gettext-0.11.
23996         * m4/lib-ld.m4: New file, from gettext-0.11.
23997         * m4/lib-link.m4: New file, from gettext-0.11.
23998         * m4/lib-prefix.m4: New file, from gettext-0.11.
23999         * m4/progtest.m4: Upgrade to gettext-0.11.
24000
24001 2002-02-15  Paul Eggert  <eggert@twinsun.com>
24002
24003         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
24004         (jm_PREREQ): Use it.
24005
24006 2002-02-15  Paul Eggert  <eggert@twinsun.com>
24007
24008         * lib/posixver.c, lib/posixver.h: New files.
24009         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
24010
24011 2002-02-02  Paul Eggert  <eggert@twinsun.com>
24012             Bruno Haible  <bruno@clisp.org>
24013
24014         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
24015         (fwrite_success_callback): New declaration.
24016         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
24017         print_unicode_char. Call failure callback instead of error.
24018         (fwrite_success_callback): New function.
24019         (exit_failure_callback): New function.
24020         (fallback_failure_callback): New function.
24021         (print_unicode_char): Call unicode_to_mb.
24022
24023 2002-01-26  Jim Meyering  <meyering@lucent.com>
24024
24025         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
24026         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
24027
24028 2002-01-26  Jim Meyering  <meyering@lucent.com>
24029
24030         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
24031
24032 2002-01-22  Paul Eggert  <eggert@twinsun.com>
24033
24034         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
24035
24036 2002-01-22  Jim Meyering  <meyering@lucent.com>
24037
24038         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
24039         Otherwise, some versions of automake would omit the rule that makes
24040         Makefile from Makefile.in.
24041
24042 2002-01-21  Paul Eggert  <eggert@twinsun.com>
24043
24044         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
24045         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
24046         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
24047         (memcoll): Set errno to zero if there is no error.
24048
24049         * lib/quotearg.c (quotearg_buffer_restyled):
24050         Fix bug with quoting buffers containing NUL when backslashing escapes.
24051         This bug was exposed by the other changes in this patch.
24052         (quotearg_n_options): New arg ARGSIZE.
24053         All callers changed.
24054         (quoting_options_from_style): New function.
24055         (quotearg_n_style): Use it.
24056         (quotearg_n_style_mem): New function.
24057
24058         * lib/quotearg.h (quotearg_n_style_mem): New function.
24059
24060 2002-01-19  Jim Meyering  <meyering@lucent.com>
24061
24062         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
24063         Remove useless quotes: DF_PROG="df".
24064         * m4/strnlen.m4: New file.
24065
24066 2002-01-16  Paul Eggert  <eggert@twinsun.com>
24067
24068         * lib/backupfile.c (ISDIGIT): Comment fix.
24069         * lib/getdate.y (ISDIGIT): Likewise.
24070         * lib/posixtm.c (ISDIGIT, year): Likewise.
24071         * lib/strverscmp.c (ISDIGIT): Likewise.
24072         * lib/userspec.c (ISDIGIT): Likewise.
24073
24074 2002-01-16  Jim Meyering  <meyering@lucent.com>
24075
24076         * lib/getdate.y: Add three semicolons, each just before a closing
24077         brace. Bison (as of version 1.31) no longer papers over that mistake.
24078
24079 2002-01-05  Jim Meyering  <meyering@lucent.com>
24080
24081         * lib/version-etc.c (version_etc_copyright): Update copyright year.
24082
24083 2001-12-19  Paul Eggert  <eggert@twinsun.com>
24084
24085         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
24086         not silently exit merely because the output buffer happens to
24087         have nothing pending.
24088
24089 2001-12-18  Paul Eggert  <eggert@twinsun.com>
24090
24091         See the big note in ../ChangeLog.
24092         * lib/human.c (suffixes): Prefer K to k for 1024.
24093         (generate_suffix_backwards): New function.
24094         (human_readable_inexact): Use it.
24095         * lib/xstrtol.c (__xstrtol): If there is no number but there
24096         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
24097         Accept 'K' as well as 'k'.
24098
24099 2001-12-15  Jim Meyering  <meyering@lucent.com>
24100
24101         * lib/regex.h (__restrict_arr): Update from libc.
24102
24103         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
24104         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
24105         (STREQ): Define.
24106
24107 2001-12-14  Jim Meyering  <meyering@lucent.com>
24108
24109         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
24110         Suggestion from Bruno Haible.
24111
24112 2001-12-10  Jim Meyering  <meyering@lucent.com>
24113
24114         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
24115         xrealloc, Instead, include "xalloc.h".
24116         (initbuffer): Don't cast xmalloc return value to char*.
24117         (readline): Reword comment.
24118         Don't cast xrealloc return value to char*
24119         Return NULL, not 0.
24120
24121 2001-12-09  Jim Meyering  <meyering@lucent.com>
24122
24123         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
24124         about `signed and unsigned type in conditional expression'.
24125         * lib/posixtm.c (posix_time_parse): Likewise.
24126
24127         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
24128
24129         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
24130         to avoid a pedantic warning.
24131
24132         * lib/getstr.c: Don't include assert.h.
24133         (getstr): Remove warning-evoking assertions.
24134         Return -1 if offset parameter is out of bounds.
24135         Change the type of a local from int to size_t.
24136
24137         * lib/strftime.c (my_strftime_localtime_r): Include this function
24138         definition in the `#if ! HAVE_TM_GMTOFF' block.
24139
24140         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
24141         Include xalloc.h instead.
24142
24143 2001-12-02  Jim Meyering  <meyering@lucent.com>
24144
24145         * lib/tempname.c: Don't declare getenv, thus reverting the change of
24146         2001-11-18.  It's no longer necessary, now that stdlib.h is always
24147         included.
24148
24149         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
24150         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
24151
24152 2001-11-30  Akim Demaille  <akim@epita.fr>
24153
24154         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
24155         before being defined.
24156
24157 2001-11-27  Paul Eggert  <eggert@twinsun.com>
24158
24159         * lib/quotearg.h (quotearg_n, quotearg_n_style):
24160         First arg is int, not unsigned.
24161         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
24162         (SIZE_MAX, UINT_MAX): New macros.
24163         (quotearg_n_options): Abort if N is negative.
24164         Avoid overflow check on hosts where size_t is 64 bits and int
24165         is 32 bits, as overflow is impossible there.
24166         Fix off-by-one typo that caused unnecessary reallocation.
24167
24168 2001-11-27  Jim Meyering  <meyering@lucent.com>
24169
24170         * lib/tempname.c: Merge with version from libc.
24171         * lib/regex.c: Likewise.
24172
24173         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
24174         systems for which STDC_HEADERS is 0, it was not included, resulting in
24175         a warning about an integer-to-pointer conversion problem with getenv.
24176         Reported by Volker Borchert.
24177
24178 2001-11-26  Jim Meyering  <meyering@lucent.com>
24179
24180         * lib/gtod.h: Remove file.
24181         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
24182         * lib/gettimeofday.c: Don't include gtod.h.
24183         (GTOD_init): Remove function.
24184         (rpl_gettimeofday): Do its job here instead, rather than aborting.
24185         Suggestion from Volker Borchert.
24186
24187 2001-11-23  Jim Meyering  <meyering@lucent.com>
24188
24189         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
24190         it.
24191         * lib/hash.c (struct hash_table): Define it here instead.
24192
24193 2001-11-22  Jim Meyering  <meyering@lucent.com>
24194
24195         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
24196
24197 2001-11-20  Jim Meyering  <meyering@lucent.com>
24198
24199         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
24200         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
24201
24202 2001-11-19  Jim Meyering  <meyering@lucent.com>
24203
24204         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
24205         directory.  Use "conftestXXXXXX" as the template.
24206         Suggestion from Paul Eggert.
24207
24208         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
24209         immediately, so the test doesn't mistakenly hit the max-open-files
24210         limit.
24211
24212 2001-11-18  Paul Eggert  <eggert@twinsun.com>
24213
24214         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
24215         (TEMPORARIES): New macro.
24216         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
24217         removes an artificial limitation (e.g. HP-UX 10.20, where
24218         TMP_MAX is 17576).
24219
24220 2001-11-18  Jim Meyering  <meyering@lucent.com>
24221
24222         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
24223
24224 2001-11-18  Jim Meyering  <meyering@lucent.com>
24225
24226         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
24227         on SunOS 4.
24228
24229         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
24230         files will be created before anything else.
24231
24232 2001-11-17  Paul Eggert  <eggert@twinsun.com>
24233
24234         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
24235         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
24236
24237 2001-11-17  Jim Meyering  <meyering@lucent.com>
24238
24239         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
24240         Prompted by a report from Bob Proulx.
24241
24242         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
24243         Instead, require UTILS_FUNC_MKSTEMP.
24244
24245 2001-11-17  Jim Meyering  <meyering@lucent.com>
24246
24247         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
24248         Now, that's done as part of AC_FUNC_STRTOD.
24249
24250 2001-11-17  Jim Meyering  <meyering@lucent.com>
24251
24252         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
24253         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
24254         rather than group writable.  Patch by Juan F. Codagnone.
24255
24256         * lib/readtokens.c: Remove explicit declarations of xmalloc and
24257         xrealloc, Instead, include "xalloc.h".
24258
24259         * lib/mountlist.c: Include unlocked-io.h after all system headers.
24260         Remove explicit declarations of xmalloc, xrealloc,
24261         and xstrdup.  Instead, include "xalloc.h".
24262
24263         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
24264         unlocked-io.h.
24265         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
24266         Likewise.
24267         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
24268
24269         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
24270         Reported by Padraig Brady.
24271
24272         * lib/mkstemp.c: #undef mkstemp.
24273         Include config.h.
24274         (rpl_mkstemp): Rename from mkstemp.
24275         Protoize.
24276
24277 2001-11-16  Jim Meyering  <meyering@lucent.com>
24278
24279         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
24280         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
24281         determine the amount of total physical memory, use pstat_getstatic.
24282         HPUX-11 doesn't define _SC_PHYS_PAGES.
24283         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
24284         If sysconf couldn't be used to determine the amount of available
24285         physical memory, use both pstat_getstatic and pstat_getdynamic.
24286         Based on a patch from Bob Proulx.
24287
24288 2001-11-10  Jim Meyering  <meyering@lucent.com>
24289
24290         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
24291         (jm_PREREQ): Use it.
24292
24293 2001-11-09  Jim Meyering  <meyering@lucent.com>
24294
24295         * m4/jm-macros.m4: Require autoconf-2.52f.
24296         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
24297         Use these AC_-prefixed names, not the AM_-prefixed ones.
24298
24299         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
24300
24301 2001-11-05  Jim Meyering  <meyering@lucent.com>
24302
24303         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
24304
24305 2001-11-04  Jim Meyering  <meyering@lucent.com>
24306
24307         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
24308         $DEFS.
24309
24310 2001-11-03  Jim Meyering  <meyering@lucent.com>
24311
24312         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
24313         of AC_DEFUN.
24314
24315         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
24316         know the name of the variable in the macro definition.
24317
24318 2001-11-03  Jim Meyering  <meyering@lucent.com>
24319
24320         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
24321         in argmatch_to_argument call.
24322
24323         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
24324         argument.
24325
24326         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
24327         e.g., a fault due to an attempt to free a NULL pointer.
24328
24329 2001-11-01  Jim Meyering  <meyering@lucent.com>
24330
24331         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
24332         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
24333
24334 2001-11-01  Jim Meyering  <meyering@lucent.com>
24335
24336         * lib/dirfd.c, lib/dirfd.h: New files.
24337         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
24338
24339         * lib/hash.c (hash_print) [TESTING]: Clean up.
24340
24341 2001-10-22  Paul Eggert  <eggert@twinsun.com>
24342
24343         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
24344         to avoid a warning if -Wall.
24345
24346 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
24347
24348         * README: New file
24349         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
24350         (per RMS's instructions, this is now the canonical source)
24351         * lgpl/, gpl/: New directories.
24352
24353 2001-10-21  Paul Eggert  <eggert@twinsun.com>
24354
24355         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
24356
24357 2001-10-21  Jim Meyering  <meyering@lucent.com>
24358
24359         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
24360         this code would end up calling gettext even in packages built
24361         with --disable-nls.
24362         * lib/getopt.c (_): Likewise.
24363         * lib/regex.c (_): Likewise.
24364
24365 2001-10-20  Paul Eggert  <eggert@twinsun.com>
24366
24367         * m4/error.m4 (jm_PREREQ_ERROR):
24368         Do not invoke AC_CHECK_FUNCS with strerror_r, as
24369         AC_FUNC_STRERROR_R does that.
24370         Check for strerror declaration.
24371
24372         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
24373         are supposed to have them these days.
24374         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
24375         Merge changes from latest Autoconf CVS.
24376         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
24377         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
24378         POSIX decided to standardize on the int flavor of strerror_r.
24379
24380 2001-10-20  Paul Eggert  <eggert@twinsun.com>
24381
24382         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
24383         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
24384         Use strerror_r that is only a macro, even if it is not a function.
24385         (strerror): Check for HAVE_DECL_STRERROR before declaring.
24386         (private_strerror): Use prototypes, not old-style function definition.
24387         (print_errno_message): New function.
24388         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
24389         char*-flavored one.
24390         (error_tail, error, error_at_line): Use it.
24391
24392 2001-10-11  Jim Meyering  <meyering@lucent.com>
24393
24394         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
24395         and quote_n (1, ... to avoid clobbering a buffer.
24396
24397 2001-10-05  Jim Meyering  <meyering@lucent.com>
24398
24399         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
24400         hash-pjw.h.
24401         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
24402         * lib/hash-pjw.h: New file.
24403
24404 2001-09-30  Jim Meyering  <meyering@lucent.com>
24405
24406         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
24407         `struct fsstat' has the `f_fstypename' member.
24408         Use that to define FS_TYPE, which is now used to make
24409         the getfsstat link test tighter.
24410
24411 2001-09-30  Jim Meyering  <meyering@lucent.com>
24412
24413         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
24414         Include <sys/ucred.h>, for Apple Darwin.
24415         Include sys/mount.h and sys/fs_types.h only if available.
24416         (FS_TYPE): Define.
24417         (read_filesystem_list): Use FS_TYPE.
24418
24419 2001-09-29  Paul Eggert  <eggert@twinsun.com>
24420
24421         * lib/exclude.c (excluded_filename): 0 -> false, since it's
24422         a boolean context.
24423
24424 2001-09-29  Jim Meyering  <meyering@lucent.com>
24425
24426         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
24427         [one-argument getmntent function]): Include stdio.h before mntent.h.
24428         SunOS 4.1.x needs it for the declaration of `FILE'.
24429         Patch by Volker Borchert.
24430
24431         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
24432         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
24433         sys/fs_types.h, and make the link-test for getfsstat guard #include
24434         directives with appropriate #if HAVE_*_H tests so that we can
24435         detect getfsstat on Apple Darwin1.3.7 systems.
24436         Reported by Nelson Beebe.
24437         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
24438
24439 2001-09-28  Paul Eggert  <eggert@twinsun.com>
24440
24441         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
24442         #defines strtoimax.  Also treat the other strto* functions
24443         like strtoimax.
24444
24445         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
24446         Check for strtoul and strtoumax,
24447         as those declarations are made even in the signed case.
24448         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
24449         Likewise, for strtol and strtoimax.
24450
24451 2001-09-28  Paul Eggert  <eggert@twinsun.com>
24452
24453         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
24454         #defines strtoimax.  Also treat the other strto* functions
24455         like strtoimax.
24456
24457         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
24458         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
24459         (strtoimax, strtoumax): Do not declare if already defined as a macro.
24460
24461 2001-09-26  Jim Meyering  <meyering@lucent.com>
24462
24463         Most macros in unlocked-io.h had the wrong number of arguments.
24464         * lib/gen-uio: New script.
24465         (USE_UNLOCKED_IO): Define to 1 if not already defined.
24466         * lib/unlocked-io.hin: Remove file.
24467         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
24468         rather than trying to embed it here.
24469         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
24470         Reported by Padraig Brady.
24471
24472 2001-09-25  Volker Borchert  <bt@teknon.de>
24473
24474         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
24475         `result'.
24476
24477 2001-09-24  Jim Meyering  <meyering@lucent.com>
24478
24479         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
24480
24481 2001-09-23  Jim Meyering  <meyering@lucent.com>
24482
24483         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
24484         instead of the mere test for existence of mntent.h.  The latter
24485         would get a false-positive on AIX 3.4 systems.
24486         In the outer getmntent if-block, don't die if neither of the getmntent
24487         tests succeeds.  Instead, just fall through and continue with the
24488         remaining tests.
24489
24490 2001-09-23  Jim Meyering  <meyering@lucent.com>
24491
24492         * lib/mountlist.c: Remove useless parentheses in #if directives.
24493         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
24494         the deprecated MOUNTED symbol is no longer defined in mntent.h.
24495
24496 2001-09-22  Jim Meyering  <meyering@lucent.com>
24497
24498         * m4/gettext.m4: New file.  From gettext.
24499         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
24500         * m4/progtest.m4: Likewise
24501         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
24502         * m4/glibc21.m4: Likewise.
24503
24504         * m4/libintl.m4: Remove.  No longer used.
24505
24506 2001-09-22  Jim Meyering  <meyering@lucent.com>
24507
24508         * lib/localcharset.c: Update from latest gettext.
24509         * lib/config.charset: Likewise.
24510
24511 2001-09-20  Jim Meyering  <meyering@lucent.com>
24512
24513         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
24514         strtoimax.
24515         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
24516         strtoumax.
24517
24518 2001-09-20  Jim Meyering  <meyering@lucent.com>
24519
24520         * lib/xstrtol.c (strtoimax): Guard declaration with
24521         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
24522         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
24523         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
24524         (strtoumax): Likewise, for completeness (it wasn't necessary).
24525
24526 2001-09-17  Paul Eggert  <eggert@twinsun.com>
24527
24528         * lib/strtoimax.c (HAVE_LONG_LONG):
24529         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
24530         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
24531         to work around bug in IBM C compiler.
24532
24533 2001-09-17  Jim Meyering  <meyering@lucent.com>
24534
24535         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
24536         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
24537         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
24538         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
24539         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
24540         whenever the right hand side need not be expanded by the shell.
24541
24542 2001-09-16  Paul Eggert  <eggert@twinsun.com>
24543
24544         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
24545         library.  It's not correct, as some older glibcs are buggy.
24546         fnmatch wasn't fixed until glibc 2.2.
24547
24548         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
24549         special shell magic here.
24550
24551 2001-09-16  Jim Meyering  <meyering@lucent.com>
24552
24553         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
24554         * m4/jm-macros.m4: Require it.
24555
24556 2001-09-16  Jim Meyering  <meyering@lucent.com>
24557
24558         * lib/mkdir.c: New file.
24559
24560 2001-09-15  Jim Meyering  <meyering@lucent.com>
24561
24562         * m4/jm-macros.m4: Check for help2man.
24563
24564 2001-09-11  Jim Meyering  <meyering@lucent.com>
24565
24566         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
24567         The body, by Paul Eggert, was moved here from configure.in.
24568         * m4/jm-macros.m4: Require UTILS_HOST_OS.
24569
24570 2001-09-04  Paul Eggert  <eggert@twinsun.com>
24571
24572         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
24573         (jm_PREREQ): Use it.
24574
24575 2001-09-04  Paul Eggert  <eggert@twinsun.com>
24576
24577         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
24578         Use ssize_t, not int, to store result of readlink.
24579         Check for ssize_t overflow as well as size_t overflow,
24580         as POSIX says the result of readlink is implementation-defined
24581         when ssize_t overflows.
24582         Remove unnecessary cast to char*.
24583         Use free+malloc instead of realloc, as the storage doesn't need
24584         to be preserved and it's clearer and can be more efficient that way.
24585         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
24586         * lib/xreadlink.h (xreadlink): Update prototype.
24587
24588 2001-09-04  Paul Eggert  <eggert@twinsun.com>
24589
24590         * lib/xgetcwd.c: Revert some of the previous change; intead,
24591         fix the HAVE_GETCWD_NULL code to behave more like the
24592         !HAVE_GETCWD_NULL code used to.
24593
24594         Include "xalloc.h".
24595         (xgetcwd): Do not return NULL when memory is exhausted; instead,
24596         invoke xalloc_die.
24597
24598 2001-09-03  Paul Eggert  <eggert@twinsun.com>
24599
24600         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
24601         sys/param.h, as pathmax.h includes them.
24602
24603 2001-09-03  Paul Eggert  <eggert@twinsun.com>
24604
24605         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
24606         (jm_PREREQ_XGETCWD): New macro.
24607
24608         * m4/getcwd.m4: New file.
24609
24610 2001-09-03  Paul Eggert  <eggert@twinsun.com>
24611
24612         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
24613         like the HAVE_GETCWD_NULL code.
24614         Include pathmax.h if not HAVE_GETCWD.
24615         Do not include xalloc.h.
24616         (INITIAL_BUFFER_SIZE): New symbol.
24617         Do not use xmalloc / xrealloc, since the caller is responsible for
24618         handling errors.  Preserve errno around `free' during failure.
24619         Do not overrun buffer when using getwd.
24620
24621 2001-09-03  Paul Eggert  <eggert@twinsun.com>
24622
24623         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
24624         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
24625         getcwd (NULL, 0).
24626
24627 2001-09-03  Paul Eggert  <eggert@twinsun.com>
24628
24629         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
24630         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
24631         spotted by Jim Meyering.
24632
24633 2001-09-03  Jim Meyering  <meyering@lucent.com>
24634
24635         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
24636         failure.
24637
24638 2001-09-02  Jim Meyering  <meyering@lucent.com>
24639
24640         * lib/error.c: Update from GNU libc.
24641
24642 2001-09-01  Jim Meyering  <meyering@lucent.com>
24643
24644         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
24645         Used by df.
24646
24647 2001-09-01  Jim Meyering  <meyering@lucent.com>
24648
24649         * lib/xreadlink.c: New file.
24650         * lib/xreadlink.h: New file.
24651         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
24652         xreadlink.h.
24653
24654         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
24655         doesn't conflict with sparc Solaris 7's definition in
24656         /usr/include/sys/int_types.h.
24657
24658         * lib/exclude.c: Use `""', not `<>' to #include non-system header
24659         files.
24660         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
24661         and strncasecmp as r-values.  Unixware didn't have declarations.
24662
24663 2001-08-31  Paul Eggert  <eggert@twinsun.com>
24664
24665         * lib/xstrtol.h: Add copyright notice.
24666         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
24667         LONGINT_INVALID_SUFFIX_CHAR.
24668
24669 2001-08-31  Paul Eggert  <eggert@twinsun.com>
24670
24671         * lib/xstrtol.c (strtoimax): New decl.
24672
24673 2001-08-31  Paul Eggert  <eggert@twinsun.com>
24674
24675         * lib/xgetcwd.c: Don't include pathmax.h.
24676         Include stdlib.h and unistd.h if available.
24677         Include xalloc.h.
24678         (xmalloc, xstrdup, free): Remove decls.
24679         (xgetcwd): Don't assume sizes fit in unsigned.
24680         Check for overflow when computing sizes.
24681         Simplify reallocation code.
24682
24683 2001-08-31  Paul Eggert  <eggert@twinsun.com>
24684
24685         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
24686         a directory's st_size can have an arbitrary value, so the old
24687         usage could waste an arbitrary amount of memory.  All uses
24688         changed.
24689         * lib/savedir.h: Update prototype.
24690
24691 2001-08-31  Paul Eggert  <eggert@twinsun.com>
24692
24693         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
24694
24695         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
24696         old strtoimax.c.
24697
24698         Also, make the following further changes to make this file's
24699         configuration more similar to that of strtol.c:
24700         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
24701         (strtoumax, uintmax_t, strtoull, strtol): Remove.
24702         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
24703         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
24704         changed to signed values.
24705
24706         And make the following changes as well:
24707         Fix copyright notice, as 1999 was missing.
24708         (verify): New macro.
24709         (strtoimax): Check sizes at compile-time, not run-time.
24710         Prefer strtol to strtoll if both work.
24711         (main): Remove; it was not that useful and was a pain to maintain.
24712
24713         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
24714
24715 2001-08-31  Jim Meyering  <meyering@lucent.com>
24716
24717         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
24718         Use an initial, malloc'd, buffer of length 128 rather than
24719         a statically allocated one of length 1024.
24720
24721 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24722
24723         Simplify code, partly by assuming autoconf 2.52 semantics.
24724
24725         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
24726
24727         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
24728         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
24729         All uses removed.
24730         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
24731         Move AC_REQUIRE to next-to-top level, to avoid confusion.
24732         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
24733         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
24734         jm_AC_HEADER_INTTYPES_H.
24735         * m4/jm-macros.m4 (jm_MACROS): Likewise.
24736
24737         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
24738
24739         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
24740         Quote first arg of AC_DEFUN.
24741         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
24742         since they are needed to parse the include file even if we need
24743         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
24744         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
24745         but with opposite signedness.
24746
24747 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24748
24749         Merge 'exclude' changes from tar 1.13.22.
24750         This fixes one or two unlikely storage allocation overflow bugs,
24751         but doesn't change user-visible behavior otherwise.
24752
24753 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24754
24755         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
24756         (jm_PREREQ_EXCLUDE): New macro.
24757
24758 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24759
24760         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
24761         tm to be declared.
24762
24763 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24764
24765         * lib/hash.c: Remove '2001' from copyright notice.
24766
24767 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24768
24769         * lib/full-write.h: New file.
24770         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
24771         * lib/full-write.c: Correct credits, as cccp.c no longer
24772         exists and anyway it was so heavily changed from the old cccp
24773         code as to be unrecognizable.  Include full-write.h.
24774         (full_write) Return size_t, with short writes meaning failure.
24775         All callers changed.  This fixes a bug with large buffers
24776         on 64-bit hosts.
24777         * lib/utime.c: Include full-write.h.
24778
24779 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24780
24781         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
24782         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
24783         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
24784         Include if available.
24785         (<xalloc.h>): Include
24786         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
24787         (verify): New macro.  Use it to verify that EXCLUDE macros do not
24788         collide with FNM macros.
24789         (struct patopts): New struct.
24790         (struct exclude): Use it, as exclude patterns now come with options.
24791         (new_exclude): Support above changes.
24792         (new_exclude, add_exclude_file):
24793         Initial size must now be a power of two to simplify overflow checking.
24794         (free_exclude, fnmatch_no_wildcards): New function.
24795         (excluded_filename): No longer requires options arg, as the options
24796         are determined by add_exclude.  Now returns bool, not int.
24797         (excluded_filename, add_exclude):
24798         Add support for the fancy new exclusion options.
24799         (add_exclude, add_exclude_file): Now takes int options arg.
24800         Check for arithmetic overflow when computing sizes.
24801         (add_exclude_file): xrealloc might modify errno, so don't
24802         realloc until after errno might be used.
24803
24804         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
24805         New macros.
24806         (free_exclude): New decl.
24807         (add_exclude, add_exclude_file): Now takes int options arg.
24808         (excluded_filename): No longer requires options arg, as the options
24809         are determined by add_exclude.  Now returns bool, not int.
24810
24811 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24812
24813         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
24814
24815 2001-08-27  Jim Meyering  <meyering@lucent.com>
24816
24817         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
24818
24819         * lib/version-etc.c (N_): Remove definition.
24820         Revert most of last change.
24821         Instead, simply don't mark the `Copyright...' string for translation.
24822         Based on advice from Paul Eggert.
24823
24824         * lib/strtoxmax.c: Tweak comment.
24825
24826 2001-08-26  Jim Meyering  <meyering@lucent.com>
24827
24828         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
24829
24830         * m4/xstrtoimax.m4: New file.
24831         * m4/xstrtoumax.m4: Add comments explaining why we
24832         AC_REPLACE_FUNCS(strtol).
24833
24834 2001-08-26  Jim Meyering  <meyering@lucent.com>
24835
24836         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
24837         of copyright with `%s' so translators don't get an untranslated
24838         message in 2002.
24839         (COPYRIGHT_YEAR): Define.
24840         (version_etc): Use fprintf rather than fputs.
24841         Suggestion from Ulrich Drepper.
24842
24843         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
24844
24845         * lib/strtoll.c: New file, from GNU libc.
24846         * lib/xstrtoimax.c: New file.
24847
24848         * lib/xstrtol.h: Add xstrtoimax.
24849         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
24850         * lib/strtoimax.c: New file.  Likewise, but first define
24851         STRTOUXMAX_SIGNED.
24852
24853         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
24854         ...
24855         * lib/strtoxmax.c: ... then renamed to this.
24856
24857 2001-08-18  Paul Eggert  <eggert@twinsun.com>
24858
24859         * m4/inttypes.m4: Add AC_PREREQ(2.13).
24860         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
24861         (jm_AC_TYPE_INTMAX_T): New macro.
24862         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
24863
24864         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
24865
24866         * m4/longlong.m4: Renamed from ulonglong.m4.
24867         * m4/inttypes.m4: Renamed from inttypes_h.m4.
24868         * m4/uintmax_t.m4: Removed.
24869
24870 2001-08-13  Paul Eggert  <eggert@twinsun.com>
24871
24872         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
24873         Port to Solaris 8, where 'sed' requires a space after the 'r'
24874         command, and where sh dislikes "$/".  Clean up the spacing a bit.
24875         Redirect output to $tmp just once.
24876
24877 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
24878
24879         * lib/addext.c (<errno.h>): Include.
24880         (errno): Declare if not defined.
24881         (addext): Work correctly when pathconf returns -1 and leaves
24882         errno alone because there is no limit.  Also, work even if
24883         pathconf returns a value greater than SIZE_MAX.
24884
24885 2001-08-12  Jim Meyering  <meyering@lucent.com>
24886
24887         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
24888         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
24889         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
24890         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
24891         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
24892         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
24893         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
24894         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
24895         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
24896         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
24897         utime.m4, utimes.m4, xstrtoumax.m4:
24898         Quote the first argument in each use of AC_DEFUN.
24899
24900 2001-08-12  Jim Meyering  <meyering@lucent.com>
24901
24902         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
24903         Simply `return getcwd (NULL, 0);'.
24904         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
24905         Use 1300 as initial value for length, not PATH_MAX.
24906
24907         * lib/pathmax.h: Clean up cpp syntax.
24908
24909 2001-08-12  Jim Meyering  <meyering@lucent.com>
24910
24911         * lib/gettimeofday.c: New file.
24912         * lib/gtod.h: New file.
24913         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
24914
24915 2001-08-05  Jim Meyering  <meyering@lucent.com>
24916
24917         * m4/jm-macros.m4: Require autoconf-2.52.
24918
24919 2001-08-04  Jim Meyering  <meyering@lucent.com>
24920
24921         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
24922         stmt, to get in sync with glibc.
24923
24924 2001-08-03  Paul Eggert  <eggert@twinsun.com>
24925
24926         The following changes are from gettext 0.10.39 as maintained by
24927         Bruno Haible.
24928
24929         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
24930         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
24931         with inverted sense.  All uses changed.
24932
24933         * lib/mbswidth.c: Don't include <limits.h>.
24934         Include <stdlib.h> and <string.h> unconditionally.
24935         (iswcntrl, mbsinit, ISCNTRL): New macros.
24936         (mbsnwidth): Use K&R style function declarations.
24937         Don't bother checking for MB_LEN_MAX == 1, since the compiler
24938         can optimize it when MB_CUR_MAX == 1.
24939         The width of control characters is zero, not 1.
24940
24941 2001-08-03  Paul Eggert  <eggert@twinsun.com>
24942
24943         The following changes are from gettext 0.10.39 as maintained by
24944         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
24945
24946         * m4/codeset.m4: Upgrade to serial AM1.
24947         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
24948         all uses changed.  Quote first arg of AC_DEFUN.
24949         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
24950
24951         * m4/iconv.m4: Upgrade to serial AM2.
24952         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
24953         Add --with-libconv-prefix.
24954         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
24955         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
24956         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
24957         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
24958         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
24959
24960         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
24961         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
24962         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
24963         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
24964         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
24965         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
24966         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
24967         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
24968         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
24969
24970         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
24971         string.h any more.
24972
24973         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
24974         not the default value.
24975
24976         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
24977         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
24978         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
24979         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
24980         Also check for iswcntrl, used for wcwidth fallback.
24981         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
24982         to Autoconf 2.13.
24983
24984 2001-08-03  Jim Meyering  <meyering@lucent.com>
24985
24986         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
24987         as it was in the original.  Reported by Paul Eggert.
24988
24989 2001-07-16  Jim Meyering  <meyering@lucent.com>
24990
24991         * m4/gettimeofday.m4: New file.
24992         Prompted by a report from Bernhard Baehr.
24993
24994 2001-07-15  Jim Meyering  <meyering@lucent.com>
24995
24996         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
24997         stuff. Now it's in ../Makefile.cfg.
24998
24999 2001-07-15  Jim Meyering  <meyering@lucent.com>
25000
25001         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
25002         (BUILT_SOURCES): Add unlocked-io.h.
25003         (io_functions): Define.
25004         (unlocked-io.h): New rule.
25005         (DISTCLEANFILES): Add unlocked-io.h.
25006         (all-local): Depend on unlocked-io.h, to ensure it is created.
25007
25008         * lib/unlocked-io.hin: New file
25009
25010         * lib/regex.c: Update from glibc.
25011
25012 2001-07-05  Jim Meyering  <meyering@lucent.com>
25013
25014         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
25015         recommendation.
25016         (libfetish_a_SOURCES): Put all .h files here instead.
25017         Remove a thus-exposed (better checks in automake) duplicate and
25018         two unnecessary .h files.
25019
25020 2001-07-04  Jim Meyering  <meyering@lucent.com>
25021
25022         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
25023         that generates jm-glibc-io.m4 so that it doesn't trigger any make
25024         distcheck failure.
25025
25026 2001-07-02  Jim Meyering  <meyering@lucent.com>
25027
25028         The following changes were prompted by suggestions from Bruno Haible.
25029
25030         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
25031         is now generated.
25032         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
25033         definition of EXTRA_DIST.
25034         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
25035         ensure that the generated file is created/updated whenever the list
25036         of $(unlocked_functions) is changed.
25037         (jm-glibc-io.m4): New rule.
25038         (unlocked-io.h): New rule -- currently unused.
25039
25040 2001-06-24  Jim Meyering  <meyering@lucent.com>
25041
25042         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
25043         unmatched right bracket, rather than kludging it with an extra,
25044         falsely-matching quote in a comment.  Patch by Akim Demaille.
25045
25046 2001-06-11  Jim Meyering  <meyering@lucent.com>
25047
25048         * lib/regex.c: Update from GNU libc.
25049
25050 2001-05-27  Jim Meyering  <meyering@lucent.com>
25051
25052         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
25053         Check for ut_type in struct utmp.
25054
25055 2001-05-27  Jim Meyering  <meyering@lucent.com>
25056
25057         * lib/readutmp.h (UT_TYPE): Define.
25058
25059 2001-05-24  Jim Meyering  <meyering@lucent.com>
25060
25061         * lib/argmatch.c: Include "quote.h".
25062         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
25063         quote function.  Reported by Göran Uddeborg.
25064
25065 2001-05-22  Jim Meyering  <meyering@lucent.com>
25066
25067         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
25068         now that we use the package-supplied version unconditionally.
25069         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
25070
25071 2001-05-21  Jim Meyering  <meyering@lucent.com>
25072
25073         * m4/regex.m4: Change a couple backticks to single quotes to avoid
25074         shell syntax errors.
25075
25076 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
25077
25078         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
25079
25080 2001-05-20  Paul Eggert  <eggert@twinsun.com>
25081
25082         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
25083         Don't bother to check library strftime, since
25084         we'll be using our own my_strftime function anyway.
25085         Define my_strftime instead of strftime.
25086
25087 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
25088
25089         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
25090         which is not yet declared.
25091
25092 2001-05-15  Jim Meyering  <meyering@lucent.com>
25093
25094         * m4/regex.m4: Use proper quoting so brackets appear in the test
25095         program.
25096         Reported by, and with help from, Bruno Haible.
25097
25098 2001-05-13  Jim Meyering  <meyering@lucent.com>
25099
25100         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
25101         undefined.
25102
25103 2001-05-11  Paul Eggert  <eggert@twinsun.com>
25104
25105         dirname code cleanup.  base_name now behaves more compatibly
25106         with POSIX basename when given file names that have trailing
25107         slashes, and similarly for dir_name.  Add new primitives
25108         base_len and dir_len.  Put the directory-name-related decls
25109         into dirname.h.
25110
25111         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
25112         * lib/backupfile.c (base_name): Likewise.
25113         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
25114         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
25115         * lib/makepath.c (strip_trailing_slashes): Likewise.
25116         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
25117         ISSLASH): Likewise.
25118         * lib/rename.c (strip_trailing_slashes): Likewise.
25119         * lib/same.c (base_name): Likewise.
25120         * lib/stripslash.c (ISSLASH): Likewise.
25121
25122         * lib/addext.c: Include <dirname.h> after size_t is defined.
25123         * lib/backupfile.c: Likewise.
25124
25125         * lib/addext.c (addext): Use base_len to trim redundant
25126         trailing slashes instead of doing it ourselves.
25127         But do not trim the last slash if it is not redundant.
25128
25129         * lib/backupfile.c (find_backup_file_name,
25130         max_backup_version): Use base_len instead of rolling it ourselves.
25131         Handle the case of "" and (on DOS) "C:" correctly.
25132
25133         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
25134         needed. Include <string.h>, <dirname.h>.
25135         (base_name): Allow file names ending in slashes, other than names
25136         that are all slashes.  In this case, return the basename followed
25137         by the slashes.  This is more general, and can be used in places
25138         where the original base_name purposely had an assertion failure.
25139         (base_len): New function.
25140
25141         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
25142         Do not include <assert.h>; no longer needed.
25143         Include xalloc.h.
25144         (memrchr): Remove decl.
25145         (dir_name_r): Remove.
25146         (dir_len): Renamed from dirlen.  All callers changed.
25147         Rewrite in terms of base_name, for simplicity and consistency.
25148         (dir_name): Never return NULL.  All callers changed.
25149         Do not include <stdlib.h> in test program; no longer needed.
25150         return 0; is fine for test program.
25151
25152         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
25153         New macros.
25154         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
25155
25156         * lib/path-concat.c (path_concat): Use base_len to compute
25157         base length, not strlen; this means we cannot rely on memcpy
25158         to null-terminate.
25159
25160         * lib/same.c (STREQ): Remove.
25161         (same_name): Handle the case where the basename ends in trailing '/'.
25162
25163         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
25164         a slash was stripped.  Do not strip the last slash after a
25165         file system prefix.
25166
25167 2001-05-11  Paul Eggert  <eggert@twinsun.com>
25168
25169         * lib/Makefile.am (libfetish_a_SOURCES):
25170         Add strftime.c, since we now compile it on all hosts.
25171
25172         * lib/strftime.c (my_strftime):
25173         Define to nstrftime if emacs, but only if my_strftime is not defined.
25174         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
25175         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
25176         Add one more extra argument: a nanoseconds value.
25177         All uses changed.
25178         (ns): New macro.
25179         (my_strftime function): Add %N format.
25180         (emacs_strftimeu): Renamed from emacs_strftime,
25181         with extra ut argument.
25182
25183 2001-05-09  Paul Eggert  <eggert@twinsun.com>
25184
25185         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
25186
25187 2001-04-21  Jim Meyering  <meyering@lucent.com>
25188
25189         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
25190         doesn't interfere.
25191
25192 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
25193
25194         * m4/ftruncate.m4: Check for chsize.
25195         Link with ftruncate.o unconditionally if ftruncate is missing.
25196         This was required when cross-compiling to i586-mingw32msvc.
25197
25198 2001-04-08  Jim Meyering  <meyering@lucent.com>
25199
25200         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
25201         recomputed; that's necessary when the offset spans a DST transition.
25202         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
25203
25204 2001-04-02  Jim Meyering  <meyering@lucent.com>
25205
25206         * lib/regex.h, regex.c: Update from GNU libc.
25207
25208 2001-03-24  Jim Meyering  <meyering@lucent.com>
25209
25210         * m4/jm-macros.m4: Require autoconf-2.49d.
25211
25212 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
25213
25214         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
25215
25216 2001-03-19  Paul Eggert  <eggert@twinsun.com>
25217
25218         * lib/version-etc.c (version_etc_copyright): Update to 2001.
25219
25220 2001-03-17  Jim Meyering  <meyering@lucent.com>
25221
25222         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
25223         now that the version in autoconf is equivalent.
25224         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
25225
25226         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
25227         Suggestion from Akim Demaille.
25228
25229         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
25230         (jm_PREREQ_TEMPNAME): New function.
25231
25232 2001-03-16  Paul Eggert  <eggert@twinsun.com>
25233
25234         * lib/tempname.c (uint64_t): Define to uintmax_t if
25235         not defined, and if UINT64_MAX is not defined.
25236         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
25237         Reported by John David Anglin.
25238
25239 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
25240
25241         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
25242         resolve alias if codeset is empty.
25243         * lib/config.charset (BeOS): Use wildcard syntax.
25244
25245 2001-03-13  Jim Meyering  <meyering@lucent.com>
25246
25247         * lib/path-concat.c (path_concat)
25248         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
25249         concatenating e.g., `C:' and `foo'.
25250         From Bruno Haible.
25251
25252 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
25253
25254         * lib/localcharset.c (locale_charset): Don't use
25255         setlocale(LC_CTYPE,NULL). Don't return NULL.
25256         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
25257
25258 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
25259
25260         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
25261         support for DOS/DJGPP.
25262
25263 2001-03-01  Paul Eggert  <eggert@twinsun.com>
25264
25265         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
25266         lacks mkstemp.  Compile our own tempname.c if we compile our own
25267         mkstemp.c, as mkstemp relies on tempname.
25268
25269 2001-03-01  Jim Meyering  <meyering@lucent.com>
25270
25271         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
25272         AH_VERBATIM really does output its argument verbatim.
25273
25274 2001-02-28  Paul Eggert  <eggert@twinsun.com>
25275
25276         * lib/Makefile.am (libfetish_a_SOURCES):
25277         Add dup-safer.c, fopen-safer.c.
25278         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
25279
25280         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
25281         * lib/unistd-safer.h: New files.
25282
25283 2001-02-25  Paul Eggert  <eggert@twinsun.com>
25284
25285         The mkstemp replacement is taken from glibc 2.2.2, with some
25286         portability fixes for use outside glibc, as follows:
25287
25288         * lib/tempname.c (struct_stat64): New macro.
25289         (direxists, __gen_tempname): Use it.
25290         This avoids a portability problem with Solaris 8.
25291
25292         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
25293         (<stddef.h>, <stdint.h>, <string.h>):
25294         Include only if STDC_HEADERS || _LIBC.
25295         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
25296         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
25297         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
25298         (__set_errno): Define this macro if <errno.h> doesn't.
25299         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
25300         Define these macros if <stdio.h> doesn't.
25301         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
25302         Define these macros if <sys/stat.h>
25303         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
25304         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
25305         __xstat64): Define if not _LIBC.
25306         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
25307         (__gen_tempname): Invoke gettimeofday only if
25308         HAVE_GETTIMEOFDAY || _LIBC;
25309         otherwise, fall back on plain "time".
25310         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
25311
25312         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
25313
25314         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
25315
25316 2001-02-18  Paul Eggert  <eggert@twinsun.com>
25317
25318         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
25319
25320 2001-02-17  Paul Eggert  <eggert@twinsun.com>
25321
25322         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
25323         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
25324         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
25325         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
25326
25327 2001-02-17  Paul Eggert  <eggert@twinsun.com>
25328
25329         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
25330         Remove workaround macros for hosts that have mbrtowc but not
25331         mbstate_t, as we now insist on proper declarations for both
25332         before using mbrtowc.
25333
25334 2001-02-17  Jim Meyering  <meyering@lucent.com>
25335
25336         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
25337         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
25338         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
25339         UnixWare 7.1.1.
25340
25341         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
25342         rather than AC_CACHE_VAL.
25343
25344 2001-02-17  Jim Meyering  <meyering@lucent.com>
25345
25346         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
25347         around included file name.
25348
25349         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
25350
25351         * lib/strftime.c: Update from GNU libc (the only changes were to
25352         comments).
25353
25354 2001-02-17  Jim Meyering  <meyering@lucent.com>
25355
25356         * lib/regex.c: Update from libc.
25357
25358 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
25359
25360         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
25361         clash.
25362
25363 2001-02-16  Paul Eggert  <eggert@twinsun.com>
25364
25365         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
25366         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
25367         Reported by Mark Hounschell via Paul Eggert.
25368
25369 2001-02-07  Jim Meyering  <meyering@lucent.com>
25370
25371         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
25372
25373 2001-02-05  Jim Meyering  <meyering@lucent.com>
25374
25375         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
25376         it includes the patch required for `large file' support with at least
25377         HP-UX's 10.20 /bin/cc.
25378
25379 2001-02-03  Jim Meyering  <meyering@lucent.com>
25380
25381         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
25382         AS_IF, now that it works once again (mysteriously).
25383         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
25384
25385 2001-01-30  Jim Meyering  <meyering@lucent.com>
25386
25387         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
25388         * m4/chown.m4: Rename conftestchown to conftest.chown.
25389         * m4/rename.m4: s/conftestdir/conftest.d1/ and
25390         s/conftestdir2/conftest.d2/.
25391         * m4/utimes.m4: s/conftestdata/conftest.data/
25392         Inspired by Pavel Roskin's change in autoconf.
25393
25394 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
25395
25396         * lib/config.charset: Update for FreeBSD 4.2.
25397
25398 2001-01-27  Jim Meyering  <meyering@lucent.com>
25399
25400         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
25401         a use of AS_IF.
25402         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
25403
25404 2001-01-26  Jim Meyering  <meyering@lucent.com>
25405
25406         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
25407         quotearg.c includes it.
25408
25409 2001-01-26  Jim Meyering  <meyering@lucent.com>
25410
25411         * lib/quotearg.c: Include stddef.h.
25412         * lib/quote.c: Include stddef.h.
25413         Reported by Axel Kittenberger.
25414
25415         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
25416         line in double quotes so that it evokes a better diagnostic.
25417         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
25418         Reported by Axel Kittenberger.
25419
25420 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
25421
25422         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
25423         as if it was a `charset'.
25424
25425 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
25426
25427         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
25428         has const.
25429
25430 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
25431
25432         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
25433         to avoid a warning.  Add back 'const' to inptr.
25434
25435 2001-01-20  Jim Meyering  <meyering@lucent.com>
25436
25437         Be sure that headers are checked before used in code compiled
25438         for the type checks.
25439         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
25440         In place of that, invoke jm_CHECK_ALL_TYPES.
25441         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
25442         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
25443         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
25444         The check for ssize_t was mistakenly run before the test for unistd.h.
25445
25446         The configure-time check for stdbool.h was missing.
25447         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
25448         (jm_PREREQ_HASH): New function.
25449
25450 2001-01-17  Jim Meyering  <meyering@lucent.com>
25451
25452         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
25453         for autoconf-2.49c.
25454         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
25455
25456 2001-01-16  Jim Meyering  <meyering@lucent.com>
25457
25458         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
25459         From Bruno Haible.
25460
25461 2001-01-14  Jim Meyering  <meyering@lucent.com>
25462
25463         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
25464         foo and bar.  Create conftestdir/ in the script, not in the C code.
25465         Remove directories in the script, not in the C code.
25466         Remove conftestdir{,2} before trying to create the directory.
25467         Make the entire configure script fail if the mkdir fails.
25468
25469 2001-01-14  Jim Meyering  <meyering@lucent.com>
25470
25471         * lib/rename.c: New file.  From Volker Borchert.
25472         Include stdlib.h, string.h or strings.h, and xalloc.h.
25473         Use strip_trailing_slashes rather than open-coding it.
25474
25475 2001-01-03  Paul Eggert  <eggert@twinsun.com>
25476
25477         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
25478
25479 2001-01-03  Jim Meyering  <meyering@lucent.com>
25480
25481         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
25482         of local `inptr' to avoid warning with some system declarations of
25483         iconv.
25484
25485 2001-01-02  Volker Borchert  <bt@teknon.de>
25486
25487         * m4/rename.m4: New file.
25488         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
25489
25490 2001-01-01  Jim Meyering  <meyering@lucent.com>
25491
25492         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
25493         even on systems with utmpx.h.  It's necessary for the declaration of
25494         utmp's ut_user member.  Reported by Andreas Jaeger.
25495
25496         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
25497         available. They are required for the declarations of getgrgid and
25498         getpwuid resp.
25499         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
25500         Reported by Andreas Jaeger.
25501
25502 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
25503
25504         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
25505         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
25506         so `make install' also works in VPATH builds.
25507
25508 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
25509
25510         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
25511         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
25512         can be used in subdirectories.
25513
25514 2000-12-29  Paul Eggert  <eggert@twinsun.com>
25515
25516         * lib/modechange.c: Do not assume that mode_t uses the
25517         traditional octal encoding.  E.g. "chmod 1 FOO" should set
25518         the other-execute bit of FOO even if S_IXOTH != 1.
25519
25520         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
25521         WOTH, XOTH, ALLM): New macros.
25522         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
25523          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
25524         Use them.
25525         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
25526         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
25527         (mode_compile):
25528         No need to use uintmax_t; unsigned long is long enough.
25529         Don't bother to get suffix since we don't use it.
25530
25531 2000-12-26  Jim Meyering  <meyering@lucent.com>
25532
25533         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
25534         better with autoheader.
25535
25536 2000-12-24  Jim Meyering  <meyering@lucent.com>
25537
25538         * lib/hash.c (is_prime): Return explicit boolean values.
25539         (hash_get_first): Return NULL to appease Irix5.6's 89.
25540         Reported by Nelson Beebe.
25541
25542 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
25543
25544         * lib/localcharset.c (locale_charset): Add support for Win32.
25545
25546 2000-12-18  Paul Eggert  <eggert@twinsun.com>
25547
25548         * lib/physmem.h, lib/physmem.c: New files.
25549
25550         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
25551         (noinst_HEADERS): Add physmem.h.
25552
25553         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
25554         't' for compatibility with Solaris 8 sort.
25555
25556 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
25557
25558         * lib/config.charset: Add support for BeOS.
25559
25560 2000-12-17  Jim Meyering  <meyering@lucent.com>
25561
25562         * m4/dos.m4 (jm_AC_DOS): New file and macro.
25563         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
25564
25565 2000-12-16  Jim Meyering  <meyering@lucent.com>
25566
25567         This bug had a serious impact on chown: `chown N:M FILE' (for integer
25568         N and M) would have treated it like `chown N:N FILE'.
25569
25570         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
25571
25572 2000-12-16  Jim Meyering  <meyering@lucent.com>
25573
25574         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
25575         SHELLS_FILE to a file name that's useful on djgpp systems.
25576         Include stdlib.h.
25577         (ADDITIONAL_DEFAULT_SHELLS): Define.
25578         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
25579         Based mostly on a patch from Prashant TR.
25580
25581 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
25582
25583         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
25584         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
25585         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
25586
25587 2000-12-08  Andreas Schwab  <schwab@suse.de>
25588
25589         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
25590         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
25591
25592 2000-12-07  Jim Meyering  <meyering@lucent.com>
25593
25594         * lib/stripslash.c (ISSLASH): Define.
25595         (strip_trailing_slashes): Use ISSLASH rather than comparing against
25596         `/'.
25597         From Prashant TR.
25598
25599         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
25600         (dir_name_r): Declare this function as static.
25601         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
25602         manifest itself on a name containing a mix of slashes and
25603         backslashes.
25604         Make this function work with names starting with a DOS-style
25605         drive letter and colon prefix.
25606         (dir_name): Append `.' if necessary.
25607         Based mostly on patches from Prashant TR and Eli Zaretskii.
25608
25609         * lib/dirname.h (dir_name_r): Remove prototype.
25610
25611 2000-12-06  Paul Eggert  <eggert@twinsun.com>
25612
25613         * m4/off_t-format.m4: Remove this file.
25614         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
25615
25616 2000-12-06  Jim Meyering  <meyering@lucent.com>
25617
25618         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
25619         replacement strtoull, we may well need the replacement strtoul, too.
25620         Check for declarations of strtoul and strtoull.
25621         Check for strtol.  Mainly as a cue to cause automake to include
25622         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
25623         Check for limits.h -- strtol.c needs it.
25624
25625 2000-12-05  Jim Meyering  <meyering@lucent.com>
25626
25627         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
25628
25629 2000-12-04  Jim Meyering  <meyering@lucent.com>
25630
25631         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
25632         Also include memory.h, stdlib.h, unistd.h if appropriate.
25633         Reported by Andreas Jaeger (conflicting declaration of malloc).
25634
25635 2000-12-02  Jim Meyering  <meyering@lucent.com>
25636
25637         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
25638         * m4/jm-macros.m4 (jm_MACROS): require it.
25639
25640 2000-12-02  Jim Meyering  <meyering@lucent.com>
25641
25642         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
25643
25644 2000-12-01  Paul Eggert  <eggert@twinsun.com>
25645
25646         * lib/memrchr.c: Include <config.h> before any system include file.
25647
25648 2000-11-30  Jim Meyering  <meyering@lucent.com>
25649
25650         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
25651
25652 2000-11-30  Jim Meyering  <meyering@lucent.com>
25653
25654         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
25655
25656 2000-11-29  Paul Eggert  <eggert@twinsun.com>
25657
25658         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
25659
25660 2000-11-26  Jim Meyering  <meyering@lucent.com>
25661
25662         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
25663
25664 2000-11-22  Paul Eggert  <eggert@twinsun.com>
25665
25666         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
25667         size of (size_t) -1; it's not portable.
25668
25669 2000-11-17  Jim Meyering  <meyering@lucent.com>
25670
25671         * lib/strstr.c: Update from GNU libc.
25672
25673 2000-11-17  Akim Demaille  <akim@epita.fr>
25674
25675         * lib/obstack.h: Formatting changes.
25676         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
25677         prevent type checking.
25678         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
25679         cast the value to (void *): assigning a `foo *' to a `void *'
25680         variable is valid.
25681         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
25682
25683 2000-11-16  Jim Meyering  <meyering@lucent.com>
25684
25685         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
25686
25687 2000-11-11  Jim Meyering  <meyering@lucent.com>
25688
25689         * lib/error.c: Add a couple #includes, merging from GNU libc version.
25690
25691 2000-11-10  Jim Meyering  <meyering@lucent.com>
25692
25693         * lib/obstack.h: Update from GNU libc.
25694         * lib/obstack.c: Likewise.
25695
25696 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
25697
25698         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
25699
25700 2000-11-06  Paul Eggert  <eggert@twinsun.com>
25701
25702         * lib/getusershell.c (setusershell): Use rewind rather than
25703         fseek/fseeko, to avoid configuration hassles with fseeko.
25704         Don't bother opening SHELLS_FILE if shellstream is NULL;
25705         it's not necessary.
25706
25707 2000-11-05  Jim Meyering  <meyering@lucent.com>
25708
25709         * lib/makepath.h (make_dir): Declare.
25710         * lib/makepath.c (make_dir): Remove `static' attribute.
25711         Tweak a comment.
25712
25713 2000-11-04  Jim Meyering  <meyering@lucent.com>
25714
25715         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
25716
25717 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
25718
25719         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
25720         last one in a bucket, advance to the next bucket.
25721
25722 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
25723
25724         * lib/fnmatch.c: Do not comment out all the code if we are using
25725         the GNU C library, because in some cases we are replacing buggy
25726         code in the GNU C library itself.
25727
25728 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
25729
25730         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
25731         (regex_compile): Catch bogus \(\1\).
25732
25733 2000-10-30  Paul Eggert  <eggert@twinsun.com>
25734
25735         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
25736         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
25737         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
25738
25739 2000-10-30  Paul Eggert  <eggert@twinsun.com>
25740
25741         * lib/error.h, getline.h, modechange.h:
25742         Remove "2000" from Copyright line, as the file hasn't been
25743         changed this year other than in the copyright notice.
25744
25745         * lib/xalloc.h: Add "2000" to Copyright line, as this file
25746         was changed this year.
25747
25748 2000-10-29  Jim Meyering  <meyering@lucent.com>
25749
25750         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
25751         renaming.
25752         * m4/ls-mntd-fs.m4: Likewise
25753
25754 2000-10-29  Jim Meyering  <meyering@lucent.com>
25755
25756         * lib/xstat.in: Fix grammar in comment.
25757
25758 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
25759
25760         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
25761         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
25762         doesn't define __restrict_arr.
25763
25764 2000-10-28  Jim Meyering  <meyering@lucent.com>
25765
25766         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
25767         (jm_PREREQ_MEMCHR): New function.
25768
25769 2000-10-28  Jim Meyering  <meyering@lucent.com>
25770
25771         * lib/memchr.c: Update from libc.
25772         Adjust for portability:
25773         [HAVE_STDLIB_H]: Include stdlib.h.
25774         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
25775         Undef __memchr, too.
25776         [!weak_alias]: Define __memchr to memchr.
25777
25778         * lib/regex.c: Update from libc.
25779         * lib/regex.h: Likewise.
25780         * lib/getopt1.c: Likewise.
25781         * lib/memcmp.c: Likewise.
25782
25783         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
25784         Avoid using fseek, when possible -- it's broken by design.
25785         Patch by Ulrich Drepper.
25786
25787 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
25788
25789         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
25790         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
25791         Giving in to popular pressure to shut up the compiler with casts.
25792
25793 2000-10-26  Jim Meyering  <meyering@lucent.com>
25794
25795         * lib/strftime.c: Update from libc.
25796
25797 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
25798
25799         * regex.c: More `unsigned char' -> `re_char' changes.
25800         Also change several `int' into `re_wchar_t'.
25801         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
25802         (PUSH_FAILURE_POINTER): Don't cast any more.
25803         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
25804         We want GCC to complain, since this piece of code makes
25805         re_match non-reentrant, which *should* be fixed.
25806         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
25807         (EXTEND_BUFFER): Use RETALLOC.
25808         (SET_LIST_BIT): Don't cast.
25809         (re_wchar_t): New type.
25810         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
25811         that those two functions will always properly return.
25812         (IMMEDIATE_QUIT_CHECK): Cast to void.
25813         (analyse_first): Use recursion rather than an explicit stack.
25814         (re_compile_fastmap): Can't fail anymore.
25815         (re_search_2): Don't check re_compile_fastmap for failure.
25816         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
25817         Now also sets the new value (passed in a new argument).
25818         (re_match_2_internal): Use it.
25819         Also, use a new var `reg' of type size_t when looping through regs
25820         rather than reuse the inappropriate `mcnt'.
25821
25822 2000-10-25  Jim Meyering  <meyering@lucent.com>
25823
25824         * lib/obstack.c: Update from libc.
25825
25826 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
25827
25828         * regex.c (regex_compile): Change the way of handling a range from
25829         a char less than 256 to a char not less than 256.
25830
25831 2000-10-24  Andrew Innes  <andrewi@gnu.org>
25832
25833         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
25834         NT-Emacs only.
25835         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
25836         so that re_search functions only quit when callers expect them to.
25837
25838 2000-10-23  Jim Meyering  <meyering@lucent.com>
25839
25840         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
25841         wrong.  That set_locale call must not have any side effects.
25842         From Paul Eggert.
25843
25844 2000-10-22  Jim Meyering  <meyering@lucent.com>
25845
25846         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
25847         [CYCLIC]: Remove now-unused definition.
25848
25849         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
25850         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
25851         Suggestion from Ulrich Drepper.
25852
25853 2000-10-21  Jim Meyering  <meyering@lucent.com>
25854
25855         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
25856         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
25857         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
25858
25859 2000-10-21  Jim Meyering  <meyering@lucent.com>
25860
25861         * lib/dirname.c (memrchr): Declare if necessary.
25862         (dir_name): Remove the restriction that there be no
25863         trailing slashes.  Now, this code skips past them, effectively
25864         ignoring them.
25865         [TEST_DIRNAME] (main): New unit tests.
25866
25867         * lib/memrchr.c: New file from GNU libc.
25868         Undef __memrchr, too.
25869         [!weak_alias]: Define __memrchr to memrchr.
25870         Guard weak_alias use with `#ifdef weak_alias'.
25871
25872 2000-10-21  Jim Meyering  <meyering@lucent.com>
25873
25874         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
25875         (dir_name): Use dir_name_r.
25876         * lib/dirname.h (dir_name_r): Declare it.
25877
25878 2000-10-17  Jim Meyering  <meyering@lucent.com>
25879
25880         * lib/quote.h (PARAMS): Define and use.
25881         Reported by Akim Demaille.
25882
25883         * lib/getopt.c: Update from libc.
25884
25885 2000-10-16  Jim Meyering  <meyering@lucent.com>
25886
25887         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
25888         setlocale.
25889         From Jan Fedak.
25890
25891 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
25892
25893         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
25894
25895 2000-09-25  Jim Meyering  <meyering@lucent.com>
25896
25897         * lib/md5.h (rol): Define (from GnuPG).
25898
25899         * lib/sha.c: Give credit (GnuPG) where due.
25900         (M): Use rol rather than open-coding it.
25901         Add a FIXME comment.
25902
25903 2000-09-21  Jim Meyering  <meyering@lucent.com>
25904
25905         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
25906         Reported by Michael Stone.
25907
25908 2000-09-20  Jim Meyering  <meyering@lucent.com>
25909
25910         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
25911         (noinst_HEADERS): Add sha.h.
25912         Based on code from Scott G. Miller and from GnuPG.
25913
25914 2000-09-18  Jim Meyering  <meyering@lucent.com>
25915
25916         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
25917         LIBS. Otherwise, everyone ends up linking with -lelf for some
25918         configurations.
25919         Reported by Mike Stone.
25920
25921 2000-09-15  Jim Meyering  <meyering@lucent.com>
25922
25923         * lib/regex.c: Update from libc.
25924
25925 2000-09-10  Jim Meyering  <meyering@lucent.com>
25926
25927         * lib/getopt.c (_getopt_internal): Update from glibc.
25928
25929 2000-09-09  Jim Meyering  <meyering@lucent.com>
25930
25931         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
25932         think it should be used as a general replacement for isascii.
25933         * lib/fnmatch.c: Likewise.
25934         * lib/mbswidth.c: Likewise
25935         * lib/regex.c: Likewise.
25936
25937         Don't use atoi.
25938         * lib/userspec.c: Include sys/param.h and limits.h.
25939         Include xstrtol.h.
25940         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
25941         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
25942         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
25943         UID, GID.  Check range.
25944
25945 2000-09-06  Jim Meyering  <meyering@lucent.com>
25946
25947         * lib/getopt.c (_getopt_internal): Update from glibc.
25948
25949 2000-08-30  Jim Meyering  <meyering@lucent.com>
25950
25951         * lib/strftime.c: Merge in changes from GNU libc.
25952
25953 2000-08-26  Jim Meyering  <meyering@lucent.com>
25954
25955         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
25956         * m4/fpending.m4: New file.
25957
25958 2000-08-26  Jim Meyering  <meyering@lucent.com>
25959
25960         * lib/closeout.c: Include "__fpending.h".
25961         (close_stdout_status): Return right away if there's nothing to flush.
25962
25963         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
25964         * lib/__fpending.c: New file.
25965         * lib/__fpending.h: New file.
25966
25967 2000-08-20  Jim Meyering  <meyering@lucent.com>
25968
25969         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
25970         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
25971         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
25972
25973 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
25974
25975         Improve fileutils installation on systems where running
25976         programs (like install) can't be unlinked.
25977         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
25978         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
25979
25980 2000-08-07  Paul Eggert  <eggert@twinsun.com>
25981
25982         Standardize on "memory exhausted" instead of "Memory exhausted"
25983         or "virtual memory exhausted".
25984         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
25985         "virtual memory exhausted".
25986         * lib/same.c (same_name): Invoke xalloc_die instead of printing
25987         our own message.
25988         * lib/userspec.c (parse_user_spec): Likewise.
25989         * lib/bumpalloc.h: comment fix
25990         * lib/same.c, userspec.c: Include xalloc.h.
25991
25992         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
25993         not char *const and pointing to a constant array.
25994         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
25995         (xrealloc): Comment fix.
25996
25997         * lib/userspec.c (parse_user_spec):
25998         Don't translate a message until just before returning,
25999         to avoid unnecessary translation.
26000
26001 2000-08-07  Jim Meyering  <meyering@lucent.com>
26002
26003         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
26004         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
26005         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
26006         getgroups.c, gethostname.c, getopt.h, group-member.c,
26007         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
26008         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
26009         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
26010         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
26011         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
26012         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
26013         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
26014         yesno.c: Back out Copyright date changes for each file with no change
26015         this year.  This eases coordination with other programs using the same
26016         source code modules.  From Paul Eggert.
26017
26018 2000-08-06  Paul Eggert  <eggert@twinsun.com>
26019
26020         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
26021         not char, for compatibility with glibc 2.1.3 strftime.c.
26022
26023 2000-08-03  Greg McGary  <greg@mcgary.org>
26024
26025         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
26026         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
26027         (EXTEND_BUFFER): Use them.
26028
26029 2000-08-01  Jim Meyering  <meyering@lucent.com>
26030
26031         * lib/dirname.c (ISSLASH): Define.
26032         (BACKSLASH_IS_PATH_SEPARATOR): Define.
26033         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
26034         both `\' and `/' may be use as path separators.
26035         Based on a patch from Prashant TR.
26036
26037 2000-07-31  Paul Eggert  <eggert@twinsun.com>
26038
26039         * lib/quotearg.c (quotearg_n_options): Don't make the initial
26040         slot vector a constant, since it might get modified.
26041
26042 2000-07-31  Jim Meyering  <meyering@lucent.com>
26043
26044         * lib/xmalloc.c: Use `virtual memory exhausted', not
26045         `Memory exhausted'.
26046         * lib/obstack.c (print_and_abort): Likewise.
26047
26048 2000-07-30  Paul Eggert  <eggert@twinsun.com>
26049
26050         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
26051         buffer, so that the caller can always quote one small
26052         component of a "memory exhausted" message in slot 0.
26053         From a suggestion by Jim Meyering.
26054
26055 2000-07-30  Jim Meyering  <meyering@lucent.com>
26056
26057         * lib/makepath.c (make_path): Quote the other instance, too.
26058
26059         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
26060         (STATIC_BUF_SIZE): Define.
26061         (quotearg_n_options): Use only statically allocated storage when
26062         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
26063         than STATIC_BUF_SIZE.
26064
26065 2000-07-29  Jim Meyering  <meyering@lucent.com>
26066
26067         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
26068         * lib/dirname.c (dir_name): Likewise.
26069
26070         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
26071         `/'.
26072
26073         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
26074         (dir_name): Assert that there are no trailing slashes.
26075
26076 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
26077
26078         * lib/mbswidth.h (mbswidth): Add a flags argument.
26079         (mbswidth): New declaration.
26080         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
26081         * lib/mbswidth.c (mbswidth): Add a flags argument.
26082         (mbsnwidth): New function.
26083
26084 2000-07-24  Jim Meyering  <meyering@lucent.com>
26085
26086         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
26087
26088 2000-07-23  Paul Eggert  <eggert@twinsun.com>
26089
26090         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
26091
26092 2000-07-23  Paul Eggert  <eggert@twinsun.com>
26093
26094         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
26095         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
26096         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
26097         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
26098         invoke multibyte primitives.
26099
26100 2000-07-23  Paul Eggert  <eggert@twinsun.com>
26101
26102         * lib/quotearg.c:
26103         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
26104         so that mbstate_t is always defined.
26105
26106         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
26107         be 1 in at least one GCC installation, and this configuration
26108         error is likely to be common.  Ignoring MB_LEN_MAX hurts
26109         performance on hosts that have mbrtowc but have only unibyte
26110         locales, but I assume these hosts are rare.
26111
26112 2000-07-23  Paul Eggert  <eggert@twinsun.com>
26113
26114         * lib/mbswidth.c (_XOPEN_SOURCE):
26115         Don't define; this causes problems on Solaris 7.
26116         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
26117
26118 2000-07-23  Jim Meyering  <meyering@lucent.com>
26119
26120         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
26121         too: getgrgid, getpwuid, getuid.
26122
26123 2000-07-23  Jim Meyering  <meyering@lucent.com>
26124
26125         * lib/basename.c (base_name): Add an assertion.
26126
26127 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
26128
26129         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
26130         shadow its mbsinit function.
26131
26132 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
26133
26134         * lib/mbswidth.h: New file.
26135         * lib/mbswidth.c: New file.
26136         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
26137         (noinst_HEADERS): Add mbswidth.h.
26138
26139 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
26140
26141         * lib/config.charset: Add support for FreeBSD. Improve support for
26142         HP-UX and IRIX 6.
26143
26144 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
26145
26146         * m4/mbswidth.m4: New file.
26147         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
26148
26149 2000-07-15  Jim Meyering  <meyering@lucent.com>
26150
26151         * lib/makepath.c: Include quote.h.
26152         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
26153         corresponding argument in a `quote (...)' call.
26154         Give better diagnostics.
26155
26156         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
26157         (noinst_HEADERS): Add quote.h.
26158
26159         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
26160         from tar's src/misc.c.
26161         * lib/quote.h: New file.  Prototypes for same.
26162
26163 2000-07-14  Paul Eggert  <eggert@twinsun.com>
26164
26165         From a suggestion by Bruno Haible.
26166         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
26167         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
26168         to decide whether to define the BeOS workaround macro;
26169         this adjusts to the change to AC_MBSTATE_T.
26170
26171 2000-07-14  Jim Meyering  <meyering@lucent.com>
26172
26173         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
26174         jm_AC_TYPE_UINTMAX_T.
26175
26176 2000-07-13  Paul Eggert  <eggert@twinsun.com>
26177
26178         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
26179
26180         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
26181         quotearg_buffer_restyled): Add support for
26182         clocale_quoting_style.  Undo previous change to
26183         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
26184         and "{RIGHT QUOTATION MARK}" msgids.
26185
26186 2000-07-10  Paul Eggert  <eggert@twinsun.com>
26187
26188         From a suggestion by Bruno Haible.
26189         * m4/mbstate_t.m4 (AC_MBSTATE_T):
26190         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
26191         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
26192         and mbstate_t, to a single-part test that simply defines mbstate_t.
26193         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
26194         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
26195
26196 2000-07-10  Jim Meyering  <meyering@lucent.com>
26197
26198         * m4/strerror_r.m4: Mirror the correction made in autoconf.
26199
26200         * m4/gnu-source.m4: Output to confdefs.h directly.
26201         Suggestion from Akim Demaille.
26202
26203 2000-07-09  Paul Eggert  <eggert@twinsun.com>
26204
26205         The old behavior of quoting `like this' doesn't look good with
26206         newer, ISO-style fonts.  See:
26207         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
26208
26209         Instead, quote "like this" by default.  Let the translator
26210         tailor the locale-specific quoting behavior by providing
26211         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
26212
26213         * lib/quotearg.c (N_): New macro.
26214         (gettext_default): New function.
26215         (quotearg_buffer_restyled): Use
26216         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
26217         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
26218
26219 2000-07-09  Jim Meyering  <meyering@lucent.com>
26220
26221         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
26222         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
26223
26224         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
26225         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
26226
26227 2000-07-09  Jim Meyering  <meyering@lucent.com>
26228
26229         * lib/Most files: Update copyright dates to include 2000.
26230
26231 2000-07-08  Jim Meyering  <meyering@lucent.com>
26232
26233         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
26234         if not defined.
26235         (xgethostname): Remove now-unnecessary #ifdef.
26236         Move declaration of `err' into loop where it's used.
26237
26238 2000-07-05  Paul Eggert  <eggert@twinsun.com>
26239         and Bruno Haible  <haible@clisp.cons.org>
26240
26241         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
26242         only if the test for an object-type mbstate_t fails.  This
26243         prevents us from mistakenly reporting that mbstate_t is a
26244         system object type after we "#define mbstate_t int" to work
26245         around its lack.
26246
26247 2000-07-05  Paul Eggert  <eggert@twinsun.com>
26248         and Bruno Haible  <haible@clisp.cons.org>
26249
26250         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
26251
26252 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
26253
26254         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
26255         to strerror_r.
26256         Include <ctype.h> for use of isalpha.
26257
26258 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
26259
26260         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
26261         by allocating a larger buffer. Test the gethostname return value for
26262         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
26263         returns an error and ENAMETOOLONG isn't defined.
26264
26265 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
26266
26267         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
26268         dimension.
26269
26270 2000-07-04  Jim Meyering  <meyering@lucent.com>
26271
26272         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
26273         of the deprecated AC_CHECKING.
26274
26275 2000-07-04  Jim Meyering  <meyering@lucent.com>
26276
26277         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
26278         Reported by Bruno Haible.
26279
26280 2000-07-04  Jim Meyering  <meyering@lucent.com>
26281
26282         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
26283         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
26284         lacks mbrtowc.
26285
26286 2000-07-03  Paul Eggert  <eggert@twinsun.com>
26287
26288         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
26289         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
26290
26291 2000-07-03  Paul Eggert  <eggert@twinsun.com>
26292         and Bruno Haible  <haible@clisp.cons.org>
26293
26294         * lib/quotearg.c (mbrtowc):
26295         Assign to *pwc, and return 1 only if result is nonzero.
26296         (iswprint): Use ISPRINT when substituting our own mbrtowc.
26297
26298 2000-07-03  Jim Meyering  <meyering@lucent.com>
26299
26300         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
26301
26302 2000-07-03  Jim Meyering  <meyering@lucent.com>
26303
26304         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
26305         This is necessary to get a definition of e.g., UTMP_FILE on
26306         HP-UX 10.20.
26307         From Bob Proulx.
26308
26309 2000-07-02  Jim Meyering  <meyering@lucent.com>
26310
26311         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
26312
26313         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
26314         AC_LIBOBJ(function_name).
26315         * m4/chown.m4: Likewise.
26316         * m4/fnmatch.m4: Likewise.
26317         * m4/ftruncate.m4: Likewise.
26318         * m4/getgroups.m4: Likewise.
26319         * m4/getline.m4: Likewise.
26320         * m4/group-member.m4: Likewise.
26321         * m4/jm-macros.m4: Likewise.
26322         * m4/lstat.m4: Likewise.
26323         * m4/malloc.m4: Likewise.
26324         * m4/memcmp.m4: Likewise.
26325         * m4/nanosleep.m4: Likewise.
26326         * m4/putenv.m4: Likewise.
26327         * m4/realloc.m4: Likewise.
26328         * m4/regex.m4: Likewise.
26329         * m4/stat.m4: Likewise.
26330         * m4/strftime.m4: Likewise.
26331
26332 2000-07-02  Jim Meyering  <meyering@lucent.com>
26333
26334         * lib/quotearg.c (mbstate_t): Don't define here.
26335
26336 2000-07-02  Jim Meyering  <meyering@lucent.com>
26337
26338         * lib/nanosleep.c (SIGCONT): Define if not already defined.
26339
26340 2000-07-01  Jim Meyering  <meyering@lucent.com>
26341
26342         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
26343
26344 2000-07-01  Jim Meyering  <meyering@lucent.com>
26345
26346         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
26347         problem.
26348
26349 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
26350
26351         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
26352         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
26353
26354 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
26355
26356         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
26357         per change in ../m4/ls-mntd-fs.m4.
26358         (read_filesystem_list): Ignore symbolic links.
26359
26360 2000-06-29  Jim Meyering  <meyering@lucent.com>
26361
26362         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
26363         for declaration of strcmp.
26364
26365         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
26366
26367         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
26368         Avoid warning by casting result to `char *' to remove `const'.
26369
26370 2000-06-28  Jim Meyering  <meyering@lucent.com>
26371
26372         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
26373         included by quotearg.c, for which we perform this test.  From
26374         Bruno Haible.
26375
26376 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
26377
26378         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
26379         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
26380         <utmpx.h> exists, put readutmp.o into LIBOBJS.
26381
26382 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
26383
26384         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
26385
26386 2000-06-26  Paul Eggert  <eggert@twinsun.com>
26387
26388         savedir now sets errno on failure and invokes xmalloc to get memory.
26389         Fix a couple of other minor bugs while we're at it.
26390
26391         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
26392         (NAMLEN): Remove macro.
26393         (malloc, realloc): Remove decls.
26394         (stpcpy): Likewise.
26395         ("xalloc.h"): Include.
26396         (NAME_SIZE_DEFAULT): New macro.
26397         (savedir): Use xmalloc / xrealloc to allocate memory.
26398         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
26399         Skip "" directory entries.
26400         Use strlen to calculate directory entry length, since the old method
26401         is rarely used these days and isn't worth supporting.
26402         Don't use a pointer after freeing it.
26403         Check for integer overflow when calculating allocation size.
26404         Use memcpy to copy entries, instead of stpcpy.
26405         Set errno properly when returning NULL.
26406         Check for readdir error.
26407
26408 2000-06-26  Jim Meyering  <meyering@lucent.com>
26409
26410         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
26411
26412 2000-06-25  Jim Meyering  <meyering@lucent.com>
26413
26414         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
26415         Linux header bug when _XOPEN_SOURCE is defined to 500.
26416
26417 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
26418
26419         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
26420         deficiency.
26421
26422 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
26423
26424         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
26425         Include xalloc.h.
26426         Don't include <stdlib.h>.  Don't declare malloc, realloc.
26427
26428 2000-06-24  Jim Meyering  <meyering@lucent.com>
26429
26430         * m4/strerror_r.m4: Revive this file -- to try out an experimental
26431         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
26432         for which strerror does return char*, but which lacks a conveniently
26433         accessible declaration of the function.  If the compile-test says
26434         strerror_r doesn't work, then resort to a `run'-test that works on
26435         BeOS and segfaults on DEC Unix.
26436
26437 2000-06-24  Jim Meyering  <meyering@lucent.com>
26438
26439         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
26440
26441 2000-06-23  Paul Eggert  <eggert@twinsun.com>
26442
26443         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
26444         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
26445
26446 2000-06-23  Paul Eggert  <eggert@twinsun.com>
26447
26448         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
26449         (mbrtowc, mbstate_t): Define substitutes if
26450         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
26451         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
26452         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
26453
26454 2000-06-23  Jim Meyering  <meyering@lucent.com>
26455
26456         * m4/afs.m4: Add missing AC_MSG_RESULT.
26457         Reported by Bruno Haible.
26458
26459         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
26460         Suggestion from Bruno Haible.
26461
26462 2000-06-23  Jim Meyering  <meyering@lucent.com>
26463
26464         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
26465
26466 2000-06-21  Jim Meyering  <meyering@lucent.com>
26467
26468         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
26469
26470 2000-06-21  Jim Meyering  <meyering@lucent.com>
26471
26472         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
26473         (noinst_HEADERS): Add getstr.h.
26474
26475         * lib/getline.c (getstr): Move into a separate file.
26476         * lib/getstr.c (getstr): New file, extracted from getline.c, with
26477         the following changes: new parameter, delim2; both delim[12]
26478         parameters have type `int', not `char'.  The latter would lose
26479         with 8-bit delimiters.
26480         * lib/getstr.h: New file.
26481
26482 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
26483
26484         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
26485         than 1024, return a memory chunk of least possible size, instead
26486         of size PATH_MAX + 2. In the loop, increment the size proportionally.
26487         Use free/xmalloc instead of xrealloc to avoid copying for very long
26488         paths.
26489
26490 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
26491
26492         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
26493         the empty string.
26494
26495 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
26496
26497         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
26498         address, not strdup.  Include <stdlib.h> and don't declare free().
26499
26500 2000-06-19  Jim Meyering  <meyering@lucent.com>
26501
26502         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
26503
26504 2000-06-18  Jim Meyering  <meyering@lucent.com>
26505
26506         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
26507
26508         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
26509         `checking whether...' message to be consistent with that of the
26510         lstat test.
26511
26512 2000-06-18  Jim Meyering  <meyering@lucent.com>
26513
26514         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
26515         Besides, these days every porting target provides a mkdir function.
26516
26517         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
26518         needed. (this snippet comes from src/system.h).
26519
26520 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
26521
26522         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
26523
26524 2000-06-15  Paul Eggert  <eggert@twinsun.com>
26525
26526         * lib/human.c (adjust_value): New function.
26527         (human_readable_inexact): Apply rounding style even when
26528         printing approximate values.
26529
26530 2000-06-14  Paul Eggert  <eggert@twinsun.com>
26531
26532         * lib/human.c (human_readable_inexact): Allow an input block
26533         size that is not a multiple of the output block size, and vice versa.
26534         Reported by Piergiorgio Sartor.
26535
26536 2000-06-14  Paul Eggert  <eggert@twinsun.com>
26537
26538         * lib/getdate.y (get_date): Apply relative times after time
26539         zone indicator, not before.  Reported by Todd A. Jacobs.
26540
26541 2000-06-13  Jim Meyering  <meyering@lucent.com>
26542
26543         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
26544
26545         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
26546
26547 2000-06-12  Paul Eggert  <eggert@twinsun.com>
26548
26549         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
26550
26551 2000-06-12  Jim Meyering  <meyering@lucent.com>
26552
26553         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
26554         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
26555         optional argument.
26556         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
26557         the optional argument, `lib'.
26558
26559 2000-06-08  Jim Meyering  <meyering@lucent.com>
26560
26561         * m4/largefile.m4: Remove file (now that it's part of autoconf).
26562
26563 2000-06-04  Paul Eggert  <eggert@twinsun.com>
26564
26565         Rewrite largefile configuration so that we don't need to run
26566         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
26567         AC_CANONICAL_HOST in configure.in -- jmm]
26568
26569         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
26570         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
26571         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
26572         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
26573         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
26574         All uses changed.
26575         Instead of inspecting the output of getconf, try to compile the
26576         test program without and with the macro definition.
26577         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
26578         for getconf.  Instead, check for the needed flags by compiling
26579         test programs.
26580
26581 2000-06-04  Paul Eggert  <eggert@twinsun.com>
26582
26583         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
26584
26585 2000-06-04  Jim Meyering  <meyering@lucent.com>
26586
26587         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
26588         SunOS 4.1.4 for which gid_t is an unsigned type.
26589
26590 2000-06-03  Jim Meyering  <meyering@lucent.com>
26591
26592         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
26593         now that autoconf requires that.
26594
26595         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
26596         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
26597         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
26598
26599 2000-06-03  Jim Meyering  <meyering@lucent.com>
26600
26601         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
26602
26603 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
26604
26605         * m4/glibc21.m4: New file.
26606         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
26607
26608 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
26609
26610         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
26611         newer, don't install charset.alias.
26612         * lib/config.charset: Change the Linux/glibc rules so they become empty
26613         on glibc-2.1 or newer.
26614
26615 2000-06-02  Jim Meyering  <meyering@lucent.com>
26616
26617         * lib/mountlist.c: Back out last change.  Instead, do this...
26618         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
26619         me_dummy member using the same `ignore'-testing code.
26620         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
26621         fs_type strings.
26622         From Mark D. Roth.
26623
26624 2000-05-29  Jim Meyering  <meyering@lucent.com>
26625
26626         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
26627         mounts with the `ignore' attribute.  Based on a patch from
26628         Mark D. Roth.
26629
26630 2000-05-28  Jim Meyering  <meyering@lucent.com>
26631
26632         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
26633         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
26634         * m4/stat.m4: Likewise.
26635         * m4/lstat.m4: Likewise.
26636         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
26637
26638         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
26639         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
26640
26641 2000-05-26  Jim Meyering  <meyering@lucent.com>
26642
26643         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
26644
26645 2000-05-24  Jim Meyering  <meyering@lucent.com>
26646
26647         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
26648         autoconf requires that.
26649         * m4/lib-check.m4: Likewise.
26650         * m4/jm-macros.m4: Likewise.
26651         * m4/strftime.m4: Likewise.
26652
26653         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
26654         AC_CHECK_DECLS, now that autoconf requires that.
26655
26656 2000-05-22  Jim Meyering  <meyering@lucent.com>
26657
26658         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
26659         * m4/lstat.m4: Likewise.
26660
26661 2000-05-22  Jim Meyering  <meyering@lucent.com>
26662
26663         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
26664
26665 2000-05-20  Jim Meyering  <meyering@lucent.com>
26666
26667         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
26668         (jm_PREREQ): Use it.
26669
26670 2000-05-18  Jim Meyering  <meyering@lucent.com>
26671
26672         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
26673         back, too, since it may have been modified by allocate_entry.
26674         (hash_delete): Rewrite to use neither the assignment operator
26675         nor the comma operator in an if-expression.
26676
26677 2000-05-15  Paul Eggert  <eggert@twinsun.com>
26678
26679         * lib/closeout.c:
26680         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
26681         Remove; no longer needed.
26682         "quotearg.h": Add include.
26683         (file_name): Do not bother to explicitly initialize to NULL; it's less
26684         efficient on some hosts.
26685         (close_stdout_status): Remove test as to whether stdout was already
26686         closed; it breaks for the case "echo x | sort >&-".
26687         Quote file name colons.
26688         Do not assume that _("write error") lacks format strings.
26689
26690 2000-05-15  Jim Meyering  <meyering@lucent.com>
26691
26692         * lib/version-etc.c (version_etc_copyright): Update the copyright
26693         string used in all --version output.
26694
26695 2000-05-14  Jim Meyering  <meyering@lucent.com>
26696
26697         * lib/closeout.c (close_stdout_set_file_name): New function.
26698         (close_stdout_status): Use new file-scoped global.
26699         Return right away if fstat says the stdout file descriptor is invalid.
26700         * lib/closeout.h (close_stdout_set_file_name): Declare.
26701
26702 2000-05-10  Jim Meyering  <meyering@lucent.com>
26703
26704         * lib/closeout.c [default_exit_status]: New file-scoped variable.
26705         (close_stdout_set_status): New function.
26706         * lib/closeout.h (close_stdout_set_status): Declare.
26707
26708 2000-05-09  Jim Meyering  <meyering@lucent.com>
26709
26710         * m4/gettext.m4: Rename this...
26711         * m4/libintl.m4: ...to this.
26712
26713 2000-05-08  Jim Meyering  <meyering@lucent.com>
26714
26715         * lib/long-options.c: Don't include closeout.h.
26716         (parse_long_options): Don't call close_stdout for --version.
26717
26718 2000-05-06  Paul Eggert  <eggert@twinsun.com>
26719
26720         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
26721         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
26722         2.1.3 bug.  This avoids a clash when files like regex.c define
26723         _GNU_SOURCE.
26724
26725 2000-05-06  Jim Meyering  <meyering@lucent.com>
26726
26727         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
26728         (AC_REPLACE_FUNCS): Add strnlen.
26729
26730         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
26731         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
26732
26733         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
26734         AC_SEARCH_LIBS call for nanosleep.
26735         (LIB_NANOSLEEP): Set and AC_SUBST.
26736
26737 2000-05-06  Jim Meyering  <meyering@lucent.com>
26738
26739         * lib/strnlen.c: Undefine __strnlen and strnlen.
26740         [!weak_alias]: Define __strnlen to strnlen.
26741
26742         * lib/atexit.c: New file, from libiberty.
26743
26744 2000-05-06  Jim Meyering  <meyering@lucent.com>
26745
26746         * lib/closeout.c (close_stdout_status): Also check for errors on the
26747         stderr stream.
26748
26749 2000-05-05  Jim Meyering  <meyering@lucent.com>
26750
26751         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
26752         AC_SEARCH_LIBS call for clock_gettime.
26753         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
26754
26755         * m4/search-libs.m4: Update from autoconf.
26756
26757         su doesn't work on Solaris 2.6.
26758         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
26759         <shadow.h>.  Reported by Dragos Harabor.
26760
26761 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
26762
26763         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
26764         memcpy instead of xmalloc, xrealloc, path_concat.
26765         (locale_charset): Treat empty environment variables as absent.
26766         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
26767
26768 2000-05-04  Jim Meyering  <meyering@lucent.com>
26769
26770         * lib/getopt.c: Update from glibc.
26771         * lib/obstack.c: Likewise.
26772         * lib/obstack.h: Likewise.
26773         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
26774         file
26775
26776         * lib/regex.h: Likewise.
26777         * lib/strndup.c: Likewise.
26778         * lib/strnlen.c: New file, from glibc.
26779
26780 2000-05-03  Jim Meyering  <meyering@lucent.com>
26781
26782         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
26783
26784 2000-05-02  Paul Eggert  <eggert@twinsun.com>
26785
26786         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
26787         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
26788         compile-time test, rather than inspecting host and OS, to
26789         decide whether to define _LARGEFILE_SOURCE.
26790
26791 2000-05-01  Jim Meyering  <meyering@lucent.com>
26792
26793         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
26794
26795         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
26796         Based on a patch from Bruno Haible.
26797
26798 2000-05-01  Jim Meyering  <meyering@lucent.com>
26799
26800         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
26801
26802 2000-04-29  Jim Meyering  <meyering@lucent.com>
26803
26804         * lib/path-concat.c: Declare strdup only if it's not defined.
26805         * lib/canon-host.c: Likewise.
26806
26807 2000-04-28  Jim Meyering  <meyering@lucent.com>
26808
26809         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
26810         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
26811         is included first, then limits.h is included by locale.h by libintl.h.
26812         From John David Anglin.
26813
26814 2000-04-25  Jim Meyering  <meyering@lucent.com>
26815
26816         * lib/makepath.c (S_IRWXUGO): Define.
26817         (make_path): Always perform explicit chmod if MODE specifies any
26818         of the `special' permission bits.  Prompted by a bug report against
26819         install from Mate Wierdl and Joost van Baal.
26820
26821 2000-04-18  Jim Meyering  <meyering@lucent.com>
26822
26823         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
26824         (jm_PREREQ): Use it.
26825
26826 2000-04-18  Jim Meyering  <meyering@lucent.com>
26827
26828         * lib/README: New file.
26829
26830         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
26831         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
26832
26833 2000-04-17  Jim Meyering  <meyering@lucent.com>
26834
26835         Get it right :-)
26836         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
26837         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
26838         Suggestion from Akim Demaille.
26839
26840 2000-04-17  Jim Meyering  <meyering@lucent.com>
26841
26842         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
26843         the definition of it to rpl_strftime also defined-away the system's
26844         declaration.
26845
26846 2000-04-15  Jim Meyering  <meyering@lucent.com>
26847
26848         Use `C' to denote so-called `contiguous' files, the same way
26849         that tar does.
26850         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
26851         (ftypelet): Use S_ISCTG.
26852         From Michael Deutschmann.
26853
26854 2000-04-14  Jim Meyering  <meyering@lucent.com>
26855
26856         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
26857         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
26858         clobbered.
26859
26860 2000-04-14  Jim Meyering  <meyering@lucent.com>
26861
26862         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
26863
26864 2000-04-13  Jim Meyering  <meyering@lucent.com>
26865
26866         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
26867         AH_VERBATIM to insert required #ifndef into config.h.in.
26868         Suggestion from Akim Demaille.
26869
26870 2000-04-12  Jim Meyering  <meyering@lucent.com>
26871
26872         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
26873         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
26874         Christian Krackowizer.
26875
26876         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
26877         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
26878         (AC_SYS_LARGEFILE): Require.
26879         (AM_C_PROTOTYPES): Require.
26880
26881 2000-04-08  Jim Meyering  <meyering@lucent.com>
26882
26883         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
26884         names don't conflict.  Reported by Eli Zaretskii.
26885
26886 2000-04-07  Jim Meyering  <meyering@lucent.com>
26887
26888         * lib/putenv.c: Move inclusion of errno.h so it follows that of
26889         sys/types.h, to work around system header problems on AIX 3.2.5.
26890         From Bruno Haible.
26891
26892 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
26893
26894         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
26895         bug.  Deal with the different error behavior of Irix iconv.
26896
26897 2000-04-05  Paul Eggert  <eggert@twinsun.com>
26898
26899         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
26900         IRIX if the installer said otherwise.
26901
26902 2000-04-05  Jim Meyering  <meyering@lucent.com>
26903
26904         Portability tweaks required for ultrix4.3.
26905         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
26906         (jm_CHECK_DECLS): Add getutent to the list of functions.
26907         (_jm_DECL_HEADERS): Add utmpx.h.
26908         From John David Anglin.
26909
26910         * m4/strftime.m4: Back out the 2000-04-02 change.
26911         Instead of that change, simply undefine putenv in the test program.
26912
26913 2000-04-05  Jim Meyering  <meyering@lucent.com>
26914
26915         Portability tweaks required for ultrix4.3.
26916         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
26917         getutent.
26918         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
26919         * lib/canon-host.c: Declare strdup.
26920         * lib/path-concat.c: Likewise.
26921         From John David Anglin.
26922
26923 2000-04-04  Jim Meyering  <meyering@lucent.com>
26924
26925         Be more DOS 8.3-friendly.
26926         * lib/ref-add.sin: Renamed from ref-add.sed.in.
26927         * lib/ref-del.sin: Renamed from ref-del.sed.in.
26928         * lib/Makefile.am: Reflect renaming.
26929         Reported by Eli Zaretskii.
26930
26931         Use a temporary file name that won't clash with `charset.alias'
26932         in the DOS 8.3 name space.
26933         * lib/Makefile.am (charset_tmp): Define.
26934         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
26935         (uninstall-local): Likewise.
26936         Reported by Eli Zaretskii.
26937
26938 2000-04-03  Jim Meyering  <meyering@lucent.com>
26939
26940         * m4/gettext.m4: Fix typo in comment.
26941
26942         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
26943         textutils/configure.in).  Suggestion from Paul Eggert.
26944         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
26945
26946 2000-04-02  Paul Eggert  <eggert@twinsun.com>
26947
26948         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
26949         variable in the shell rather than using putenv, which isn't
26950         portable.  This avoids the configure-time inter-test dependency
26951         on the potentially-renamed putenv function.
26952
26953 2000-03-30  Paul Eggert  <eggert@twinsun.com>
26954
26955         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
26956         before checking struct stat.st_blksize, so that
26957         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
26958
26959 2000-03-29  Paul Eggert  <eggert@twinsun.com>
26960
26961         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
26962         since strftime.c uses HAVE_STRFTIME to decide whether to use
26963         the underlying strftime.
26964
26965 2000-03-29  Paul Eggert  <eggert@twinsun.com>
26966
26967         * lib/time/strftime.c (my_strftime): Make sure we call the system
26968         strftime, not ourselves, when invoking the underlying strftime.
26969
26970 2000-03-24  Jim Meyering  <meyering@lucent.com>
26971
26972         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
26973         (charset_alias): Define.
26974         (install-exec-local): Factor out common code.
26975         (uninstall-local): Split lines longer than 80.
26976         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
26977         (SUFFIXES): Define.
26978         (.sed.in.sed): New rule.  Don't redirect directly to $@.
26979         (CLEANFILES): Add ref-add.sed and ref-del.sed.
26980
26981 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
26982
26983         * lib/config.charset: Output a line containing "Packages using this
26984         file".
26985         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
26986         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
26987         ref-del.sed): New rules.
26988
26989 2000-03-17  Jim Meyering  <meyering@lucent.com>
26990
26991         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
26992         Otherwise, include <strings.h>
26993
26994 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
26995
26996         * lib/unicodeio.c (utf8_wctomb): New function.
26997         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
26998         format instead of in UCS-4 with platform dependent endianness.
26999
27000 2000-03-10  Jim Meyering  <meyering@lucent.com>
27001
27002         * m4/lib-check.m4: Look for getspnam in -lgen, too.
27003         From Marco Franzen.
27004
27005 2000-03-07  Paul Eggert  <eggert@twinsun.com>
27006
27007         * lib/savedir.c (savedir): Work even if directory size is
27008         negative; this can happen with some screwy NFS configurations.
27009
27010 2000-03-06  Jim Meyering  <meyering@lucent.com>
27011
27012         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
27013         if it's NULL (because we ran out of memory).  From Bruno Haible.
27014
27015 2000-03-05  Jim Meyering  <meyering@lucent.com>
27016
27017         * lib/localcharset.c ("path-concat.h"): Include.
27018         (get_charset_aliases): Use path_concat instead of ANSI string
27019         concatenation.
27020
27021         * lib/unicodeio.h (PARAMS): Define.
27022         Use it to guard prototype.
27023
27024 2000-03-04  Jim Meyering  <meyering@lucent.com>
27025
27026         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
27027         for lib/localcharset.c.
27028
27029 2000-03-04  Jim Meyering  <meyering@lucent.com>
27030
27031         * lib/Makefile.am (install-exec-local): Create $(libdir) before
27032         installing into it.
27033         (uninstall-local): Uncomment this rule so `make distcheck' works
27034         once again.
27035
27036         * lib/unicodeio.c (<errno.h>): Include it.
27037         (errno): Declare if not defined.
27038
27039         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
27040
27041         * lib/config.charset: New version, incorporating remarks from a linux
27042         i18n mailing list.  From Bruno Haible.
27043
27044 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
27045
27046         * m4/codeset.m4: New file.
27047         * m4/iconv.m4: New file.
27048         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
27049
27050 2000-03-03  Jim Meyering  <meyering@lucent.com>
27051
27052         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
27053
27054 2000-03-02  Jim Meyering  <meyering@lucent.com>
27055
27056         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
27057         the messages come out on separate lines.
27058
27059         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
27060         rather than jm_CHECK_DECLARATIONS.
27061         * m4/decl.m4: Remove now-unused file.
27062
27063         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
27064         geteuid.
27065
27066 2000-03-02  Jim Meyering  <meyering@lucent.com>
27067
27068         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
27069
27070 2000-03-01  Jim Meyering  <meyering@lucent.com>
27071
27072         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
27073         * lib/unicodeio.c: Likewise.
27074
27075 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
27076
27077         * lib/config.charset: New file.
27078         * lib/localcharset.c: New file.
27079         * lib/unicodeio.h, lib/unicodeio.c: New files.
27080         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
27081         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
27082         (noinst_HEADERS): Add unicodeio.h.
27083         (all-local, install-exec-local, charset.alias): New targets.
27084
27085 2000-02-28  Paul Eggert  <eggert@twinsun.com>
27086
27087         * lib/quotearg.c (ALERT_CHAR): New macro.
27088         (quotearg_buffer_restyled): Use it.
27089
27090 2000-02-27  Jim Meyering  <meyering@lucent.com>
27091
27092         * m4/check-decl.m4: Add getenv to the list.
27093
27094 2000-02-27  Jim Meyering  <meyering@lucent.com>
27095
27096         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
27097         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
27098
27099         * lib/backupfile.c: Guard inclusion of stdlib.h with
27100         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
27101         Declare malloc if needed.
27102
27103         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
27104         `#ifndef HAVE_DECL..'
27105         now that autoconf always defines the HAVE_DECL_ symbols.
27106         * lib/human.c: Likewise.
27107         * lib/same.c: Likewise.
27108         * lib/strtoumax.c: Likewise.
27109
27110         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
27111         declaration check was not run.
27112         * lib/hash.c: Likewise.
27113         * lib/human.c: Likewise.
27114         * lib/same.c: Likewise.
27115         * lib/strtoumax.c: Likewise.
27116
27117         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
27118         `.', then first look up the entire `.'-containing string as a login
27119         name.
27120
27121 2000-02-23  Jim Meyering  <meyering@lucent.com>
27122
27123         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
27124         in place of my hack.
27125
27126 2000-02-18  Paul Eggert  <eggert@twinsun.com>
27127
27128         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
27129         (textint): New typedef.
27130         (parser_control): Member year changed from int to textint.
27131         All uses changed.
27132         (YYSTYPE): Removed; replaced by %union with int and textint members.
27133         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
27134         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
27135         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
27136         (tSNUMBER, tUNUMBER): Now of type <textintval>.
27137         (date, number, to_year): Use width of number in digits, not its value,
27138         to determine whether it's a 2-digit year, or a 2-digit time.
27139         (yylex): Store number of digits of numeric tokens.
27140         Reported by John Kendall.
27141
27142         (parser_control): Changed from struct parser_control to typedef (for
27143         consistency).  All uses changed.
27144
27145         (tID): Removed; not used.
27146         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
27147
27148 2000-02-14  Paul Eggert  <eggert@twinsun.com>
27149
27150         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
27151         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
27152
27153 2000-02-12  Jim Meyering  <meyering@lucent.com>
27154
27155         * lib/userspec.c (ISDIGIT): Define it.
27156         (isdigit): Remove definition.
27157         (is_number): Use ISDIGIT, not isdigit.
27158         <libintl.h>: Include.
27159         (_ and N_): Define.
27160         (parse_user_spec): Mark translatable strings.
27161
27162 2000-02-10  Jim Meyering  <meyering@lucent.com>
27163
27164         With these changes, nanosleep.[ch] are finally enough like the other
27165         lib/* replacement files to compile on a few more losing systems.
27166
27167         * lib/nanosleep.h: Don't include config.h.
27168         Remove prototype from declaration of nanosleep.
27169         (PARAMS): Remove now-unneeded definition.
27170         * lib/nanosleep.c: #undef nanosleep.
27171         (rpl_nanosleep): Rename from nanosleep.
27172
27173 2000-02-10  Jim Meyering  <meyering@lucent.com>
27174
27175         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
27176         gnu_nanosleep to rpl_nanosleep.
27177
27178 2000-02-09  Jim Meyering  <meyering@lucent.com>
27179
27180         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
27181         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
27182
27183 2000-02-08  Akim Demaille  <akim@epita.fr>
27184
27185         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
27186         `[' and `]' and remove uses of `changequote'.
27187         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
27188         (AC_SYS_LARGEFILE): Likewise.
27189         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
27190         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
27191         of changequote.
27192         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
27193         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
27194         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
27195         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
27196
27197 2000-02-05  Jim Meyering  <meyering@lucent.com>
27198
27199         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
27200         Remove explicit use of AC_HEADER_TIME.  It is required by
27201         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
27202         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
27203         in autoconf whereby the expansion of the latter ended up preceding
27204         the expansion of its prerequisite, AC_HEADER_TIME.
27205         Reported by Volker Borchert.
27206
27207 2000-02-03  Jim Meyering  <meyering@lucent.com>
27208
27209         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
27210
27211 2000-02-03  Jim Meyering  <meyering@lucent.com>
27212
27213         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
27214         rather than with `#if HAVE_UTMPNAME'.
27215
27216 2000-02-02  Jim Meyering  <meyering@lucent.com>
27217
27218         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
27219         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
27220         Reported by Eli Zaretskii.
27221
27222 2000-02-01  Jim Meyering  <meyering@lucent.com>
27223
27224         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
27225
27226 2000-01-31  Jim Meyering  <meyering@lucent.com>
27227
27228         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
27229         functions.  Add the time.h and sys/time.h headers along with the
27230         AC_REQUIRE'ment of AC_HEADER_TIME.
27231
27232 2000-01-31  Jim Meyering  <meyering@lucent.com>
27233
27234         * lib/nanosleep.h (nanosleep): Guard declaration with
27235         `#if ! HAVE_DECL_NANOSLEEP'.
27236         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
27237         the declaration in that vendor's sys/timers.h.
27238         Reported by Christian Krackowizer.
27239
27240         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
27241         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
27242         (ISPRINT): Likewise.
27243         Reported by Tom Tromey.
27244
27245 2000-01-30  Jim Meyering  <meyering@lucent.com>
27246
27247         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
27248
27249         * m4/prereq.m4 (utmp_includes): Define.
27250         Check for ut_user and ut_name members in both struct utmpx
27251         and struct utmp.
27252
27253 2000-01-30  Jim Meyering  <meyering@lucent.com>
27254
27255         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
27256         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
27257         header files where only utmpx.ut_user is declared.
27258
27259         * lib/readutmp.h (UT_USER): Define.
27260
27261 2000-01-29  Jim Meyering  <meyering@lucent.com>
27262
27263         * m4/lib-check.m4: New file containing library-related checks from
27264         fileutils and sh-utils (textutils had none).
27265
27266 2000-01-28  Jim Meyering  <meyering@lucent.com>
27267
27268         * m4/perl.m4: Change format of warning message to look more like that
27269         from the missing script.  Suggestion from François Pinard.
27270
27271 2000-01-25  Jim Meyering  <meyering@lucent.com>
27272
27273         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
27274         well as time.h in the compile check.
27275         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
27276         Fix typo in cross-compiling case: s/yes/no/.
27277
27278 2000-01-23  Jim Meyering  <meyering@lucent.com>
27279
27280         * m4/jm-macros.m4: Move df-related tests here from
27281         fileutils/configure.in
27282
27283         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
27284         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
27285
27286         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
27287         s/space/ac_fsusage_space/.
27288         (jm_FILE_SYSTEM_USAGE): Take two parameters.
27289
27290         * m4/ftruncate.m4: New file (derived from part of
27291         fileutils/configure.in).
27292         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
27293         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
27294
27295         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
27296         AC_SUBST these here, rather than just in sh-util/configure.in, so
27297         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
27298         all the same.
27299         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
27300         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
27301         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
27302         (AC_SUBST(POW_LIBM)): Likewise.
27303         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
27304
27305 2000-01-23  Jim Meyering  <meyering@lucent.com>
27306
27307         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
27308         obstack.c.
27309
27310 2000-01-22  Jim Meyering  <meyering@lucent.com>
27311
27312         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
27313
27314         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
27315
27316         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
27317         configure.in
27318         (AC_CHECK_HEADERS): Likewise for sh-utils.
27319         (AC_CHECK_HEADERS): Likewise for textutils.
27320         Merge the three lists of headers.
27321
27322         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
27323         from fileutils' configure.in.
27324
27325         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
27326         code. Moved tests into their own function (_jm_DECL_HEADERS) in
27327         check-decl.m4.
27328
27329         * m4/check-decl.m4: Use #if rather than #ifdef.
27330         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
27331         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
27332         (_jm_DECL_HEADERS): Define new function.
27333         (jm_CHECK_DECLARATIONS): Require it.
27334
27335 2000-01-22  Jim Meyering  <meyering@lucent.com>
27336
27337         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
27338         [! HAVE_DECL_STRTOULL]: Declare strtoull.
27339         Required for some AIX systems.  Reported by Christian Krackowizer.
27340         [TESTING] (main): New function.
27341
27342         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
27343         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
27344         letters.
27345
27346         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
27347         iswprint.
27348
27349         * lib/strverscmp.c (ISDIGIT): Define.
27350         (strverscmp): Use ISDIGIT, not isdigit.
27351
27352 2000-01-19  Jim Meyering  <meyering@lucent.com>
27353
27354         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
27355         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
27356         defines `struct timespec' in <sys/time.h>
27357
27358         * m4/c-bs-a.m4: Remove uses of changequote altogether.
27359         Thanks to Akim for explaining.
27360
27361 2000-01-17  Paul Eggert  <eggert@twinsun.com>
27362
27363         * lib/nanosleep.c (nanosleep):
27364         Don't use SA_INTERRUPT to decide whether to call sigaction, as
27365         POSIX.1 doesn't require SA_INTERRUPT and some systems
27366         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
27367         it's been part of POSIX.1 since day 1 (in 1988).
27368
27369 2000-01-17  Jim Meyering  <meyering@lucent.com>
27370
27371         * lib/interlock: Remove unused file.  Reported by François Pinard.
27372
27373 2000-01-16  Paul Eggert  <eggert@twinsun.com>
27374
27375         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
27376         alert, backslash, formfeed, and vertical tab unnecessarily in
27377         shell quoting style.
27378
27379 2000-01-16  Jim Meyering  <meyering@lucent.com>
27380
27381         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
27382         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
27383         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
27384         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
27385
27386 2000-01-16  Jim Meyering  <meyering@lucent.com>
27387
27388         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
27389         because the latter didn't work.
27390
27391 2000-01-15  Jim Meyering  <meyering@lucent.com>
27392
27393         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
27394         (AC_REPLACE_FUNCS): Add memcpy and memset.
27395         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
27396         Add strpbrk.
27397         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
27398
27399 2000-01-12  Jim Meyering  <meyering@lucent.com>
27400
27401         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
27402         (jm_PREREQ): Use it.
27403         (jm_PREREQ_READUTMP): New macro.
27404         (jm_PREREQ): Use it.
27405
27406 2000-01-11  Paul Eggert  <eggert@twinsun.com>
27407
27408         Quote multibyte characters correctly.
27409         * m4/c-bs-a.m4: New file.
27410         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
27411         (jm_PREREQ): Use it.
27412
27413 2000-01-11  Paul Eggert  <eggert@twinsun.com>
27414
27415         * m4/uintmax_t.m4: Port to autoconf 2.13.
27416
27417 2000-01-08  Jim Meyering  <meyering@ascend.com>
27418
27419         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
27420         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
27421
27422 2000-01-04  Jim Meyering  <meyering@ascend.com>
27423
27424         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
27425         jm_STRUCT_DIRENT_D_TYPE.
27426         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
27427         jm_STRUCT_DIRENT_D_INO.
27428         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
27429         jm_STRUCT_UTIMBUF.
27430         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
27431         renamings.
27432         * m4/utime.m4: Likewise.
27433
27434         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
27435         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
27436
27437 2000-01-03  Paul Eggert  <eggert@twinsun.com>
27438
27439         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
27440         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
27441
27442 2000-01-02  Jim Meyering  <meyering@ascend.com>
27443
27444         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
27445         remember if this is necessary.
27446
27447 1999-12-26  Jim Meyering  <meyering@ascend.com>
27448
27449         * m4/jm-macros.m4: Use it here.
27450         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
27451
27452 1999-12-23  Jim Meyering  <meyering@ascend.com>
27453
27454         * m4/jm-macros.m4: Check for clock_gettime (moved from
27455         fileutils/configure.in)
27456         Check for gettimeofday.
27457
27458 1999-12-20  Jim Meyering  <meyering@ascend.com>
27459
27460         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
27461         autoconf-2.14a-1999-12-20.
27462
27463 1999-12-19  Jim Meyering  <meyering@ascend.com>
27464
27465         * m4/lstat-slash.m4: New file.
27466         * m4/jm-macros.m4: Use the new macro:
27467         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
27468
27469 1999-12-07  Jim Meyering  <meyering@ascend.com>
27470
27471         * m4/perl.m4: Require that File::Compare be available, too.
27472         Too many systems seem to lack it.
27473
27474         * m4/strftime.m4: Add checks for most of the cpp macros tested in
27475         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
27476
27477 1999-11-18  Paul Eggert  <eggert@twinsun.com>
27478
27479         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
27480         problem with the QNX 4.25 shell, which doesn't propagate exit
27481         status of failed commands inside shell assignments.
27482
27483 1999-11-17  Jim Meyering  <meyering@ascend.com>
27484
27485         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
27486
27487 1999-11-07  Jim Meyering  <meyering@ascend.com>
27488
27489         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
27490
27491 1999-11-06  Jim Meyering  <meyering@ascend.com>
27492
27493         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
27494         * m4/jm-macros.m4 (jm_MACROS): Use it here.
27495
27496 1999-11-05  Jim Meyering  <meyering@ascend.com>
27497
27498         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
27499         configure.in of textutils, fileutils, and sh-utils into this one
27500         (shared between those packages) file.
27501         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
27502         AC_STRUCT_ST_BLKSIZE.
27503
27504 1999-11-03  Jim Meyering  <meyering@ascend.com>
27505
27506         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
27507         of AC_CHECK_TYPE checks includes unistd.h.
27508         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
27509         Suggestion from Akim Demaille.
27510
27511 1999-10-30  Jim Meyering  <meyering@ascend.com>
27512
27513         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
27514         m4-quoted string.
27515         * m4/ls-mntd-fs.m4: Likewise.
27516         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
27517         * m4/jm-winsz1.m4: Likewise.
27518
27519         * m4/const.m4: Remove file, since the fix made it into the experimental
27520         version of autoconf.
27521         * m4/mktime.m4: Likewise.
27522
27523         * m4/check-type.m4: Remove file, now that the latest version of
27524         AC_CHECK_TYPE takes a third arg to specify additional #includes.
27525
27526         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
27527         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
27528         AC_CHECK_TYPE.
27529
27530 1999-10-04  Jim Meyering  <meyering@ascend.com>
27531
27532         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
27533
27534 1999-09-22  Paul Eggert  <eggert@twinsun.com>
27535
27536         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
27537         2.95.1 bug with HP-UX 10.20.
27538
27539 1999-09-17  Jim Meyering  <meyering@ascend.com>
27540
27541         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
27542         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
27543         due to missing strdup (against sh-utils-2.0).
27544
27545 1999-08-29  Jim Meyering  <meyering@ascend.com>
27546
27547         * m4/jm-macros.m4: Require jm_BISON.
27548         * m4/bison.m4: New file.
27549
27550 1999-08-17  Paul Eggert  <eggert@twinsun.com>
27551
27552         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
27553         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
27554
27555 1999-08-05  Jim Meyering  <meyering@ascend.com>
27556
27557         * m4/getline.m4: Rename test file from conftestdata to conftest.data
27558         to avoid conflicts with `conftest' on 8+3 filesystems.
27559         Suggestion from Eli Zaretskii.
27560
27561 1999-08-04  Jim Meyering  <meyering@ascend.com>
27562
27563         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
27564         fileutils and sh-utils (textutils's getline test was inadequate).
27565         (AM_FUNC_GETLINE): Run this test.
27566         (AC_CHECK_FUNCS): Check for getdelim.
27567         Reported by Bob Proulx.
27568
27569 1999-08-02  Jim Meyering  <meyering@ascend.com>
27570
27571         * m4/jm-macros.m4: Add a comment.
27572
27573 1999-08-01  Paul Eggert  <eggert@twinsun.com>
27574
27575         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
27576         <inttypes.h> defines strtoumax as a macro (and not as a
27577         function).
27578
27579 1999-08-01  Paul Eggert  <eggert@twinsun.com>
27580
27581         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
27582         that we can shift, multiply and divide unsigned long long
27583         values; Ultrix cc can't do it.
27584
27585 1999-08-01  Paul Eggert  <eggert@twinsun.com>
27586
27587         * m4/mktime.m4: New file, which is a preview of what should appear
27588         in the next public autoconf release.
27589
27590 1999-08-01  Paul Eggert  <eggert@twinsun.com>
27591
27592         * m4/lfs.m4: Remove this file.
27593         * m4/largefile.m4: New file.  It contains the old contents of
27594         lfs.m4, except that all names with prefix AC_LFS have been
27595         changed to use the prefix AC_SYS_LARGEFILE instead, to be
27596         compatible with future autoconf versions.  Also, some minor m4
27597         quoting problems have been fixed.
27598
27599 1999-08-01  Paul Eggert  <eggert@twinsun.com>
27600
27601         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
27602         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
27603         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
27604         and simplify the shell code.
27605
27606 1999-08-01  Jim Meyering  <meyering@ascend.com>
27607
27608         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
27609         m4.
27610
27611 1999-07-20  Jim Meyering  <meyering@ascend.com>
27612
27613         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
27614
27615 1999-07-15  Jim Meyering  <meyering@ascend.com>
27616
27617         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
27618
27619 1999-05-22  Jim Meyering  <meyering@ascend.com>
27620
27621         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
27622
27623 1999-05-20  Jim Meyering  <meyering@ascend.com>
27624
27625         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
27626         Add a colon after each `then' in case $4 is empty.
27627
27628 1999-05-16  Jim Meyering  <meyering@ascend.com>
27629
27630         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
27631
27632 1999-05-10  Jim Meyering  <meyering@ascend.com>
27633
27634         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
27635
27636         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
27637         AC_FUNC_MKTIME.
27638
27639 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
27640
27641         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
27642
27643 1999-05-04  Paul Eggert  <eggert@twinsun.com>
27644
27645         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
27646         not CPPFLAGS, so that linking works correctly in IRIX.
27647
27648 1999-04-30  Paul Eggert  <eggert@twinsun.com>
27649
27650         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
27651
27652 1999-04-20  Paul Eggert  <eggert@twinsun.com>
27653
27654         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
27655         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
27656         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
27657         jm_AC_TYPE_UNSIGNED_LONG_LONG.
27658         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
27659
27660         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
27661
27662 1999-04-20  Jim Meyering  <meyering@ascend.com>
27663
27664         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
27665         AC_REPLACE xstroull if necessary.  From Paul Eggert.
27666         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
27667
27668 1999-04-18  Jim Meyering  <meyering@ascend.com>
27669
27670         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
27671         * m4/jm-macros.m4: Use it.
27672
27673 1999-04-06  Jim Meyering  <meyering@ascend.com>
27674
27675         * m4/strftime.m4: Remove test for %f.
27676
27677 1999-03-29  Jim Meyering  <meyering@ascend.com>
27678
27679         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
27680         superset of the AC_TYPE_* checks in the textutils, fileutils,
27681         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
27682         AC_TYPE_PID_T.
27683
27684 1999-03-28  Jim Meyering  <meyering@ascend.com>
27685
27686         * m4/jm-macros.m4: Define GNU_PACKAGE here.
27687         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
27688         replaced e.g., in the *.sh files of the sh-utils.
27689
27690 1999-03-20  Jim Meyering  <meyering@ascend.com>
27691
27692         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
27693         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
27694         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
27695
27696 1999-03-19  Jim Meyering  <meyering@ascend.com>
27697
27698         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
27699
27700 1999-03-12  Jim Meyering  <meyering@ascend.com>
27701
27702         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
27703
27704 1999-03-07  Jim Meyering  <meyering@ascend.com>
27705
27706         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
27707         declared.
27708
27709 1999-02-17  Jim Meyering  <meyering@ascend.com>
27710
27711         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
27712         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
27713
27714 1999-02-07  Jim Meyering  <meyering@ascend.com>
27715
27716         * m4/group-member.m4: New file -- extracted from sh-utils'
27717         configure.in.
27718
27719         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
27720         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
27721
27722 1999-02-06  Jim Meyering  <meyering@ascend.com>
27723
27724         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
27725         * m4/fnmatch.m4: Likewise.
27726         * m4/getgroups.m4: Likewise.
27727         * m4/lstat.m4: Likewise.
27728         * m4/malloc.m4: Likewise.
27729         * m4/putenv.m4: Likewise.
27730         * m4/realloc.m4: Likewise.
27731         * m4/regex.m4: Likewise.
27732         * m4/stat.m4: Likewise.
27733         * m4/strftime.m4: Likewise.
27734         Suggestion from Alain Magloire.
27735
27736         * m4/chown.m4: Use `.$ac_objext', not `.o'.
27737         * m4/fnmatch.m4: Likewise.
27738         * m4/getgroups.m4: Likewise.
27739         * m4/getline.m4: Likewise.
27740         * m4/lstat.m4: Likewise.
27741         * m4/malloc.m4: Likewise.
27742         * m4/memcmp.m4: Likewise.
27743         * m4/putenv.m4: Likewise.
27744         * m4/realloc.m4: Likewise.
27745         * m4/regex.m4: Likewise.
27746         * m4/stat.m4: Likewise.
27747         * m4/strftime.m4: Likewise.
27748         Suggestion from Alain Magloire.
27749
27750         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
27751         an argument.
27752
27753         * m4/regex.m4: Add a run-time Test for proper operation of
27754         re_compile_pattern.
27755
27756 1999-01-31  Jim Meyering  <meyering@ascend.com>
27757
27758         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
27759
27760 1999-01-30  Jim Meyering  <meyering@ascend.com>
27761
27762         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
27763
27764         * m4/jm-mktime.m4: Make this a wrapper around the official
27765         AM_FUNC_MKTIME rather than my private copy, now that the official one
27766         is up to date.
27767         * m4/mktime.m4: Remove file.
27768
27769         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
27770         * m4/uptime.m4: Likewise.
27771         * m4/uintmax_t.m4: Likewise.
27772
27773 1999-01-28  Jim Meyering  <meyering@ascend.com>
27774
27775         * m4/jm-macros.m4: Use jm_AFS.
27776         * m4/afs.m4: New file (from fileutils' configure.in).
27777
27778         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
27779         * m4/chown.m4: Likewise.
27780         * m4/d-ino.m4: Likewise.
27781         * m4/d-type.m4: Likewise.
27782         * m4/fnmatch.m4: Likewise.
27783         * m4/getgroups.m4: Likewise.
27784         * m4/gettext.m4: Likewise.
27785         * m4/jm-mktime.m4: Likewise.
27786         * m4/jm-winsz2.m4: Likewise.
27787         * m4/lcmessage.m4: Likewise.
27788         * m4/ls-mntd-fs.m4: Likewise.
27789         * m4/malloc.m4: Likewise.
27790         * m4/memcmp.m4: Likewise.
27791         * m4/putenv.m4: Likewise.
27792         * m4/realloc.m4: Likewise.
27793         * m4/st_mtim.m4: Likewise.
27794         * m4/strftime.m4: Likewise.
27795
27796 1999-01-16  Jim Meyering  <meyering@ascend.com>
27797
27798         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
27799         (ARGMATCH_DIE_DECL): Define.
27800
27801 1999-01-12  Jim Meyering  <meyering@ascend.com>
27802
27803         * m4/Makefile.am.in: Rewrite to avoid using fmt.
27804         Reported by Lars Hecking.
27805
27806 1999-01-10  Jim Meyering  <meyering@ascend.com>
27807
27808         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
27809         gross kludge.
27810         * m4/inttypes_h.m4: Likewise.
27811         * m4/lstat.m4: Likewise.
27812         * m4/malloc.m4: Likewise.
27813         * m4/readdir.m4: Likewise.
27814         * m4/realloc.m4: Likewise.
27815         * m4/st_dm_mode.m4: Likewise.
27816         * m4/stat.m4: Likewise.
27817         * m4/utimbuf.m4: Likewise.
27818         * m4/utimes.m4: Likewise.
27819
27820         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
27821         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
27822         comments in config.h.in are meaningful.
27823
27824         * m4/jm-macros.m4: Require autoconf-2.13 here.
27825
27826         * m4/regex.m4: By default, don't use the included regex.c on systems
27827         with glibc 2.  Suggestion from Uli Drepper.
27828
27829 1999-01-02  Jim Meyering  <meyering@ascend.com>
27830
27831         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
27832
27833 1998-12-18  Jim Meyering  <meyering@ascend.com>
27834
27835         * m4/Makefile.am.in (Makefile.am): Simplify rule.
27836         Based on a suggestion from Lars Hecking.
27837
27838 1998-11-16  Paul Eggert  <eggert@twinsun.com>
27839
27840         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
27841
27842 1998-11-16  Jim Meyering  <meyering@ascend.com>
27843
27844         * m4/lfs.m4: Double-quote the `uname...` expression.
27845
27846 1998-11-14  Jim Meyering  <meyering@ascend.com>
27847
27848         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
27849         * m4/stat.m4: Likewise.
27850
27851 1998-11-03  Jim Meyering  <meyering@ascend.com>
27852
27853         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
27854         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
27855
27856 1998-10-18  Jim Meyering  <meyering@ascend.com>
27857
27858         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
27859
27860 1998-10-17  Jim Meyering  <meyering@ascend.com>
27861
27862         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
27863         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
27864         calls for those previously hard-coded headers.  Instead, take a new
27865         parameter.
27866         (jm_CHECK_DECLARATIONS): Reflect interface change.
27867         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
27868         (jm_CHECK_DECL_LOCALTIME_R): New macro.
27869
27870         * m4/mktime.m4: Test for spring-forward gap before long-running test.
27871
27872 1998-10-14  Jim Meyering  <meyering@ascend.com>
27873
27874         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
27875         instead of "TZ=America/Vancouver".  From Paul Eggert.
27876
27877 1998-10-11  Jim Meyering  <meyering@ascend.com>
27878
27879         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
27880         This adds a test for a recently added compatibility fix for mktime.c.
27881         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
27882
27883 1998-09-27  Jim Meyering  <meyering@ascend.com>
27884
27885         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
27886
27887         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
27888         ../configure.in, including a change from Gordon Matzigkeit to allow
27889         cross-compiling for the Hurd.
27890
27891         * m4/glibc.m4: New file/macro to test for the GNU C Library
27892         versions 1 and 2.  From Gordon Matzigkeit.
27893         Indent.
27894
27895 1998-09-21  Jim Meyering  <meyering@ascend.com>
27896
27897         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
27898
27899 1998-08-18  Paul Eggert  <eggert@twinsun.com>
27900
27901         Port nanosecond-resolution times to UnixWare 2.1.2 and
27902         pedantic Solaris 2.6.
27903
27904         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
27905         AC_STRUCT_ST_MTIM.
27906         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
27907         Generate name of ns member, instead of just 1 or undef.
27908         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
27909
27910 1998-08-15  Jim Meyering  <meyering@ascend.com>
27911
27912         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
27913         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
27914         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
27915         instead of jm_TYPE_SSIZE_T.
27916
27917 1998-08-12  Jim Meyering  <meyering@ascend.com>
27918
27919         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
27920
27921 1998-08-02  Jim Meyering  <meyering@ascend.com>
27922
27923         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
27924         in acconfig.h manually.
27925
27926 1998-07-31  Paul Eggert  <eggert@twinsun.com>
27927
27928         * m4/st_mtim.m4: New file.
27929
27930 1998-07-28  Jim Meyering  <meyering@ascend.com>
27931
27932         * m4/utimes.m4: Undef stat.
27933
27934 1998-07-25  Jim Meyering  <meyering@ascend.com>
27935
27936         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
27937         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
27938
27939 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
27940
27941         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
27942         uid and gid actually remain unchanged.
27943
27944 1998-07-07  Jim Meyering  <meyering@ascend.com>
27945
27946         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
27947
27948 1998-07-04  Jim Meyering  <meyering@ascend.com>
27949
27950         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
27951         to prove that this macro can be used in packages without regex.c.
27952
27953 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
27954
27955         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
27956         is to be used.
27957
27958 1998-07-03  Jim Meyering  <meyering@ascend.com>
27959
27960         * m4/gettext.m4: Add -lintl if it's found to be necessary.
27961
27962         * m4/gettext.m4: New file -- from gettext-0.10.35.
27963         * m4/lcmessage.m4: Likewise.
27964         * m4/progtest.m4: Likewise.
27965
27966         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
27967         * m4/jm-macros.m4: Require the new macro.
27968
27969 1998-06-29  Jim Meyering  <meyering@ascend.com>
27970
27971         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
27972         for the definition of NGROUPS (used in a system header included
27973         by sys/mount.h).
27974
27975 1998-06-28  Jim Meyering  <meyering@ascend.com>
27976
27977         * m4/ls-mntd-fs.m4: New file.
27978         * m4/fstypename.m4: New file.
27979
27980         * m4/jm-macros.m4: Require the new macro.
27981         * m4/jm-glibc-io.m4: New file.
27982
27983 1998-05-19  Jim Meyering  <meyering@ascend.com>
27984
27985         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
27986         * m4/lchown.m4: New file.
27987
27988         * m4/Makefile.am.in: New file.
27989         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
27990
27991 1998-05-14  Jim Meyering  <meyering@ascend.com>
27992
27993         * m4/Makefile.am (EXTRA_DIST): Add them.
27994         * m4/jm-macros.m4: New file.
27995         * m4/utimbuf.m4: New file.
27996
27997 1998-05-12  Jim Meyering  <meyering@ascend.com>
27998
27999         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
28000
28001 1998-05-11  Jim Meyering  <meyering@ascend.com>
28002
28003         * m4/isc-posix.m4: New file.
28004
28005 1998-05-10  Jim Meyering  <meyering@ascend.com>
28006
28007         * m4/jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
28008
28009 1998-05-09  Jim Meyering  <meyering@ascend.com>
28010
28011         * m4/Makefile.am (EXTRA_DIST): Add ssize_t.m4.
28012         (EXTRA_DIST): Remove mktime.m4, now that the new version is included
28013         with automake.
28014
28015         * m4/ssize_t.m4: New file.
28016         * m4/mktime.m4: Remove file -- the new automake has this now.
28017
28018 1998-04-26  Jim Meyering  <meyering@ascend.com>
28019
28020         * m4/assert.m4: New file.
28021         * m4/Makefile.am (EXTRA_DIST): Add assert.m4.
28022
28023 1998-04-05  Jim Meyering  <meyering@ascend.com>
28024
28025         * m4/prereq.m4 (jm_PREREQ_REGEX): New macro.
28026         (jm_PREREQ): Use it here.
28027
28028 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
28029
28030         * m4/inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H
28031         in acconfig.h.
28032
28033 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
28034
28035         * m4/prereq.m4: New file.
28036         * m4/error.m4: New file.
28037         * m4/Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4.
28038
28039 1998-02-07  Jim Meyering  <meyering@eng.ascend.com>
28040
28041         * m4/getline.m4: Don't set am_cv_func_working_getline before the
28042         cache-check for the same variable -- that defeated the purpose of
28043         the test; the test program was never run.  This was a problem only
28044         on systems with losing getline functions -- HP-UX 10.20 is one.
28045         Reported by Bjorn Helgaas.
28046
28047 1998-02-06  Jim Meyering  <meyering@eng.ascend.com>
28048
28049         * m4/Makefile.am (EXTRA_DIST): Add perl.m4.
28050
28051 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
28052
28053         * m4/Makefile.am (EXTRA_DIST): Add const.m4.
28054
28055         * m4/const.m4: New file.  Use an initializer in this declaration
28056         typedef int charset[2]; const charset x;
28057         Reported by Bob Glickstein.
28058
28059 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
28060
28061         * m4/chown.m4: Fix reversed types on -1 args to chown.
28062         From Kaveh Ghazi.
28063
28064 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
28065
28066         * m4/check-decl.m4: s/DECLARATION_/DECL_/g.
28067         Add lseek and memchr.
28068
28069         * m4/decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
28070         T.E.Dickey <dickey@clark.net> said that some older preprocessors
28071         have a 20-character limit on names.
28072
28073 1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>
28074
28075         * m4/inttypes_h.m4: New file.
28076         * m4/uintmax_t.m4: New file.
28077         * m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
28078
28079 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
28080   Free Software Foundation, Inc.
28081 Copying and distribution of this file, with or without modification,
28082 are permitted provided the copyright notice and this notice are preserved.