Make <sys/socket.h> self-contained, so that it can be included without
[pspp] / ChangeLog
1 2007-03-02  Bruno Haible  <bruno@clisp.org>
2
3         * lib/socket_.h: If sys/socket.h exists, include that and <sys/types.h>
4         before it. Turn HAVE_WINSOCK2_H and HAVE_WS2TCPIP_H into configute-time
5         values.
6         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Test also whether
7         <sys/socket.h> is self-contained. Set ABSOLUTE_SYS_SOCKET_H,
8         HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H.
9         * modules/sys_socket (Depends-on): Add absolute-header.
10         (Makefile.am): Substitute ABSOLUTE_SYS_SOCKET_H, HAVE_SYS_SOCKET_H,
11         HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H into sys/socket.h.
12         (Include): Remove requirement of inclusion of <sys/types.h>.
13
14 2007-03-02  Bruno Haible  <bruno@clisp.org>
15
16         * lib/byteswap_.h (bswap_32): Fix formula.
17
18 2007-03-06  Bruno Haible  <bruno@clisp.org>
19
20         * modules/sprintf-posix-tests: New file.
21         * tests/test-sprintf-posix.c: New file.
22
23         * modules/sprintf-posix: New file.
24         * lib/sprintf.c: New file.
25         * m4/sprintf-posix.m4: New file.
26         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_SPRINTF_POSIX,
27         REPLACE_SPRINTF.
28         * lib/stdio_.h (sprintf): New declaration.
29         * modules/stdio (Makefile.am): Substitute also GNULIB_SPRINTF_POSIX,
30         REPLACE_SPRINTF.
31
32 2007-03-06  Bruno Haible  <bruno@clisp.org>
33
34         * modules/vsprintf-posix-tests: New file.
35         * tests/test-vsprintf-posix.c: New file.
36         * tests/test-sprintf-posix.h: New file.
37
38         * modules/vsprintf-posix: New file.
39         * lib/vsprintf.c: New file.
40         * m4/vsprintf-posix.m4: New file.
41         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VSPRINTF_POSIX,
42         REPLACE_VSPRINTF.
43         * lib/stdio_.h (vsprintf): New declaration.
44         * modules/stdio (Makefile.am): Substitute also GNULIB_VSPRINTF_POSIX,
45         REPLACE_VSPRINTF.
46
47 2007-03-06  Bruno Haible  <bruno@clisp.org>
48
49         * modules/vsnprintf (Depend-on): Remove minmax.
50
51 2007-03-06  Bruno Haible  <bruno@clisp.org>
52
53         * modules/snprintf-posix-tests: New file.
54         * tests/test-snprintf-posix.c: New file.
55
56         * modules/snprintf-posix: New file.
57         * m4/snprintf-posix.m4: New file.
58         * m4/snprintf.m4 (gl_REPLACE_SNPRINTF): New macro, extracted from
59         gl_FUNC_SNPRINTF.
60         (gl_FUNC_SNPRINTF): Invoke it.
61         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_SNPRINTF.
62         * lib/stdio_.h (snprintf): Define as a replacement if REPLACE_SNPRINTF
63         is set.
64         * modules/stdio (Makefile.am): Substitute also REPLACE_SNPRINTF.
65
66 2007-03-06  Bruno Haible  <bruno@clisp.org>
67
68         * modules/vsnprintf-posix-tests: New file.
69         * tests/test-vsnprintf-posix.c: New file.
70         * tests/test-snprintf-posix.h: New file.
71
72         * modules/vsnprintf-posix: New file.
73         * m4/vsnprintf-posix.m4: New file.
74         * m4/vsnprintf.m4 (gl_REPLACE_VSNPRINTF): New macro, extracted from
75         gl_FUNC_VSNPRINTF.
76         (gl_FUNC_VSNPRINTF): Invoke it.
77         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_VSNPRINTF.
78         * lib/stdio_.h (vsnprintf): Define as a replacement if
79         REPLACE_VSNPRINTF is set.
80         * modules/stdio (Makefile.am): Substitute also REPLACE_VSNPRINTF.
81
82 2007-03-06  Bruno Haible  <bruno@clisp.org>
83
84         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Test for vasnprintf here.
85         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): ... not here.
86
87 2007-03-06  Bruno Haible  <bruno@clisp.org>
88
89         * lib/math_.h (acosl): Declare also if HAVE_DECL_ACOSL is set.
90         (asinl): Declare also if HAVE_DECL_ASINL is set.
91         (atanl): Declare also if HAVE_DECL_ATANL is set.
92         (ceill): Declare also if HAVE_DECL_CEILL is set.
93         (cosl): Declare also if HAVE_DECL_COSL is set.
94         (expl): Declare also if HAVE_DECL_EXPL is set.
95         (floorl): Declare also if HAVE_DECL_FLOORL is set.
96         (frexpl): Declare also if HAVE_DECL_FREXPL is set.
97         (ldexpl): Declare also if HAVE_DECL_LDEXPL is set.
98         (logl): Declare also if HAVE_DECL_LOGL is set.
99         (sinl): Declare also if HAVE_DECL_SINL is set.
100         (sqrtl): Declare also if HAVE_DECL_SQRTL is set.
101         (tanl): Declare also if HAVE_DECL_TANL is set.
102         * modules/math (Makefile.am): Substitute the values of HAVE_DECL_*.
103         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Set HAVE_DECL_* to 1.
104         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Fix tests for the
105         declaration of frexpl, ldexpl.
106         * modules/printf-frexpl (Depends-on): Add math.
107         * lib/printf-frexp.c (frexpl, ldexpl): Undo last change.
108
109 2007-03-05  Bruno Haible  <bruno@clisp.org>
110
111         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Also test whether
112         frexpl and ldexpl are declared.
113         * lib/printf-frexp.c (frexpl, ldexpl): Provide fallback declarations.
114
115 2007-03-05  Bruno Haible  <bruno@clisp.org>
116
117         * gnulib-tool (func_get_automake_snippet): Don't synthesize an
118         EXTRA_lib_SOURCES augmentation for the relocatable-prog-wrapper module.
119
120 2007-03-05  Bruno Haible  <bruno@clisp.org>
121
122         * lib/stdio_.h: Include <stddef.h>.
123
124 2007-03-05  Bruno Haible  <bruno@clisp.org>
125
126         * m4/printf.m4 (gl_SNPRINTF_DIRECTIVE_N): New macro.
127
128 2007-03-05  Bruno Haible  <bruno@clisp.org>
129
130         * m4/printf.m4: Update with info about OpenBSD 3.9, HP-UX 10.20,
131         NetBSD 4, from Ralf Wildenhues.
132
133 2007-03-04  Bruno Haible  <bruno@clisp.org>
134
135         * lib/vasprintf.h: Update #if logic for the case when the functions
136         exist but are overridden.
137
138 2007-03-04  Bruno Haible  <bruno@clisp.org>
139
140         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Exclude two buggy
141         implementations: glibc-2.4 and MacOS X 10.3.
142         * tests/test-vasnprintf-posix.c (test_function): Test also the case
143         that exhibits the bugs in glibc-2.4 and MacOS X 10.3.
144         * tests/test-vasprintf-posix.c (test_function): Likewise.
145
146 2007-03-04  Bruno Haible  <bruno@clisp.org>
147
148         * modules/vasprintf-posix-tests: New file.
149         * tests/test-vasprintf-posix.c: New file.
150
151         * modules/vasprintf-posix: New file.
152         * lib/vasprintf.h (asprintf, vasprintf): Rename if REPLACE_VASPRINTF is
153         defined.
154         * m4/vasprintf-posix.m4: New file.
155         * m4/vasprintf.m4 (gl_REPLACE_VASPRINTF): New macro, extracted from
156         gl_FUNC_VASPRINTF.
157         (gl_FUNC_VASPRINTF): Invoke it.
158         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Define REPLACE_VASNPRINTF
159         here.
160         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Not here.
161
162 2007-03-04  Bruno Haible  <bruno@clisp.org>
163
164         * lib/sys_time_.h: Rename GETTIMEOFDAY_REPLACEMENT to
165         REPLACE_GETTIMEOFDAY.
166         * modules/sys_time (Makefile.am): Likewise.
167         * m4/sys_time_h.m4: Likewise.
168         * m4/gettimeofday.m4: Likewise.
169
170 2007-03-04  Bruno Haible  <bruno@clisp.org>
171
172         * modules/vasnprintf-posix-tests: New file.
173         * tests/test-vasnprintf-posix.c: New file.
174
175         * modules/vasnprintf-posix: New file.
176         * lib/vasnprintf.c: Include isnan.h, isnanl.h, printf-frexp.h,
177         printf-frexpl.h.
178         (VASNPRINTF): Handle the 'a' and 'A' directives here, if needed.
179         * lib/vasnprintf.h (asnprintf, vasnprintf): Rename if
180         REPLACE_VASNPRINTF is defined.
181         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): New macro, extracted from
182         gl_FUNC_VASNPRINTF.
183         (gl_FUNC_VASNPRINTF): Invoke it.
184         * m4/vasnprintf-posix.m4: New file.
185         * m4/printf.m4: New file.
186
187 2007-03-04  Bruno Haible  <bruno@clisp.org>
188
189         Compile progreloc.c only if --enable-relocatable is specified.
190         * m4/relocatable.m4 (gl_RELOCATABLE): Arrange to compile progreloc.c
191         if --enable-relocatable was specified.
192         * modules/relocatable-prog (Makefile.am): Remove progreloc.c from
193         lib_SOURCES.
194
195 2007-03-04  Jim Meyering  <jim@meyering.net>
196
197         * lib/acl.c (ACL_NOT_WELL_SUPPORTED): New macro.
198         Use it consistently, rather than enumerating errno constants.
199
200 2007-03-04  Bruno Haible  <bruno@clisp.org>
201
202         * modules/xvasprintf-tests: New file.
203         * tests/test-xvasprintf.c: New file.
204
205         * modules/vasprintf-tests: New file.
206         * tests/test-vasprintf.c: New file.
207
208         * modules/vasnprintf-tests: New file.
209         * tests/test-vasnprintf.c: New file.
210
211         * modules/vsnprintf-tests: New file.
212         * tests/test-vsnprintf.c: New file.
213
214         * modules/snprintf-tests: New file.
215         * tests/test-snprintf.c: New file.
216
217 2007-03-04  Bruno Haible  <bruno@clisp.org>
218
219         Compile relocatable.c only if --enable-relocatable is specified.
220         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY_BODY): Renamed from
221         gl_RELOCATABLE_LIBRARY.
222         (gl_RELOCATABLE_LIBRARY, gl_RELOCATABLE_LIBRARY_SEPARATE): New macros.
223         * m4/relocatable.m4 (gl_RELOCATABLE): Invoke gl_RELOCATABLE_LIBRARY.
224         (gl_RELOCATABLE_BODY): Require gl_RELOCATABLE_LIBRARY_BODY instead of
225         gl_RELOCATABLE_LIBRARY.
226         * modules/relocatable-lib (configure.ac): Invoke gl_RELOCATABLE_LIBRARY.
227         (Makefile.am): Remove lib_SOURCES.
228         * modules/relocatable-lib-lgpl (configure.ac): Invoke
229         gl_RELOCATABLE_LIBRARY.
230         (Makefile.am): Remove lib_SOURCES.
231         * modules/relocatable-prog (Makefile.am): Don't compile relocatable.c
232         always.
233         * modules/relocatable-prog-wrapper (configure.ac): Invoke
234         gl_RELOCATABLE_LIBRARY_SEPARATE instead of gl_RELOCATABLE_LIBRARY.
235
236 2007-03-04  Bruno Haible  <bruno@clisp.org>
237
238         * modules/argmatch-tests: New file.
239         * tests/test-argmatch.c: New file.
240
241         * tests/test-allocsa.c (main): Halve the number of loop runs.
242
243         * modules/alloca-opt-tests: New file.
244         * tests/test-alloca-opt.c: New file.
245
246 2007-03-04  Jim Meyering  <jim@meyering.net>
247
248         Work around difference between Linux ACLs and Solaris 10 ZFS.
249         * lib/acl.c (set_acl): Revert to using chmod_or_fchmod also
250         for EINVAL.
251
252 2007-03-03  Bruno Haible  <bruno@clisp.org>
253
254         * modules/relocatable-prog (Depends-on): Add back progreloc's
255         dependencies: canonicalize-lgpl, xalloc, xreadlink, stdbool, unistd.
256
257 2007-03-03  Bruno Haible  <bruno@clisp.org>
258
259         * modules/relocatable-lib-lgpl: Renamed from modules/relocatable-lib.
260         * modules/relocatable-lib: New file.
261
262 2007-03-03  Bruno Haible  <bruno@clisp.org>
263
264         * modules/relocatable-prog: Renamed from modules/relocatable.
265         * doc/relocatable-maint.texi: Talk about module 'relocatable-prog'.
266
267 2007-03-03  Bruno Haible  <bruno@clisp.org>
268
269         * modules/relocatable-script (Files): Add doc/relocatable.texi,
270         m4/relocatable-lib.m4.
271         (Depends-on): Remove 'relocatable'.
272         (configure.ac): Add gl_RELOCATABLE_NOP.
273
274 2007-03-03  Bruno Haible  <bruno@clisp.org>
275
276         * modules/relocatable-prog-wrapper: New file.
277         * modules/relocatable (Depends-on): Add it. Remove all other
278         dependencies except progname.
279         (Files): Remove build-aux/install-reloc, lib/relocwrapper.c.
280
281         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): New macro.
282         (gl_FUNC_STRERROR): Nop.
283         * lib/strerror.c: Compile the file only if !HAVE_STRERROR.
284
285         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): New macro.
286         * lib/setenv.c: Compile the file only if _LIBC || !HAVE_SETENV.
287
288         * m4/readlink.m4 (gl_FUNC_READLINK_SEPARATE): New macro.
289         (gl_FUNC_READLINK): Update.
290
291         * m4/canonicalize-lgpl.m4 (gl_CANONICALIZE_LGPL_SEPARATE): New macro.
292
293 2007-03-03  Bruno Haible  <bruno@clisp.org>
294
295         * lib/xreadlink.c: Include <unistd.h> unconditionally.
296         * modules/xreadlink (Depends-on): Add unistd.
297         * modules/xreadlink-with-size (Depends-on): Likewise.
298
299 2007-03-03  Bruno Haible  <bruno@clisp.org>
300
301         * m4/setenv.m4 (gl_FUNC_SETENV, gl_FUNC_UNSETENV): New macros,
302         extracted from gt_FUNC_SETENV.
303         (gt_FUNC_SETENV): Remove macro.
304         * modules/setenv (configure.ac): Add gl_FUNC_SETENV, gl_FUNC_UNSETENV,
305         remove gt_FUNC_SETENV.
306
307 2007-03-03  Bruno Haible  <bruno@clisp.org>
308
309         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY): Define
310         ENABLE_RELOCATABLE here.
311         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Don't define it here.
312
313 2007-03-03  Bruno Haible  <bruno@clisp.org>
314
315         * modules/rbtreehash-list-tests (Depends-on): Add progname.
316         * tests/test-rbtreehash_list.c: Include progname.h.
317         (main): Call set_program_name.
318
319         * modules/rbtree-oset-tests (Depends-on): Add progname.
320         * tests/test-rbtree_oset.c: Include progname.h.
321         (main): Call set_program_name.
322
323         * modules/rbtree-list-tests (Depends-on): Add progname.
324         * tests/test-rbtree_list.c: Include progname.h.
325         (main): Call set_program_name.
326
327         * modules/linked-list-tests (Depends-on): Add progname.
328         * tests/test-linked_list.c: Include progname.h.
329         (main): Call set_program_name.
330
331 2007-03-03  Bruno Haible  <bruno@clisp.org>
332
333         * lib/glob-libc.h (_Restrict_): New macro, copied from lib/regex.h.
334         All uses of __restrict changed to _Restrict_.
335         * lib/glob_.h (__restrict): Remove macro.
336
337 2007-03-02  Bruno Haible  <bruno@clisp.org>
338
339         * modules/gettext (configure.ac): Require gettext infrastructure
340         from version 0.16.1.
341
342 2007-03-02  Bruno Haible  <bruno@clisp.org>
343
344         * modules/linkedhash-list-tests (Depends-on): Add progname.
345         * tests/test-linkedhash_list.c: Include progname.h.
346         (main): Call set_program_name.
347
348         * modules/carray-list-tests (Depends-on): Add progname.
349         * tests/test-carray_list.c: Include progname.h.
350         (main): Call set_program_name.
351
352         * modules/avltreehash-list-tests (Depends-on): Add progname.
353         * tests/test-avltreehash_list.c: Include progname.h.
354         (main): Call set_program_name.
355
356         * modules/avltree-oset-tests (Depends-on): Add progname.
357         * tests/test-avltree_oset.c: Include progname.h.
358         (main): Call set_program_name.
359
360         * modules/avltree-list-tests (Depends-on): Add progname.
361         * tests/test-avltree_list.c: Include progname.h.
362         (main): Call set_program_name.
363
364         * modules/array-oset-tests (Depends-on): Add progname.
365         * tests/test-array_oset.c: Include progname.h.
366         (main): Call set_program_name.
367
368         * modules/array-list-tests (Depends-on): Add progname.
369         * tests/test-array_list.c: Include progname.h.
370         (main): Call set_program_name.
371
372         * modules/argp-tests (Depends-on): Add progname.
373         * tests/test-argp.c: Include argp.h first. Include progname.h.
374         (main): Call set_program_name.
375
376 2007-03-02  Paul Eggert  <eggert@cs.ucla.edu>
377
378         * doc/gnulib-tool.texi (Initial import): Reword description of
379         _FILE_OFFSET_BITS and _GNU_SOURCE, since they sometimes have a
380         limited effect even if defined after the first system include.
381
382 2007-03-01  Bruno Haible  <bruno@clisp.org>
383
384         * build-aux/config.libpath: Update to libtool-1.5.22.
385         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
386
387 2007-03-01  Bruno Haible  <bruno@clisp.org>
388
389         * doc/relocatable-maint.texi: Recommend to set foo_CPPFLAGS, not
390         foo_CFLAGS.
391         Reported by Ralf Wildenhues.
392
393 2007-03-01  Bruno Haible  <bruno@clisp.org>
394
395         * build-aux/install-reloc: Remove object files left over by some
396         compilers.
397         Reported by Ralf Wildenhues.
398
399 2007-03-01  Bruno Haible  <bruno@clisp.org>
400
401         * build-aux/install-reloc: Break long lines.
402
403 2007-03-01  Bruno Haible  <bruno@clisp.org>
404
405         * doc/relocatable.texi: Document that it may not work on OpenBSD.
406         Reported by Ralf Wildenhues.
407
408 2007-03-01  Bruno Haible  <bruno@clisp.org>
409
410         * doc/gnulib-tool.texi (Initial import): Remove paragraph about
411         include ordering constraints.
412
413 2007-03-01  Paul Eggert  <eggert@cs.ucla.edu>
414
415         Followup to the 2007-02-12 patch, using suggestions from Bruno Haible in
416         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00136.html>.
417         * doc/gnulib-tool.texi (Initial import): Mention _FILE_OFFSET_BITS
418         as another example.
419         * lib/time_.h: Fix misspelling.
420         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
421         Require gl_HEADER_TIME_H_DEFAULTS.
422         * m4/strptime.m4 (gl_FUNC_STRPTIME): Likewise.
423         * m4/time_r.m4 (gl_TIME_R): Likewise.
424         * m4/timegm.m4 (gl_FUNC_TIMEGM): Likewise.
425
426 2007-03-01  Bruno Haible  <bruno@clisp.org>
427
428         * m4/utimecmp.m4 (gl_UTIMECMP): Don't require gl_TIMESPEC.
429         * m4/utimens.m4 (gl_UTIMENS): Likewise.
430
431 2007-03-01  Jim Meyering  <jim@meyering.net>
432
433         * modules/xreadlink (Maintainer): Add my name.
434         * modules/xreadlink-with-size (Depends-on): Alphabetize.
435
436 2007-02-26  Ben Pfaff  <blp@cs.stanford.edu>
437             Bruno Haible  <bruno@clisp.org>
438
439         * build-aux/install-reloc: Compile also c-ctype.c.
440         * build-aux/relocatable.sh.in: New file.
441         * doc/relocatable.texi: New file.
442         * doc/relocatable-maint.texi: New file.
443         * doc/gnulib.texi: Include relocatable-maint.texi.
444         * lib/progreloc.c: Include unistd.h unconditionally.
445         * lib/relocwrapper.c: Include unistd.h unconditionally.
446         Include c-ctype.h.
447         (add_dotbin): Use c_tolower.
448         * m4/relocatable-lib.m4: New file, extracted from m4/relocatable.m4.
449         (gl_RELOCATABLE_LIBRARY): Renamed from AC_RELOCATABLE_LIBRARY.
450         (gl_RELOCATABLE_NOP): Renamed from AC_RELOCATABLE_NOP.
451         * m4/relocatable.m4 (AC_RELOCATABLE_LIBRARY, AC_RELOCATABLE_NOP): Move
452         to m4/relocatable-lib.m4.
453         (gl_RELOCATABLE): Renamed from AC_RELOCATABLE. Set also
454         RELOCATABLE_CONFIG_H_DIR, RELOCATABLE_SRC_DIR, RELOCATABLE_BUILD_DIR.
455         (gl_RELOCATABLE_BODY): Renamed from AC_RELOCATABLE_BODY. Don't
456         require obsolete macro AC_EXEEXT. Don't check for unistd.h. Don't set
457         SET_RELOCATABLE. Instead set RELOCATABLE_LDFLAGS, INSTALL_PROGRAM_ENV.
458         * modules/relocatable: New file.
459         * modules/relocatable-lib: New file.
460         * modules/relocatable-script: New file.
461
462 2007-02-28  Bruno Haible  <bruno@clisp.org>
463
464         Import --enable-relocatable infrastructure.
465         * build-aux/config.libpath: New file, from GNU gettext.
466         * build-aux/install-reloc: New file, from GNU gettext.
467         * build-aux/reloc-ldflags: New file, from GNU gettext.
468         * lib/relocatable.h: New file, from GNU gettext.
469         * lib/relocatable.c: New file, from GNU gettext.
470         * lib/relocwrapper.c: New file, from GNU gettext.
471         * m4/relocatable.m4: New file, from GNU gettext.
472
473 2007-02-28  Bruno Haible  <bruno@clisp.org>
474
475         * MODULES.html.sh (File system functions): Add xreadlink-with-size.
476
477         * modules/xreadlink: New file, from GNU gettext with modifications.
478         * lib/xreadlink.c: New file, from GNU gettext.
479         * lib/xreadlink.h: Add comments.
480         (xreadlink): New declaration.
481
482         * modules/xreadlink-with-size: Renamed from modules/xreadlink.
483         (Files): Remove m4/xreadlink.m4. Replace lib/xreadlink.c with
484         lib/xreadlink-with-size.c.
485         (configure.ac): Remove gl_XREADLINK invocation.
486         (Makefile.am): Augment lib_SOURCES.
487         * m4/xreadlink.m4: Remove file.
488         * lib/xreadlink-with-size.c: Renamed from lib/xreadlink.c.
489         (xreadlink_with_size): Renamed from xreadink.
490         * lib/xreadlink.h (xreadlink_with_size): Renamed from xreadink.
491         * modules/canonicalize (Depends-on): Replace xreadlink with
492         xreadlink-with-size.
493         * lib/canonicalize.c (canonicalize_filename_mode): Update.
494
495 2007-02-25  Jim Meyering  <jim@meyering.net>
496
497         * build-aux/announce-gen: When complaining about excess arguments,
498         list them.
499
500 2007-02-25  Paul Eggert  <eggert@cs.ucla.edu>
501
502         * README: Document signed integer overflow situation more
503         accurately.
504
505 2007-02-25  Bruno Haible  <bruno@clisp.org>
506
507         * lib/vasnprintf.c (VASNPRINTF): Fix estimate of size needed for a
508         'a' or 'A' conversion.
509
510 2007-02-25  Bruno Haible  <bruno@clisp.org>
511
512         * modules/filename: Renamed from modules/pathname.
513         (Files): Replace lib/pathname.h with lib/filename.h. Replace
514         lib/concatpath.c with lib/concat-filename.c.
515         (Makefile.am): Update.
516         (Include): Replace pathname.h with filename.h.
517         * lib/filename.h: Renamed from lib/pathname.h.
518         (concatenated_filename): Renamed from concatenated_pathname.
519         * lib/concat-filename.c: Renamed from lib/concatpath.c.
520         (concatenated_filename): Renamed from concatenated_pathname.
521         * lib/findprog.c: Include filename.h instead of pathname.h.
522         (find_in_path): Update.
523         * lib/javacomp.c: Include filename.h instead of pathname.h.
524         (is_envjavac_gcj43_usable, is_envjavac_oldgcj_14_14_usable,
525         is_envjavac_oldgcj_14_13_usable, is_envjavac_nongcj_usable,
526         is_gcj_present, is_gcj43_usable, is_oldgcj_14_14_usable,
527         is_oldgcj_14_13_usable, is_javac_usable): Update.
528         * lib/javaexec.c: Include filename.h instead of pathname.h.
529         (execute_java_class): Update.
530         * modules/findprog: Update.
531         * modules/javacomp: Update.
532         * modules/javaexec: Update.
533         * MODULES.html.sh (File system functions): Add 'filename', remove
534         'pathname'.
535
536 2007-02-25  Bruno Haible  <bruno@clisp.org>
537
538         * modules/printf-frexpl-tests: New file.
539         * tests/test-printf-frexpl.c: New file.
540
541         * modules/printf-frexpl: New file.
542         * lib/printf-frexpl.h: New file.
543         * lib/printf-frexpl.c: New file.
544         * m4/printf-frexpl.m4: New file.
545
546 2007-02-25  Bruno Haible  <bruno@clisp.org>
547
548         * modules/printf-frexp-tests: New file.
549         * tests/test-printf-frexp.c: New file.
550
551         * modules/printf-frexp: New file.
552         * lib/printf-frexp.h: New file.
553         * lib/printf-frexp.c: New file.
554         * m4/printf-frexp.m4: New file.
555
556 2007-02-25  Bruno Haible  <bruno@clisp.org>
557
558         Assume automake >= 1.10 for the tests.
559         * modules/arcfour-tests (TESTS): Remove $(EXEEXT) suffix.
560         * modules/arctwo-tests: Likewise.
561         * modules/argp-tests: Likewise.
562         * modules/avltree-list-tests: Likewise.
563         * modules/avltree-oset-tests: Likewise.
564         * modules/avltreehash-list-tests: Likewise.
565         * modules/carray-list-tests: Likewise.
566         * modules/crc-tests: Likewise.
567         * modules/des-tests: Likewise.
568         * modules/gc-arcfour-tests: Likewise.
569         * modules/gc-arctwo-tests: Likewise.
570         * modules/gc-des-tests: Likewise.
571         * modules/gc-hmac-md5-tests: Likewise.
572         * modules/gc-hmac-sha1-tests: Likewise.
573         * modules/gc-md2-tests: Likewise.
574         * modules/gc-md4-tests: Likewise.
575         * modules/gc-md5-tests: Likewise.
576         * modules/gc-pbkdf2-sha1-tests: Likewise.
577         * modules/gc-rijndael-tests: Likewise.
578         * modules/gc-sha1-tests: Likewise.
579         * modules/gc-tests: Likewise.
580         * modules/getaddrinfo-tests: Likewise.
581         * modules/hmac-md5-tests: Likewise.
582         * modules/hmac-sha1-tests: Likewise.
583         * modules/linked-list-tests: Likewise.
584         * modules/linkedhash-list-tests: Likewise.
585         * modules/lock-tests: Likewise.
586         * modules/md2-tests: Likewise.
587         * modules/md4-tests: Likewise.
588         * modules/md5-tests: Likewise.
589         * modules/rbtree-list-tests: Likewise.
590         * modules/rbtree-oset-tests: Likewise.
591         * modules/rbtreehash-list-tests: Likewise.
592         * modules/read-file-tests: Likewise.
593         * modules/rijndael-tests: Likewise.
594         * modules/stdint-tests: Likewise.
595         * modules/tls-tests: Likewise.
596
597 2007-02-24  Bruno Haible  <bruno@clisp.org>
598
599         * lib/isnanl.h (isnanl): Define through isnan if isnan is a macro.
600         * m4/isnan.m4 (gl_FUNC_ISNAN_NO_LIBM): Don't check for isnan as a
601         function; instead check whether isnan with a double argument links.
602         * m4/isnanl.m4 (gl_FUNC_ISNANL_NO_LIBM): Don't check for isnanl as a
603         function; instead check whether isnan with a 'long double' argument
604         links.
605         Reported by Eric Blake <ebb9@byu.net>.
606
607 2007-02-24  Bruno Haible  <bruno@clisp.org>
608
609         * lib/isnan.c: Support the 'long double' case if USE_LONG_DOUBLE is
610         defined.
611         * lib/isnanl.c: Remove all code. Just include isnan.c.
612         * modules/isnanl-nolibm (Files): Add lib/isnan.c.
613
614 2007-02-25  Jim Meyering  <jim@meyering.net>
615
616         Avoid conflicting types for 'unsetenv' on FreeBSD.
617         * lib/putenv.c (_unsetenv): Rename from "unsetenv", to avoid
618         conflicting with FreeBSD's (5.0 and 6.1) function declaration
619         in stdlib.h.
620
621 2007-02-24  Bruno Haible  <bruno@clisp.org>
622
623         * modules/isnanl-nolibm-tests: New file.
624         * tests/test-isnanl.c: New file.
625
626         * modules/isnanl-nolibm: New file.
627         * lib/isnanl.h: New file.
628         * lib/isnanl.c: New file.
629         * m4/isnanl.m4: New file.
630
631 2007-02-24  Bruno Haible  <bruno@clisp.org>
632
633         * modules/isnan-nolibm-tests: New file.
634         * tests/test-isnan.c: New file.
635
636         * modules/isnan-nolibm: New file.
637         * lib/isnan.h: New file.
638         * lib/isnan.c: New file.
639         * m4/isnan.m4: New file.
640
641 2007-02-24  Bruno Haible  <bruno@clisp.org>
642
643         * lib/frexpl.c (frexpl): Correct return values for x = 1.0L. Don't
644         assume that an exponent fits in 20 bits.
645
646 2007-02-24  Jim Meyering  <jim@meyering.net>
647
648         * m4/regex.m4: Update the description of the configure-time option,
649         --without-included-regex, to state accurately what the defaults are,
650         and perhaps to give people an idea why using this option is risky.
651
652 2007-02-24  Paul Eggert  <eggert@cs.ucla.edu>
653
654         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check for a nanosleep that
655         loops on small arguments.  This attempts to avoid the problem
656         Bruno Haible reported for AIX 4.3.2 in
657         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00309.html>.
658
659 2007-02-23  Bruno Haible  <bruno@clisp.org>
660
661         * m4/perl.m4 (gl_PERL): Require version 5.005, not 5.003.
662         Needed for help2man.
663
664 2007-02-23  Karl Berry  <karl@gnu.org>
665
666         * doc/gnulib-tool.texi (CVS Issues): mention that when foo_.h
667         exists, foo.h should be cvs-ignored, not committed.
668
669 2007-02-23  Eric Blake  <ebb9@byu.net>
670
671         * lib/getdate.h (includes):  Include <time.h>, not "timespec.h".
672         * lib/stat-time.h (includes): Likewise.
673         * lib/utimecmp.c (includes): Likewise.
674         * lib/utimens.h (includes): Likewise.
675         * lib/getdate.y (includes): Also include "timespec.h" for use
676         internal to the module.
677         * modules/utimens (Depends-on): Revert yesterday's patch.
678         * modules/nanosleep (Depends-on): Add missing dependency.
679
680 2007-02-22  Bruno Haible  <bruno@clisp.org>
681
682         * lib/glob.c: Don't include getlogin_r.h.
683
684 2007-02-22  Jim Meyering  <jim@meyering.net>
685
686         * modules/utimens (Depends-on): Add timespec, required for
687         utimens.h's inclusion of timespec.h.
688
689 2007-02-21  Paul Eggert  <eggert@cs.ucla.edu>
690
691         * lib/getcwd.c (__getcwd): Undo previous change; it mishandled
692         long unreadable paths in GNU/Linux.  Problem reported by Andreas
693         Schwab in
694         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00261.html>.
695         I'll try to think of a better way to fix the Solaris problem.
696
697         * lib/getcwd.c (__getcwd): Don't assume getcwd (NULL, 0) works
698         like glibc; on Solaris 10, it fails with errno == EINVAL.
699         POSIX says the behavior is unspecified if the first argument is NULL,
700         so play it safe and never pass NULL to the system getcwd.
701
702 2007-02-21  Jim Meyering  <jim@meyering.net>
703
704         * lib/gettimeofday.c (rpl_gettimeofday): Remove declaration
705         of gettimeofday.  It would conflict with the one now always
706         provided via sys_time_.h.  Reported by Matthew Woehlke, as
707         an IRIX 6.5 build failure.
708
709 2007-02-20  Paul Eggert  <eggert@cs.ucla.edu>
710
711         Minor fixups to port to Solaris 10 with Sun C 5.8.
712         * lib/getcwd.c [!_LIBC]: Include dirfd.h, since we use dirfd.
713         * modules/getcwd (Depends-on): Add dirfd.
714         * lib/putenv.c (putenv): #undef it.
715         (rpl_putenv): New decl.
716         (malloc, free): Include <stdlib.h> rather than prototyping separately.
717
718 2007-02-20  Bruno Haible  <bruno@clisp.org>
719
720         * modules/stdio-tests: New file.
721         * tests/test-stdio.c: New file.
722
723         * modules/vsnprintf (Files): Remove lib/vsnprintf.h.
724         (Depends-on): Add stdio.
725         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
726         (Include): Use <stdio.h> instead of vsnprintf.h.
727         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
728         HAVE_DECL_VSNPRINTF.
729         * lib/vsnprintf.c: Include <stdio.h> instead of vsnprintf.h.
730
731         * modules/snprintf (Files): Remove lib/snprintf.h.
732         (Depends-on): Add stdio.
733         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
734         (Include): Use <stdio.h> instead of snprintf.h.
735         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
736         HAVE_DECL_SNPRINTF.
737         * lib/snprintf.c: Include <stdio.h> instead of snprintf.h.
738         * lib/getaddrinfo.c: Likewise.
739
740         * modules/stdio: New file.
741         * lib/stdio_.h: New file, incorporating snprintf.h and vsnprintf.h.
742         * lib/snprintf.h: Remove file.
743         * lib/vsnprintf.h: Remove file.
744         * lib/.cppi-disable: Remove snprintf.h.
745         * m4/stdio_h.m4: New file.
746         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdio.
747
748 2007-02-20  Jim Meyering  <jim@meyering.net>
749
750         * lib/ftruncate.c [HAVE_CHSIZE]: Document that this code is
751         used by e.g., mingw.  From Bruno Haible.
752
753 2007-02-19  Bruno Haible  <bruno@clisp.org>
754
755         * lib/string_.h: Use "#pragma GCC system_header" to suppress some gcc
756         warnings.
757         Reported by Ben Pfaff <blp@cs.stanford.edu>.
758
759 2007-02-19  Bruno Haible  <bruno@clisp.org>
760
761         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Don't request a complaint mail
762         from mingw users.
763
764 2007-02-19  Bruno Haible  <bruno@clisp.org>
765
766         * lib/stdlib_.h: Use "#pragma GCC system_header" to suppress some gcc
767         warnings.
768         Reported by Joel E. Denny <jdenny@ces.clemson.edu> via Paul Eggert.
769
770 2007-02-19  Jim Meyering  <jim@meyering.net>
771
772         Don't use FD after a successful "fdopendir (fd)".
773         * lib/getcwd.c (__getcwd) [AT_FDCWD]: fdopendir (fd) usually closes fd.
774         Reset it by calling dirfd on the just-obtained DIR*.
775
776         * m4/ftruncate.m4: Adjust comment to give this module a 3-year reprieve.
777         Prompted by a report from Bruno Haible that mingw lacks ftruncate.
778
779 2007-02-18  Bruno Haible  <bruno@clisp.org>
780
781         * lib/readlink.c: Include <unistd.h>.
782         * m4/readlink.m4 (gl_FUNC_READLINK): Require gl_UNISTD_H_DEFAULTS. Set
783         HAVE_READLINK.
784         * modules/readlink (Depends-on): Add unistd.
785         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
786         (Include): Add <unistd.h>.
787
788         * lib/getlogin_r.h: Remove file.
789         * lib/getlogin_r.c: Include <unistd.h> instead of getlogin_r.h.
790         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE): Remove macro.
791         (gl_GETLOGIN_R): Inline it here. Require gl_UNISTD_H_DEFAULTS. Set
792         HAVE_DECL_GETLOGIN_R.
793         * modules/getlogin_r (Files): Remove lib/getlogin_r.h.
794         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
795         (Include): Use <unistd.h> instead of getlogin_r.h.
796
797         * lib/getcwd.h: Remove file.
798         * lib/getcwd.c: Include <unistd.h> instead of getcwd.h.
799         * lib/xgetcwd.c: Likewise.
800         * m4/getcwd.m4 (gl_FUNC_GETCWD): Require gl_UNISTD_H_DEFAULTS. Set
801         REPLACE_GETCWD. Don't define __GETCWD_PREFIX.
802         * modules/getcwd (Files): Remove lib/getcwd.h.
803         (Depends-on): Add unistd.
804         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
805         (Include): Use <unistd.h> instad of getcwd.h.
806
807         * lib/ftruncate.c: Include <unistd.h> first.
808         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Require gl_UNISTD_H_DEFAULTS.
809         Set HAVE_FTRUNCATE.
810         * modules/ftruncate (Depends-on): Add unistd.
811         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
812
813         * lib/fchdir.c: Include <unistd.h> first.
814         * lib/dirent_.h: Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT.
815         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_UNISTD_H_DEFAULTS instead
816         of gl_HEADER_UNISTD_DEFAULTS. Set REPLACE_FCHDIR. Don't set UNISTD_H.
817         * modules/fchdir (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
818         (Makefile.am): Substitute also REPLACE_FCHDIR into dirent.h.
819
820         * lib/dup2.c: Include <unistd.h> first.
821         * m4/dup2.m4 (gl_FUNC_DUP2): Require gl_UNISTD_H_DEFAULTS. Set
822         HAVE_DUP2.
823         * modules/dup2 (Depends-on): Add unistd.
824         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
825
826         * lib/chown.c: Include <unistd.h> first. Undefine chown later.
827         * m4/chown.m4 (gl_FUNC_CHOWN): Require gl_UNISTD_H_DEFAULTS. Set
828         REPLACE_CHOWN. Don't define chown as a macro here.
829         * modules/chown (Depends-on): Add unistd.
830         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
831
832         * lib/unistd_.h: Test HAVE_UNISTD_H determined at configure time.
833         Add definition for GL_LINK_WARNING.
834         (chown, dup2): New declarations.
835         (fchdir): Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT. Provide optional
836         link warning.
837         (ftruncate): New declaration.
838         (getcwd): New declaration, taken from old getcwd.h.
839         (getlogin_r): New declaration, taken from old getlogin_r.h.
840         (readlink): New declaration.
841         * m4/unistd_h.m4 (gl_UNISTD_H): Renamed from gl_HEADER_UNISTD. Don't
842         set UNISTD_H. Inline gl_PREREQ_UNISTD. Set HAVE_UNISTD_H.
843         (gl_PREREQ_UNISTD): Remove macro.
844         (gl_UNISTD_MODULE_INDICATOR): New macro.
845         (gl_UNISTD_H_DEFAULTS): Renamed from gl_HEADER_UNISTD_DEFAULTS. Set
846         many new variables. Don't set UNISTD_H.
847         * modules/unistd (Description): Change.
848         (Depends-on): Add link-warning.
849         (configure.ac): Update.
850         (Makefile.am): Create unistd.h always. Substitute many new variables
851         into it.
852
853 2007-02-18  Bruno Haible  <bruno@clisp.org>
854
855         * lib/stdlib_.h (getsubopt): New declaration, copied from getsubopt.h.
856         * modules/stdlib (stdlib.h): Also substitute GNULIB_GETSUBOPT and
857         HAVE_GETSUBOPT.
858         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Also initialize
859         GNULIB_GETSUBOPT and HAVE_GETSUBOPT.
860         * lib/getsubopt.h: Remove file.
861         * modules/getsubopt (Files): Remove lib/getsubopt.h.
862         (Depends-on): Add stdlib.
863         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
864         (Includes): Use <stdlib.h> instead of getsubopt.h.
865         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Require gl_STDLIB_H_DEFAULTS.
866         Set HAVE_GETSUBOPT.
867         * lib/getsubopt.c: Don't include getsubopt.h.
868
869 2007-02-18  Bruno Haible  <bruno@clisp.org>
870
871         * modules/fchdir (Depends-on): Add dup2.
872
873 2007-02-18  Bruno Haible  <bruno@clisp.org>
874
875         * lib/stdlib_.h: Handle glibc's special invocation convention
876         specially.
877
878 2007-02-18  Bruno Haible  <bruno@clisp.org>
879
880         * modules/stdlib-tests: New file.
881         * tests/test-stdlib.c: New file.
882
883         * modules/mkstemp (Files): Remove lib/mkstemp.h.
884         (Depends-on): Add stdlib.
885         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
886         (Includes): Use <stdlib.h> instead of mkstemp.h.
887         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require gl_STDLIB_H_DEFAULTS. Set
888         REPLACE_MKSTEMP. Remove definition of __MKSTEMP_PREFIX.
889         * lib/mkstemp.c: Don't include mkstemp.h.
890         * lib/mkstemp-safer.c: Include <stdlib.h> instead of mkstemp.h.
891         * lib/stdlib--.h: Don't include mkstemp.h.
892
893         * modules/mkdtemp (Files): Remove lib/mkdtemp.h.
894         (Depends-on): Add stdlib.
895         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
896         (Includes): Use <stdlib.h> instead of mkdtemp.h.
897         * m4/mkdtemp.m4 (gt_FUNC_MKDTEMP): Require gl_STDLIB_H_DEFAULTS. Set
898         HAVE_MKDTEMP.
899         * lib/mkdtemp.c: Don't include mkdtemp.h.
900         * lib/clean-temp.c: Don't include mkdtemp.h.
901
902         * modules/exit (Files): Remove lib/exit.h.
903         (Depends-on): Add stdlib.
904         (Makefile.am): Remove lib_SOURCES.
905         (Include): Use <stdlib.h> instead of exit.h.
906         * lib/argmatch.c: Don't include exit.h.
907         * lib/execute.c: Likewise.
908         * lib/pagealign_alloc.c: Likewise.
909         * lib/pipe.c: Likewise.
910         * lib/wait-process.c: Likewise.
911         * lib/copy-file.c: Include <stdlib.h> instead of exit.h.
912         * lib/exitfail.c: Likewise.
913         * lib/savewd.c: Likewise.
914         * lib/xsetenv.c: Likewise.
915
916         * modules/stdlib: New file.
917         * lib/stdlib_.h: New file, incorporating exit.h, mkdtemp.h, mkstemp.h
918         and extra comments about mkstemp().
919         * lib/exit.h: Remove file.
920         * lib/mkdtemp.h: Remove file.
921         * lib/mkstemp.h: Remove file.
922         * m4/stdlib_h.m4: New file.
923         * MODULES.html.sh (Support for systems lacking ANSI C 89): Add stdlib.
924
925 2007-02-18  Bruno Haible  <bruno@clisp.org>
926
927         * modules/math-tests: New file.
928         * tests/test-math.c: New file.
929
930         * modules/math: New file.
931         * modules/mathl (Files): Remove lib/mathl.h.
932         (Depends-on): Add math.
933         (Makefile.am): Don't mention mathl.h.
934         (Include): Use <math.h> instead of mathl.h.
935         * lib/math_.h: New file.
936         * lib/mathl.h: Remove file.
937         * lib/acosl.c: Include <config.h> and <math.h> first. Don't include
938         mathl.h.
939         * lib/asinl.c: Likewise.
940         * lib/atanl.c: Likewise.
941         * lib/ceill.c: Likewise.
942         * lib/cosl.c: Likewise.
943         * lib/expl.c: Likewise.
944         * lib/floorl.c: Likewise.
945         * lib/frexpl.c: Likewise.
946         * lib/ldexpl.c: Likewise.
947         * lib/logl.c: Likewise.
948         * lib/sincosl.c: Likewise.
949         * lib/sinl.c: Likewise.
950         * lib/sqrtl.c: Likewise.
951         * lib/tanl.c: Likewise.
952         * lib/trigl.c: Likewise.
953         * m4/math_h.m4: New file.
954         * MODULES.html.sh (Mathematics): Add math.
955
956 2007-02-17  Bruno Haible  <bruno@clisp.org>
957
958         * modules/wctype-tests: New file.
959         * tests/test-wctype.c: New file.
960
961         * modules/wchar-tests: New file.
962         * tests/test-wchar.c: New file.
963
964         * modules/unistd-tests: New file.
965         * tests/test-unistd.c: New file.
966
967         * modules/time-tests: New file.
968         * tests/test-time.c: New file.
969
970         * modules/sysexits-tests: New file.
971         * tests/test-sysexits.c: New file.
972
973         * modules/sys_time-tests: New file.
974         * tests/test-sys_time.c: New file.
975
976         * modules/sys_stat-tests: New file.
977         * tests/test-sys_stat.c: New file.
978
979         * modules/sys_socket-tests: New file.
980         * tests/test-sys_socket.c: New file.
981
982         * modules/sys_select-tests: New file.
983         * tests/test-sys_select.c: New file.
984
985         * modules/string-tests: New file.
986         * tests/test-string.c: New file.
987
988         * modules/stdbool-tests: New file.
989         * tests/test-stdbool.c: New file.
990
991         * modules/netinet_in-tests: New file.
992         * tests/test-netinet_in.c: New file.
993
994         * modules/inttypes-tests: New file.
995         * tests/test-inttypes.c: New file.
996
997         * modules/fcntl-tests: New file.
998         * tests/test-fcntl.c: New file.
999
1000         * modules/byteswap-tests: New file.
1001         * tests/test-byteswap.c: New file.
1002
1003         * modules/arpa_inet-tests: New file.
1004         * tests/test-arpa_inet.c: New file.
1005
1006 2007-02-17  Bruno Haible  <bruno@clisp.org>
1007
1008         * lib/inttypes_.h: Add definition for GL_LINK_WARNING.
1009         (imaxabs, imaxdiv, strtoimax, strtoumax): Don't declare the function
1010         if the corresponding module is not enabled. Emit link warnings if
1011         the function is used nevertheless.
1012         * m4/inttypes.m4 (gl_INTTYPES_H): Never use the existing <inttypes.h>.
1013         Don't AC_SUBST HAVE_DECL_IMAXABS, HAVE_DECL_IMAXDIV,
1014         HAVE_DECL_STRTOIMAX, HAVE_DECL_STRTOUMAX.
1015         (gl_INTTYPES_MODULE_INDICATOR, gl_INTTYPES_H_DEFAULTS): New macros.
1016         * modules/inttypes (Depends-on): Add link-warning.
1017         (Makefile.am): Copy the contents of build-aux/link-warning.h into
1018         inttypes.h. Substitute also GNULIB_IMAXABS, GNULIB_IMAXDIV,
1019         GNULIB_STRTOIMAX, GNULIB_STRTOUMAX.
1020         * modules/imaxabs (configure.ac): Invoke gl_INTTYPES_MODULE_INDICATOR.
1021         * modules/imaxdiv (configure.ac): Likewise.
1022         * modules/strtoimax (configure.ac): Likewise.
1023         * modules/strtoumax (configure.ac): Likewise.
1024
1025 2007-02-17  Bruno Haible  <bruno@clisp.org>
1026
1027         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Include the contents of
1028         gl_STRING_MODULE_INDICATOR_DEFAULTS.
1029         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Remove macro.
1030         (gl_HEADER_STRING_H_BODY, gl_STRING_MODULE_INDICATOR): Update.
1031
1032 2007-02-17  Bruno Haible  <bruno@clisp.org>
1033
1034         * modules/link-warning: New file.
1035         * build-aux/link-warning.h: New file, extracted from lib/string_.h.
1036         * lib/string_.h (GL_LINK_WARNING): Remove definition.
1037         * modules/string (Depends-on): Add link-warning.
1038         (Makefile.am): Copy the contents of build-aux/link-warning.h into
1039         string.h.
1040         * MODULES.html.sh (Support for building libraries and executables): Add
1041         link-warning.
1042
1043 2007-02-17  Bruno Haible  <bruno@clisp.org>
1044
1045         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strcasecmp,
1046         strncasecmp, strchr, strchrnul, strdup, strndup, strnlen, strcspn,
1047         strpbrk, strspn, strrchr, strsep, strstr, strcasestr, strtok_r): Break
1048         long lines.
1049
1050 2007-02-17  Ben Pfaff  <blp@cs.stanford.edu>
1051             Bruno Haible  <bruno@clisp.org>
1052
1053         * modules/tmpfile: New file.
1054         * lib/tmpfile.c: New file.
1055         * m4/tmpfile.m4: New file.
1056         * MODULES.html.sh (func_all_modules): New section "Input/output".
1057
1058 2007-02-15  Bruno Haible  <bruno@clisp.org>
1059
1060         * lib/clean-temp.c [WIN32 && !CYGWIN]: Include <windows.h>.
1061         (supports_delete_on_close): New function.
1062         (open_temp, fopen_temp): Use _O_TEMPORARY when supported.
1063
1064 2007-02-14  Bruno Haible  <bruno@clisp.org>
1065
1066         * modules/mbspcasecmp-tests: New file.
1067         * tests/test-mbspcasecmp.sh: New file.
1068         * tests/test-mbspcasecmp.c: New file.
1069
1070         New module mbspcasecmp.
1071         * modules/mbspcasecmp: New file.
1072         * lib/mbspcasecmp.c: New file.
1073         * lib/string_.h (strncasecmp): Change warning message.
1074         (mbspcasecmp): New declaration.
1075         * m4/mbspcasecmp.m4: New file.
1076         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1077         GNULIB_MBSPCASECMP.
1078         * modules/string (string.h): Also substitute GNULIB_MBSPCASECMP.
1079         * MODULES.html.sh (Internationalization functions): Add mbspcasecmp.
1080
1081 2007-02-14  Bruno Haible  <bruno@clisp.org>
1082
1083         * modules/mbsncasecmp-tests: New file.
1084         * tests/test-mbsncasecmp.sh: New file.
1085         * tests/test-mbsncasecmp.c: New file.
1086
1087         New module mbsncasecmp.
1088         * modules/mbsncasecmp: New file.
1089         * lib/mbsncasecmp.c: New file.
1090         * lib/string_.h (mbsncasecmp): New declaration.
1091         * m4/mbsncasecmp.m4: New file.
1092         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1093         GNULIB_MBSNCASECMP.
1094         * modules/string (string.h): Also substitute GNULIB_MBSNCASECMP.
1095         * MODULES.html.sh (Internationalization functions): Add mbsncasecmp.
1096
1097 2007-02-14  Paul Eggert  <eggert@cs.ucla.edu>
1098
1099         * lib/exclude.c (FNM_EXTMATCH): Define if system does not.
1100         Verify that it doesn't overlap with our flags.
1101         (fnmatch_no_wildcards): Don't use strcasecmp or strncasecmp, which
1102         do not have the desired effect in multibyte locales; instead, use
1103         mbscasecmp.
1104         * modules/exclude (Depends-on): Depend on mbscasecmp, not strcase.
1105         Add dependency on xalloc.  Depend on fnmatch, not fnmatch-gnu, since
1106         we don't require GNU fnmatch ourselves (if our users require it, they
1107         should do so explicitly).
1108
1109         Fix regex code so it doesn't rely on strcasecmp.
1110         * lib/regex_internal.h: Include <langinfo.h> only if _LIBC is defined.
1111         Otherwise, include gnulib's langinfo.h.
1112         * lib/regcomp.c (init_dfa): Don't use strcasecmp, as it can have
1113         undesirable behavior in non-C locales.  Instead, rely on localecharset.
1114         * m4/regex.m4 (gl_PREREQ_REGEX): Don't require AM_LANGINFO_CODESET.
1115         * modules/regex (FILES): Remove m4/codeset.m4.
1116         (Depends-on): Add localcharset.  Remove strcase.
1117
1118 2007-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1119
1120         * m4/unlinkdir.m4 (gl_UNLINKDIR): Fix m4 quoting bug.
1121         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
1122
1123 2007-02-13  Bruno Haible  <bruno@clisp.org>
1124
1125         * m4/intdiv0.m4 (gt_INTDIV0): Assume ANSI C. Fix underquoting bug.
1126         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
1127
1128 2007-02-12  Bruno Haible  <bruno@clisp.org>
1129
1130         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
1131         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): If
1132         GNULIB_POSIXCHECK and the gnulib module not enabled, provoke a link-
1133         time warning rather than a link error.
1134
1135 2007-02-12  Bruno Haible  <bruno@clisp.org>
1136
1137         * m4/locale-fr.m4 (gt_LOCALE_FR): Fix m4 quoting bug.
1138         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
1139         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
1140
1141 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
1142
1143         * lib/string_.h (strncasecmp): Fix typo: this macro takes 3
1144         args, not 2.
1145
1146 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
1147
1148         New module 'time', so that apps can include <time.h> as per
1149         POSIX and GNU instead of separate include files like time_r.h
1150         and timegm.h.  This implementation tries out a simpler approach
1151         for replacing decls in standard include files (as compared to
1152         the string module), somewhat as an experiment.
1153
1154         * config/srclist.txt: Comment out mktime.c for now.
1155         * doc/gnulib-tool.texi (Initial import): Don't use time_r as an example
1156         since it doesn't apply any more.  Use generic wording instead.
1157         * MODULES.html.sh (Support for systems lacking POSIX:2001): New module
1158         'time'.
1159         * lib/time_.h, m4/time_h.m4, modules/time: New files.
1160         * lib/strptime.h, lib/time_r.h, lib/timegm.h: Remove.
1161         * lib/mktime.c: Include config.h depending on _LIBC, not HAVE_CONFIG_H.
1162         Don't include <sys/types.h>; no longer needed since we assume C89.
1163         * lib/mktime.c: Don't include "time_r.h"; no longer needed.
1164         * lib/strftime.c: Likewise.
1165         * lib/time_r.c: Likewise.
1166         * lib/nanosleep.c (nanosleep): #undef after include files, not before.
1167         * lib/nanosleep.c: Include <time.h> first, to check interface.
1168         * lib/strptime.c: Likewise.
1169         * lib/time_r.c: Likewise.
1170         * lib/timegm.c: Likewise.
1171         * lib/strptime.c: Don't include strptime.h or time_r.h; no longer
1172         needed.
1173         * lib/timegm.c: Don't include timegm.h; no longer needed.
1174         * lib/timespec.h: Don't include <sys/time.h> before <time.h>;
1175         time.h now handles any problems in that area.
1176         (struct timespec, nanosleep): Remove; time.h now arranges for these.
1177         * lib/xnanosleep.c: Don't include timespec.h; no longer needed now
1178         that time.h defines struct timespec.
1179         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check that nanosleep is declared.
1180         Set REPLACE_NANOSLEEP.  Don't AC_DEFINE nanosleep; the time module now
1181         handles that.
1182         * m4/strptime.m4 (gl_FUNC_STPRTIME): Set REPLACE_STRPTIME.
1183         * m4/time_r.m4 (gl_TIME_R): Don't define HAVE_TIME_R_POSIX; no longer
1184         needed.  Set REPLACE_LOCALTIME.
1185         * m4/timegm.m4 (gl_FUNC_TIMEGM): Set REPLACE_TIMEGM.
1186         * m4/timespec.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Move to time_h.m4.
1187         (gl_TIMESPEC): Don't check for sys/time.h or struct timespec or
1188         nanosleep; time_h.m4 now does that.  Don't require
1189         gl_USE_SYSTEM_EXTENSIONS; no longer needed directly, and the time
1190         module handles this now.
1191         * modules/getdate (Depends-on): Remove timespec.  Add time.
1192         * modules/nanosleep (Depends-on): Likewise.
1193         * modules/stat-time (Depends-on): Likewise.
1194         * modules/nanosleep (Include): Include time.h, not timespec.h.
1195         * modules/strptime (Files): Remove lib/strptime.h.
1196         (Depends-on): Add extensions, time.
1197         (Include): Include time.h, not strptime.h.
1198         * modules/time_r (Files): Remove lib/time_r.h.
1199         (Depends-on): Add time.
1200         (Include): Include time.h, not time_r.h.
1201         * modules/timegm: Likewise.
1202         * modules/timespec (Description): Now does timespec-related decls
1203         of our own, instead of struct timespec itself.
1204         (Depends-on): Add time; remove extensions.
1205         (Maintainer): Add self.
1206         * modules/utimecmp (Depends-on): Add time; remove timespec.
1207         * modules/utimens (Depends-on): Likewise.
1208         * modules/xnanosleep (Depends-on): Likewise.
1209
1210 2007-02-11  Bruno Haible  <bruno@clisp.org>
1211
1212         * lib/c-strstr.c: Include allocsa.h.
1213         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
1214         * lib/c-strcasestr.c: Include allocsa.h.
1215         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
1216         * lib/strcasestr.c: Include allocsa.h.
1217         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
1218         * lib/mbsstr.c: Include allocsa.h.
1219         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
1220         allocsa/freesa instead of malloc/free.
1221         * lib/mbscasestr.c: Include allocsa.h.
1222         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
1223         allocsa/freesa instead of malloc/free.
1224         * modules/c-strstr (Depends-on): Add allocsa.
1225         * modules/c-strcasestr (Depends-on): Likewise.
1226         * modules/strcasestr (Depends-on): Likewise.
1227         * modules/mbsstr (Depends-on): Likewise.
1228         * modules/mbscasestr (Depends-on): Likewise.
1229
1230 2007-02-11  Bruno Haible  <bruno@clisp.org>
1231
1232         * lib/mbsspn.c (mbsspn): Fix bug. Remove unnecessary strlen call.
1233
1234         * modules/mbsspn-tests: New file.
1235         * tests/test-mbsspn.sh: New file.
1236         * tests/test-mbsspn.c: New file.
1237
1238 2007-02-11  Bruno Haible  <bruno@clisp.org>
1239
1240         * lib/mbspbrk.c (mbspbrk): Remove unneeded cast.
1241
1242         * modules/mbspbrk-tests: New file.
1243         * tests/test-mbspbrk.sh: New file.
1244         * tests/test-mbspbrk.c: New file.
1245
1246 2007-02-11  Bruno Haible  <bruno@clisp.org>
1247
1248         * lib/mbscspn.c (mbscspn): Remove unnecessary strlen call and
1249         unneeded cast.
1250
1251         * modules/mbscspn-tests: New file.
1252         * tests/test-mbscspn.sh: New file.
1253         * tests/test-mbscspn.c: New file.
1254
1255 2007-02-11  Bruno Haible  <bruno@clisp.org>
1256
1257         * modules/mbscasecmp-tests: New file.
1258         * tests/test-mbscasecmp.sh: New file.
1259         * tests/test-mbscasecmp.c: New file.
1260
1261 2007-02-11  Bruno Haible  <bruno@clisp.org>
1262
1263         Ensure O(n) worst-case complexity of mbscasestr.
1264         * lib/mbscasestr.c: Include stdbool.h.
1265         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
1266         functions.
1267         (mbscasestr): Add some bookkeeping. Invoke knuth_morris_pratt_* when
1268         the bookkeeping indicates that it's worth it.
1269         * modules/mbscasestr (Depends-on): Add stdbool, mbslen, strnlen.
1270
1271         * modules/mbscasestr-tests: New file.
1272         * tests/test-mbscasestr1.c: New file.
1273         * tests/test-mbscasestr2.sh: New file.
1274         * tests/test-mbscasestr2.c: New file.
1275         * tests/test-mbscasestr3.sh: New file.
1276         * tests/test-mbscasestr3.c: New file.
1277         * tests/test-mbscasestr4.sh: New file.
1278         * tests/test-mbscasestr4.c: New file.
1279         * m4/locale-tr.m4: New file.
1280
1281 2007-02-11  Bruno Haible  <bruno@clisp.org>
1282
1283         Ensure O(n) worst-case complexity of mbsstr.
1284         * lib/mbsstr.c: Include stdbool.h.
1285         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
1286         functions.
1287         (mbsstr): Add some bookkeeping. Invoke knuth_morris_pratt_* when the
1288         bookkeeping indicates that it's worth it.
1289         * modules/mbsstr (Depends-on): Add stdbool, mbslen, strnlen.
1290
1291         * modules/mbsstr-tests: New file.
1292         * tests/test-mbsstr1.c: New file.
1293         * tests/test-mbsstr2.sh: New file.
1294         * tests/test-mbsstr2.c: New file.
1295         * tests/test-mbsstr3.sh: New file.
1296         * tests/test-mbsstr3.c: New file.
1297         * m4/locale-fr.m4: New file.
1298
1299 2007-02-11  Bruno Haible  <bruno@clisp.org>
1300
1301         * lib/mbsrchr.c (mbsrchr): Fix bug.
1302
1303         * modules/mbsrchr-tests: New file.
1304         * tests/test-mbsrchr.sh: New file.
1305         * tests/test-mbsrchr.c: New file.
1306
1307 2007-02-11  Bruno Haible  <bruno@clisp.org>
1308
1309         * lib/mbschr.c (mbschr): Fix bug.
1310
1311         * modules/mbschr-tests: New file.
1312         * tests/test-mbschr.sh: New file.
1313         * tests/test-mbschr.c: New file.
1314         * m4/locale-zh.m4: New file.
1315
1316 2007-02-11  Bruno Haible  <bruno@clisp.org>
1317
1318         Support for copying multibyte string iterators.
1319         * lib/mbiter.h: Include <string.h>.
1320         (mbiter_multi_copy): New function.
1321         (mbi_copy): New macro.
1322         * lib/mbuiter.h: Include <string.h>.
1323         (mbuiter_multi_copy): New function.
1324         (mbui_copy): New macro.
1325
1326 2007-02-11  Bruno Haible  <bruno@clisp.org>
1327
1328         New module mbslen.
1329         * modules/mbslen: New file.
1330         * lib/mbslen.c: New file.
1331         * lib/string_.h (mbslen): New declaration.
1332         * m4/mbslen.m4: New file.
1333         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1334         GNULIB_MBSLEN.
1335         * modules/string (string.h): Also substitute GNULIB_MBSLEN.
1336         * MODULES.html.sh (Internationalization functions): Add mbslen.
1337
1338 2007-02-11  Bruno Haible  <bruno@clisp.org>
1339
1340         Ensure O(n) worst-case complexity of strcasestr substitute.
1341         * lib/strcasestr.c: Include stdbool.h.
1342         (knuth_morris_pratt): New function.
1343         (strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when the
1344         bookkeeping indicates that it's worth it.
1345         * modules/strcasestr (Depends-on): Add stdbool, strnlen.
1346
1347         * modules/strcasestr-tests: New file.
1348         * tests/test-strcasestr.c: New file.
1349
1350 2007-02-11  Bruno Haible  <bruno@clisp.org>
1351
1352         Ensure O(n) worst-case complexity of c_strcasestr.
1353         * lib/c-strcasestr.c: Include stdbool.h, string.h.
1354         (knuth_morris_pratt): New function.
1355         (c_strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when
1356         the bookkeeping indicates that it's worth it.
1357         * modules/c-strcasestr (Depends-on): Add stdbool, strnlen.
1358
1359         * modules/c-strcasestr-tests: New file.
1360         * tests/test-c-strcasestr.c: New file.
1361
1362 2007-02-11  Bruno Haible  <bruno@clisp.org>
1363
1364         Ensure O(n) worst-case complexity of c_strstr.
1365         * lib/c-strstr.c: Include stdbool.h, string.h.
1366         (knuth_morris_pratt): New function.
1367         (c_strstr): Add some bookkeeping. Invoke knuth_morris_pratt when the
1368         bookkeeping indicates that it's worth it.
1369         * modules/c-strstr (Depends-on): Add stdbool, strnlen.
1370
1371         * lib/c-strstr.c: Complete rewrite for maintainability.
1372
1373         * modules/c-strstr-tests: New file.
1374         * tests/test-c-strstr.c: New file.
1375
1376 2007-02-11  Bruno Haible  <bruno@clisp.org>
1377
1378         * m4/javacomp.m4 (gt_JAVACOMP): Work around a 'tr' bug in coreutils
1379         5.2.1 and earlier, whereby \055 was treated just like the range
1380         delimiter '-'.
1381         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
1382
1383 2007-02-08  Bruno Haible  <bruno@clisp.org>
1384
1385         * modules/regex (Depends-on): Add stdbool.
1386         Reported by Dalibor Topic <robilad@kaffe.org>.
1387
1388 2007-02-05  Paul Eggert  <eggert@cs.ucla.edu>
1389
1390         * m4/regex.m4 (gl_REGEX): Check for glibc bug #3957.
1391         Prefer returning from main to exiting from it.
1392         Remove unnecessary parens after sizeof.
1393
1394 2007-02-05  Bruno Haible  <bruno@clisp.org>
1395
1396         New module mbssep.
1397         * modules/mbssep: New file.
1398         * lib/mbssep.c: New file.
1399         * lib/string_.h (strsep): Add a conditional link warning.
1400         (mbssep): New declaration.
1401         * m4/mbssep.m4: New file.
1402         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1403         GNULIB_MBSSEP.
1404         * modules/string (string.h): Also substitute GNULIB_MBSSEP.
1405         * MODULES.html.sh (Internationalization functions): Add mbssep.
1406
1407 2007-02-05  Bruno Haible  <bruno@clisp.org>
1408
1409         * lib/strsep.c (strsep): Fix actions in case of no delimiters.
1410         Optimize search in case of 1 delimiter.
1411
1412 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
1413
1414         * lib/acl.h: Include sys/types.h before sys/acl.h.
1415
1416 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
1417
1418         Merge upstream fix for glibc bugzilla #3957:
1419
1420         2007-02-05  Jakub Jelinek  <jakub@redhat.com>
1421
1422         * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0'
1423         bit for RE_HAT_LISTS_NOT_NEWLINE.
1424         (build_charclass_op): Remove bogus comment.
1425
1426 2007-02-05  Simon Josefsson  <simon@josefsson.org>
1427
1428         * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
1429
1430 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
1431
1432         * lib/getsubopt.c [!_LIBC]: Include config.h and getsubopt.h.
1433         * lib/memmem.c [!defined _LIBC]: Include config.h.
1434
1435 2007-02-04  Bruno Haible  <bruno@clisp.org>
1436
1437         * lib/string_.h (GL_LINK_WARNING2): Put the word "warning:" into the
1438         warning message.
1439
1440 2007-02-04  Bruno Haible  <bruno@clisp.org>
1441
1442         New module mbstok_r.
1443         * modules/mbstok_r: New file.
1444         * lib/mbstok_r.c: New file.
1445         * lib/string_.h (strtok_r): Change argument names to match the
1446         comments. Add a conditional link warning.
1447         (mbstok_r): New declaration.
1448         * m4/mbstok_r.m4: New file.
1449         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1450         GNULIB_MBSTOK_R.
1451         * modules/string (string.h): Also substitute GNULIB_MBSTOK_R.
1452         * MODULES.html.sh (Internationalization functions): Add mbstok_r.
1453
1454 2007-02-04  Bruno Haible  <bruno@clisp.org>
1455
1456         New module mbsspn.
1457         * modules/mbsspn: New file.
1458         * lib/mbsspn.c: New file.
1459         * lib/string_.h (strspn): Add a conditional link warning.
1460         (mbsspn): New declaration.
1461         * m4/mbsspn.m4: New file.
1462         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1463         GNULIB_MBSSPN.
1464         * modules/string (string.h): Also substitute GNULIB_MBSSPN.
1465         * MODULES.html.sh (Internationalization functions): Add mbsspn.
1466
1467 2007-02-04  Bruno Haible  <bruno@clisp.org>
1468
1469         New module mbspbrk.
1470         * modules/mbspbrk: New file.
1471         * lib/mbspbrk.c: New file.
1472         * lib/string_.h (strpbrk): Add a conditional link warning.
1473         (mbspbrk): New declaration.
1474         * m4/mbspbrk.m4: New file.
1475         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1476         GNULIB_MBSPBRK.
1477         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
1478         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
1479
1480 2007-02-04  Bruno Haible  <bruno@clisp.org>
1481
1482         New module mbscspn.
1483         * modules/mbscspn: New file.
1484         * lib/mbscspn.c: New file.
1485         * lib/string_.h (strcspn): Add a conditional link warning.
1486         (mbscspn): New declaration.
1487         * m4/mbscspn.m4: New file.
1488         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1489         GNULIB_MBSCSPN.
1490         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
1491         * MODULES.html.sh (Internationalization functions): Add mbscspn.
1492
1493 2007-02-04  Bruno Haible  <bruno@clisp.org>
1494
1495         New module mbscasestr, reduced goal of strcasestr.
1496         * modules/mbscasestr: New file.
1497         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
1498         (mbscasestr): Renamed from strcasestr.
1499         * lib/strcasestr.c: Don't include mbuiter.h.
1500         (strcasestr): Remove support for multibyte locales.
1501         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
1502         Change the conditional link warning.
1503         (mbscasestr): New declaration.
1504         * m4/mbscasestr.m4: New file.
1505         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
1506         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
1507         REPLACE_STRCASESTR.
1508         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
1509         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
1510         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
1511         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
1512         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
1513         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
1514         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
1515         (Depends-on): Remove mbuiter.
1516         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
1517
1518 2007-02-04  Bruno Haible  <bruno@clisp.org>
1519
1520         Simplify handling of strncasecmp.
1521         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
1522         the conditional link warning.
1523         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
1524         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
1525         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
1526         * modules/strcase (configure.ac): Don't invoke
1527         gl_STRING_MODULE_INDICATOR.
1528         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
1529
1530 2007-02-04  Bruno Haible  <bruno@clisp.org>
1531
1532         New module mbscasecmp, reduced goal of strcasecmp.
1533         * modules/mbscasecmp: New file.
1534         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
1535         (mbscasecmp): Renamed from strcasecmp.
1536         * lib/strcasecmp.c: Don't include mbuiter.h.
1537         (strcasecmp): Remove support for multibyte locales.
1538         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
1539         Change the conditional link warning.
1540         (mbscasecmp): New declaration.
1541         * m4/mbscasecmp.m4: New file.
1542         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
1543         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
1544         REPLACE_STRCASECMP.
1545         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
1546         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1547         GNULIB_MBSCASECMP.
1548         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
1549         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
1550         * modules/strcase (Files): Remove m4/mbrtowc.m4.
1551         (Depends-on): Remove mbuiter.
1552         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
1553
1554 2007-02-04  Bruno Haible  <bruno@clisp.org>
1555
1556         New module mbsstr. Remove module strstr.
1557         * modules/mbsstr: New file.
1558         * modules/strstr: Remove file.
1559         * lib/mbsstr.c: Renamed from lib/strstr.c.
1560         (mbsstr): Renamed from strstr.
1561         * lib/string_.h (strstr): Remove declaration. Change the conditional
1562         link warning.
1563         (mbsstr): New declaration.
1564         * m4/mbsstr.m4: New file.
1565         * m4/strstr.m4: Remove file.
1566         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
1567         REPLACE_STRSTR.
1568         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
1569         Don't initialize GNULIB_STRSTR.
1570         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
1571         substitute GNULIB_STRSTR and REPLACE_STRSTR.
1572         * MODULES.html.sh (Internationalization functions): Add mbsstr.
1573         (Support for systems lacking ANSI C 89): Remove strstr.
1574
1575 2007-02-04  Bruno Haible  <bruno@clisp.org>
1576
1577         New module mbsrchr.
1578         * modules/mbsrchr: New file.
1579         * lib/mbsrchr.c: New file.
1580         * lib/string_.h (strrchr): Add a conditional link warning.
1581         (mbsrchr): New declaration.
1582         * m4/mbsrchr.m4: New file.
1583         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1584         GNULIB_MBSRCHR.
1585         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
1586         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
1587
1588 2007-02-04  Bruno Haible  <bruno@clisp.org>
1589
1590         New module mbschr.
1591         * modules/mbschr: New file.
1592         * lib/mbschr.c: New file.
1593         * lib/string_.h (strchr): Add a conditional link warning.
1594         (mbschr): New declaration.
1595         * m4/mbschr.m4: New file.
1596         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1597         GNULIB_MBSCHR.
1598         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
1599         * MODULES.html.sh (Internationalization functions): Add mbschr.
1600
1601 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
1602
1603         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
1604
1605         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
1606
1607 2007-02-04  Bruno Haible  <bruno@clisp.org>
1608
1609         New module description section 'configure.ac-early'.
1610         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
1611         (func_get_autoconf_early_snippet): New function.
1612         (func_import, func_create_testdir): Use it. Remove special cases for
1613         modules 'extensions' and 'lock'.
1614         * modules/extensions (configure.ac-early): Require
1615         gl_USE_SYSTEM_EXTENSIONS.
1616         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
1617
1618 2007-02-04  Bruno Haible  <bruno@clisp.org>
1619
1620         Make use of gcj-4.3's -fsource and -ftarget option.
1621         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
1622         and if so try the options -fsource and -ftarget.
1623         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
1624         source_version, ftarget_option, target_version arguments.
1625         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
1626         (is_envjavac_oldgcj_14_14_usable): Renamed from
1627         is_envjavac_gcj_14_14_usable.
1628         (is_envjavac_oldgcj_14_13_usable): Renamed from
1629         is_envjavac_gcj_14_13_usable.
1630         (is_gcj_present): Update.
1631         (is_gcj_43, is_gcj43_usable): New functions.
1632         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
1633         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
1634         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
1635         try the options -fsource and -ftarget.
1636
1637 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
1638
1639         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
1640         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
1641         larger value.
1642
1643 2007-02-03  Jim Meyering  <jim@meyering.net>
1644
1645         Give tools a better chance to allocate space for very large buffers.
1646         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
1647
1648         Make pwd and readlink work also when run with an unreadable parent dir
1649         on systems with openat support.
1650         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
1651         provided getcwd function, even when we have openat support.
1652         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
1653
1654 2007-02-02  Bruno Haible  <bruno@clisp.org>
1655
1656         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
1657         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
1658         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
1659         portability problems if one of these functions is only used on specific
1660         platforms.
1661         Reported by Paul Eggert.
1662
1663 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
1664
1665         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
1666         is causing more trouble than it's curing.
1667         * lib/regex_internal.h (__mempcpy): Remove.
1668         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
1669         (and make the code a tad smaller to boot).
1670         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
1671
1672 2007-02-02  Jim Meyering  <jim@meyering.net>
1673
1674         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
1675         section, not in the Makefile.am: one.
1676
1677 2007-02-02  Eric Blake  <ebb9@byu.net>
1678
1679         * lib/strchrnul.c: Always include config.h first.
1680
1681         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
1682         gnulib strstr is not necessary here.
1683
1684 2007-02-02  Simon Josefsson  <simon@josefsson.org>
1685
1686         * m4/socklen.m4: Fix typo.
1687
1688 2007-02-02  Eric Blake  <ebb9@byu.net>
1689
1690         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
1691         * modules/netinet_in (Makefile.am): Likewise.
1692
1693 2007-02-01  Bruno Haible  <bruno@clisp.org>
1694
1695         * lib/string_.h (GL_LINK_WARNING): New macro.
1696         (strcasecmp, strstr, strcasestr): If provided by the system,
1697         conditionally define as a macro that leads to a warning instead of to
1698         an error.
1699         (strncasecmp): Conditionally define as a macro that leads to a warning.
1700
1701 2007-02-01  Karl Berry  <karl@gnu.org>
1702
1703         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
1704
1705 2007-02-01  Bruno Haible  <bruno@clisp.org>
1706
1707         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
1708         renamings.
1709
1710 2007-02-01  Eric Blake  <ebb9@byu.net>
1711
1712         * modules/regex (Depends-on): Revert dependence on mempcpy.
1713         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
1714         module's definition of mempcpy.
1715         Reported by Paul Eggert.
1716
1717 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
1718
1719         * lib/string_.h: If the gnulib module XYZ is not present, undefine
1720         the symbol XYZ before redefining it.  This fixes a problem with
1721         programs that don't use XYZ, when compiled on systems that define
1722         XYZ to something else.
1723
1724 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
1725
1726         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
1727         occurs when "mkdir -m foo" creates a setgid directory that is (1)
1728         writeable to group or other and (2) is intended to have a special
1729         mode bit that is set or cleared.  In such a case, the directory
1730         should be neither group- nor other-writeable until the special
1731         mode bits are right.
1732
1733 2007-01-31  Eric Blake  <ebb9@byu.net>
1734
1735         * modules/mountlist (Depends-on): Add strstr.
1736
1737         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
1738         bug.
1739         * modules/string (Makefile.am): Remove redundant replacement.
1740         * modules/regex (Depends-on): Add mempcpy.
1741
1742 2007-01-31  Bruno Haible  <bruno@clisp.org>
1743
1744         New module description field 'Link'.
1745         * gnulib-tool (func_usage): Document --extract-link-directive.
1746         (sed_extract_prog): Recognize 'Link' directive.
1747         (func_get_link_directive): New function.
1748         (func_import): Show summary of link directives.
1749         Handle --extract-link-directive option.
1750         * modules/acl (Link): New section.
1751         * modules/clock-time (Link): New section.
1752         * modules/euidaccess (Link): New section.
1753         * modules/gettext (Link): New section.
1754         * modules/iconv (Link): New section.
1755         * modules/lock (Link): New section.
1756         * modules/nanosleep (Link): New section.
1757         * modules/readline (Link): New section.
1758
1759 2007-01-27  Bruno Haible  <bruno@clisp.org>
1760
1761         Enforce the use of gnulib modules for unportable <string.h> functions.
1762         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
1763         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
1764         (gl_HEADER_STRING_H_BODY): Require it.
1765         * lib/string_.h: If the gnulib module XYZ is not present, redefine
1766         the symbol XYZ to one that gives a link error.
1767         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
1768         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
1769         * modules/mempcpy (configure.ac): Likewise.
1770         * modules/memrchr (configure.ac): Likewise.
1771         * modules/stpcpy (configure.ac): Likewise.
1772         * modules/stpncpy (configure.ac): Likewise.
1773         * modules/strcase (configure.ac): Likewise.
1774         * modules/strcasestr (configure.ac): Likewise.
1775         * modules/strchrnul (configure.ac): Likewise.
1776         * modules/strdup (configure.ac): Likewise.
1777         * modules/strndup (configure.ac): Likewise.
1778         * modules/strnlen (configure.ac): Likewise.
1779         * modules/strpbrk (configure.ac): Likewise.
1780         * modules/strsep (configure.ac): Likewise.
1781         * modules/strstr (configure.ac): Likewise.
1782         * modules/strtok_r (configure.ac): Likewise.
1783
1784 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
1785
1786         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
1787
1788 2007-01-30  Jim Meyering  <jim@meyering.net>
1789
1790         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
1791
1792 2007-01-29  Bruno Haible  <bruno@clisp.org>
1793
1794         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
1795         * lib/execute.c: Likewise.
1796         * lib/pipe.c: Likewise.
1797         * lib/printf-args.h: Likewise.
1798         * lib/printf-args.c: Likewise.
1799         * lib/printf-parse.c: Likewise.
1800         * lib/vasnprintf.c: Likewise.
1801
1802 2007-01-29  Eric Blake  <ebb9@byu.net>
1803
1804         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
1805         declaration.
1806
1807 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
1808
1809         * lib/strptime.h (strptime): Use 'restrict' for args where
1810         POSIX requires this.
1811         * lib/strptime.c (strptime): Likewise.
1812         Change license notice from LGPL to GPL, since gnulib-tool will
1813         change this as needed.
1814         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
1815         defined.
1816         Include "strptime.h" first, to check interface.
1817         Do not #undef _LIBC and _NL_CURRENT.
1818         Do not include <stdlib.h>; no longer needed.
1819         Include "time_r.h" and declare ptime_locale_status
1820         only if _LIBC is not defined.
1821         (__P): Remove unused macro.
1822         (match_string): Bring back glibc version, but use it only if _LIBC
1823         is defined.
1824         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
1825         Remove unnecessary assertion and abort() call.
1826         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
1827         * m4/strptime.m4: Fix serial number comment.
1828         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
1829         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
1830         (Depends-on): Add time_r.
1831
1832 2007-01-29  Bruno Haible  <bruno@clisp.org>
1833
1834         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
1835         strptime.
1836         * modules/strptime (Depends-on): Add stdbool.
1837         * lib/strptime.h: Include <time.h> always. Add comments.
1838
1839 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
1840
1841         * modules/strptime: New file.
1842         * lib/strptime.h: New file.
1843         * lib/strptime.c: New file.
1844         * m4/strptime.m4: New file.
1845
1846 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
1847
1848         * MODULES.html.sh: New module mpsort.
1849         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
1850
1851         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
1852         a circularity problem with HP-UX ia64 reported by Bob Proulx in
1853         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
1854         All uses changed.
1855         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
1856         All uses changed.
1857         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
1858         to _Restrict_.
1859         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
1860         the parameter matches the prototype.
1861
1862 2007-01-28  Jim Meyering  <jim@meyering.net>
1863
1864         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
1865         sys/time.h here, reverting that part of the previous patch:
1866         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
1867
1868 2007-01-28  Bruno Haible  <bruno@clisp.org>
1869
1870         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
1871         value of $(SYS_TIME_H).
1872         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
1873         remove it conditionally, too. [added by Jim Meyering]
1874         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
1875         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
1876         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
1877         GETTIMEOFDAY_REPLACEMENT to 1.
1878
1879 2007-01-28  Bruno Haible  <bruno@clisp.org>
1880
1881         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
1882         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
1883         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
1884         Set UNISTD_H instead of UNISTD_H2.
1885         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
1886
1887 2007-01-28  Bruno Haible  <bruno@clisp.org>
1888
1889         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
1890         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
1891
1892 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1893
1894         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
1895         (func_create_testdir): Ensure C locale for `grep' and `tr'
1896         character ranges.
1897         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
1898         ACLOCAL_AMFLAGS parsing state machine.
1899
1900 2007-01-27  Bruno Haible  <bruno@clisp.org>
1901
1902         * modules/unistr/base: Update.
1903
1904 2007-01-27  Bruno Haible  <bruno@clisp.org>
1905
1906         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
1907         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
1908         * modules/unistr/u32-mbtouc-unsafe: Renamed from
1909         modules/unistr/u32-mbtouc.
1910         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
1911         * lib/unistr.h: Update.
1912         * lib/linebreak.c: Update.
1913         * modules/unistr/u32-mbtouc: Renamed from
1914         modules/unistr/u32-mbtouc-safe.
1915         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
1916         * lib/unistr.h: Update.
1917         * lib/unistr/u32-to-u8.c: Update.
1918         * lib/unistr/u32-to-u16.c: Update.
1919
1920 2007-01-27  Bruno Haible  <bruno@clisp.org>
1921
1922         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
1923         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
1924         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
1925         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
1926         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
1927         * modules/unistr/u16-mbtouc-unsafe: Renamed from
1928         modules/unistr/u16-mbtouc.
1929         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
1930         * lib/unistr.h: Update.
1931         * lib/linebreak.c: Update.
1932         * modules/linebreak: Update.
1933         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
1934         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
1935         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
1936         * modules/unistr/u16-mbtouc: Renamed from
1937         modules/unistr/u16-mbtouc-safe.
1938         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
1939         * lib/unistr.h: Update.
1940         * lib/unistr/u16-to-u8.c: Update.
1941         * modules/unistr/u16-to-u8: Update.
1942         * lib/unistr/u16-to-u32.c: Update.
1943         * modules/unistr/u16-to-u32: Update.
1944
1945 2007-01-27  Bruno Haible  <bruno@clisp.org>
1946
1947         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
1948         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
1949         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
1950         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
1951         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
1952         * modules/unistr/u8-mbtouc-unsafe: Renamed from
1953         modules/unistr/u8-mbtouc.
1954         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
1955         * lib/unistr.h: Update.
1956         * lib/striconveh.c: Update.
1957         * modules/striconveh: Update.
1958         * lib/linebreak.c: Update.
1959         * modules/linebreak: Update.
1960         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
1961         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
1962         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
1963         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
1964         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
1965         * lib/unistr.h: Update.
1966         * lib/striconveh.c: Update.
1967         * modules/striconveh: Update.
1968         * lib/unistr/u8-to-u16.c: Update.
1969         * modules/unistr/u8-to-u16: Update.
1970         * lib/unistr/u8-to-u32.c: Update.
1971         * modules/unistr/u8-to-u32: Update.
1972
1973 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1974
1975         Sync from Libtool.
1976         * lib/argz.c: Do not include strings.h nor memory.h, include
1977         string.h unconditionally.  Patch by Simon Josefsson.
1978
1979 2007-01-27  Bruno Haible  <bruno@clisp.org>
1980
1981         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
1982         from gl_HEADER_STRING_H_BODY.
1983         (gl_HEADER_STRING_H_BODY): Require it.
1984         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
1985         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
1986         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
1987         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
1988         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
1989         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
1990         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
1991         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
1992         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
1993         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
1994         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
1995         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
1996         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
1997         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
1998         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
1999
2000 2007-01-27  Bruno Haible  <bruno@clisp.org>
2001
2002         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
2003         check_PROGRAMS into noinst_PROGRAMS.
2004         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
2005         check_PROGRAMS in this case.
2006         (func_import): Set for_test to false.
2007         (func_create_testdir): Set for_test to true.
2008
2009 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
2010             Bruno Haible  <bruno@clisp.org>
2011
2012         * modules/strcasestr (Files): Remove lib/strcasestr.h.
2013         (Depends-on): Add string.
2014         (Includes): Use <string.h> instead of strcasestr.h.
2015         * modules/string (Makefile.am): Also substitute the value of
2016         REPLACE_STRCASESTR.
2017         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
2018         assume strcasestr is declared in <string.h> not <strings.h>. Also
2019         set REPLACE_STRCASESTR.
2020         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
2021         REPLACE_STRCASESTR.
2022         * lib/strcasestr.h: Remove file.
2023         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
2024         * lib/string_.h (strcasestr): New declaration.
2025
2026 2007-01-27  Bruno Haible  <bruno@clisp.org>
2027
2028         * lib/string_.h: Use 'extern'.
2029
2030 2007-01-27  Jim Meyering  <jim@meyering.net>
2031
2032         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
2033         of set-but-not-used local, "q".
2034
2035         * lib/mempcpy.c: Include <config.h> before <string.h>.
2036         This fixes a compilation error on HP-UX, due to the system's
2037         "restrict"-using mempcpy prototype.
2038
2039 2007-01-26  Bruno Haible  <bruno@clisp.org>
2040
2041         Small optimization.
2042         * lib/javacomp.c: Include c-strstr.h.
2043          (is_envjavac_gcj): Use c_strstr instead of strstr.
2044         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
2045
2046 2007-01-26  Bruno Haible  <bruno@clisp.org>
2047
2048         * MODULES.html.sh (Unicode string functions): Add the new modules.
2049
2050         * modules/uniconv/u32-strconv-to-locale: New file.
2051         * lib/uniconv/u32-strconv-to-locale.c: New file.
2052
2053         * modules/uniconv/u16-strconv-to-locale: New file.
2054         * lib/uniconv/u16-strconv-to-locale.c: New file.
2055
2056         * modules/uniconv/u8-strconv-to-locale: New file.
2057         * lib/uniconv/u8-strconv-to-locale.c: New file.
2058
2059         * modules/uniconv/u32-strconv-from-locale: New file.
2060         * lib/uniconv/u32-strconv-from-locale.c: New file.
2061
2062         * modules/uniconv/u16-strconv-from-locale: New file.
2063         * lib/uniconv/u16-strconv-from-locale.c: New file.
2064
2065         * modules/uniconv/u8-strconv-from-locale: New file.
2066         * lib/uniconv/u8-strconv-from-locale.c: New file.
2067
2068         * modules/uniconv/u32-strconv-to-enc: New file.
2069         * lib/uniconv/u32-strconv-to-enc.c: New file.
2070         * modules/uniconv/u32-strconv-to-enc-tests: New file.
2071         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
2072
2073         * modules/uniconv/u16-strconv-to-enc: New file.
2074         * lib/uniconv/u16-strconv-to-enc.c: New file.
2075         * lib/uniconv/u-strconv-to-enc.h: New file.
2076         * modules/uniconv/u16-strconv-to-enc-tests: New file.
2077         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
2078
2079         * modules/uniconv/u8-strconv-to-enc: New file.
2080         * lib/uniconv/u8-strconv-to-enc.c: New file.
2081         * modules/uniconv/u8-strconv-to-enc-tests: New file.
2082         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
2083
2084         * modules/uniconv/u32-strconv-from-enc: New file.
2085         * lib/uniconv/u32-strconv-from-enc.c: New file.
2086         * modules/uniconv/u32-strconv-from-enc-tests: New file.
2087         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
2088
2089         * modules/uniconv/u16-strconv-from-enc: New file.
2090         * lib/uniconv/u16-strconv-from-enc.c: New file.
2091         * modules/uniconv/u16-strconv-from-enc-tests: New file.
2092         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
2093
2094         * modules/uniconv/u8-strconv-from-enc: New file.
2095         * lib/uniconv/u8-strconv-from-enc.c: New file.
2096         * lib/uniconv/u-strconv-from-enc.h: New file.
2097         * modules/uniconv/u8-strconv-from-enc-tests: New file.
2098         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
2099
2100         * modules/uniconv/u32-conv-from-enc: New file.
2101         * lib/uniconv/u32-conv-from-enc.c: New file.
2102         * modules/uniconv/u32-conv-from-enc-tests: New file.
2103         * tests/uniconv/test-u32-conv-from-enc.c: New file.
2104
2105         * modules/uniconv/u16-conv-from-enc: New file.
2106         * lib/uniconv/u16-conv-from-enc.c: New file.
2107         * lib/uniconv/u-conv-from-enc.h: New file.
2108         * modules/uniconv/u16-conv-from-enc-tests: New file.
2109         * tests/uniconv/test-u16-conv-from-enc.c: New file.
2110
2111         * modules/uniconv/u8-conv-from-enc: New file.
2112         * lib/uniconv/u8-conv-from-enc.c: New file.
2113         * modules/uniconv/u8-conv-from-enc-tests: New file.
2114         * tests/uniconv/test-u8-conv-from-enc.c: New file.
2115
2116         * modules/uniconv/base: New file.
2117         * lib/uniconv.h: New file.
2118
2119 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
2120
2121         * doc/gnulib-tool.texi (Initial import): Update to match current
2122         behavior with strdup module.
2123         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
2124         * lib/memmem.h: Remove; all uses removed.  This is now done
2125         by <string.h>.
2126         * lib/mempcpy.h: Likewise.
2127         * lib/memrchr.h: Likewise.
2128         * lib/stpcpy.h: Likewise.
2129         * lib/stpncpy.h: Likewise.
2130         * lib/strcase.h: Likewise.
2131         * lib/strchrnul.h: Likewise.
2132         * lib/strdup.h: Likewise.
2133         * lib/strndup.h: Likewise.
2134         * lib/strnlen.h: Likewise.
2135         * lib/strpbrk.h: Likewise.
2136         * lib/strsep.h: Likewise.
2137         * lib/strstr.h: Likewise.
2138         * lib/strtok_r.h: Likewise.
2139         * lib/string_.h: New file.
2140         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
2141         Rely on <string.h> instead.
2142         * lib/canon-host.c: Likewise.
2143         * lib/chdir-long.c: Likewise.
2144         * lib/concatpath.c: Likewise.
2145         * lib/exclude.c: Likewise.
2146         * lib/fchdir.c: Likewise.
2147         * lib/getaddrinfo.c: Likewise.
2148         * lib/getcwd.c: Likewise.
2149         * lib/getsubopt.c: Likewise.
2150         * lib/glob.c: Likewise.
2151         * lib/hard-locale.c: Likewise.
2152         * lib/iconvme.c: Likewise.
2153         * lib/javacomp.c: Likewise.
2154         * lib/mempcpy.c: Likewise.
2155         * lib/memrchr.c: Likewise.
2156         * lib/regex_internal.h: Likewise.
2157         * lib/stpncpy.c: Likewise.
2158         * lib/strcasecmp.c: Likewise.
2159         * lib/strchrnul.c: Likewise.
2160         * lib/strdup.c: Likewise.
2161         * lib/striconv.c: Likewise.
2162         * lib/striconveh.c: Likewise.
2163         * lib/striconveha.c: Likewise.
2164         * lib/strncasecmp.c: Likewise.
2165         * lib/strndup.c: Likewise.
2166         * lib/strnlen.c: Likewise.
2167         * lib/strsep.c: Likewise.
2168         * lib/strstr.c: Likewise.
2169         * lib/strtok_r.c: Likewise.
2170         * lib/userspec.c: Likewise.
2171         * lib/w32spawn.h: Likewise.
2172         * lib/xstrndup.c: Likewise.
2173         * lib/mountlist.c (strstr): Remove decl.
2174         * m4/string_h.m4: New file.
2175         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
2176         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
2177         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
2178         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
2179         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
2180         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
2181         Set REPLACE_STRCASECMP if necessary.
2182         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
2183         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
2184         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
2185         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
2186         HAVE_DECL_STRDUP if necessary.
2187         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
2188         since gl_FUNC_STRNDUP does that now.
2189         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
2190         Check for decl here...
2191         (gl_PREREQ_STRNLEN): ... not here.
2192         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
2193         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
2194         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
2195         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
2196         necessary.
2197         * modules/string: New file.
2198         * modules/memmem (Files): Remove special-purpose include file.
2199         (Depends-on): Add string.
2200         (Include): Include <string.h>, not the removed file.
2201         * modules/mempcpy: Likewise.
2202         * modules/memrchr: Likewise.
2203         * modules/stpcpy: Likewise.
2204         * modules/stpncpy: Likewise.
2205         * modules/strcase: Likewise.
2206         * modules/strchrnul: Likewise.
2207         * modules/strdup: Likewise.
2208         * modules/strndup: Likewise.
2209         * modules/strnlen: Likewise.
2210         * modules/strpbrk: Likewise.
2211         * modules/strsep: Likewise.
2212         * modules/strstr: Likewise.
2213         * modules/strtok_r: Likewise.
2214         * tests/test-dirname.c: Don't include "strdup.h", since
2215         <string.h> now suffices.
2216         * tests/test-memmem.c: Don't include "memmem.h", since
2217         <string.h> now suffices.
2218
2219 2007-01-25  Bruno Haible  <bruno@clisp.org>
2220
2221         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
2222         *resultp is 0.
2223
2224         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
2225         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
2226         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
2227         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
2228
2229         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
2230         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
2231         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
2232         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
2233         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
2234         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
2235
2236 2007-01-24  Bruno Haible  <bruno@clisp.org>
2237
2238         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
2239         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
2240         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
2241         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
2242         gl_FUNC_FTS_CORE.
2243         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
2244         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
2245         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
2246         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
2247         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
2248         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
2249         gl_FUNC_FCHOWNAT.
2250         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
2251         gl_FUNC_STRFTIME.
2252         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
2253         Reported by Ralf Wildenhues.
2254
2255 2007-01-24  Bruno Haible  <bruno@clisp.org>
2256
2257         Drop AC_REQUIRE calls that are redundant with the module dependencies.
2258         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
2259         gl_GETADDRINFO.
2260         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
2261         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
2262         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
2263
2264 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
2265
2266         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
2267         Don't use 'exit'; just return from 'main'.
2268         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
2269
2270         * lib/fnmatch_.h: Readjust white space and comments to match
2271         glibc, to avoid spurious diffs.
2272
2273 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
2274
2275         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
2276         2004-12-01 change by Jakub Jelinek, since this code won't compile
2277         if !LIBC.  Problem reported by Bob Proulx.
2278
2279 2007-01-23  Bruno Haible  <bruno@clisp.org>
2280
2281         * lib/striconveh.c: Include c-strcaseeq.h.
2282         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
2283         * modules/striconveh (Depends-on): Add c-strcaseeq.
2284
2285 2007-01-23  Bruno Haible  <bruno@clisp.org>
2286
2287         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
2288
2289         * modules/c-strcaseeq: New file.
2290         * lib/c-strcaseeq.h: New file.
2291
2292         * modules/streq: New file.
2293         * lib/streq.h: New file.
2294
2295 2007-01-23  Bruno Haible  <bruno@clisp.org>
2296
2297         * modules/striconveha-tests: New file.
2298         * tests/test-striconveha.c: New file.
2299
2300         * lib/striconveha.h: Include <stdbool.h>.
2301         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
2302         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
2303         (mem_iconveha_notranslit): Renamed from mem_iconveha.
2304         (mem_iconveha): New function.
2305         (str_iconveha_notranslit): Renamed from str_iconveha.
2306         (str_iconveha): New function.
2307         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
2308         c-strcase.
2309
2310 2007-01-23  Bruno Haible  <bruno@clisp.org>
2311
2312         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
2313         encodings without forgiving before trying any encoding with handler.
2314         (str_iconveha): Try all encodings without forgiving before trying any
2315         encoding with handler.
2316
2317 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
2318
2319         Import the following changes from libc.
2320
2321         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
2322
2323         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
2324
2325         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
2326
2327         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
2328         normal_bracket label.
2329
2330         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
2331
2332         [BZ #361]
2333         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
2334         to normal_bracket after fetching the next character.
2335
2336 2007-01-22  Bruno Haible  <bruno@clisp.org>
2337
2338         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
2339         argument.
2340         * lib/striconveh.c (iconv_carefully_1): New function.
2341         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
2342         argument.
2343         (str_cd_iconveh): Update.
2344         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
2345         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
2346         * tests/test-striconveh.c (MAGIC): New macro.
2347         (new_offsets): New function.
2348         (main): Test call with and without offsets.
2349
2350 2007-01-22  Bruno Haible  <bruno@clisp.org>
2351
2352         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
2353         * modules/sys_select (Makefile.am): Likewise.
2354         * modules/sys_socket (Makefile.am): Likewise.
2355         * modules/sys_time (Makefile.am): Likewise.
2356
2357 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
2358
2359         * modules/gettimeofday (License): Change from GPL to LGPL, since
2360         gettimeofday is a library function.
2361
2362 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
2363
2364         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
2365
2366 2007-01-21  Bruno Haible  <bruno@clisp.org>
2367
2368         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
2369
2370 2007-01-21  Bruno Haible  <bruno@clisp.org>
2371
2372         * modules/striconveha: New file.
2373         * lib/striconveha.h: New file.
2374         * lib/striconveha.c: New file.
2375         * MODULES.html.sh (Internationalization functions): Add striconveha.
2376         * lib/striconv.c (str_iconv): Optimize the case of an empty input
2377         string.
2378         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
2379
2380 2007-01-21  Bruno Haible  <bruno@clisp.org>
2381
2382         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
2383         * lib/striconveh.c (str_iconveh): Likewise.
2384
2385 2007-01-21  Bruno Haible  <bruno@clisp.org>
2386
2387         * lib/striconveh.h (mem_iconveh): New declaration.
2388         * lib/striconveh.c (mem_iconveh): New function.
2389         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
2390
2391 2007-01-21  Bruno Haible  <bruno@clisp.org>
2392
2393         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
2394
2395         * lib/striconveh.h (mem_cd_iconveh): Change specification.
2396         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
2397         original result buffer.
2398         (str_cd_iconveh): Update.
2399         * tests/test-striconveh.c (main): Update.
2400
2401         * lib/striconv.h (mem_cd_iconv): Change specification.
2402         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
2403         result buffer.
2404         (str_cd_iconv): Update.
2405         * tests/test-striconv.c (main): Update.
2406
2407 2007-01-21  Bruno Haible  <bruno@clisp.org>
2408
2409         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
2410
2411 2007-01-20  Jim Meyering  <jim@meyering.net>
2412
2413         * lib/userspec.c (parse_with_separator): If a user or group string
2414         starts with "+", skip the corresponding name-to-ID look-up, since
2415         such a look-up must fail: user and group names may not include "+".
2416
2417 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
2418
2419         * lib/poll.c: Include sys/time.h and time.h unconditionally,
2420         since we now assume the sys_time module.
2421         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
2422         check for sys/time.h; no longer needed.
2423         * modules/poll (Depends-on): Depend on sys_time.
2424
2425 2007-01-18  Bruno Haible  <bruno@clisp.org>
2426
2427         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
2428         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
2429
2430         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
2431         gettimeofday.
2432
2433         * tests/test-gettimeofday.c: Include <time.h>.
2434         (dummy): Remove variable.
2435
2436         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
2437         gl_HEADER_SYS_TIME_H.
2438         (gl_HEADER_SYS_TIME_H): New macro.
2439
2440         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
2441         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
2442         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
2443         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
2444         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
2445         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
2446         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
2447         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
2448         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
2449         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
2450         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
2451
2452         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
2453         last change; it caused a compilation error when cross-compiling to
2454         Cygwin.
2455
2456 2007-01-18  Jim Meyering  <jim@meyering.net>
2457
2458         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
2459         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
2460         than the race-prone "test -d sys || mkdir sys".
2461         (configure.ac): Use AC_PROG_MKDIR_P.
2462         * modules/sys_select: Likewise.
2463         * modules/sys_socket: Likewise.
2464         * modules/sys_time: Likewise.
2465
2466 2007-01-18  Eric Blake  <ebb9@byu.net>
2467
2468         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
2469         replace gettimeofday.
2470         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
2471         name, to avoid infinite recursion.
2472
2473 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
2474
2475         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
2476         module sys_time.
2477         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
2478         assume timespec.h defines struct timeval.
2479         * lib/settime.c: Likewise.
2480         * lib/utimens.c: Likewise.
2481         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
2482         since we now assume the gettimeofday module.
2483         * lib/tempname.c (__gen_tempname): Likewise.
2484         * lib/gettimeofday.h: Remove.
2485         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
2486         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
2487         Include <time.h>, for 'time()'.
2488         (localtime_buffer_addr): Also use this workaround if
2489         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
2490         to simplify the uses.  All uses changed.
2491         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
2492         that #undef is inside {}, and 'const' follows type name consistently.
2493         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
2494         (gettimeofday): Do not use the maximum possible value for
2495         tv->tv_usec, since that might break usages other than ls.c.
2496         Instead, we'll leave ls.c alone.  This undoes today's patch
2497         by Bruno.  Add a compile-time warning for 1s-clock resolution;
2498         we've never observed the problem but might as well keep the
2499         canary.
2500         * lib/nanosleep.c: Include timespec.h first, for interface check.
2501         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
2502         now assume the sys_time module.
2503         * lib/tempname.c: Likewise.
2504         * lib/timespec.h: Likewise.
2505         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
2506         needed.
2507         * lib/strftime.c: Likewise.
2508         * lib/timespec.h: Likewise.
2509         * lib/posixtm.c: Include posixtm.h first, for interface check.
2510         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
2511         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
2512         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
2513         * lib/sys_time_.h: New file.
2514         * lib/timespec.h (struct timespec): Use long int, not long.
2515         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
2516         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
2517         Remove obsolescent call to AC_HEADER_TIME.
2518         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
2519         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
2520         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
2521         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
2522         Likewise.
2523         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
2524         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
2525         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
2526         into the sys_time module.  Check for gettimeofday just once.
2527         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
2528         for gettimeofday signature to just check the signature.  Merely
2529         compile it, since linking doesn't test signature.  Improve test for
2530         whether gettimeofday.o is actually needed.
2531         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
2532         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
2533         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
2534         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
2535         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
2536         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
2537         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
2538         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
2539         than worrying about sys/time.h.
2540         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
2541         Don't bother worrying about TIME_WITH_SYS_TIME.
2542         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
2543         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
2544         * m4/sys_time_h.m4: New file.
2545         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
2546         Don't include sys/time.h.  Return from main rather than exiting.
2547         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
2548         all uses changed.
2549         * modules/gethrxtime (Depends-on): Add sys_time.
2550         * modules/gettime (Depends-on): Likewise.
2551         * modules/gettimeofday (Depends-on): Likewise.
2552         * modules/nanosleep (Depends-on): Likewise.
2553         * modules/settime (Depends-on): Likewise.
2554         * modules/tempname (Depends-on): Likewise.
2555         * modules/utimens (Depends-on): Likewise.
2556         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
2557         (Include:) Change back to <sys/time.h>.
2558         (Maintainer:) Add self.
2559         * modules/sys_time: New file.
2560         * modules/tempname (Depends-on): Add gettimeofday.
2561         * tests/test-gettimeofday.c: Include <sys/time.h>
2562         rather than gettimeofday.h.
2563
2564 2007-01-17  Bruno Haible  <bruno@clisp.org>
2565
2566         * gnulib-tool (func_get_license): Revert last patch. Instead, let
2567         the license default to GPL.
2568         (func_create_testdir): Don't complain if a module is LGPL and its
2569         tests module depends on GPLed modules.
2570
2571 2007-01-17  Bruno Haible  <bruno@clisp.org>
2572
2573         * lib/gettimeofday.c (gettimeofday): Add code for the case
2574         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
2575         maximum possible value for tv->tv_usec, rather than the minimum one.
2576
2577 2005-10-08  Martin Lambers  <marlam@marlam.de>
2578 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
2579 2007-01-16  Bruno Haible  <bruno@clisp.org>
2580
2581         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
2582         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
2583         gl_FUNC_GETTIMEOFDAY.
2584         (Include): Add gettimeofday.h.
2585         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
2586         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
2587         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
2588         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
2589         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
2590         * lib/gettimeofday.h: New file.
2591         * lib/gettimeofday.c: Include <sys/timeb.h>.
2592         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
2593         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
2594         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
2595         fall back on time().
2596
2597         * tests/test-gettimeofday.c: New file.
2598         * modules/gettimeofday-tests: New file.
2599
2600 2007-01-16  Eric Blake  <ebb9@byu.net>
2601
2602         * modules/fnmatch (Depends-on): Depend on wchar.
2603         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
2604         * m4/fnmatch.m4: Likewise.
2605         * modules/mbchar (Makefile.am): Assume <wchar.h>.
2606         * m4/mbchar.m4: Likewise.
2607         * modules/mbswidth (Depends-on): Depend on wchar.
2608         * lib/mbswidth.c: Assume <wchar.h>.
2609         * m4/mbswidth.m4: Likewise.
2610         * modules/quotearg (Depends-on): Depend on wchar.
2611         * lib/quotearg.c: Assume <wchar.h>.
2612         * m4/quotearg.m4: Likewise.
2613         * modules/regex (Depends-on): Depend on wchar.
2614         * lib/regex_internal.h: Assume <wchar.h>.
2615         * m4/regex.m4: Likewise.
2616         * modules/stdint (Depends-on): Depend on wchar.
2617         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
2618         * m4/stdint.m4: Likewise.
2619         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
2620         * modules/strftime (Depends-on): Depend on wchar.
2621         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
2622         * modules/strtol (Depends-on): Depend on wchar.
2623         * lib/strtol.c: Assume <wchar.h>.
2624         * modules/wcwidth (Depends-on): Depend on wchar.
2625         * lib/wcwidth.h: Assume <wchar.h>.
2626         * m4/wcwidth.m4: Likewise.
2627
2628 2007-01-16  Bruno Haible  <bruno@clisp.org>
2629
2630         * modules/csharpexec-script: New, created from...
2631         * modules/csharpexec: ... this.
2632
2633 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
2634
2635         * modules/javaexec-script: New, created from...
2636         * modules/javaexec: ... this.
2637
2638 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
2639
2640         * modules/poll (Dependencies): Add sys_select.
2641
2642 2007-01-15  Jim Meyering  <jim@meyering.net>
2643
2644         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
2645         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
2646         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
2647         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
2648
2649 2007-01-15  Bruno Haible  <bruno@clisp.org>
2650
2651         * modules/striconveh: New file.
2652         * lib/striconveh.h: New file.
2653         * lib/striconveh.c: New file.
2654         * MODULES.html.sh (Internationalization functions): Add striconveh.
2655
2656         * modules/striconveh-tests: New file.
2657         * tests/test-striconveh.c: New file.
2658
2659 2007-01-15  Bruno Haible  <bruno@clisp.org>
2660
2661         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
2662         not from GNU libiconv or GNU libc.
2663
2664 2007-01-15  Bruno Haible  <bruno@clisp.org>
2665
2666         * doc/gnulib-intro.texi (Copyright): Explain the different license
2667         terms for module descriptions, autoconf macros, tests, documentation.
2668
2669 2007-01-14  Bruno Haible  <bruno@clisp.org>
2670
2671         * modules/striconv-tests: New file.
2672         * tests/test-striconv.c: New file.
2673
2674 2007-01-14  Bruno Haible  <bruno@clisp.org>
2675
2676         * modules/iconv-tests: New file.
2677         * tests/test-iconv.c: New file.
2678
2679 2007-01-14  Bruno Haible  <bruno@clisp.org>
2680
2681         * gnulib-tool (func_get_license): For test modules, use the license of
2682         the main module.
2683
2684 2007-01-14  Bruno Haible  <bruno@clisp.org>
2685
2686         * modules/iconv (Include): Clarify that <iconv.h> can only be included
2687         if iconv is found to exist.
2688
2689 2007-01-14  Bruno Haible  <bruno@clisp.org>
2690
2691         * modules/c-ctype-tests: New file.
2692         * tests/test-c-ctype.c: New file.
2693
2694 2007-01-14  Bruno Haible  <bruno@clisp.org>
2695
2696         * modules/binary-io-tests: New file.
2697         * tests/test-binary-io.sh: New file.
2698         * tests/test-binary-io.c: New file.
2699
2700 2007-01-14  Bruno Haible  <bruno@clisp.org>
2701
2702         * modules/array-oset-tests: New file.
2703         * tests/test-array_oset.c: New file.
2704
2705 2007-01-14  Bruno Haible  <bruno@clisp.org>
2706
2707         * modules/array-list-tests: New file.
2708         * tests/test-array_list.c: New file.
2709
2710 2007-01-14  Bruno Haible  <bruno@clisp.org>
2711
2712         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
2713         and make.
2714         Reported by Simon Josefsson in
2715         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
2716
2717 2007-01-14  Bruno Haible  <bruno@clisp.org>
2718
2719         * modules/allocsa-tests: New file.
2720         * tests/test-allocsa.c: New file.
2721
2722 2007-01-14  Bruno Haible  <bruno@clisp.org>
2723
2724         * modules/fchdir (Depends-on): Add absolute-header.
2725         * modules/unistd (Depends-on): Likewise.
2726
2727 2006-12-30  Bruno Haible  <bruno@clisp.org>
2728
2729         * modules/fchdir: New file.
2730         * modules/unistd (Files): Add lib/unistd_.h.
2731         (Makefile.am): Generate unistd.h from unistd_.h.
2732         * lib/fchdir.c: New file.
2733         * lib/dirent_.h: New file.
2734         * lib/unistd_.h: New file.
2735         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
2736         * m4/fchdir.m4: New file.
2737         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
2738         (gl_HEADER_UNISTD): Invoke it.
2739         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
2740         function.
2741         * lib/backupfile.c (opendir, closedir): Undefine.
2742         * lib/chown.c (open, close): Undefine.
2743         * lib/clean-temp.c (open, close): Undefine.
2744         * lib/copy-file.c (open, close): Undefine.
2745         * lib/execute.c (open, close): Undefine.
2746         * lib/fsusage.c (open, close): Undefine.
2747         * lib/gc-gnulib.c (open, close): Undefine.
2748         * lib/getcwd.c (opendir, closedir): Undefine.
2749         * lib/glob.c (opendir, closedir): Undefine.
2750         * lib/javacomp.c (open, close): Undefine.
2751         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
2752         * lib/openat-proc.c (open, close): Undefine.
2753         * lib/pagealign_alloc.c (open, close): Undefine.
2754         * lib/pipe.c (open, close): Undefine.
2755         * lib/progreloc.c (open, close): Undefine.
2756         * lib/savedir.c (opendir, closedir): Undefine.
2757         * lib/utime.c (open, close): Undefine.
2758         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
2759
2760 2007-01-10  Bruno Haible  <bruno@clisp.org>
2761
2762         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
2763
2764 2007-01-12  Eric Blake  <ebb9@byu.net>
2765
2766         Provide a robust <wchar.h>.  Further simplifications are now
2767         possible in other modules, but not included here.
2768         * modules/wchar: New module.
2769         * m4/wchar.m4: New file.
2770         * lib/wchar_.h: Likewise.
2771         * modules/mbchar (Depends-on): Depend on wchar, as the first use
2772         of the new module.
2773         * MODULES.html.sh (Extended multibyte and wide character utilities):
2774         New section.
2775
2776 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
2777
2778         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
2779         to a reasonable default for memory allocation.
2780         (xreadlink): Don't allocate a huge buffer, to work around a buggy
2781         file system that reports garbage st_size values for symlinks.
2782         Problem reported by Liyang Hu.
2783
2784 2007-01-11  Simon Josefsson  <simon@josefsson.org>
2785
2786         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
2787         Emacs .#* auto-save files).
2788
2789 2007-01-11  Bruno Haible  <bruno@clisp.org>
2790
2791         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
2792         directory.
2793
2794 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
2795
2796         Use @...@ consistently in lib/wctype_.h.
2797         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
2798         on it being set to 1 or 0.
2799         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
2800         go back to AC_SUBSTing it.
2801         * modules/wctype (Makefile.am): Undo previous change.
2802
2803 2007-01-10  Eric Blake  <ebb9@byu.net>
2804
2805         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
2806         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
2807         * modules/wctype (Makefile.am): Likewise.
2808         Reported by Chris McGuire.
2809
2810 2007-01-10  Jim Meyering  <jim@meyering.net>
2811
2812         fts.c: a small readability/maintainability improvement
2813         * lib/fts.c (fts_read): Make this code slightly more readable and
2814         maintainable by hoisting the "sp->fts_cur = p" assignments to
2815         immediately follow the statements that set P.  Derived from
2816         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
2817
2818 2007-01-10  Eric Blake  <ebb9@byu.net>
2819
2820         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
2821         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
2822         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
2823         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
2824         Reported by Chris McGuire.
2825
2826 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2827
2828         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
2829         in sed script.
2830
2831 2007-01-09  Bruno Haible  <bruno@clisp.org>
2832
2833         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
2834         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
2835         variables.
2836         (func_module): Use them.
2837
2838 2007-01-09  Bruno Haible  <bruno@clisp.org>
2839
2840         * modules/unistr/base: New file.
2841         * lib/unistr.h: New file.
2842
2843         * modules/unistr/u8-to-u16: New file.
2844         * lib/unistr/u8-to-u16.c: New file.
2845
2846         * modules/unistr/u8-to-u32: New file.
2847         * lib/unistr/u8-to-u32.c: New file.
2848
2849         * modules/unistr/u16-to-u8: New file.
2850         * lib/unistr/u16-to-u8.c: New file.
2851
2852         * modules/unistr/u16-to-u32: New file.
2853         * lib/unistr/u16-to-u32.c: New file.
2854
2855         * modules/unistr/u32-to-u8: New file.
2856         * lib/unistr/u32-to-u8.c: New file.
2857
2858         * modules/unistr/u32-to-u16: New file.
2859         * lib/unistr/u32-to-u16.c: New file.
2860
2861         * modules/unistr/u8-check: New file.
2862         * modules/unistr/u16-check: New file.
2863         * modules/unistr/u32-check: New file.
2864         * lib/unistr/u8-check.c: New file.
2865         * lib/unistr/u16-check.c: New file.
2866         * lib/unistr/u32-check.c: New file.
2867
2868         * modules/unistr/u8-chr: New file.
2869         * modules/unistr/u16-chr: New file.
2870         * modules/unistr/u32-chr: New file.
2871         * lib/unistr/u8-chr.c: New file.
2872         * lib/unistr/u16-chr.c: New file.
2873         * lib/unistr/u32-chr.c: New file.
2874
2875         * modules/unistr/u8-cmp: New file.
2876         * modules/unistr/u16-cmp: New file.
2877         * modules/unistr/u32-cmp: New file.
2878         * lib/unistr/u8-cmp.c: New file.
2879         * lib/unistr/u16-cmp.c: New file.
2880         * lib/unistr/u32-cmp.c: New file.
2881
2882         * modules/unistr/u8-cpy: New file.
2883         * modules/unistr/u16-cpy: New file.
2884         * modules/unistr/u32-cpy: New file.
2885         * lib/unistr/u8-cpy.c: New file.
2886         * lib/unistr/u16-cpy.c: New file.
2887         * lib/unistr/u32-cpy.c: New file.
2888         * lib/unistr/u-cpy.h: New file.
2889
2890         * modules/unistr/u8-cpy-alloc: New file.
2891         * modules/unistr/u16-cpy-alloc: New file.
2892         * modules/unistr/u32-cpy-alloc: New file.
2893         * lib/unistr/u8-cpy-alloc.c: New file.
2894         * lib/unistr/u16-cpy-alloc.c: New file.
2895         * lib/unistr/u32-cpy-alloc.c: New file.
2896         * lib/unistr/u-cpy-alloc.h: New file.
2897
2898         * modules/unistr/u8-endswith: New file.
2899         * modules/unistr/u16-endswith: New file.
2900         * modules/unistr/u32-endswith: New file.
2901         * lib/unistr/u8-endswith.c: New file.
2902         * lib/unistr/u16-endswith.c: New file.
2903         * lib/unistr/u32-endswith.c: New file.
2904         * lib/unistr/u-endswith.h: New file.
2905
2906         * modules/unistr/u8-mblen: New file.
2907         * modules/unistr/u16-mblen: New file.
2908         * modules/unistr/u32-mblen: New file.
2909         * lib/unistr/u8-mblen.c: New file.
2910         * lib/unistr/u16-mblen.c: New file.
2911         * lib/unistr/u32-mblen.c: New file.
2912
2913         * modules/unistr/u8-mbtouc: New file.
2914         * modules/unistr/u16-mbtouc: New file.
2915         * modules/unistr/u32-mbtouc: New file.
2916         * lib/unistr/u8-mbtouc.c: New file.
2917         * lib/unistr/u16-mbtouc.c: New file.
2918         * lib/unistr/u32-mbtouc.c: New file.
2919
2920         * modules/unistr/u8-mbtouc-safe: New file.
2921         * modules/unistr/u16-mbtouc-safe: New file.
2922         * modules/unistr/u32-mbtouc-safe: New file.
2923         * lib/unistr/u8-mbtouc-safe.c: New file.
2924         * lib/unistr/u16-mbtouc-safe.c: New file.
2925         * lib/unistr/u32-mbtouc-safe.c: New file.
2926
2927         * modules/unistr/u8-move: New file.
2928         * modules/unistr/u16-move: New file.
2929         * modules/unistr/u32-move: New file.
2930         * lib/unistr/u8-move.c: New file.
2931         * lib/unistr/u16-move.c: New file.
2932         * lib/unistr/u32-move.c: New file.
2933         * lib/unistr/u-move.h: New file.
2934
2935         * modules/unistr/u8-next: New file.
2936         * modules/unistr/u16-next: New file.
2937         * modules/unistr/u32-next: New file.
2938         * lib/unistr/u8-next.c: New file.
2939         * lib/unistr/u16-next.c: New file.
2940         * lib/unistr/u32-next.c: New file.
2941
2942         * modules/unistr/u8-prev: New file.
2943         * modules/unistr/u16-prev: New file.
2944         * modules/unistr/u32-prev: New file.
2945         * lib/unistr/u8-prev.c: New file.
2946         * lib/unistr/u16-prev.c: New file.
2947         * lib/unistr/u32-prev.c: New file.
2948
2949         * modules/unistr/u8-set: New file.
2950         * modules/unistr/u16-set: New file.
2951         * modules/unistr/u32-set: New file.
2952         * lib/unistr/u8-set.c: New file.
2953         * lib/unistr/u16-set.c: New file.
2954         * lib/unistr/u32-set.c: New file.
2955         * lib/unistr/u-set.h: New file.
2956
2957         * modules/unistr/u8-startswith: New file.
2958         * modules/unistr/u16-startswith: New file.
2959         * modules/unistr/u32-startswith: New file.
2960         * lib/unistr/u8-startswith.c: New file.
2961         * lib/unistr/u16-startswith.c: New file.
2962         * lib/unistr/u32-startswith.c: New file.
2963         * lib/unistr/u-startswith.h: New file.
2964
2965         * modules/unistr/u8-stpcpy: New file.
2966         * modules/unistr/u16-stpcpy: New file.
2967         * modules/unistr/u32-stpcpy: New file.
2968         * lib/unistr/u8-stpcpy.c: New file.
2969         * lib/unistr/u16-stpcpy.c: New file.
2970         * lib/unistr/u32-stpcpy.c: New file.
2971         * lib/unistr/u-stpcpy.h: New file.
2972
2973         * modules/unistr/u8-stpncpy: New file.
2974         * modules/unistr/u16-stpncpy: New file.
2975         * modules/unistr/u32-stpncpy: New file.
2976         * lib/unistr/u8-stpncpy.c: New file.
2977         * lib/unistr/u16-stpncpy.c: New file.
2978         * lib/unistr/u32-stpncpy.c: New file.
2979         * lib/unistr/u-stpncpy.h: New file.
2980
2981         * modules/unistr/u8-strcat: New file.
2982         * modules/unistr/u16-strcat: New file.
2983         * modules/unistr/u32-strcat: New file.
2984         * lib/unistr/u8-strcat.c: New file.
2985         * lib/unistr/u16-strcat.c: New file.
2986         * lib/unistr/u32-strcat.c: New file.
2987         * lib/unistr/u-strcat.h: New file.
2988
2989         * modules/unistr/u8-strchr: New file.
2990         * modules/unistr/u16-strchr: New file.
2991         * modules/unistr/u32-strchr: New file.
2992         * lib/unistr/u8-strchr.c: New file.
2993         * lib/unistr/u16-strchr.c: New file.
2994         * lib/unistr/u32-strchr.c: New file.
2995
2996         * modules/unistr/u8-strcmp: New file.
2997         * modules/unistr/u16-strcmp: New file.
2998         * modules/unistr/u32-strcmp: New file.
2999         * lib/unistr/u8-strcmp.c: New file.
3000         * lib/unistr/u16-strcmp.c: New file.
3001         * lib/unistr/u32-strcmp.c: New file.
3002
3003         * modules/unistr/u8-strcpy: New file.
3004         * modules/unistr/u16-strcpy: New file.
3005         * modules/unistr/u32-strcpy: New file.
3006         * lib/unistr/u8-strcpy.c: New file.
3007         * lib/unistr/u16-strcpy.c: New file.
3008         * lib/unistr/u32-strcpy.c: New file.
3009         * lib/unistr/u-strcpy.h: New file.
3010
3011         * modules/unistr/u8-strcspn: New file.
3012         * modules/unistr/u16-strcspn: New file.
3013         * modules/unistr/u32-strcspn: New file.
3014         * lib/unistr/u8-strcspn.c: New file.
3015         * lib/unistr/u16-strcspn.c: New file.
3016         * lib/unistr/u32-strcspn.c: New file.
3017         * lib/unistr/u-strcspn.h: New file.
3018
3019         * modules/unistr/u8-strdup: New file.
3020         * modules/unistr/u16-strdup: New file.
3021         * modules/unistr/u32-strdup: New file.
3022         * lib/unistr/u8-strdup.c: New file.
3023         * lib/unistr/u16-strdup.c: New file.
3024         * lib/unistr/u32-strdup.c: New file.
3025         * lib/unistr/u-strdup.h: New file.
3026
3027         * modules/unistr/u8-strlen: New file.
3028         * modules/unistr/u16-strlen: New file.
3029         * modules/unistr/u32-strlen: New file.
3030         * lib/unistr/u8-strlen.c: New file.
3031         * lib/unistr/u16-strlen.c: New file.
3032         * lib/unistr/u32-strlen.c: New file.
3033         * lib/unistr/u-strlen.h: New file.
3034
3035         * modules/unistr/u8-strmblen: New file.
3036         * modules/unistr/u16-strmblen: New file.
3037         * modules/unistr/u32-strmblen: New file.
3038         * lib/unistr/u8-strmblen.c: New file.
3039         * lib/unistr/u16-strmblen.c: New file.
3040         * lib/unistr/u32-strmblen.c: New file.
3041
3042         * modules/unistr/u8-strmbtouc: New file.
3043         * modules/unistr/u16-strmbtouc: New file.
3044         * modules/unistr/u32-strmbtouc: New file.
3045         * lib/unistr/u8-strmbtouc.c: New file.
3046         * lib/unistr/u16-strmbtouc.c: New file.
3047         * lib/unistr/u32-strmbtouc.c: New file.
3048
3049         * modules/unistr/u8-strncat: New file.
3050         * modules/unistr/u16-strncat: New file.
3051         * modules/unistr/u32-strncat: New file.
3052         * lib/unistr/u8-strncat.c: New file.
3053         * lib/unistr/u16-strncat.c: New file.
3054         * lib/unistr/u32-strncat.c: New file.
3055         * lib/unistr/u-strncat.h: New file.
3056
3057         * modules/unistr/u8-strncmp: New file.
3058         * modules/unistr/u16-strncmp: New file.
3059         * modules/unistr/u32-strncmp: New file.
3060         * lib/unistr/u8-strncmp.c: New file.
3061         * lib/unistr/u16-strncmp.c: New file.
3062         * lib/unistr/u32-strncmp.c: New file.
3063
3064         * modules/unistr/u8-strncpy: New file.
3065         * modules/unistr/u16-strncpy: New file.
3066         * modules/unistr/u32-strncpy: New file.
3067         * lib/unistr/u8-strncpy.c: New file.
3068         * lib/unistr/u16-strncpy.c: New file.
3069         * lib/unistr/u32-strncpy.c: New file.
3070         * lib/unistr/u-strncpy.h: New file.
3071
3072         * modules/unistr/u8-strnlen: New file.
3073         * modules/unistr/u16-strnlen: New file.
3074         * modules/unistr/u32-strnlen: New file.
3075         * lib/unistr/u8-strnlen.c: New file.
3076         * lib/unistr/u16-strnlen.c: New file.
3077         * lib/unistr/u32-strnlen.c: New file.
3078         * lib/unistr/u-strnlen.h: New file.
3079
3080         * modules/unistr/u8-strpbrk: New file.
3081         * modules/unistr/u16-strpbrk: New file.
3082         * modules/unistr/u32-strpbrk: New file.
3083         * lib/unistr/u8-strpbrk.c: New file.
3084         * lib/unistr/u16-strpbrk.c: New file.
3085         * lib/unistr/u32-strpbrk.c: New file.
3086         * lib/unistr/u-strpbrk.h: New file.
3087
3088         * modules/unistr/u8-strrchr: New file.
3089         * modules/unistr/u16-strrchr: New file.
3090         * modules/unistr/u32-strrchr: New file.
3091         * lib/unistr/u8-strrchr.c: New file.
3092         * lib/unistr/u16-strrchr.c: New file.
3093         * lib/unistr/u32-strrchr.c: New file.
3094
3095         * modules/unistr/u8-strspn: New file.
3096         * modules/unistr/u16-strspn: New file.
3097         * modules/unistr/u32-strspn: New file.
3098         * lib/unistr/u8-strspn.c: New file.
3099         * lib/unistr/u16-strspn.c: New file.
3100         * lib/unistr/u32-strspn.c: New file.
3101         * lib/unistr/u-strspn.h: New file.
3102
3103         * modules/unistr/u8-strstr: New file.
3104         * modules/unistr/u16-strstr: New file.
3105         * modules/unistr/u32-strstr: New file.
3106         * lib/unistr/u8-strstr.c: New file.
3107         * lib/unistr/u16-strstr.c: New file.
3108         * lib/unistr/u32-strstr.c: New file.
3109         * lib/unistr/u-strstr.h: New file.
3110
3111         * modules/unistr/u8-strtok: New file.
3112         * modules/unistr/u16-strtok: New file.
3113         * modules/unistr/u32-strtok: New file.
3114         * lib/unistr/u8-strtok.c: New file.
3115         * lib/unistr/u16-strtok.c: New file.
3116         * lib/unistr/u32-strtok.c: New file.
3117         * lib/unistr/u-strtok.h: New file.
3118
3119         * modules/unistr/u8-uctomb: New file.
3120         * modules/unistr/u16-uctomb: New file.
3121         * modules/unistr/u32-uctomb: New file.
3122         * lib/unistr/u8-uctomb.c: New file.
3123         * lib/unistr/u16-uctomb.c: New file.
3124         * lib/unistr/u32-uctomb.c: New file.
3125
3126         * MODULES.html.sh (Unicode string functions): Add the new modules.
3127
3128 2007-01-08  Bruno Haible  <bruno@clisp.org>
3129
3130         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
3131         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
3132         subdirectories.
3133
3134 2007-01-08  Karl Berry  <karl@gnu.org>
3135
3136         * doc/error.texi: mention that main() fns must set program_name
3137         when progname is used.
3138
3139 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
3140
3141         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
3142         WCTYPE_H is empty, for the benefit of builds from non-distclean
3143         directories.  Problem reported by Eric Blake in
3144         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
3145
3146 2007-01-08  Bruno Haible  <bruno@clisp.org>
3147
3148         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
3149         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
3150         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
3151         PROVIDE_CANONICALIZE_FILENAME_MODE.
3152         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
3153
3154 2007-01-08  Bruno Haible  <bruno@clisp.org>
3155
3156         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
3157         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
3158         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
3159         * lib/fts.c: Likewise.
3160         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
3161
3162 2006-12-25  Bruno Haible  <bruno@clisp.org>
3163
3164         * modules/utf8-ucs4-safe: New file.
3165         * lib/utf8-ucs4-safe.h: New file.
3166         * lib/unistr/utf8-ucs4-safe.c: New file.
3167
3168         * modules/utf16-ucs4-safe: New file.
3169         * lib/utf16-ucs4-safe.h: New file.
3170         * lib/unistr/utf16-ucs4-safe.c: New file.
3171
3172         * MODULES.html.sh (Unicode string functions): Add the new modules.
3173
3174 2007-01-08  Bruno Haible  <bruno@clisp.org>
3175
3176         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
3177         (Depends-on): Add unitypes.
3178         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
3179         (u8_mbtouc_aux): Move out to separate file.
3180         (u8_mbtouc): Use ucs4_t, uint8_t types.
3181         * lib/unistr/utf8-ucs4.c: New file.
3182
3183         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
3184         (Depends-on): Add unitypes.
3185         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
3186         (u16_mbtouc_aux): Move out to separate file.
3187         (u16_mbtouc): Use ucs4_t, uint16_t types.
3188         * lib/unistr/utf16-ucs4.c: New file.
3189
3190         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
3191         (Depends-on): Add unitypes.
3192         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
3193         (u8_uctomb_aux): Move out to separate file.
3194         (u8_uctomb): Use ucs4_t, uint8_t types.
3195         * lib/unistr/ucs4-utf8.c: New file.
3196
3197         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
3198         (Depends-on): Add unitypes.
3199         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
3200         (u16_uctomb_aux): Move out to separate file.
3201         (u16_uctomb): Use ucs4_t, uint16_t types.
3202         * lib/unistr/ucs4-utf16.c: New file.
3203
3204 2006-12-25  Bruno Haible  <bruno@clisp.org>
3205
3206         * modules/unitypes: New file.
3207         * lib/unitypes.h: New file.
3208         * MODULES.html.sh (func_all_modules): New section "Unicode string
3209         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
3210         this section. Add unitypes.
3211
3212 2007-01-08  Bruno Haible  <bruno@clisp.org>
3213
3214         Avoid variable names that conflict with those from libtool.
3215         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
3216         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
3217         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
3218         library_names_spec to acl_library_names_spec, hardcode_* to
3219         acl_hardcode_*.
3220         Reported by Ralf Wildenhues.
3221
3222 2007-01-08  Bruno Haible  <bruno@clisp.org>
3223
3224         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
3225         definition.
3226         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
3227         definition.
3228         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
3229         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
3230         definition.
3231         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
3232         definition.
3233         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
3234         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
3235         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
3236         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
3237         definition.
3238         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
3239         definition.
3240         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
3241         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
3242         GC_USE_<algorithm>.
3243         * lib/gc-libgcrypt.c: Likewise.
3244         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
3245         * modules/gc-arctwo (configure.ac): Likewise.
3246         * modules/gc-des (configure.ac): Likewise.
3247         * modules/gc-hmac-md5 (configure.ac): Likewise.
3248         * modules/gc-hmac-sha1 (configure.ac): Likewise.
3249         * modules/gc-md2 (configure.ac): Likewise.
3250         * modules/gc-md4 (configure.ac): Likewise.
3251         * modules/gc-md5 (configure.ac): Likewise.
3252         * modules/gc-random (configure.ac): Likewise.
3253         * modules/gc-rijndael (configure.ac): Likewise.
3254         * modules/gc-sha1 (configure.ac): Likewise.
3255
3256 2007-01-08  Bruno Haible  <bruno@clisp.org>
3257
3258         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
3259         macro definition.
3260         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
3261         definition.
3262         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
3263         definition.
3264         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
3265         * modules/fcntl-safer (configure.ac): Likewise.
3266         * modules/fopen-safer (configure.ac): Likewise.
3267         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
3268         GNULIB_FWRITEERROR macro definition.
3269
3270 2007-01-08  Bruno Haible  <bruno@clisp.org>
3271
3272         * m4/gnulib-common.m4: New file.
3273         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
3274         (func_get_filelist): Add m4/gnulib-common.m4.
3275
3276 2007-01-08  Bruno Haible  <bruno@clisp.org>
3277
3278         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
3279         command.
3280
3281 2007-01-08  Jim Meyering  <jim@meyering.net>
3282
3283         Use a more robust test for a "can't happen" condition.
3284         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
3285         narrowed the st_size value.  Presuming the "can't happen" condition
3286         is true, that narrowing could conceivably convert an invalid st_size
3287         value into a valid one.  Instead, use a change based on Matthew
3288         Woehlke's original patch.
3289
3290         Slight readability improvement: use an assert-like macro
3291         in place of literal "abort ()" uses.
3292         * lib/fts.c (fts_assert): Define.
3293         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
3294         Use this macro instead of a bare 'abort'.
3295
3296 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
3297
3298         Don't worry about using IRIX 5.3's wctype.h broken definitions;
3299         simply work around them.
3300         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
3301         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
3302         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before
3303         declaring.
3304         Don't bother to define as macros, since the standard doesn't require it.
3305         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
3306         longer worry about IRIX 5.3.
3307         (HAVE_WCTYPE_CTMP_BUG): Remove.
3308
3309 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
3310
3311         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
3312         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
3313         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
3314         Problems reported by Georg Schwarz for IRIX 5.3.
3315
3316         * gnulib-tool (autoconf_minversion): Take the maximum version number
3317         found, not the minimum.  Problem reported by James Youngman.
3318
3319 2007-01-03  Karl Berry  <karl@gnu.org>
3320
3321         * doc/error.texi: new file, explaining interaction with progname.
3322         * doc/gnulib.texi: include it.  Update copyright.
3323
3324 2007-01-03  Simon Josefsson  <simon@josefsson.org>
3325
3326         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
3327         AC_CANONICAL_HOST, to improve autobuild outputs.
3328
3329 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
3330             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
3331
3332         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
3333         sockets, server sockets, and other file descriptors.  Count errors
3334         to compute the return value.  Reorder the code a bit to be easier
3335         to follow.  Don't set event bits that were not requested (except
3336         POLLERR and POLLHUP).
3337
3338 2007-01-01  Bruno Haible  <bruno@clisp.org>
3339
3340         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
3341
3342 2007-01-03  Jim Meyering  <jim@meyering.net>
3343
3344         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
3345
3346 2007-01-02  Bruno Haible  <bruno@clisp.org>
3347
3348         * modules/settime (Include): Require timespec.h.
3349         * modules/nanosleep (Include): Likewise.
3350
3351 2007-01-01  Bruno Haible  <bruno@clisp.org>
3352
3353         * gnulib-tool (func_emit_copyright_notice): Bump year.
3354         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
3355
3356 2007-01-01  Bruno Haible  <bruno@clisp.org>
3357
3358         Improve support for OpenBSD.
3359         * build-aux/config.rpath (libname_spec): Export.
3360         (library_names_spec): New variable. Export.
3361         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
3362         library_names_spec from the config.rpath output. Locate shared library
3363         through the name pattern in library_names_spec.
3364
3365 2007-01-01  Eric Blake  <ebb9@byu.net>
3366
3367         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
3368
3369 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
3370
3371         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
3372         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
3373         assume the C locale, and avoid an "eval" that could cause trouble.
3374         Problem with SORT reported by Bob Proulx.
3375
3376         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
3377         Define.  Trivial patch from Henning Nielsen Lund, originally
3378         sent to bug-grep@gnu.org today.
3379
3380 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
3381
3382         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
3383         struct stat.  Problem reported by Henning Nielsen Lund.
3384         * lib/acl.c: Include acl.h first, to check interface.  Don't
3385         bother to include sys/types.h and sys/stat.h again.
3386
3387 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
3388
3389         Import the following change from libc; problem reported by
3390         Sven Verdoolaege.
3391
3392         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
3393
3394         [BZ #1373]
3395         * lib/argp.h: Remove __NTH for __argp_usage inline function.
3396
3397 2006-12-28  Jim Meyering  <jim@meyering.net>
3398
3399         * build-aux/announce-gen: Do not assume that the package
3400         builds any of tar.gz, tar.bz2, and .xdelta files.
3401         Suggestion from Simon Josefsson.
3402
3403 2006-12-28  Simon Josefsson  <simon@josefsson.org>
3404
3405         * modules/announce-gen: New file.
3406
3407 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
3408
3409         * lib/mbchar.h: Just include <wctype.h>; the wctype module
3410         handles its gotchas now.
3411         * lib/mbswidth.c: Likewise.
3412         * lib/wcwidth.h: Likewise.
3413         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
3414         and iswcntrl; the wctype module does this stuff now.
3415         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
3416         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
3417         * modules/mbchar (Depends-on): Add wctype.
3418         * modules/mbswidth (Depends-on): Likewise.
3419         * modules/wcwidth (Depends-on): Likewise.
3420
3421 2006-12-27  Eric Blake  <ebb9@byu.net>
3422
3423         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
3424         module uses more than what <wctype.h> is required to provide.
3425
3426 2006-12-26  Eric Blake  <ebb9@byu.net>
3427
3428         * gnulib-tool (sed_extract_prog): Avoid space-tab.
3429
3430 2006-12-26  Eric Blake  <ebb9@byu.net>
3431
3432         * modules/absolute-header: New module.
3433         * modules/fcntl (Depends-on): Depend on it.
3434         * modules/inttypes (Depends-on): Likewise.
3435         * modules/stdint (Depends-on): Likewise.
3436         * modules/sys_stat (Depends-on): Likewise.
3437         * modules/wctype (Depends-on): Likewise.
3438         * MODULES.html.sh (Support for building libraries and
3439         executables): Document it.
3440
3441 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
3442
3443         * gnulib-tool (SED): Remove, undoing previous change.
3444         The problem was that it broke coreutils on Solaris, because
3445         "sed --posix" leaked into a makefile.
3446         (sed): New alias, if 'alias' and GNU sed.
3447
3448 2006-12-24  Jim Meyering  <jim@meyering.net>
3449
3450         Work around an fchownat bug in glibc-2.4:
3451         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
3452         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
3453         in spite of the -P option.
3454         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
3455         New macros.
3456         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
3457         * modules/openat (Files): Add lib/fchownat.c.
3458         * lib/openat.c (fchownat): Don't define here.  Move to...
3459         * lib/fchownat.c: ...this new file.
3460
3461 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
3462
3463         Fix bug reported by Bruno Haible in
3464         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
3465         where quotearg.c didn't compile on Mac OS X 10.2 because it
3466         lacks <wchar.h> and wint_t.
3467         * lib/wctype_.h (__wctype_wint_t): New type.
3468         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
3469         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
3470         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
3471         Arg is now of type __wctype_wint_t, not wint_t.
3472         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
3473         substitute HAVE_WINT_T.
3474         * modules/wctype (Files): Add m4/wint_t.m4.
3475         (wctype.h): Substitute HAVE_WINT_T.
3476
3477 2006-12-23  Bruno Haible  <bruno@clisp.org>
3478
3479         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
3480
3481 2006-12-23  Bruno Haible  <bruno@clisp.org>
3482
3483         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
3484         S_ISLNK.
3485         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
3486         mingw.
3487
3488 2006-12-22  Bruno Haible  <bruno@clisp.org>
3489
3490         * lib/copy-file.c: Include acl.h.
3491         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
3492         Close the file descriptors only after being done with copy_acl.
3493         * modules/copy-file (Depends-on): Add acl.
3494
3495 2006-12-22  Bruno Haible  <bruno@clisp.org>
3496
3497         * gnulib-tool (SED): New variable.
3498         Use $SED instead of sed everywhere.
3499
3500 2006-12-22  Bruno Haible  <bruno@clisp.org>
3501
3502         * modules/no-c++: New file.
3503         * m4/no-c++.m4: New file.
3504         * MODULES.html.sh (Support for building libraries and executables):
3505         Add no-c++.
3506
3507 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
3508
3509         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
3510         Include <limits.h>, and use its INT_MAX to rewrite the
3511         j loop so that it does not overflow 'int'.  Problem reported by
3512         Ralf Wildenhues in
3513         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
3514         Play it safe by shifting left by 1 rather than multiplying by 2,
3515         as GCC is less likely to optimize this away when the value
3516         is signed (when it assumes overflow leads to undefined behavior).
3517         Also, don't assume time_t uses two's complement.
3518
3519 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
3520
3521         * MODULES.html.sh: New module wctype.
3522         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
3523         * lib/fnmatch.c: Don't bother to include <wchar.h> before
3524         <wctype.h>, since the new wctype module should fix this.
3525         * lib/quotearg.c: Include <wctype.h> unconditionally, since
3526         the wctype module should arrange for it.
3527         * lib/regex_internal.h: Likewise.
3528         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
3529         since the wctype module should handle this now.
3530         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
3531         * modules/fnmatch (Depends-on): Add wctype.
3532         * modules/quotearg (Depends-on): Likewise.
3533         * modules/regex (Depends-on): Likewise.
3534
3535 2006-12-19  Bruno Haible  <bruno@clisp.org>
3536
3537         * lib/strdup.h [C++]: Wrap definitions in extern "C".
3538         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
3539
3540 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3541
3542         * modules/savewd (Depends-on): Fix dependency on fcntl.
3543
3544 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
3545
3546         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
3547         conforms to C99, rather than relying on the user's environment
3548         setting of STDINT_H.
3549
3550 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
3551         and Eric Blake  <ebb9@byu.net>
3552
3553         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
3554         This is more consistent with the other defines here.
3555         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
3556         Port to z/OS.  Problem reported by Paul Gilmartin.
3557         Change local vars to use gl_ prefix rather than ac_.
3558         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
3559         with other defines.
3560         * modules/double-slash-root: New module.
3561         * modules/dirname (Files): Remove m4/double-slash-root.m4.
3562         (Depends-on): Add double-slash-root.
3563         * MODULES.html.sh (File system functions): Mention new module.
3564
3565 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
3566
3567         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
3568         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
3569         This is for the benefit of gzip, which doesn't do i18n.
3570
3571 2006-12-12  Jim Meyering  <jim@meyering.net>
3572
3573         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
3574         Reported by Andreas Schwab <schwab@suse.de>.
3575
3576 2006-12-12  Bruno Haible  <bruno@clisp.org>
3577
3578         Merge these changes.
3579         2006-09-05  Bruno Haible  <bruno@clisp.org>
3580         * lib/iconvme.c (iconv_string): No need to save and restore errno when
3581         iconv_alloc succeeded.
3582         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
3583         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
3584         test for " && dest " at the end - dest is always != NULL there. Call
3585         iconv with 4xNULL arguments initially, to reset the state. Call iconv
3586         with 2xNULL arguments, also to flush the state storage. Handle the
3587         IRIX iconv behaviour. Realloc the final result, to throw away unused
3588         memory.
3589
3590 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
3591
3592         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
3593         and fchmodat unconditionally, since glibc 2.4 has them.
3594         Problem reported by Arkadiusz Miskiewicz.
3595
3596 2006-12-10  Bruno Haible  <bruno@clisp.org>
3597
3598         * gnulib-tool (func_import): Show the include files only for those
3599         modules that are copied and specified.
3600         Reported by Karl Berry.
3601
3602 2006-12-08  Jim Meyering  <jim@meyering.net>
3603
3604         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
3605         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
3606
3607         * build-aux/announce-gen: Add two new options, both optional:
3608         --bootstrap-tools=TOOL_LIST
3609               a comma-separated list of tools, e.g.,
3610               autoconf,automake,bison,gnulib
3611         --gnulib-snapshot-date=DATE
3612               if gnulib is in the bootstrap tool list,
3613               then report this as the snapshot date.
3614               If not specified, use the current date/time.
3615               If you specify a date here, be sure it's UTC.
3616
3617 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3618
3619         * tests/test-argp-2.sh: Fix test to match actual output.
3620         (func_compare): Fix sed script to be portable.
3621
3622 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
3623
3624         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
3625         workaround for this case.  It is not autoconfigured now; offhand
3626         it's hard to see how to autoconfigure it.
3627
3628 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
3629
3630         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
3631         a directory that is about to be chowned.  Such a directory's
3632         initial file permissions should permit the owner only and this
3633         should not be changed until after the chown, since the group and
3634         other bits would be incorrect if they granted permission before
3635         the chown.
3636
3637         Fix porting problem for iswctype reported by Georg Schwarz in:
3638         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
3639         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
3640         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
3641         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
3642         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
3643
3644 2006-12-03  Jim Meyering  <jim@meyering.net>
3645
3646         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
3647         p->fts_statp may not yet be defined.
3648         (fts_read): Instead, set it in the caller, once p->fts_statp is
3649         sure to be defined, and corresponds to a top-level directory.
3650         This bug made du -x fail.  Here's the coreutils test case:
3651         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
3652         Reported by Mike Frysinger.
3653
3654 2006-12-01  Jim Meyering  <jim@meyering.net>
3655
3656         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
3657         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
3658         Reported by Simon Josefsson.
3659
3660 2006-11-30  Jim Meyering  <jim@meyering.net>
3661
3662         * m4/warning.m4: Use the all-permissive copyright notice
3663         recommended by RMS (rather than LGPL).
3664         * m4/vararrays.m4: Likewise.
3665         * m4/flexmember.m4: Likewise.
3666
3667 2006-11-29  Bruno Haible  <bruno@clisp.org>
3668
3669         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
3670         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
3671         using +=.
3672         Reported by Simon Josefsson <simon@josefsson.org>.
3673
3674 2006-11-28  James Youngman <jay@gnu.org>
3675
3676         * README: Advise users that they might find the bug-gnulib@gnu.org
3677         and autotools-announce@gnu.org mailing lists useful.
3678
3679 2006-11-28  Bruno Haible  <bruno@clisp.org>
3680
3681         * m4/ptrdiff_max.m4: Remove file.
3682
3683 2006-11-21  Bruno Haible  <bruno@clisp.org>
3684
3685         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
3686         _AC_COMPUTE_INT.
3687         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
3688         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
3689         _AC_COMPUTE_INT.
3690         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
3691         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
3692         _AC_COMPUTE_INT.
3693         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
3694
3695 2006-11-28  Jim Meyering  <jim@meyering.net>
3696
3697         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
3698         warning from "gcc -Wshadow" about shadowing the builtin.
3699
3700 2006-11-27  Bruno Haible  <bruno@clisp.org>
3701
3702         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
3703         _AC_COMPUTE_INT.
3704         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
3705
3706 2006-11-27  Bruno Haible  <bruno@clisp.org>
3707             Paul Eggert  <eggert@cs.ucla.edu>
3708
3709         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
3710
3711 2006-11-26  Bruno Haible  <bruno@clisp.org>
3712
3713         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
3714         noinst_LTLIBRARIES.
3715
3716 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
3717             Bruno Haible  <bruno@clisp.org>
3718
3719         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
3720         if compiling with "gcc -ansi".
3721
3722 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
3723
3724         Fix some incompatibilities with gcc -ansi -pedantic.
3725         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
3726         if compiling pedantically with GCC, unless it's C99 or later.
3727         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
3728         it mishandles gcc -ansi -pedantic as well.
3729         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
3730         if gcc -pedantic.
3731         * lib/regexec.c (check_node_accept_bytes): Don't use auto
3732         initializers for struct if -pedantic, unless it's C99 or later.
3733
3734 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
3735
3736         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
3737         Don't close an fd more than once. Identical atimes indicate
3738         success, not failure.
3739
3740 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
3741
3742         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
3743
3744 2006-11-23  Jim Meyering  <jim@meyering.net>
3745
3746         * build-aux/announce-gen: New file.  From coreutils.
3747
3748 2006-11-22  Jim Meyering  <jim@meyering.net>
3749
3750         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
3751         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
3752         (fts_read): Use a temporary to narrow the overused st_size member
3753         before using it in a switch statement.  Reported by Matthew Woehlke.
3754
3755         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
3756         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
3757
3758 2006-11-20  Bruno Haible  <bruno@clisp.org>
3759
3760         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
3761         changequote instead of pairs of brackets.
3762         Reported by Andreas Schwab <schwab@suse.de>.
3763
3764 2006-11-21  Jim Meyering  <jim@meyering.net>
3765
3766         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
3767         so as to remain compatible with older compilers.
3768         Patch from Michael Deutschmann.
3769
3770 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
3771
3772         * MODULES.html.sh (File system functions): Add openat.
3773
3774         * lib/openat.h (rpl_fstatat): New macro, if
3775         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
3776         (fstatat): Define to rpl_fstatat under the same conditions,
3777         unless COMPILING_FSTATAT.
3778         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
3779         seems to have the bug.
3780         * lib/fstatat.c: New file.
3781         * modules/openat (Files): Add it.
3782
3783 2006-11-20  Bruno Haible  <bruno@clisp.org>
3784
3785         * Makefile: New file.
3786
3787 2006-11-20  Jim Meyering  <jim@meyering.net>
3788
3789         The beginnings of syntax-related checks for gnulib.
3790         * lib/Makefile: New file.
3791         * lib/t-idcache: New script.  Ensure that the two halves of
3792         idcache.c stay in sync.
3793
3794         * lib/idcache.c: Adjust comments in user- and group- portions to
3795         be more accurate, and to be consistent with one another.
3796
3797 2006-11-20  Jim Meyering  <jim@meyering.net>
3798
3799         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
3800         continue using the flexible array member (thus, this module performs
3801         half as many malloc calls), with the addition that...
3802         (getgroup, getuser): Consistently record a non-match via an empty
3803         "name" string, and map an empty string match to a NULL return value.
3804         * modules/idcache (Depends-on): Re-add flexmember.
3805
3806         * lib/idcache.c (getuser): Remove all uses of the register keyword.
3807         (getuidbyname, getgroup, getgidbyname): Likewise.
3808
3809         Use cleaner syntax: NULL rather than 0.
3810         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
3811
3812 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
3813
3814         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
3815         It mishandled the case where the group was missing.
3816         Problem reported by Greg Schafer.
3817         * modules/idcache: Likewise.
3818
3819 2006-11-18  Jim Meyering  <jim@meyering.net>
3820
3821         * check-module (%exempt_header): Add exception for some
3822         conditionally-included headers.
3823
3824         * modules/i-ring (Depends-on): Add verify.
3825         (License): Change to LGPL.
3826
3827 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
3828
3829         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
3830         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
3831         and inttostr.h.  Use snprintf rather than uinttostr, so that
3832         LGPLed code doesn't depend on GPLed.
3833
3834 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
3835
3836         * modules/inline (License): Change from GPL to LGPL.
3837
3838 2006-11-17  Jim Meyering  <jim@meyering.net>
3839
3840         * modules/d-type (License): Switch to LGPL.
3841
3842 2006-11-15  Bruno Haible  <bruno@clisp.org>
3843
3844         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
3845
3846 2006-11-15  Eric Blake  <ebb9@byu.net>
3847
3848         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
3849         the module dependency.
3850
3851 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
3852             Bruno Haible  <bruno@clisp.org>
3853
3854         * gnulib-tool (func_create_testdir): Add license consistency check.
3855
3856 2006-11-15  Eric Blake  <ebb9@byu.net>
3857
3858         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
3859         random "(cached)" in configure output.
3860
3861 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3862
3863         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
3864         test for conforming inttypes.h is both announced and cached.
3865
3866         * MODULES.html.sh (seen_modules, seen_files): New variables.
3867         (func_module): Rewrite to use a few less gnulib-tool and sed
3868         invocations.  Avoid a couple of quadratic algorithms for ...
3869         (missed_modules, missed_files): ... these, with ...
3870         (func_append, func_tmpdir): ... these new functions, from
3871         gnulib-tool.  Analogously, install traps for cleanup.
3872
3873         * tests/test-gc.c (main): Remove unused variables.
3874         * tests/test-read-file.c: Include stdlib.h, for 'free'.
3875
3876 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
3877
3878         * modules/inttostr (License): Change to LGPL.
3879
3880 2006-11-14  Eric Blake  <ebb9@byu.net>
3881
3882         * modules/tempname (License): Change to LGPL.
3883
3884 2006-11-14  Eric Blake  <ebb9@byu.net>
3885
3886         * doc/functions.texi (Function Portability): *printf functions on
3887         Cygwin now understand all POSIX size specifiers.
3888
3889 2006-11-14  Bruno Haible  <bruno@clisp.org>
3890
3891         * modules/c-ctype (License): Change to LGPL.
3892
3893 2006-11-12  Bruno Haible  <bruno@clisp.org>
3894
3895         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
3896         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
3897         for GNOME libraries, for which the include files are installed in
3898         subdirectories of $prefix/include.
3899
3900 2006-11-12  Bruno Haible  <bruno@clisp.org>
3901
3902         * m4/lib-link.m4: Require at least autoconf-2.54.
3903         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
3904         name to underscores for the --with option.
3905
3906 2006-11-13  Bruno Haible  <bruno@clisp.org>
3907
3908         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
3909         the tests directory.
3910         Reported by Ralf Wildenhues.
3911
3912 2006-11-13  Bruno Haible  <bruno@clisp.org>
3913
3914         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
3915         (func_emit_initmacro_end): Undo the override here.
3916         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
3917         Works around the famous automake error in coreutils.
3918
3919 2006-11-13  Eric Blake  <ebb9@byu.net>
3920
3921         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
3922         element, not its node.
3923
3924 2006-11-12  Bruno Haible  <bruno@clisp.org>
3925
3926         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
3927         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
3928
3929 2006-11-12  Bruno Haible  <bruno@clisp.org>
3930
3931         * gnulib-tool: New option --local-symlink.
3932         (func_usage): Document it.
3933         (lsymbolic): New variable.
3934         (func_import, func_create_testdir): If --symlink was not specified,
3935         test whether --local-symlink was specified and the file comes from
3936         the local_gnulib_dir.
3937
3938 2006-11-12  Bruno Haible  <bruno@clisp.org>
3939
3940         * gnulib-tool (func_ln): New function.
3941         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
3942
3943 2006-11-12  Bruno Haible  <bruno@clisp.org>
3944
3945         Finish support for source files in subdirectories.
3946         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
3947         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
3948         AUTOMAKE_OPTIONS.
3949         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
3950
3951 2006-11-12  Bruno Haible  <bruno@clisp.org>
3952
3953         * gnulib-tool (func_get_automake_snippet): Synthesize also an
3954         EXTRA_lib_SOURCES augmentation.
3955         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
3956
3957 2006-11-12  Jim Meyering  <jim@meyering.net>
3958
3959         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
3960         file descriptors.  This also averts a failure on systems with
3961         native openat support when a traversed directory lacks "x" access.
3962         * lib/fts_.h: Include "i-ring.h"
3963         (struct FTS) [fts_fd_ring]: New member.
3964         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
3965         (FCHDIR): Add parentheses.
3966         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
3967         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
3968         When descending, rather than simply closing the previous
3969         fts_cwd_fd value, push that file descriptor onto the ring.
3970         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
3971         (fts_open): Initialize the new fd_ring member.
3972         (fts_close): Clear the ring.
3973         (fts_safe_changedir): When possible, use our new fd_ring to skip
3974         the diropen and fstat and dev/ino comparison that would normally
3975         accompany a virtual `chdir ("..")'.
3976
3977         * modules/fts (Depends-on): Add i-ring.
3978         * modules/i-ring: New module.
3979         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
3980         * m4/i-ring.m4: New file.
3981
3982 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3983
3984         * gnulib-tool (func_create_testdir): Fix replacement of
3985         `build-aux' in configure.ac.  Run autotools in gltests
3986         subdirectory.
3987         (func_create_testdir, func_create_megatestdir, test): There is
3988         no need for '--force' in most autotool invocations in a new
3989         tree.  Actually fail the whole test if any of the tools, or the
3990         configure or make stages fail.
3991
3992         Sync from Automake.
3993         * build-aux/gnupload: Revert last change.  Add pointer to upload
3994         instructions of the GNU Maintenance Instructions.
3995         Suggestion by Karl Berry.
3996
3997 2006-11-10  Jim Meyering  <jim@meyering.net>
3998
3999         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
4000
4001 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
4002
4003         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
4004         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
4005         (bind_textdomain_codeset) [! ENABLE_NLS]:
4006         Evaluate all the arguments.  That way, callers get compatible behavior
4007         if the arguments have side effects.  Also, it avoids some GCC
4008         diagnostics in some cases; Joel E. Denny reported problems when Bison
4009         was configured with --enable-gcc-warnigs.
4010
4011 2006-11-10  Jim Meyering  <jim@meyering.net>
4012
4013         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
4014         relevant options in CFLAGS (like -O, -fno-inline) are taken into
4015         account.
4016
4017 2006-11-10  Jim Meyering  <jim@meyering.net>
4018
4019         * modules/inline: New file/module.
4020         * modules/xalloc (Files): Remove m4/inline.m4.
4021         (Depends-on): Add inline, instead.
4022         * modules/oset: Likewise.
4023         * modules/list: Likewise.
4024
4025 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
4026
4027         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
4028         Problem reported by Matthew Woehlke.
4029
4030 2006-11-09  Bruno Haible  <bruno@clisp.org>
4031
4032         * lib/tempname.c (gen_tempname): Remove variant that invokes
4033         __gen_tempname.
4034         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
4035         __gen_tempname.
4036
4037 2006-11-08  Bruno Haible  <bruno@clisp.org>
4038
4039         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
4040         to 'yes' instead of 'cross-compiling'.
4041
4042 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
4043
4044         * lib/quotearg.h (quotearg_free): New decl.
4045         * lib/quotearg.c (quotearg_free): New function.
4046         (slot0, nslots, slotvec0, slotvec):
4047         Now file-scope so that quotearg_free can get at them.
4048
4049 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4050
4051         Sync from Automake.
4052         * build-aux/gnupload: Add missing 'gnu' to example URL.
4053         Report by Karl Berry.
4054
4055 2006-11-08  Bruno Haible  <bruno@clisp.org>
4056
4057         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
4058         Suggested by Paul Eggert.
4059
4060 2006-11-08  Jim Meyering  <jim@meyering.net>
4061
4062         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
4063         It's already included if !_LIBC.
4064         (fts_safe_changedir): Add a comment.
4065
4066 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
4067
4068         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
4069         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
4070         Matthew Woehlke.
4071
4072         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
4073         definitions up, to avoid colliding with change below.
4074         (static_inline) [HAVE_INLINE]: New macro.
4075         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
4076         Provide extern decls when !HAVE_INLINE.  Do not define unless
4077         static_inline is defined, either by us or by xmalloc.c.  Use
4078         static_inline rather than static inline.
4079         (XCALLOC): Optimize sizeof(T) = 1 case.
4080         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
4081
4082 2006-11-07  Bruno Haible  <bruno@clisp.org>
4083
4084         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
4085         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
4086         AC_C_INLINE.
4087         * modules/xalloc (Files): Add m4/inline.m4.
4088
4089 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4090
4091         * README: Fix typo.
4092         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
4093         (Miscellanous Notes): ...from this.
4094
4095 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
4096
4097         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
4098         Mention that offsetof should be used instead of sizeof.
4099         From Bruno Haible.
4100
4101 2006-11-07  Bruno Haible  <bruno@clisp.org>
4102
4103         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
4104
4105 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
4106
4107         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
4108         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
4109         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
4110         (gl_tree_add_before, gl_tree_add_after):
4111         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
4112         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
4113         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
4114         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
4115         (gl_linked_add_after, gl_linked_add_at): Likewise.
4116         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
4117         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
4118         (gl_tree_add_before, gl_tree_add_after): Likewise.
4119         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
4120         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
4121         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
4122
4123 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4124
4125         * lib/gl_oset.h: Use C comment style, not C++ comment style.
4126
4127 2006-11-06  Bruno Haible  <bruno@clisp.org>
4128
4129         * m4/inline.m4: New file.
4130         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
4131         * modules/list (Files): Add m4/inline.m4.
4132         * modules/oset (Files): Likewise.
4133
4134 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
4135
4136         * lib/idcache.c: Include <stddef.h>, for offsetof.
4137         (struct userid.name): Change from char * to a flexible array member.
4138         All uses changed.
4139         * modules/idcache (Depends-on): Add flexmember.
4140
4141         * MODULES.html.sh (Core language properties): New module flexmember.
4142         * modules/flexmember, m4/flexmember.m4: New files.
4143
4144         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
4145         inline functions that are identical with the old xnmalloc_inline,
4146         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
4147         that we can avoid some unnecessary integer multiplications and
4148         divisions in the common case where the element size is known at
4149         compile time.
4150         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
4151         needed.
4152         (xnboundedmalloc): Remove.
4153         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
4154         arguments, for consistency with rest of this header.
4155         (xcharalloc): Rewrite using XNMALLOC.
4156         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
4157         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
4158         versions have been moved to lib/xalloc.h and renamed to be the
4159         non-*_inline versions.
4160         (xmalloc, xrealloc): Implement without reference to the xnmalloc
4161         and xnrealloc functions, since those functions are now inline and
4162         now call us.
4163         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
4164         renaming described above.
4165         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
4166         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
4167         captures the dependency in AC_C_INLINE.
4168
4169         New module canonicalize-lgpl, proposed by Charles Wilson in
4170         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
4171         with a few small changes afterwards.
4172         * MODULES.html.sh (File system functions): New module
4173         canonicalize-lgpl.
4174         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
4175         and canonicalize_file_name.
4176         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
4177         * modules/canonicalize-lgpl: New files.
4178
4179 2006-11-05  Bruno Haible  <bruno@clisp.org>
4180
4181         * gnulib-tool (func_import, func_create_testdir): Create directories
4182         also for files in subdirectories of lib/.
4183
4184 2006-11-05  Bruno Haible  <bruno@clisp.org>
4185
4186         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
4187         ANSI C compliant.
4188
4189 2006-11-03  Bruno Haible  <bruno@clisp.org>
4190
4191         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
4192         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
4193         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
4194         (xnboundedmalloc): New inline function.
4195         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
4196         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
4197         xmalloc.
4198         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
4199         xmalloc.
4200         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
4201         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
4202         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
4203         xmalloc.
4204         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
4205         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
4206         xmalloc.
4207         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
4208         gl_tree_add_after): Use XMALLOC instead of xmalloc.
4209         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
4210         xmalloc.
4211         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
4212         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
4213         gl_tree_add_after): Use XMALLOC instead of xmalloc.
4214         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
4215         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
4216         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
4217         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
4218
4219 2006-11-03  Bruno Haible  <bruno@clisp.org>
4220
4221         * lib/c-ctype.h [C++]: Define functions without name mangling.
4222         * lib/fwriteerror.h [C++]: Likewise.
4223         * lib/gcd.h [C++]: Likewise.
4224         * lib/linebreak.h [C++]: Likewise.
4225
4226 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
4227
4228         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
4229         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
4230         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
4231         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
4232         Check for functions and headers just once.
4233         Check for declaration of canonicalize_file_name.
4234         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
4235
4236 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
4237
4238         * gnulib-tool (func_import): Fix typo in actioncmd.
4239
4240 2006-11-02  Bruno Haible  <bruno@clisp.org>
4241
4242         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
4243         newline sequence in the Makefile.am snippet as a space, like "make"
4244         does.
4245         Reported by Roger Persson <perrog@gmail.com>.
4246
4247 2006-11-01  Bruno Haible  <bruno@clisp.org>
4248
4249         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
4250         already declared in <string.h>.
4251         * lib/strcase.h (strncasecmp): Don't declare it if yes.
4252
4253 2006-11-01  Bruno Haible  <bruno@clisp.org>
4254
4255         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
4256         * lib/strcase.h: Include <string.h>.
4257         (strcasecmp): Define to rpl_strcasecmp here.
4258
4259 2006-11-01  Bruno Haible  <bruno@clisp.org>
4260
4261         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
4262
4263 2006-11-01  Eric Blake  <ebb9@byu.net>
4264
4265         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
4266
4267         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
4268
4269 2006-10-29  Bruno Haible  <bruno@clisp.org>
4270
4271         Make it compile in C++ mode.
4272         * lib/full-write.c (full_rw): Add a cast.
4273
4274 2006-11-01  Bruno Haible  <bruno@clisp.org>
4275
4276         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
4277         be POSIX compliant.
4278         Reported by Roger Persson <perrog@gmail.com>.
4279
4280 2006-11-01  Eric Blake  <ebb9@byu.net>
4281
4282         * lib/getopt_.h: Fix comments.
4283
4284 2006-10-31  Eric Blake  <ebb9@byu.net>
4285
4286         * modules/tmpdir (Depends-on): Add sys_stat.
4287         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
4288         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
4289         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
4290         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
4291         tempname.
4292
4293 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
4294
4295         Avoid some C++ diagnostics reported by Bruno Haible.
4296         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
4297         xmalloc.
4298         (quotearg_alloc): Use xcharalloc rather than xmalloc.
4299         (struct slotvec): Move to top level.
4300         (quotearg_n_options): Rewrite to avoid xmalloc.
4301         * lib/xalloc.h (xcharalloc): New function.
4302         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
4303         [defined __cplusplus]: Add function template that provides result
4304         type propagation.  This part of the change is from Bruno Haible.
4305
4306 2006-10-29  Bruno Haible  <bruno@clisp.org>
4307
4308         Make it compile in C++ mode.
4309         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
4310         * lib/strnlen1.c (strnlen1): Cast memchr result.
4311         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
4312         * lib/clean-temp.c (string_equals, string_hash): Add casts.
4313         (create_temp_dir): Rename local variable 'template'.
4314         (compile_csharp_using_sscli): Add cast.
4315         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
4316         * lib/findprog.c (find_in_path): Likewise.
4317         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
4318         * lib/wait-process.c (register_slave_subprocess): Likewise.
4319
4320 2006-10-22  Bruno Haible  <bruno@clisp.org>
4321
4322         * modules/tsearch: New file.
4323         * lib/tsearch.h: New file.
4324         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
4325         * m4/tsearch.m4: New file.
4326         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
4327
4328 2006-10-29  Eric Blake  <ebb9@byu.net>
4329
4330         * lib/arcfour.c: Assume config.h.
4331         * lib/arctwo.c: Likewise.
4332         * lib/base64.c: Likewise.
4333         * lib/check-version.c: Likewise.
4334         * lib/crc.c: Likewise.
4335         * lib/des.c: Likewise.
4336         * lib/gc-gnulib.c: Likewise.
4337         * lib/gc-libgcrypt.c: Likewise.
4338         * lib/gc-pbkdf2-sha1.c: Likewise.
4339         * lib/getaddrinfo.c: Likewise.
4340         * lib/getdelim.c: Likewise.
4341         * lib/getline.c: Likewise.
4342         * lib/hmac-md5.c: Likewise.
4343         * lib/hmac-sha1.c: Likewise.
4344         * lib/iconvme.c: Likewise.
4345         * lib/md2.c: Likewise.
4346         * lib/md4.c: Likewise.
4347         * lib/memxor.c: Likewise.
4348         * lib/read-file.c: Likewise.
4349         * lib/readline.c: Likewise.
4350         * lib/rijndael-alg-fst.c: Likewise.
4351         * lib/rijndael-api-fst.c: Likewise.
4352         * lib/xgetdomainname.c: Likewise.
4353
4354 2006-10-28  Eric Blake  <ebb9@byu.net>
4355
4356         * lib/xstrndup.c: Assume config.h.
4357
4358 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
4359
4360         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
4361         stat-macros.h is now for our own macros, whereas stat_h is for
4362         macros in the <sys/stat.h> name space.
4363         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
4364         (STAT_MACROS_H): Remove.
4365         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
4366         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
4367         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
4368         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
4369         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
4370         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
4371         Move these macros to ...
4372         * lib/stat_.h: here.  Don't include stat-macros.h.
4373         * lib/canonicalize.c: Don't include stat-macros.h.
4374         * lib/chown.c: Likewise.
4375         * lib/euidaccess.c: Likewise.
4376         * lib/file-type.c: Likewise.
4377         * lib/filemode.c: Likewise.
4378         * lib/glob.c: Likewise.
4379         * lib/isapipe.c: Likewise.
4380         * lib/lchown.c: Likewise.
4381         * lib/lstat.c: Likewise.
4382         * lib/mkdir-p.c: Likewise.
4383         * lib/rmdir.c: Likewise.
4384         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
4385         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
4386         unless mkdir isn't declared, to speed up 'configure'.
4387         Always create sys/stat.h, since it's unlikely any real sys/stat.h
4388         would define all the S_* symbols.
4389         * modules/canonicalize (Depends-on):
4390         Depend on sys_stat, not stat-macros.
4391         * modules/chown: Likewise.
4392         * modules/euidaccess: Likewise.
4393         * modules/filemode: Likewise.
4394         * modules/file-type: Likewise.
4395         * modules/glob: Likewise.
4396         * modules/isapipe: Likewise.
4397         * modules/lchown: Likewise.
4398         * modules/lstat: Likewise.
4399         * modules/mkancesdirs: Likewise.
4400         * modules/rmdir: Likewise.
4401         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
4402         * modules/modechange: Likewise.
4403         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
4404         (configure.ac): Remove gl_STAT_MACROS.
4405         * modules/sys_stat (Depends-on): Remove stat-macros.
4406
4407 2006-10-27  Bruno Haible  <bruno@clisp.org>
4408
4409         * m4/signed.m4: Remove file.
4410         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
4411         invocation.
4412         * modules/vasnprintf (Files): Remove m4/signed.m4.
4413
4414 2006-10-27  Bruno Haible  <bruno@clisp.org>
4415
4416         Update to GNU gettext 0.16.
4417         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
4418         m4/inttypes-h.m4, m4/signed.m4.
4419         * m4/gettext.m4: Update to GNU gettext 0.16.
4420         * m4/intl.m4: New file, from GNU gettext.
4421         * m4/intldir.m4: New file, from GNU gettext.
4422         * config/srclist.txt: Update
4423
4424 2006-10-27  Eric Blake  <ebb9@byu.net>
4425
4426         * MODULES.html.sh: Document tempname.
4427         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
4428         dependencies.
4429         (Files): Move lib/tempname.c...
4430         * modules/tempname: ...to this new module.
4431         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
4432         (gl_PREREQ_TEMPNAME): Move...
4433         * m4/tempname.m4: ...to this new file.
4434         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
4435         * modules/sys_stat (Depends-on): Add stat-macros.
4436         * lib/stat_.h (includes): Pick up stat macros.
4437         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
4438         if stat macros are broken.
4439         * lib/tempname.c (includes): No need to include "stat-macros.h".
4440         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
4441         (direxists, __path_search) [!_LIBC]: Don't compile these in
4442         gnulib; the tmpdir module covers that.
4443         * lib/tempname.h: New file.
4444
4445 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
4446
4447         * COPYING: Explain how gnulib-tool converts licence headers.
4448         Almost all wording by Eric Blake.
4449
4450 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
4451
4452         * lib/mbchar.h (is_basic_table): Make read-only.
4453         * lib/mbchar.c (is_basic_table): Likewise.
4454         Reported by John Darrington.
4455
4456 2006-10-25  Bruno Haible  <bruno@clisp.org>
4457
4458         * lib/progname.h (set_program_name): Undefine before defining.
4459
4460 2006-10-25  Bruno Haible  <bruno@clisp.org>
4461
4462         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
4463         false for non-gcc C++ compilers.
4464         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
4465
4466 2006-10-24  Bruno Haible  <bruno@clisp.org>
4467
4468         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
4469         iconv implementations like Irix iconv.
4470
4471 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
4472
4473         * modules/vararrays: New file.
4474         * m4/vararrays.m4: New file, taken from diffutils.
4475         * MODULES.html.sh: New module vararrays.
4476
4477 2006-10-24  Karl Berry  <karl@gnu.org>
4478
4479         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
4480         Don't call GNU Unix.
4481
4482 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4483
4484         * users.txt: Add Libtool.
4485
4486         Sync from Libtool:
4487
4488         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
4489
4490         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
4491         to gnulib's policy of including config.h unconditionally.
4492
4493 2006-10-24  Bruno Haible  <bruno@clisp.org>
4494
4495         * modules/wcwidth (Files): Add m4/wint_t.m4.
4496         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
4497         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
4498
4499 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
4500
4501         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
4502         to pacify GCC with some -W flags enabled.  Problem reported by
4503         Bruno Haible.
4504
4505 2006-10-24  Jim Meyering  <jim@meyering.net>
4506
4507         * MODULES.html.sh: Remove uinttostr.  It's not a module.
4508         Reported by Karl Berry.
4509
4510 2006-10-23  Bruno Haible  <bruno@clisp.org>
4511
4512         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
4513
4514 2006-10-24  Bruno Haible  <bruno@clisp.org>
4515
4516         * lib/gl_list.h: Use C comment style, not C++ comment style.
4517
4518 2006-10-23  Eric Blake  <ebb9@byu.net>
4519
4520         * lib/getaddrinfo.c (includes): Add missing include.
4521
4522 2006-10-23  Bruno Haible  <bruno@clisp.org>
4523             Paul Eggert  <eggert@cs.ucla.edu>
4524
4525         Ability to rename obstack_free.
4526         * lib/obstack.h (__obstack_free): New macro. Declare instead of
4527         obstack_free.
4528         (obstack_free): Invoke the __obstack_free macro.
4529         * lib/obstack.c (obstack_free): Use __obstack_free macro.
4530
4531 2006-10-23  Bruno Haible  <bruno@clisp.org>
4532             Paul Eggert  <eggert@cs.ucla.edu>
4533
4534         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
4535         __argc, __argv from the declaration. (They are defined as macros on
4536         mingw.)
4537
4538 2006-10-22  Bruno Haible  <bruno@clisp.org>
4539
4540         * doc/gnulib-intro.texi: New file.
4541         * doc/gnulib.texi: Include it.
4542
4543 2006-10-21  Bruno Haible  <bruno@clisp.org>
4544
4545         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
4546         "Introduction", "Miscellanous Notes", "Particular Modules".
4547
4548 2006-10-21  Bruno Haible  <bruno@clisp.org>
4549
4550         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
4551         Change mostlyclean-local rule to avoid sh syntax error from bash
4552         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
4553
4554 2006-10-23  Jim Meyering  <jim@meyering.net>
4555
4556         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
4557         in place of snprintf.
4558
4559         * modules/inttostr (Files): Add lib/uinttostr.c.
4560         * lib/uinttostr.c (inttostr): New file/function.
4561         * lib/inttostr.h (uinttostr): Declare.
4562         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
4563         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
4564         Add uinttostr.
4565         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
4566
4567 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
4568
4569         * lib/canonicalize.c (ELOOP): Define if not already defined.
4570         Problem reported by Bruno Haible in
4571         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
4572
4573 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
4574
4575         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
4576         Problem reported by Perry Smith and Ville Laurikari.
4577
4578         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
4579         uses.
4580
4581 2006-10-19  Bruno Haible  <bruno@clisp.org>
4582
4583         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
4584         for mingw.
4585
4586 2006-10-19  Bruno Haible  <bruno@clisp.org>
4587
4588         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
4589         Needed for mingw.
4590
4591 2006-10-19  Bruno Haible  <bruno@clisp.org>
4592
4593         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
4594
4595 2006-10-19  Bruno Haible  <bruno@clisp.org>
4596
4597         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
4598         it.
4599
4600 2006-10-19  Bruno Haible  <bruno@clisp.org>
4601
4602         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
4603         invocation.
4604
4605 2006-10-19  Bruno Haible  <bruno@clisp.org>
4606
4607         * gnulib-tool (func_create_testdir): Don't include ftruncate and
4608         mountlist by default.
4609
4610 2006-10-16  Bruno Haible  <bruno@clisp.org>
4611
4612         * lib/c-strstr.c: Include c-strstr.h.
4613
4614 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
4615
4616         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
4617         in a slash.
4618
4619 2006-10-18  Bruno Haible  <bruno@clisp.org>
4620
4621         * lib/lock.h [C++]: Wrap definitions in extern "C".
4622
4623 2006-10-18  Bruno Haible  <bruno@clisp.org>
4624
4625         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
4626         gl_LIBOBJS list.
4627
4628 2006-10-18  Bruno Haible  <bruno@clisp.org>
4629
4630         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
4631
4632 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
4633
4634         * lib/xstrtol.h: Include gettext.h.
4635         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
4636         Problem reported by Eric Blake.
4637         * modules/xstrtol (Depends-on): Add gettext-h.
4638
4639 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
4640
4641         * lib/strftime.c (advance): New macro.
4642         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
4643         incomplete type, so you can't add 0 to it.  Problem and patch
4644         reported by Eelco Dolstra for dietlibc.
4645
4646 2006-10-18  Jim Meyering  <jim@meyering.net>
4647
4648         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
4649         type for a local, and rename it: s/up/user_proc/.
4650
4651 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
4652
4653         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
4654         READ_UTMP_USER_PROCESS.
4655         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
4656
4657 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
4658
4659         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
4660         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
4661
4662 2006-10-17  Eric Blake  <ebb9@byu.net>
4663
4664         * lib/sigprocmask.c (sigprocmask): Fix typo.
4665
4666         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
4667
4668         * modules/clean-temp (Makefile.am): Don't add to make output...
4669         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
4670         config.h.
4671
4672 2006-10-17  Bruno Haible  <bruno@clisp.org>
4673
4674         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
4675         differently if DEFAULT_TEXT_DOMAIN is set.
4676
4677 2006-10-16  Bruno Haible  <bruno@clisp.org>
4678
4679         * lib/clean-temp.c: Include fwriteerror.h.
4680
4681 2006-10-16  Bruno Haible  <bruno@clisp.org>
4682
4683         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
4684
4685 2006-10-16  Bruno Haible  <bruno@clisp.org>
4686
4687         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
4688         * lib/sigprocmask.h: Include <sys/types.h>.
4689         (sigset_t): Use the system's definition if present.
4690
4691 2006-10-17  Eric Blake  <ebb9@byu.net>
4692
4693         * lib/xvasprintf.c (includes): Assume config.h.
4694         * lib/xasprintf.c (includes): Likewise.
4695
4696 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
4697
4698         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
4699         at least as wide as intmax_t.
4700
4701 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
4702
4703         (Imported from Automake.)
4704         * build-aux/gnupload: Update to version 1.1 of directive file.
4705
4706 2006-10-16  Eric Blake  <ebb9@byu.net>
4707
4708         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
4709         match Automake 1.10a.
4710
4711 2006-10-14  Bruno Haible  <bruno@clisp.org>
4712
4713         * modules/sigprocmask: New file.
4714         * lib/sigprocmask.h: New file.
4715         * lib/sigprocmask.c: New file.
4716         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
4717         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
4718         request sigprocmask.o.
4719         (gl_PREREQ_SIGPROCMASK): New macro.
4720         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
4721         (Depends-on): Add sigprocmask.
4722         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
4723         gt_SIGNALBLOCKING. Test for 'raise' only once.
4724         * lib/fatal-signal.c: Include sigprocmask.h.
4725         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
4726         unblock_fatal_signals): Define always.
4727         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
4728         sigprocmask.
4729
4730 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
4731
4732         Sync from Automake.
4733         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
4734         which incorrectly sets the mode of an existing destination
4735         directory.  In some cases the unpatched install-sh could do the
4736         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
4737         system.  We hope this is rare in practice, but it's clearly worth
4738         fixing.  Problem reported by Alex Unleashed in
4739         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
4740         Also, don't bother to check for -m bugs unless we're using -m;
4741         suggested by Stepan Kasal.
4742
4743 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4744
4745         Sync from Automake.
4746         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
4747         `-c' flag, so they appear at the same position as in %FASTDEP%
4748         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
4749         which ignores unknown options only after the first non-option.
4750         Bug report against M4 by Nelson H. F. Beebe.
4751
4752 2006-10-13  Jim Meyering  <jim@meyering.net>
4753
4754         Fix a bug in yesterday's change.
4755         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
4756         p->fts_statp->st_dev would be used uninitialized.
4757         Ensures that we always call fts_stat on the very first entry.
4758         Miklos Szeredi reported that find -xdev stopped working.
4759
4760 2006-10-12  Bruno Haible  <bruno@clisp.org>
4761
4762         * gnulib-tool (func_get_automake_snippet): Append an automatically
4763         computed EXTRA_DIST augmentation.
4764         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
4765         * modules/alloca-opt (Makefile.am): Likewise.
4766         * modules/allocsa (Makefile.am): Likewise.
4767         * modules/arcfour (Makefile.am): Likewise.
4768         * modules/arctwo (Makefile.am): Likewise.
4769         * modules/argmatch (Makefile.am): Likewise.
4770         * modules/argz (Makefile.am): Likewise.
4771         * modules/atexit (Makefile.am): Likewise.
4772         * modules/backupfile (Makefile.am): Likewise.
4773         * modules/byteswap (Makefile.am): Likewise.
4774         * modules/c-strtod (Makefile.am): Likewise.
4775         * modules/c-strtold (Makefile.am): Likewise.
4776         * modules/calloc (Makefile.am): Likewise.
4777         * modules/canon-host (Makefile.am): Likewise.
4778         * modules/canonicalize (Makefile.am): Likewise.
4779         * modules/chdir-long (Makefile.am): Likewise.
4780         * modules/chdir-safer (Makefile.am): Likewise.
4781         * modules/check-version (Makefile.am): Likewise.
4782         * modules/chown (Makefile.am): Likewise.
4783         * modules/cloexec (Makefile.am): Likewise.
4784         * modules/close-stream (Makefile.am): Likewise.
4785         * modules/closeout (Makefile.am): Likewise.
4786         * modules/crc (Makefile.am): Likewise.
4787         * modules/csharpexec (Makefile.am): Likewise.
4788         * modules/cycle-check (Makefile.am): Likewise.
4789         * modules/des (Makefile.am): Likewise.
4790         * modules/dev-ino (Makefile.am): Likewise.
4791         * modules/dirfd (Makefile.am): Likewise.
4792         * modules/dirname (Makefile.am): Likewise.
4793         * modules/dup2 (Makefile.am): Likewise.
4794         * modules/eealloc (Makefile.am): Likewise.
4795         * modules/error (Makefile.am): Likewise.
4796         * modules/euidaccess (Makefile.am): Likewise.
4797         * modules/exclude (Makefile.am): Likewise.
4798         * modules/exitfail (Makefile.am): Likewise.
4799         * modules/fcntl-safer (Makefile.am): Likewise.
4800         * modules/fcntl (Makefile.am): Likewise.
4801         * modules/file-type (Makefile.am): Likewise.
4802         * modules/fileblocks (Makefile.am): Likewise.
4803         * modules/filemode (Makefile.am): Likewise.
4804         * modules/filenamecat (Makefile.am): Likewise.
4805         * modules/fnmatch (Makefile.am): Likewise.
4806         * modules/fopen-safer (Makefile.am): Likewise.
4807         * modules/fpending (Makefile.am): Likewise.
4808         * modules/fprintftime (Makefile.am): Likewise.
4809         * modules/free (Makefile.am): Likewise.
4810         * modules/fsusage (Makefile.am): Likewise.
4811         * modules/ftruncate (Makefile.am): Likewise.
4812         * modules/fts (Makefile.am): Likewise.
4813         * modules/gc-arcfour (Makefile.am): Likewise.
4814         * modules/gc-des (Makefile.am): Likewise.
4815         * modules/gc-hmac-md5 (Makefile.am): Likewise.
4816         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
4817         * modules/gc-md4 (Makefile.am): Likewise.
4818         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
4819         * modules/gc-sha1 (Makefile.am): Likewise.
4820         * modules/gc (Makefile.am): Likewise.
4821         * modules/getaddrinfo (Makefile.am): Likewise.
4822         * modules/getcwd (Makefile.am): Likewise.
4823         * modules/getdelim (Makefile.am): Likewise.
4824         * modules/getdomainname (Makefile.am): Likewise.
4825         * modules/getgroups (Makefile.am): Likewise.
4826         * modules/gethostname (Makefile.am): Likewise.
4827         * modules/gethrxtime (Makefile.am): Likewise.
4828         * modules/getline (Makefile.am): Likewise.
4829         * modules/getloadavg (Makefile.am): Likewise.
4830         * modules/getlogin_r (Makefile.am): Likewise.
4831         * modules/getndelim2 (Makefile.am): Likewise.
4832         * modules/getopt (Makefile.am): Likewise.
4833         * modules/getpagesize (Makefile.am): Likewise.
4834         * modules/getpass-gnu (Makefile.am): Likewise.
4835         * modules/getpass (Makefile.am): Likewise.
4836         * modules/getsubopt (Makefile.am): Likewise.
4837         * modules/gettime (Makefile.am): Likewise.
4838         * modules/gettimeofday (Makefile.am): Likewise.
4839         * modules/getugroups (Makefile.am): Likewise.
4840         * modules/getusershell (Makefile.am): Likewise.
4841         * modules/glob (Makefile.am): Likewise.
4842         * modules/group-member (Makefile.am): Likewise.
4843         * modules/hard-locale (Makefile.am): Likewise.
4844         * modules/hash (Makefile.am): Likewise.
4845         * modules/hmac-md5 (Makefile.am): Likewise.
4846         * modules/hmac-sha1 (Makefile.am): Likewise.
4847         * modules/human (Makefile.am): Likewise.
4848         * modules/idcache (Makefile.am): Likewise.
4849         * modules/imaxabs (Makefile.am): Likewise.
4850         * modules/imaxdiv (Makefile.am): Likewise.
4851         * modules/inet_ntop (Makefile.am): Likewise.
4852         * modules/inet_pton (Makefile.am): Likewise.
4853         * modules/intprops (Makefile.am): Likewise.
4854         * modules/inttostr (Makefile.am): Likewise.
4855         * modules/inttypes (Makefile.am): Likewise.
4856         * modules/isapipe (Makefile.am): Likewise.
4857         * modules/javaversion (Makefile.am): Likewise.
4858         * modules/lchmod (Makefile.am): Likewise.
4859         * modules/lchown (Makefile.am): Likewise.
4860         * modules/localcharset (Makefile.am): Likewise.
4861         * modules/long-options (Makefile.am): Likewise.
4862         * modules/lstat (Makefile.am): Likewise.
4863         * modules/malloc (Makefile.am): Likewise.
4864         * modules/mathl (Makefile.am): Likewise.
4865         * modules/mbchar (Makefile.am): Likewise.
4866         * modules/md2 (Makefile.am): Likewise.
4867         * modules/md4 (Makefile.am): Likewise.
4868         * modules/md5 (Makefile.am): Likewise.
4869         * modules/memcasecmp (Makefile.am): Likewise.
4870         * modules/memchr (Makefile.am): Likewise.
4871         * modules/memcmp (Makefile.am): Likewise.
4872         * modules/memcoll (Makefile.am): Likewise.
4873         * modules/memcpy (Makefile.am): Likewise.
4874         * modules/memmem (Makefile.am): Likewise.
4875         * modules/memmove (Makefile.am): Likewise.
4876         * modules/mempcpy (Makefile.am): Likewise.
4877         * modules/memrchr (Makefile.am): Likewise.
4878         * modules/memset (Makefile.am): Likewise.
4879         * modules/memxor (Makefile.am): Likewise.
4880         * modules/mkancesdirs (Makefile.am): Likewise.
4881         * modules/mkdir-p (Makefile.am): Likewise.
4882         * modules/mkdir (Makefile.am): Likewise.
4883         * modules/mkdtemp (Makefile.am): Likewise.
4884         * modules/mkstemp (Makefile.am): Likewise.
4885         * modules/mktime (Makefile.am): Likewise.
4886         * modules/modechange (Makefile.am): Likewise.
4887         * modules/mountlist (Makefile.am): Likewise.
4888         * modules/nanosleep (Makefile.am): Likewise.
4889         * modules/obstack (Makefile.am): Likewise.
4890         * modules/openat (Makefile.am): Likewise.
4891         * modules/pagealign_alloc (Makefile.am): Likewise.
4892         * modules/pathmax (Makefile.am): Likewise.
4893         * modules/physmem (Makefile.am): Likewise.
4894         * modules/poll (Makefile.am): Likewise.
4895         * modules/posixtm (Makefile.am): Likewise.
4896         * modules/posixver (Makefile.am): Likewise.
4897         * modules/putenv (Makefile.am): Likewise.
4898         * modules/quote (Makefile.am): Likewise.
4899         * modules/quotearg (Makefile.am): Likewise.
4900         * modules/raise (Makefile.am): Likewise.
4901         * modules/read-file (Makefile.am): Likewise.
4902         * modules/readline (Makefile.am): Likewise.
4903         * modules/readlink (Makefile.am): Likewise.
4904         * modules/readtokens (Makefile.am): Likewise.
4905         * modules/readutmp (Makefile.am): Likewise.
4906         * modules/realloc (Makefile.am): Likewise.
4907         * modules/regex (Makefile.am): Likewise.
4908         * modules/rename-dest-slash (Makefile.am): Likewise.
4909         * modules/rename (Makefile.am): Likewise.
4910         * modules/rijndael (Makefile.am): Likewise.
4911         * modules/rmdir (Makefile.am): Likewise.
4912         * modules/rpmatch (Makefile.am): Likewise.
4913         * modules/safe-read (Makefile.am): Likewise.
4914         * modules/safe-write (Makefile.am): Likewise.
4915         * modules/same-inode (Makefile.am): Likewise.
4916         * modules/same (Makefile.am): Likewise.
4917         * modules/save-cwd (Makefile.am): Likewise.
4918         * modules/savedir (Makefile.am): Likewise.
4919         * modules/setenv (Makefile.am): Likewise.
4920         * modules/settime (Makefile.am): Likewise.
4921         * modules/sha1 (Makefile.am): Likewise.
4922         * modules/sig2str (Makefile.am): Likewise.
4923         * modules/snprintf (Makefile.am): Likewise.
4924         * modules/stat-macros (Makefile.am): Likewise.
4925         * modules/stat-time (Makefile.am): Likewise.
4926         * modules/stdbool (Makefile.am): Likewise.
4927         * modules/stdint (Makefile.am): Likewise.
4928         * modules/stdlib-safer (Makefile.am): Likewise.
4929         * modules/stpcpy (Makefile.am): Likewise.
4930         * modules/stpncpy (Makefile.am): Likewise.
4931         * modules/strcase (Makefile.am): Likewise.
4932         * modules/strcasestr (Makefile.am): Likewise.
4933         * modules/strchrnul (Makefile.am): Likewise.
4934         * modules/strcspn (Makefile.am): Likewise.
4935         * modules/strdup (Makefile.am): Likewise.
4936         * modules/strerror (Makefile.am): Likewise.
4937         * modules/strftime (Makefile.am): Likewise.
4938         * modules/strndup (Makefile.am): Likewise.
4939         * modules/strnlen (Makefile.am): Likewise.
4940         * modules/strpbrk (Makefile.am): Likewise.
4941         * modules/strsep (Makefile.am): Likewise.
4942         * modules/strstr (Makefile.am): Likewise.
4943         * modules/strtod (Makefile.am): Likewise.
4944         * modules/strtoimax (Makefile.am): Likewise.
4945         * modules/strtok_r (Makefile.am): Likewise.
4946         * modules/strtol (Makefile.am): Likewise.
4947         * modules/strtoll (Makefile.am): Likewise.
4948         * modules/strtoul (Makefile.am): Likewise.
4949         * modules/strtoull (Makefile.am): Likewise.
4950         * modules/strtoumax (Makefile.am): Likewise.
4951         * modules/strverscmp (Makefile.am): Likewise.
4952         * modules/sys_socket (Makefile.am): Likewise.
4953         * modules/sys_stat (Makefile.am): Likewise.
4954         * modules/sysexits (Makefile.am): Likewise.
4955         * modules/time_r (Makefile.am): Likewise.
4956         * modules/timegm (Makefile.am): Likewise.
4957         * modules/timespec (Makefile.am): Likewise.
4958         * modules/tmpfile-safer (Makefile.am): Likewise.
4959         * modules/trim (Makefile.am): Likewise.
4960         * modules/unistd-safer (Makefile.am): Likewise.
4961         * modules/unlinkdir (Makefile.am): Likewise.
4962         * modules/unlocked-io (Makefile.am): Likewise.
4963         * modules/userspec (Makefile.am): Likewise.
4964         * modules/utime (Makefile.am): Likewise.
4965         * modules/utimecmp (Makefile.am): Likewise.
4966         * modules/utimens (Makefile.am): Likewise.
4967         * modules/vasnprintf (Makefile.am): Likewise.
4968         * modules/vasprintf (Makefile.am): Likewise.
4969         * modules/vsnprintf (Makefile.am): Likewise.
4970         * modules/xalloc (Makefile.am): Likewise.
4971         * modules/xgetcwd (Makefile.am): Likewise.
4972         * modules/xnanosleep (Makefile.am): Likewise.
4973         * modules/xreadlink (Makefile.am): Likewise.
4974         * modules/xstrtod (Makefile.am): Likewise.
4975         * modules/xstrtol (Makefile.am): Likewise.
4976         * modules/xstrtold (Makefile.am): Likewise.
4977         * modules/yesno (Makefile.am): Likewise.
4978         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
4979
4980 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
4981
4982         * modules/error (Makefile.am): Distribute files through
4983         EXTRA_DIST, not lib_SOURCES.
4984
4985 2006-10-12  Eric Blake  <ebb9@byu.net>
4986
4987         * modules/error (Makefile.am): Distribute files in /lib.
4988         * modules/obstack (Makefile.am): Likewise.
4989
4990 2006-10-12  Bruno Haible  <bruno@clisp.org>
4991
4992         * modules/acl (Makefile.am): Distribute all files in lib/ through
4993         EXTRA_DIST.
4994         * modules/arcfour (Makefile.am): Likewise.
4995         * modules/arctwo (Makefile.am): Likewise.
4996         * modules/argmatch (Makefile.am): Likewise.
4997         * modules/argz (Makefile.am): Likewise.
4998         * modules/atexit (Makefile.am): Likewise.
4999         * modules/backupfile (Makefile.am): Likewise.
5000         * modules/c-strtod (Makefile.am): Likewise.
5001         * modules/c-strtold (Makefile.am): Likewise.
5002         * modules/calloc (Makefile.am): Likewise.
5003         * modules/canon-host (Makefile.am): Likewise.
5004         * modules/canonicalize (Makefile.am): Likewise.
5005         * modules/chdir-long (Makefile.am): Likewise.
5006         * modules/chdir-safer (Makefile.am): Likewise.
5007         * modules/check-version (Makefile.am): Likewise.
5008         * modules/chown (Makefile.am): Likewise.
5009         * modules/cloexec (Makefile.am): Likewise.
5010         * modules/close-stream (Makefile.am): Likewise.
5011         * modules/closeout (Makefile.am): Likewise.
5012         * modules/crc (Makefile.am): Likewise.
5013         * modules/cycle-check (Makefile.am): Likewise.
5014         * modules/des (Makefile.am): Likewise.
5015         * modules/dirfd (Makefile.am): Likewise.
5016         * modules/dirname (Makefile.am): Likewise.
5017         * modules/dup2 (Makefile.am): Likewise.
5018         * modules/euidaccess (Makefile.am): Likewise.
5019         * modules/exclude (Makefile.am): Likewise.
5020         * modules/exitfail (Makefile.am): Likewise.
5021         * modules/fcntl-safer (Makefile.am): Likewise.
5022         * modules/file-type (Makefile.am): Likewise.
5023         * modules/fileblocks (Makefile.am): Likewise.
5024         * modules/filemode (Makefile.am): Likewise.
5025         * modules/filenamecat (Makefile.am): Likewise.
5026         * modules/fnmatch (Makefile.am): Likewise.
5027         * modules/fopen-safer (Makefile.am): Likewise.
5028         * modules/fpending (Makefile.am): Likewise.
5029         * modules/fprintftime (Makefile.am): Likewise.
5030         * modules/free (Makefile.am): Likewise.
5031         * modules/fsusage (Makefile.am): Likewise.
5032         * modules/ftruncate (Makefile.am): Likewise.
5033         * modules/fts (Makefile.am): Likewise.
5034         * modules/gc (Makefile.am): Likewise.
5035         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
5036         * modules/getaddrinfo (Makefile.am): Likewise.
5037         * modules/getcwd (Makefile.am): Likewise.
5038         * modules/getdelim (Makefile.am): Likewise.
5039         * modules/getdomainname (Makefile.am): Likewise.
5040         * modules/getgroups (Makefile.am): Likewise.
5041         * modules/gethostname (Makefile.am): Likewise.
5042         * modules/gethrxtime (Makefile.am): Likewise.
5043         * modules/getline (Makefile.am): Likewise.
5044         * modules/getloadavg (Makefile.am): Likewise.
5045         * modules/getlogin_r (Makefile.am): Likewise.
5046         * modules/getopt (Makefile.am): Likewise.
5047         * modules/getpass (Makefile.am): Likewise.
5048         * modules/getpass-gnu (Makefile.am): Likewise.
5049         * modules/getsubopt (Makefile.am): Likewise.
5050         * modules/gettime (Makefile.am): Likewise.
5051         * modules/gettimeofday (Makefile.am): Likewise.
5052         * modules/getugroups (Makefile.am): Likewise.
5053         * modules/getusershell (Makefile.am): Likewise.
5054         * modules/glob (Makefile.am): Likewise.
5055         * modules/group-member (Makefile.am): Likewise.
5056         * modules/hard-locale (Makefile.am): Likewise.
5057         * modules/hash (Makefile.am): Likewise.
5058         * modules/hmac-md5 (Makefile.am): Likewise.
5059         * modules/hmac-sha1 (Makefile.am): Likewise.
5060         * modules/human (Makefile.am): Likewise.
5061         * modules/idcache (Makefile.am): Likewise.
5062         * modules/imaxabs (Makefile.am): Likewise.
5063         * modules/imaxdiv (Makefile.am): Likewise.
5064         * modules/inet_ntop (Makefile.am): Likewise.
5065         * modules/inet_pton (Makefile.am): Likewise.
5066         * modules/inttostr (Makefile.am): Likewise.
5067         * modules/isapipe (Makefile.am): Likewise.
5068         * modules/lchown (Makefile.am): Likewise.
5069         * modules/long-options (Makefile.am): Likewise.
5070         * modules/lstat (Makefile.am): Likewise.
5071         * modules/malloc (Makefile.am): Likewise.
5072         * modules/mathl (Makefile.am): Likewise.
5073         * modules/mbchar (Makefile.am): Likewise.
5074         * modules/md2 (Makefile.am): Likewise.
5075         * modules/md4 (Makefile.am): Likewise.
5076         * modules/md5 (Makefile.am): Likewise.
5077         * modules/memcasecmp (Makefile.am): Likewise.
5078         * modules/memchr (Makefile.am): Likewise.
5079         * modules/memcmp (Makefile.am): Likewise.
5080         * modules/memcoll (Makefile.am): Likewise.
5081         * modules/memcpy (Makefile.am): Likewise.
5082         * modules/memmem (Makefile.am): Likewise.
5083         * modules/memmove (Makefile.am): Likewise.
5084         * modules/mempcpy (Makefile.am): Likewise.
5085         * modules/memrchr (Makefile.am): Likewise.
5086         * modules/memset (Makefile.am): Likewise.
5087         * modules/memxor (Makefile.am): Likewise.
5088         * modules/mkancesdirs (Makefile.am): Likewise.
5089         * modules/mkdir (Makefile.am): Likewise.
5090         * modules/mkdir-p (Makefile.am): Likewise.
5091         * modules/mkdtemp (Makefile.am): Likewise.
5092         * modules/mkstemp (Makefile.am): Likewise.
5093         * modules/mktime (Makefile.am): Likewise.
5094         * modules/modechange (Makefile.am): Likewise.
5095         * modules/mountlist (Makefile.am): Likewise.
5096         * modules/nanosleep (Makefile.am): Likewise.
5097         * modules/openat (Makefile.am): Likewise.
5098         * modules/pagealign_alloc (Makefile.am): Likewise.
5099         * modules/physmem (Makefile.am): Likewise.
5100         * modules/poll (Makefile.am): Likewise.
5101         * modules/posixtm (Makefile.am): Likewise.
5102         * modules/posixver (Makefile.am): Likewise.
5103         * modules/putenv (Makefile.am): Likewise.
5104         * modules/quote (Makefile.am): Likewise.
5105         * modules/quotearg (Makefile.am): Likewise.
5106         * modules/raise (Makefile.am): Likewise.
5107         * modules/read-file (Makefile.am): Likewise.
5108         * modules/readline (Makefile.am): Likewise.
5109         * modules/readlink (Makefile.am): Likewise.
5110         * modules/readtokens (Makefile.am): Likewise.
5111         * modules/readutmp (Makefile.am): Likewise.
5112         * modules/realloc (Makefile.am): Likewise.
5113         * modules/regex (Makefile.am): Likewise.
5114         * modules/rename (Makefile.am): Likewise.
5115         * modules/rename-dest-slash (Makefile.am): Likewise.
5116         * modules/rijndael (Makefile.am): Likewise.
5117         * modules/rmdir (Makefile.am): Likewise.
5118         * modules/rpmatch (Makefile.am): Likewise.
5119         * modules/safe-read (Makefile.am): Likewise.
5120         * modules/safe-write (Makefile.am): Likewise.
5121         * modules/same (Makefile.am): Likewise.
5122         * modules/save-cwd (Makefile.am): Likewise.
5123         * modules/savedir (Makefile.am): Likewise.
5124         * modules/setenv (Makefile.am): Likewise.
5125         * modules/settime (Makefile.am): Likewise.
5126         * modules/sha1 (Makefile.am): Likewise.
5127         * modules/sig2str (Makefile.am): Likewise.
5128         * modules/snprintf (Makefile.am): Likewise.
5129         * modules/stdlib-safer (Makefile.am): Likewise.
5130         * modules/stpcpy (Makefile.am): Likewise.
5131         * modules/stpncpy (Makefile.am): Likewise.
5132         * modules/strcase (Makefile.am): Likewise.
5133         * modules/strcasestr (Makefile.am): Likewise.
5134         * modules/strchrnul (Makefile.am): Likewise.
5135         * modules/strcspn (Makefile.am): Likewise.
5136         * modules/strdup (Makefile.am): Likewise.
5137         * modules/strerror (Makefile.am): Likewise.
5138         * modules/strftime (Makefile.am): Likewise.
5139         * modules/strndup (Makefile.am): Likewise.
5140         * modules/strnlen (Makefile.am): Likewise.
5141         * modules/strpbrk (Makefile.am): Likewise.
5142         * modules/strsep (Makefile.am): Likewise.
5143         * modules/strstr (Makefile.am): Likewise.
5144         * modules/strtod (Makefile.am): Likewise.
5145         * modules/strtoimax (Makefile.am): Likewise.
5146         * modules/strtok_r (Makefile.am): Likewise.
5147         * modules/strtol (Makefile.am): Likewise.
5148         * modules/strtoll (Makefile.am): Likewise.
5149         * modules/strtoul (Makefile.am): Likewise.
5150         * modules/strtoull (Makefile.am): Likewise.
5151         * modules/strtoumax (Makefile.am): Likewise.
5152         * modules/strverscmp (Makefile.am): Likewise.
5153         * modules/time_r (Makefile.am): Likewise.
5154         * modules/timegm (Makefile.am): Likewise.
5155         * modules/tmpfile-safer (Makefile.am): Likewise.
5156         * modules/unistd-safer (Makefile.am): Likewise.
5157         * modules/unlinkdir (Makefile.am): Likewise.
5158         * modules/userspec (Makefile.am): Likewise.
5159         * modules/utime (Makefile.am): Likewise.
5160         * modules/utimecmp (Makefile.am): Likewise.
5161         * modules/utimens (Makefile.am): Likewise.
5162         * modules/vasnprintf (Makefile.am): Likewise.
5163         * modules/vasprintf (Makefile.am): Likewise.
5164         * modules/vsnprintf (Makefile.am): Likewise.
5165         * modules/xalloc (Makefile.am): Likewise.
5166         * modules/xgetcwd (Makefile.am): Likewise.
5167         * modules/xnanosleep (Makefile.am): Likewise.
5168         * modules/xreadlink (Makefile.am): Likewise.
5169         * modules/xstrtod (Makefile.am): Likewise.
5170         * modules/xstrtol (Makefile.am): Likewise.
5171         * modules/xstrtold (Makefile.am): Likewise.
5172         * modules/yesno (Makefile.am): Likewise.
5173
5174 2006-10-12  Jim Meyering  <jim@meyering.net>
5175
5176         * m4/getloadavg.m4: Revert the change below.
5177
5178         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
5179         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
5180         fail with a symlink, which is what coreutils' ./bootstrap now
5181         creates by default.
5182
5183 2006-10-12  Bruno Haible  <bruno@clisp.org>
5184
5185         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
5186         mingw.
5187         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
5188         MSVC and mingw explicitly.
5189
5190 2006-10-11  Simon Josefsson  <jas@extundo.com>
5191             Bruno Haible  <bruno@clisp.org>
5192
5193         Add support for multiple gnulib-tool invocations in the scope of a
5194         single configure.ac file.
5195         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
5196         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
5197         with the same contents as the _LIBADD variable.
5198         (func_emit_initmacro_start, func_emit_initmacro_end,
5199         func_emit_initmacro_done): New functions.
5200         (func_import, func_create_testdir): Invoke them. Allow the identifiers
5201         gl_LIBOBJS and gl_LTLIBOBJS.
5202
5203 2006-10-11  Bruno Haible  <bruno@clisp.org>
5204
5205         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
5206         (func_create_testdir): Don't create po/Makefile.am, don't invoke
5207         autoreconf. Instead, invoke autopoint explicitly but move back the
5208         *.m4 files from gnulib.
5209
5210 2006-10-11  Bruno Haible  <bruno@clisp.org>
5211
5212         * gnulib-tool (func_usage): Make module names after --create-testdir
5213         optional.
5214         (func_create_testdir): If no module was specified, use nearly all
5215         modules.
5216
5217 2006-10-12  Jim Meyering  <jim@meyering.net>
5218
5219         Big performance improvement for fts-based tools that use FTS_NOSTAT.
5220         Avoid spurious inode-mismatch problems on non-POSIX file systems.
5221         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
5222         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
5223         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
5224         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
5225         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
5226         (fts_set_stat_required): New function.
5227         (fts_open): Defer the calls to fts_stat, if possible or requested.
5228         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
5229         into fts_stat itself.
5230         (fts_read): Perform any required (deferred) fts_stat call.
5231         (fts_build): Likewise, for the directory we're about to open and read.
5232         In the readdir loop, carefully decide whether each entry will require
5233         an eventual call to fts_stat, using dirent.d_type info if available.
5234         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
5235         a command line argument into this function.  Update all callers.
5236         Map a return value of FTS_DOT to FTS_D for a command line argument.
5237         * modules/fts (Depends-on): Add d-type.  Alphabetize.
5238         Thanks to Miklos Szeredi for his tenacity and for the initial
5239         bug report about "find" failing on a FUSE-based file system.
5240
5241         * lib/fts.c (fts_open): Use consistent indentation.
5242
5243 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
5244
5245         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
5246         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
5247         reported by Jim Meyering.  All uses of cache variables renamed
5248         to match Autoconf's.
5249         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
5250         the other one.
5251
5252         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
5253         Fix misspelling in diagnostic.
5254
5255 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
5256
5257         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
5258         defined.  Problem reported by Matthew Woehlke.
5259
5260         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
5261         Add support for Tandem NonStop R series.
5262         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
5263         Use new macro.
5264
5265         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
5266         (has_trailing_slash): Omit size arg; all callers changed.
5267         Omit 'inline', since it doesn't help performance and we'd
5268         need to configure it.
5269         Don't count //, ///, etc. as having a trailing slash.
5270         As a side effect, this removes a C99ism reported by Matthew Woehlke.
5271         (rpl_rename_dest_slash): On failure, use rename's errno rather
5272         than (in some cases) an incorrect or junk errno.
5273         Simplify code by removing need to compute length; this does
5274         cause it to make two passes instead of one over the file name,
5275         but it's worth it.
5276
5277         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
5278         change, since Autoconf's version may no longer be appropriate now
5279         that we are using CVS Autoconf's version.  Add support for Tandem.
5280
5281 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
5282             Bruno Haible  <bruno@clisp.org>
5283
5284         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
5285         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
5286         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
5287         gl_AC_TYPE_LONG_LONG.
5288
5289         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
5290         instead of HAVE_LONG_LONG.
5291         * lib/printf-args.c (printf_fetchargs): Likewise.
5292         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
5293         * lib/vasnprintf.c (VASNPRINTF): Likewise.
5294         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
5295         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
5296         gl_AC_TYPE_LONG_LONG.
5297
5298 2006-10-11  Bruno Haible  <bruno@clisp.org>
5299
5300         * m4/longlong.m4: Add comments.
5301         * m4/ulonglong.m4: Likewise.
5302
5303 2006-10-10  Bruno Haible  <bruno@clisp.org>
5304
5305         Make it possible to #define stpcpy, strdup to aliases.
5306         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
5307         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
5308
5309 2006-10-10  Bruno Haible  <bruno@clisp.org>
5310
5311         Make it possible to #define gcd to an alias.
5312         * lib/gcd.c: Include config.h.
5313
5314 2006-10-10  Bruno Haible  <bruno@clisp.org>
5315
5316         Make it possible to #define c_isascii to an alias.
5317         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
5318         defined. Undefine the macros before defining them, to avoid gcc
5319         warnings.
5320         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
5321         define NO_C_CTYPE_MACROS early.
5322
5323 2006-10-10  Bruno Haible  <bruno@clisp.org>
5324
5325         Make it possible to #define set_program_name to an alias.
5326         * lib/progname.c: Don't undefine set_program_name; instead, undefine
5327         ENABLE_RELOCATABLE early.
5328
5329 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
5330
5331         Port to Tandem NSK OSS, which has 64-bit signed int but at most
5332         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
5333         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
5334         More generally, don't assume that 64-bit signed int is available
5335         if unsigned int is, and vice versa.
5336         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
5337         unsigned symbols, not on their signed counterparts.
5338         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
5339         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
5340         (UINT64_C, UINTMAX_C):
5341         Likewise.
5342         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
5343         unsigned counterparts.
5344         (Have_long_long, Unsigned): New macros.
5345         (Int): Renamed from INT.
5346         (strtoimax): Use the new macros.
5347         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
5348         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
5349         * modules/inttypes (inttypes.h): Substitute
5350         HAVE_UNSIGNED_LONG_LONG_INT.
5351         * modules/stdint (stdint.h): Likewise.
5352         (Files): Add m4/ulonglong.m4.
5353
5354 2006-10-10  Bruno Haible  <bruno@clisp.org>
5355
5356         Fix a gcc -Wshadow warning.
5357         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
5358         to 'bucket'.
5359         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
5360         gl_linked_indexof_from_to): Likewise.
5361         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
5362         Likewise.
5363         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
5364         Likewise.
5365         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
5366         Reported by Eric Blake.
5367
5368 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
5369
5370         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
5371         for NetBSD.  Problem reported by Bruno Haible.
5372
5373 2006-10-09  Jim Meyering  <jim@meyering.net>
5374
5375         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
5376         Patch from Bruno Haible.
5377
5378 2006-10-09  Jim Meyering  <jim@meyering.net>
5379
5380         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
5381         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
5382         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
5383
5384 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
5385
5386         Don't include <config.h> twice; this doesn't work in some cases,
5387         e.g., when config.h has "#define intmax_t long long int" and
5388         we include <config.h>, <inttypes.h>, <config.h> in that order.
5389         Problem reported by Matthew Woehlke in:
5390         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
5391         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
5392         * lib/fts-cycle.c: Don't include config.h.
5393         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
5394         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
5395         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
5396         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
5397         inttypes.h.
5398         * lib/xstrtoumax.c: Likewise.
5399         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
5400         __strtol and the like, so that this module is more like its siblings.
5401         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
5402         Remove; no longer needed now that we assume gnulib inttypes.h.
5403
5404 2006-10-08  Bruno Haible  <bruno@clisp.org>
5405
5406         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
5407         option.
5408
5409 2006-10-07  Jim Meyering  <jim@meyering.net>
5410
5411         * modules/inttypes (inttypes.h): Revert what seems to have been
5412         an inadvertent part of today's change: use "|", not "/" in the
5413         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
5414
5415 2006-10-07  Bruno Haible  <bruno@clisp.org>
5416
5417         * modules/sublist: New file.
5418
5419 2006-10-07  Bruno Haible  <bruno@clisp.org>
5420
5421         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
5422         * modules/argz (argz.h): Likewise.
5423         * modules/arpa_inet (arpa/inet.h): Likewise.
5424         * modules/byteswap (byteswap.h): Likewise.
5425         * modules/configmake (configmake.h): Likewise.
5426         * modules/fcntl (fcntl.h): Likewise.
5427         * modules/fnmatch (fnmatch.h): Likewise.
5428         * modules/getopt (getopt.h): Likewise.
5429         * modules/glob (glob.h): Likewise.
5430         * modules/inttypes (inttypes.h): Likewise.
5431         * modules/netinet_in (netinet/in.h): Likewise.
5432         * modules/poll (poll.h): Likewise.
5433         * modules/stdbool (stdbool.h): Likewise.
5434         * modules/stdint (stdint.h): Likewise.
5435         * modules/sys_select (sys/select.h): Likewise.
5436         * modules/sys_socket (sys/socket.h): Likewise.
5437         * modules/sys_stat (sys/stat.h): Likewise.
5438         * modules/sysexits (sysexits.h): Likewise.
5439         * modules/unistd (unistd.h): Likewise.
5440         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5441         Add a "DO NOT EDIT" comment to the generated file.
5442         (func_import): Likewise for gnulib-comp.m4.
5443
5444 2006-10-07  Bruno Haible  <bruno@clisp.org>
5445
5446         * lib/gl_sublist.h: New file.
5447         * lib/gl_sublist.c: New file.
5448
5449 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
5450
5451         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
5452         name (relative to the original working directory) and the file
5453         name component (relative to the temporary working directory).  All
5454         callers changed.
5455         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
5456         * lib/mkdir-p.c (make_dir_parents): Likewise.
5457         * lib/mkdir-p.h (make_dir_parents): Likewise.
5458
5459 2006-10-06  Eric Blake  <ebb9@byu.net>
5460
5461         Define several macros for use by the clean-temp module.
5462         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
5463         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
5464         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
5465
5466         * lib/clean-temp.h (close_stream_temp): New declaration.
5467         * lib/clean-temp.c (includes): Pull in headers according to what
5468         other modules are in use.
5469         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
5470
5471 2006-10-06  Bruno Haible  <bruno@clisp.org>
5472
5473         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
5474         instead of fopen, fwriteerror.
5475
5476 2006-10-06  Bruno Haible  <bruno@clisp.org>
5477
5478         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
5479         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
5480         int.
5481         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
5482         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
5483         Return an error indicator.
5484         Suggested by Eric Blake.
5485
5486 2006-10-06  Bruno Haible  <bruno@clisp.org>
5487
5488         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
5489         Reported by Eric Blake.
5490
5491 2006-10-06  Bruno Haible  <bruno@clisp.org>
5492
5493         * modules/closeout (Description): Mention stderr too.
5494
5495 2006-10-06  Bruno Haible  <bruno@clisp.org>
5496         and Paul Eggert  <eggert@cs.ucla.edu>
5497
5498         * lib/closeout.c (close_stdout): Also close stderr.
5499         * lib/closeout.h: Update comment.
5500
5501 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
5502
5503         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
5504         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
5505         * lib/dirchownmod.c: Include lchown.h.
5506         * lib/lchown.c: Don't include files that lchown.h now includes.
5507         Don't declare chown, since lchown.h now does that.
5508         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
5509         (lchown): Define to rpl_chown if lchown is declared but
5510         does not exist.  Declare using a prototype if lchown is not
5511         declared.  Add a copyright notice.
5512         * lib/mkstemp.h: Include <unistd.h>.
5513         * lib/openat.c: Include lchown.h.
5514
5515         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
5516         we now test for that separately.
5517         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
5518         rather than O_NOFOLLOW, when testing whether it's possible to
5519         avoid a race condition reliably.
5520         * lib/savewd.c (savewd_chdir): Likewise.
5521
5522         Remove macros that are no longer needed now that stdint.h is
5523         reliable.
5524         * lib/fsusage.c (UINTMAX_MAX): Remove.
5525         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
5526         * lib/utimecmp.c (SIZE_MAX): Remove.
5527
5528         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
5529
5530         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
5531         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
5532         O_NOATIME works.
5533
5534 2006-10-05  Bruno Haible  <bruno@clisp.org>
5535
5536         * lib/gl_list.h (gl_sortedlist_search_from_to,
5537         gl_sortedlist_indexof_from_to): New declarations.
5538         (gl_list_implementation): New fields sortedlist_search_from_to,
5539         sortedlist_indexof_from_to.
5540         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
5541         inline functions.
5542         * lib/gl_list.c (gl_sortedlist_search_from_to,
5543         gl_sortedlist_indexof_from_to): New functions.
5544         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
5545         function.
5546         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
5547         (gl_array_sortedlist_search_from_to): New function.
5548         (gl_array_list_implementation): Update.
5549         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
5550         function.
5551         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
5552         (gl_carray_sortedlist_search_from_to): New function.
5553         (gl_carray_list_implementation): Update.
5554         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
5555         gl_linked_sortedlist_indexof_from_to): New functions.
5556         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
5557         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
5558         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
5559         gl_tree_sortedlist_indexof_from_to): New functions.
5560         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
5561         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
5562         Update.
5563         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
5564         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
5565         Update.
5566
5567 2006-10-05  Bruno Haible  <bruno@clisp.org>
5568
5569         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
5570         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
5571         (struct gl_list_implementation): Add fields search_from_to,
5572         indexof_from_to. Remove fields search, indexof.
5573         (gl_list_search): Use the search_from_to method.
5574         (gl_list_search_from, gl_list_search_from_to): New functions.
5575         (gl_list_indexof): Use the indexof_from_to method.
5576         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
5577         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
5578         (gl_list_search_from, gl_list_search_from_to): New functions.
5579         (gl_list_indexof): Use the indexof_from_to method.
5580         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
5581         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
5582         gl_array_indexof. Add start_index, end_index arguments.
5583         (gl_array_search_from_to): Renamed from gl_array_search. Add
5584         start_index, end_index arguments.
5585         (gl_array_remove, gl_array_list_implementation): Update.
5586         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
5587         gl_carray_indexof. Add start_index, end_index arguments.
5588         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
5589         start_index, end_index arguments.
5590         (gl_carray_remove, gl_carray_list_implementation): Update.
5591         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
5592         gl_linked_search. Add start_index, end_index arguments.
5593         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
5594         start_index, end_index arguments.
5595         (gl_linked_remove): Update.
5596         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
5597         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
5598         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
5599         field to 'size_t'.
5600         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
5601         gl_tree_search. Add start_index, end_index arguments.
5602         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
5603         start_index, end_index arguments.
5604         (gl_tree_remove): Update.
5605         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
5606         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
5607         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
5608         function.
5609         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
5610         gl_tree_search. Add start_index, end_index arguments.
5611         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
5612         start_index, end_index arguments.
5613         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
5614         Update.
5615         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
5616
5617 2006-10-05  Bruno Haible  <bruno@clisp.org>
5618
5619         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
5620
5621         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
5622         fwriteerror_temp): New declarations.
5623         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
5624         (descriptors): New variable.
5625         (cleanup): First, close the descriptors.
5626         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
5627         fclose_temp, fwriteerror_temp): New functions.
5628
5629 2006-10-04  Jim Meyering  <jim@meyering.net>
5630
5631         * lib/fts.c (fts_open): Tiny comment change.
5632
5633 2006-10-04  Bruno Haible  <bruno@clisp.org>
5634
5635         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
5636         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
5637         gl_LOCK_BODY.
5638         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
5639         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
5640         gl_LOCK_EARLY_BODY.
5641         (gl_LOCK): Require gl_LOCK_BODY.
5642
5643 2006-10-04  Bruno Haible  <bruno@clisp.org>
5644
5645         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
5646         (gl_oset_search_atleast): New declaration.
5647         (struct gl_oset_implementation): Add field 'search_atleast'.
5648         (gl_oset_search_atleast): New inline function.
5649         * lib/gl_oset.c (gl_oset_search_atleast): New function.
5650         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
5651         (gl_array_oset_implementation): Update.
5652         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
5653         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
5654         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
5655
5656 2006-10-04  Bruno Haible  <bruno@clisp.org>
5657
5658         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
5659
5660 2006-10-03  Bruno Haible  <bruno@clisp.org>
5661
5662         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
5663         from gl_avltreehash_list_implementation.
5664
5665 2006-10-03  Bruno Haible  <bruno@clisp.org>
5666
5667         * lib/gl_oset.c (gl_oset_add): Fix return type.
5668
5669 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
5670
5671         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
5672
5673 2006-10-02  Eric Blake  <ebb9@byu.net>
5674
5675         * modules/strnlen (Depends-on): Add extensions.
5676
5677 2006-10-02  Eric Blake  <ebb9@byu.net>
5678
5679         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
5680         definition in 2.60+.
5681
5682 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
5683
5684         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
5685         checks.
5686
5687 2006-10-02  Bruno Haible  <bruno@clisp.org>
5688
5689         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
5690         to the AUTOMAKE_OPTIONS.
5691         Reported by Jim Meyering.
5692
5693 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
5694
5695         Work around bug in Solaris 10 /proc file system:
5696         /proc/self/fd/NNN/.. isn't the parent directory of
5697         the directory whose file descriptor is NNN.  This needs to
5698         be worked around at run time, not compile time, since a
5699         program might be built on Solaris 8, where things work, and
5700         run on Solaris 10.
5701         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
5702         to use the following interface instead:
5703         (OPENAT_BUFFER_SIZE): New macro.
5704         (openat_proc_name): New function.
5705         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
5706         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
5707         Likewise.
5708         * lib/openat-proc.c: New file.
5709         * modules/openat (Files): Add lib/openat-proc.c.
5710         (Depends-on): Add same-inode, stdbool.
5711         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
5712
5713 2006-09-29  Bruno Haible  <bruno@clisp.org>
5714
5715         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
5716         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
5717         argument. Set stdout_closed before testing for ferror, not after.
5718         (fwriteerror, fwriteerror_no_ebadf): New functions.
5719
5720 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5721
5722         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
5723
5724 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
5725
5726         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
5727         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
5728
5729 2006-09-28  Jim Meyering  <jim@meyering.net>
5730
5731         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
5732         Include <unistd.h>.
5733
5734 2006-09-28  Bruno Haible  <bruno@clisp.org>
5735
5736         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
5737         * modules/linkedhash-list (Depends-on): Likewise.
5738         * modules/rbtreehash-list (Depends-on): Likewise.
5739
5740 2006-09-28  Bruno Haible  <bruno@clisp.org>
5741
5742         * lib/strndup.h: Simplify the redefinition of strndup.
5743         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
5744         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
5745
5746 2006-09-28  Bruno Haible  <bruno@clisp.org>
5747
5748         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
5749         * lib/gl_linkedhash_list.c: Likewise.
5750         * lib/gl_rbtreehash_list.c: Likewise.
5751
5752 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
5753
5754         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
5755         getaddrinfo.
5756
5757         * lib/__fpending.h: Don't include <stdio_ext.h> unless
5758         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
5759         it causes <stdio_ext.h> to cause a compile-time error.
5760         Problem reported by Nelson H. F. Beebe.
5761         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
5762         of HAVE_DECL___PENDING.
5763
5764         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
5765         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
5766         declaration.
5767
5768 2006-09-27  Jim Meyering  <jim@meyering.net>
5769
5770         This file could end up with a definition for a function
5771         named __strndup, rather than rpl_strndup on a system with
5772         incomplete weak_alias support.
5773         * lib/strndup.c (strndup): Rename from __strndup.
5774         Remove #defines that used to map __strndup to strndup.
5775         Don't use K&R prototypes.
5776         Remove LIBC-related code, since this file is not sync'd with glibc.
5777         * lib/strndup.h: Revamp, accordingly.
5778         * m4/strndup.m4: Modernize.
5779
5780 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
5781
5782         * modules/savewd (Depends-on): Add 'raise'.
5783         * lib/savewd.c: Include <signal.h>, for 'raise'.
5784
5785 2006-09-26  Jim Meyering  <jim@meyering.net>
5786
5787         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
5788         when we detect Darwin 8.7.0's acl_get_file bug.
5789         Rearrange to perform the new (below) run-test while $LIBS
5790         contains any acl-related library.  Set USE_ACL at the end.
5791         (gl_ACL_GET_FILE): New function.
5792
5793 2006-09-26  Eric Blake  <ebb9@byu.net>
5794
5795         * lib/verror.c: Include <config.h> unconditionally.
5796
5797 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
5798
5799         * modules/clock-time (Maintainer): Add self.
5800         * modules/getlogin_r (Depends-on): Add extensions.
5801
5802 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5803
5804         * modules/clock-time: New module.
5805         * modules/nanosleep (Depends-on): Add clock-time.
5806         * modules/gethrxtime (Depends-on): Likewise.
5807         * modules/gettime (Depends-on): Likewise.
5808         * modules/settime (Depends-on): Likewise.
5809
5810         * modules/fts-lgpl: Depend on openat.
5811         * modules/mkancesdirs: Depend on savewd.
5812         * modules/mkdir-p: Likewise.
5813
5814 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5815
5816         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
5817
5818         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
5819         `gl_have_arbitrary_file_name_length_limit' to
5820         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
5821         actually works between configure runs.
5822
5823 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5824             Bruno Haible  <bruno@clisp.org>
5825
5826         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
5827
5828 2006-09-25  Jim Meyering  <jim@meyering.net>
5829
5830         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
5831         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
5832
5833 2006-09-25  Eric Blake  <ebb9@byu.net>
5834
5835         * gnulib-tool (func_import, func_create_testdir): Fix typos in
5836         exec's in 2006-09-18 patch when shuffling fds.
5837
5838 2006-09-25  Bruno Haible  <bruno@clisp.org>
5839
5840         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
5841         Reported by Jim Meyering.
5842
5843 2006-09-24  Jim Meyering  <jim@meyering.net>
5844
5845         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
5846         compare a pointer against a literal "0".  That caused failures with
5847         at least HP-UX's hpcc.
5848
5849 2006-09-22  Simon Josefsson  <jas@extundo.com>
5850
5851         * modules/gc-sha1:
5852         * modules/gc-md4:
5853         * modules/gc-hmac-sha1:
5854         * modules/gc-hmac-md5:
5855         * modules/gc-des:
5856         * modules/gc-arcfour: Distribute more files.
5857
5858 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5859
5860         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
5861         (gl_linked_iterator_from_to): Initialize struct completely.
5862         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
5863         (gl_tree_iterator_from_to): Likewise
5864         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
5865         * lib/gl_array_list.c [lint] (gl_array_iterator)
5866         (gl_array_iterator_from_to): Likewise.
5867         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
5868         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
5869         (gl_carray_iterator_from_to): Likewise.
5870
5871         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
5872         * lib/md4.c (md4_process_block): Remove unused variable.
5873         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
5874         parentheses for clarity.
5875
5876 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5877
5878         * modules/bison-i18n (Depends-on): Add gettext.
5879
5880 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5881
5882         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
5883         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
5884         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
5885         also add missing comma that caused broken test.
5886         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
5887         stdlib.h, for `abort'.
5888         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
5889         variables.
5890         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
5891         include unistd.h if present, for `rmdir'.
5892         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
5893         variables.
5894         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
5895         in the process include standard headers for prototypes.
5896         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
5897         gets declared on GNU/Linux.
5898         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
5899         unistd.h, for `rmdir'.
5900         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
5901
5902         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
5903         always true.
5904         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
5905
5906         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
5907
5908 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5909
5910         * gnulib-tool (func_version): Create output all at once.  This
5911         may help avoid triggering unnecessary SIGPIPEs, and at any
5912         rate it doesn't hurt.
5913
5914 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5915             Bruno Haible  <bruno@clisp.org>
5916
5917         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
5918         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
5919         * m4/signed.m4 (bh_C_SIGNED): Likewise.
5920
5921         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
5922         (gl_FUNC_VASPRINTF): Invoke it.
5923
5924 2006-09-22  Bruno Haible  <bruno@clisp.org>
5925
5926         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
5927         getloadavg.c as first argument.
5928
5929 2006-09-22  Bruno Haible  <bruno@clisp.org>
5930
5931         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
5932         at the beginning of the gl_INIT macro.
5933         * modules/getloadavg (configure.ac): Pass $gl_source_base to
5934         gl_GETLOADAVG.
5935
5936 2006-09-22  Bruno Haible  <bruno@clisp.org>
5937
5938         * gnulib-tool (func_create_megatestdir): Don't include the config-h
5939         module.
5940         Suggested by Ralf Wildenhues.
5941
5942 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
5943
5944         Import this patch from libc:
5945
5946         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
5947
5948         * lib/regex_internal.c (re_string_reconstruct): Handle
5949         offset < pstr->valid_raw_len && pstr->offsets_needed case.
5950         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
5951         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
5952         re_string_context_at.
5953
5954         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
5955         now requires it.
5956         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
5957         gl_REGEX now does it for us.
5958         (gl_REGEX): Add test taken from
5959         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
5960
5961         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
5962         Check that large offsets work.  Modernize Autoconf usages.
5963         Prefer "yes" to mean a good thing rather than a bad.
5964         Don't put "#define mkstemp" in config.h, as this might interfere
5965         with standard system headers that "#define mkstemp mkstemp64".
5966
5967         * modules/mkstemp (Depends-on): Add extensions, so that
5968         mkstemp is visible on some platforms.
5969         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
5970         (Include): Change to "mkstemp.h" from <stdlib.h>.
5971         (Files): Add mkstemp.h.
5972
5973         * lib/mkstemp.h: New file, since some standard headers
5974         #define mkstemp.
5975         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
5976         Include "mkstemp.h".
5977         Make the _LIBC code resemble glibc original more,
5978         e.g., use K&R style.
5979         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
5980         (mkstemp): Remove, since mkstemp.h does this for us.
5981         * lib/stdlib--.h: Include mkstemp.h.
5982
5983         Import this patch from libc:
5984
5985         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
5986
5987         * lib/tempname.c (__gen_tempname): Change attempts_min
5988         into a macro.  Use preprocessor to decide how to initialize
5989         attempts [Coverity CID 67].
5990
5991 2006-09-20  Bruno Haible  <bruno@clisp.org>
5992
5993         * lib/mkdtemp.c: Import from libc.
5994         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
5995                 * sysdeps/posix/tempname.c (__gen_tempname): Change
5996                 attempts_min into a macro.  Use preprocessor to decide how to
5997                 initialize attempts [Coverity CID 67].
5998         2001-11-27  Paul Eggert  <eggert@twinsun.com>
5999                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
6000                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
6001
6002 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6003
6004         * gnulib-tool (func_exit): New function, to allow to pass the
6005         exit status portably through the trap.  Use everywhere.
6006         (--help, --version): Signal a write error.
6007         (trap): catch SIGPIPE, for write errors.
6008         Exit at the end of the trap, with the correct exit status.
6009
6010 2006-09-19  Karl Berry  <karl@gnu.org>
6011
6012         * doc/gnulib.texi: note about the license texinfo files.
6013
6014 2006-09-19  Eric Blake  <ebb9@byu.net>
6015
6016         * gnulib-tool: Avoid space-tab.
6017
6018 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
6019
6020         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
6021         that prevented coreutils 6.1 from building.  Problem reported
6022         by Petter Reinholdtsen.
6023
6024 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
6025
6026         * gnulib-tool (avoidlist): Fix typo that broke options like
6027         --avoid=lock that are used by coreutils bootstrap.
6028
6029 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
6030
6031         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
6032         more systematically.
6033
6034 2006-09-18  Jim Meyering  <jim@meyering.net>
6035
6036         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
6037
6038 2006-09-18  Bruno Haible  <bruno@clisp.org>
6039
6040         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
6041
6042 2006-09-18  Bruno Haible  <bruno@clisp.org>
6043
6044         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
6045         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
6046         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
6047         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
6048         * m4/gettext.m4: Require autoconf >= 2.52.
6049         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
6050         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
6051         of gl_cv_header_inttypes_h.
6052
6053 2006-09-18  Bruno Haible  <bruno@clisp.org>
6054
6055         * lib/javaversion.c: Include configmake.h.
6056
6057 2006-09-18  Bruno Haible  <bruno@clisp.org>
6058
6059         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
6060         avoid that the while loops be executed in a subshell.
6061
6062 2006-09-18  Bruno Haible  <bruno@clisp.org>
6063
6064         * MODULES.html.sh (func_module): Break long lines.
6065         Suggested by Bruce Korb <bkorb@gnu.org>.
6066
6067 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6068
6069         Speed up by a factor of 1.12.
6070         * gnulib-tool (nl): New variable.
6071         (func_import): Rewrite include directive extraction to only read each
6072         directive once.
6073
6074 2006-09-17  Bruno Haible  <bruno@clisp.org>
6075
6076         * modules/javaversion (Makefile.am): Remove DEFS setting.
6077         (Depends-on): Add configmake, for PKGDATADIR definition.
6078
6079 2006-09-17  Bruno Haible  <bruno@clisp.org>
6080
6081         * gnulib-tool (func_create_testdir): Rewrite all files at once.
6082
6083 2006-09-17  Bruno Haible  <bruno@clisp.org>
6084
6085         * gnulib-tool (func_append): New function, stolen from libtool.m4.
6086         (func_modules_transitive_closure, func_modules_add_dummy,
6087         func_modules_to_filelist, func_import, func_create_testdir,
6088         func_create_megatestdir, ...): Use it wherever possible.
6089         Suggested by Ralf Wildenhues.
6090
6091 2006-09-16  Karl Berry  <karl@gnu.org>
6092
6093         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
6094         to avoid sectioning errors.
6095         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
6096         [ifinfo]: blank line after @center-ed titles.
6097         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
6098         Spell FSF address consistently with others.
6099         (These changes approved by rms.)
6100
6101 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6102
6103         Speed up by a factor of 1.61.
6104         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
6105         already checked module names again.
6106
6107 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6108
6109         Speed up by a factor of 1.13.
6110         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
6111         for new_files, and the input to func_add_or_update.
6112
6113 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6114
6115         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
6116         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
6117
6118 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
6119
6120         * modules/mkancesdirs (Depends-on): Add fcntl.
6121         * modules/savewd: New file.
6122         * MODULES.html.sh (File system functions): Add savewd.
6123
6124         * modules/configmake (Makefile.am): Add support for the
6125         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
6126
6127 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
6128
6129         * m4/savewd.m4: New file.
6130
6131 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
6132
6133         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
6134         (dirchownmod): New arg FD.  All callers changed.
6135         Use FD rather than opening the directory ourself, as opening is
6136         now the caller's responsibility.
6137         * lib/dirchownmod.h: Likewise.
6138         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
6139         hosts that require <sys/types.h> before <sys/stat.h>.  Include
6140         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
6141         (test_dir): Remove.
6142         (mkancesdirs): Return length of prefix of FILE that has already
6143         been made, or -2 if there is a child doing the work.  Redo
6144         algorithm so that it is O(N) rather than O(N**2).  Optimize away
6145         ".", and treat ".." specially since it might stray back into
6146         already-created areas.  Use a subprocess if necessary.  New arg
6147         WD; all users changed.  MAKE_DIR function should now return 1
6148         if it creates a directory that is not readable.  Return -2 if
6149         a child process is spun off.
6150         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
6151         Adjust signature to match code.
6152         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
6153         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
6154         all users changed.
6155         * lib/savewd.c, lib/savewd.h: New files.
6156
6157 2006-09-15  Jim Meyering  <jim@meyering.net>
6158
6159         * modules/rename-dest-slash: New module.
6160         * MODULES.html.sh (posix_compat): Add it here.
6161
6162         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
6163
6164 2006-09-15  Jim Meyering  <jim@meyering.net>
6165
6166         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
6167         file.
6168
6169         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
6170
6171 2006-09-15  Jim Meyering  <jim@meyering.net>
6172
6173         * lib/rename-dest-slash.c (has_trailing_slash): Use
6174         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
6175         (rpl_rename_dest_slash): Perform the cheaper trailing slash
6176         test before testing whether SRC is a directory.
6177         Suggestions from Bruno Haible.
6178
6179         Avoid a warning about an unused variable.
6180         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
6181         into the #ifdef block where it's used.
6182
6183         * lib/rename-dest-slash.c: New file.
6184
6185 2006-09-14  Bruno Haible  <bruno@clisp.org>
6186
6187         * lib/allocsa.c: Include <config.h> unconditionally.
6188         * lib/asnprintf.c: Likewise.
6189         * lib/asprintf.c: Likewise.
6190         * lib/c-strcasecmp.c: Likewise.
6191         * lib/c-strcasestr.c: Likewise.
6192         * lib/c-strncasecmp.c: Likewise.
6193         * lib/c-strstr.c: Likewise.
6194         * lib/classpath.c: Likewise.
6195         * lib/clean-temp.c: Likewise.
6196         * lib/concatpath.c: Likewise.
6197         * lib/copy-file.c: Likewise.
6198         * lib/csharpcomp.c: Likewise.
6199         * lib/csharpexec.c: Likewise.
6200         * lib/execute.c: Likewise.
6201         * lib/fatal-signal.c: Likewise.
6202         * lib/findprog.c: Likewise.
6203         * lib/fwriteerror.c: Likewise.
6204         * lib/gl_array_list.c: Likewise.
6205         * lib/gl_array_oset.c: Likewise.
6206         * lib/gl_avltree_list.c: Likewise.
6207         * lib/gl_avltree_oset.c: Likewise.
6208         * lib/gl_avltreehash_list.c: Likewise.
6209         * lib/gl_carray_list.c: Likewise.
6210         * lib/gl_linked_list.c: Likewise.
6211         * lib/gl_linkedhash_list.c: Likewise.
6212         * lib/gl_list.c: Likewise.
6213         * lib/gl_oset.c: Likewise.
6214         * lib/gl_rbtree_list.c: Likewise.
6215         * lib/gl_rbtree_oset.c: Likewise.
6216         * lib/gl_rbtreehash_list.c: Likewise.
6217         * lib/imaxabs.c: Likewise.
6218         * lib/imaxdiv.c: Likewise.
6219         * lib/javacomp.c: Likewise.
6220         * lib/javaexec.c: Likewise.
6221         * lib/javaversion.c: Likewise.
6222         * lib/linebreak.c: Likewise.
6223         * lib/localcharset.c: Likewise.
6224         * lib/lock.c: Likewise.
6225         * lib/mbchar.c: Likewise.
6226         * lib/mbswidth.c: Likewise.
6227         * lib/mkdtemp.c: Likewise.
6228         * lib/pipe.c: Likewise.
6229         * lib/printf-args.c: Likewise.
6230         * lib/printf-parse.c: Likewise.
6231         * lib/progname.c: Likewise.
6232         * lib/progreloc.c: Likewise.
6233         * lib/readlink.c: Likewise.
6234         * lib/sh-quote.c: Likewise.
6235         * lib/stpcpy.c: Likewise.
6236         * lib/stpncpy.c: Likewise.
6237         * lib/strcasecmp.c: Likewise.
6238         * lib/strcasestr.c: Likewise.
6239         * lib/strcspn.c: Likewise.
6240         * lib/striconv.c: Likewise.
6241         * lib/strncasecmp.c: Likewise.
6242         * lib/strnlen1.c: Likewise.
6243         * lib/strstr.c: Likewise.
6244         * lib/strtok_r.c: Likewise.
6245         * lib/tls.c: Likewise.
6246         * lib/tmpdir.c: Likewise.
6247         * lib/unicodeio.c: Likewise.
6248         * lib/unsetenv.c: Likewise.
6249         * lib/vasnprintf.c: Likewise.
6250         * lib/vasprintf.c: Likewise.
6251         * lib/wait-process.c: Likewise.
6252         * lib/xallocsa.c: Likewise.
6253         * lib/xsetenv.c: Likewise.
6254         * lib/xstriconv.c: Likewise.
6255
6256 2006-09-13  Simon Josefsson  <jas@extundo.com>
6257
6258         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
6259         that internally, suggested by Ralf Wildenhues
6260         <Ralf.Wildenhues@gmx.de>.
6261
6262 2006-09-13  Simon Josefsson  <jas@extundo.com>
6263
6264         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
6265         @LIBOBJS@.
6266         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6267
6268 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
6269
6270         * lib/_fpending.c: Include <config.h> unconditionally, since we no
6271         longer worry about uses that don't define HAVE_CONFIG_H.
6272         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
6273         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
6274         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
6275         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
6276         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
6277         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
6278         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
6279         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
6280         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
6281         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
6282         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
6283         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
6284         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
6285         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
6286         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
6287         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
6288         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
6289         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
6290         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
6291         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
6292         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
6293         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
6294         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
6295         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
6296         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
6297         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
6298         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
6299         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
6300         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
6301         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
6302         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
6303         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
6304         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
6305         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
6306         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
6307         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
6308         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
6309         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
6310         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
6311         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
6312         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
6313         Likewise.
6314
6315 2006-09-13  Eric Blake  <ebb9@byu.net>
6316
6317         * lib/getopt.c: Fix typo in last commit.
6318
6319 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
6320
6321         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
6322         dgettext.
6323
6324 2006-09-12  Jim Meyering  <jim@meyering.net>
6325
6326         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
6327         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
6328         Reported by Nelson H. F. Beebe.
6329
6330 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
6331
6332         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
6333         program_invocation_name and program_invocation_short_name are
6334         initialized.
6335         * lib/argp-namefrob.h: Move declarations of program_invocation_name
6336         and program_invocation_short_name to argp.h, so they are visible
6337         to user programs.
6338         * lib/argp.h: Likewise
6339
6340 2006-09-10  Bruno Haible  <bruno@clisp.org>
6341
6342         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
6343         m4/inttypes_h.m4, m4/uintmax_t.m4.
6344
6345 2006-09-10  Bruno Haible  <bruno@clisp.org>
6346
6347         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
6348         gl_AC_TYPE_UINTMAX_T.
6349
6350 2006-09-10  Bruno Haible  <bruno@clisp.org>
6351
6352         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
6353
6354 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
6355
6356         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
6357         convention.  Text proposed by Bruno Haible.
6358         (struct argp_option): Document the use of N_() wrappers.
6359
6360         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
6361         '\v', and translate the two parts separately, instead of feeding
6362         the whole string to gettext.  This allows to exclude
6363         '\v' from the strings visible to the translator by writing doc
6364         strings as N_("..") "\v" N_("..").
6365
6366 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
6367
6368         * config/srclist.txt: Undo latest change; the bug was fixed.
6369
6370 2006-09-09  Bruno Haible  <bruno@clisp.org>
6371
6372         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
6373         assignments if building a library without libtool.
6374         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
6375         in func_emit_lib_Makefile_am.
6376         (func_import): When building a static library libfoo.a, arrange to
6377         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
6378         (func_create_testdir): Likewise.
6379         * modules/gc (configure.ac, Makefile.am): If building statically,
6380         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
6381         * modules/iconvme (configure.ac, Makefile.am): Likewise.
6382         * modules/striconv (configure.ac, Makefile.am): Likewise.
6383         Based on a suggestion by Ralf Wildenhues.
6384
6385 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
6386
6387         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
6388         Check for unistd.h too, since Autoconf doesn't assume POSIX.
6389         Also:
6390
6391         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
6392         Add year_2050_test to catch glibc bug 2821
6393         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
6394
6395         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
6396         Prefer #ifdef to #if.
6397
6398         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
6399         Return from 'main' instead of calling 'exit'.
6400
6401 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
6402
6403         * lib/mktime.c (guess_time_tm): Fix bug where mktime
6404         returned the maximum time_t value rather than (time_t) -1.
6405         Problem originally reported by William Bardwell
6406         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
6407
6408         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
6409         Moved to here ...
6410         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
6411         ... from here.
6412
6413 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
6414
6415         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
6416         2821 is fixed.
6417
6418 2006-09-08  Jim Meyering  <jim@meyering.net>
6419
6420         Don't make generated files read-only.  That would bother too many
6421         people.  However, do retain the ability to work when targets are
6422         read-only: remove the destination and temporary files before writing
6423         them (when generated via sed or echo), or by using the -f option for
6424         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
6425         * modules/alloca-opt, modules/argz, modules/arpa_inet:
6426         * modules/byteswap, modules/configmake, modules/fcntl:
6427         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
6428         * modules/localcharset, modules/netinet_in, modules/poll:
6429         * modules/stdbool, modules/stdint, modules/sys_select:
6430         * modules/sys_socket, modules/sys_stat, modules/sysexits:
6431
6432 2006-09-08  Jim Meyering  <jim@meyering.net>
6433
6434         Avoid new build failure on FreeBSD 6.0.
6435         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
6436         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
6437         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
6438
6439 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6440
6441         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
6442
6443 2006-09-07  Jim Meyering  <jim@meyering.net>
6444
6445         Fix global typo in last change: use chmod u-w, not chmod u-x.
6446         Spotted by Paul Eggert and Bruce Korb.
6447         * modules/alloca-opt, modules/argz, modules/arpa_inet:
6448         * modules/byteswap, modules/configmake, modules/fcntl:
6449         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
6450         * modules/localcharset, modules/netinet_in, modules/poll:
6451         * modules/stdbool, modules/stdint, modules/sys_select:
6452         * modules/sys_socket, modules/sys_stat, modules/sysexits:
6453
6454 2006-09-06  Jim Meyering  <jim@meyering.net>
6455
6456         Make generated files be read-only.
6457         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
6458         Ensure that each generated file is now read-only.
6459         * modules/argz: Likewise.
6460         * modules/arpa_inet: Likewise.
6461         * modules/byteswap: Likewise.
6462         * modules/configmake: Likewise.
6463         * modules/fcntl: Likewise.
6464         * modules/fnmatch: Likewise.
6465         * modules/getopt: Likewise.
6466         * modules/glob: Likewise.
6467         * modules/inttypes: Likewise.
6468         * modules/netinet_in: Likewise.
6469         * modules/poll: Likewise.
6470         * modules/stdbool: Likewise.
6471         * modules/stdint: Likewise.
6472         * modules/sys_select: Likewise.
6473         * modules/sys_socket: Likewise.
6474         * modules/sys_stat: Likewise.
6475         * modules/sysexits: Likewise.
6476         * modules/localcharset: Same as above, but continue using temporary
6477         file named "t-$@" (why different?) rather than the "$@-t" used
6478         everywhere else.
6479
6480         * modules/sysexits (Makefile.am): Replace literal occurrences
6481         of "sysexit.h" more readable, and more consistent, "$@".
6482
6483 2006-09-06  Bruno Haible  <bruno@clisp.org>
6484
6485         * modules/striconv: New file.
6486         * modules/xstriconv: New file.
6487         * MODULES.html.sh (Internationalization functions): Add striconv,
6488         xstriconv.
6489
6490 2006-09-06  Bruno Haible  <bruno@clisp.org>
6491
6492         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
6493         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
6494         not using libtool correctly.
6495
6496 2006-09-06  Bruno Haible  <bruno@clisp.org>
6497
6498         * lib/striconv.h: New file.
6499         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
6500         iconvstring.c.
6501         * lib/xstriconv.h: New file.
6502         * lib/xstriconv.c: New file.
6503
6504 2006-09-06  Bruno Haible  <bruno@clisp.org>
6505
6506         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
6507         lib_..._LDFLAGS.
6508
6509 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6510
6511         * lib/argz_.h: Sync from Libtool.
6512
6513         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
6514                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6515
6516         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
6517
6518 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
6519
6520         * modules/trim: New file.
6521
6522 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
6523
6524         * lib/trim.h: New file.
6525         * lib/trim.c: New file.
6526
6527 2006-09-05  Bruno Haible  <bruno@clisp.org>
6528
6529         * MODULES.html.sh (String handling): Add trim.
6530
6531 2006-09-04  Karl Berry  <karl@gnu.org>
6532
6533         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
6534         until next release.
6535
6536 2006-09-03  Bruno Haible  <bruno@clisp.org>
6537
6538         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
6539         correctly.
6540
6541 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
6542
6543         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
6544         not gl_GETLOADAVG.  Omit unneeded semicolons.
6545         Problems reported by Ralf Wildenhues in
6546         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
6547         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
6548         at the end, which is the usual gnulib style.
6549
6550         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
6551         of doing all the work ourselves.
6552         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
6553         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
6554
6555 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
6556
6557         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
6558         Problem reported by Ralf Wildenhues in
6559         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
6560
6561         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
6562         HAVE_STRUCT_STATFS_F_FSTYPENAME.
6563
6564 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
6565
6566         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
6567         yesterday's patch by changing test -n to test -z.
6568
6569 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
6570
6571         * modules/getloadavg (Files): Add m4/getloadavg.m4.
6572         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
6573         the former is now obsolescent.
6574
6575         * modules/chdir-long (Depends-on): Add fcntl.
6576
6577 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
6578
6579         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
6580         obsolescent, and programs should use gnulib instead.
6581         * m4/getloadavg.m4: New file, with contents taken from Autoconf
6582         but with prefixes changed.
6583
6584 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
6585
6586         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
6587         or stdbool.h, because they might not exist while configuring.
6588
6589         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
6590         Don't include unistd.h or limits.h; not needed, since chdir-long.h
6591         does that for us.
6592         (O_DIRECTORY): Remove.
6593
6594 2006-08-31  Eric Blake  <ebb9@byu.net>
6595
6596         * gnulib-tool: Don't let emacs change spaces to TAB.
6597
6598 2006-08-31  Bruno Haible  <bruno@clisp.org>
6599
6600         * gnulib-tool: When calling func_import more than once, do it in a
6601         subshell.
6602         Reported by Eric Blake <ebb9@byu.net>.
6603
6604 2006-08-31  Bruno Haible  <bruno@clisp.org>
6605
6606         * gnulib-tool (nl): Remove variable.
6607         (sed_transform_lib_file): Use more robust test for config-h module.
6608         (func_import): Fix typo in 2006-08-25 patch.
6609
6610 2006-08-31  Bruno Haible  <bruno@clisp.org>
6611
6612         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
6613         specified, augment Makefile.am variables instead of assigning them.
6614
6615 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
6616
6617         Work around a bug in both the Linux and SunOS 64-bit kernels:
6618         nanosleep mishandles sleeps for longer than 2**31 seconds.
6619         Problem reported by Frank v Waveren in
6620         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
6621         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
6622         Check for nanosleep bug.
6623         (LIB_NANOSLEEP): Append clock_gettime library if needed.
6624
6625 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
6626
6627         Work around a bug in both the Linux and SunOS 64-bit kernels:
6628         nanosleep mishandles sleeps for longer than 2**31 seconds.
6629         Problem reported by Frank v Waveren in
6630         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
6631         * lib/nanosleep.c (BILLION): New constant.
6632         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
6633         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
6634         implementation.
6635
6636 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
6637
6638         * modules/nanosleep (Depends-on): Add gettime.
6639
6640 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
6641         and Simon Josefsson  <jas@extundo.com>
6642         and Oskar Liljeblad  <oskar@osk.mine.nu>
6643
6644         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
6645         * gnulib-tool (func_import): New license type 'unmodifiable license
6646         text'.
6647         * modules/fdl: Use it.  Longer description.
6648         * module/gpl, module/lgpl: New files.
6649
6650 2006-08-30  Jim Meyering  <jim@meyering.net>
6651
6652         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
6653         shadowing the parameter.
6654
6655 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6656
6657         Sync from Libtool:
6658
6659         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6660
6661         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
6662         sharing with gnulib.  Report by Eric Blake.
6663
6664 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
6665
6666         * modules/isapipe: New file.
6667         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
6668
6669 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
6670
6671         * modules/configmake (Makefile.am): Add a comment, and omit
6672         the CONFIGMAKE_ prefix from generated macro names.  Suggested
6673         by Bruno Haible.
6674
6675 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
6676
6677         * m4/isapipe.m4: New file.
6678
6679 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
6680
6681         * lib/isapipe.c, lib/isapipe.h: New files.
6682
6683 2006-08-29  Jim Meyering  <jim@meyering.net>
6684
6685         * modules/configmake (Makefile.am): Make configmake.h depend on
6686         Makefile.  Otherwise, a stale configmake.h could hang around.
6687
6688 2006-08-29  Eric Blake  <ebb9@byu.net>
6689
6690         * lib/error.c (error_at_line, print_errno_message): Match libc, after
6691         resolution of upstream bug 3044.
6692
6693 2006-08-29  Bruno Haible  <bruno@clisp.org>
6694
6695         * modules/localcharset (Depends-on): Add configmake.
6696         (Makefile.am): Remove setting of LIBDIR through DEFS.
6697
6698 2006-08-29  Bruno Haible  <bruno@clisp.org>
6699
6700         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
6701         defined.
6702
6703 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
6704
6705         * modules/fcntl: New file.
6706         * modules/chdir-safer (Depends-on): Add fcntl.
6707         * modules/fts: Likewise.
6708         * modules/mkdir-p: Likewise.
6709
6710         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
6711         This undoes the most recent change, since we're now addressing the
6712         problem in a different way.
6713
6714         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
6715         into output, since the output might be called Makefile.am even
6716         if $makefile_name is something different.
6717         (func_import): Use $makefile_am rather than
6718         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
6719         empty.
6720
6721         * modules/inttypes (Files): Add m4/inttypes-h.m4.
6722
6723 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
6724
6725         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
6726         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
6727         recent change to stdint.m4, since we're now addressing the problem in a
6728         different way.
6729
6730 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
6731
6732         * m4/fcntl_h.m4: New file.
6733
6734 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
6735
6736         * lib/fcntl_.h: New file.
6737         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
6738         the fcntl module.
6739         * lib/dirchownmod.c: Likewise.
6740         * lib/fts.c: Likewise.
6741
6742         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
6743         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
6744         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
6745         just before including <inttypes.h>, to avoid circular inclusion.
6746
6747 2006-08-28  Jim Meyering  <jim@meyering.net>
6748
6749         * doc/visibility.texi: Actually read and correct the grammar of the
6750         sentence affected by yesterday's change.
6751
6752 2006-08-28  Eric Blake  <ebb9@byu.net>
6753
6754         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
6755         needs wrapper.
6756
6757 2006-08-28  Eric Blake  <ebb9@byu.net>
6758
6759         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
6760
6761 2006-08-28  Eric Blake  <ebb9@byu.net>
6762
6763         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
6764
6765 2006-08-28  Bruno Haible  <bruno@clisp.org>
6766
6767         * modules/c-strstr: New file, from GNU gettext.
6768         * MODULES.html.sh (String handling): Add c-strstr.
6769
6770 2006-08-28  Bruno Haible  <bruno@clisp.org>
6771
6772         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
6773         macros.
6774         Reported by Eric Blake.
6775
6776 2006-08-28  Bruno Haible  <bruno@clisp.org>
6777
6778         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
6779         (VASNPRINTF): Return a string of length > INT_MAX without failing.
6780         * lib/vasprintf.c: Include errno.h, limits.h.
6781         (EOVERFLOW): New fallback definition.
6782         (vasprintf): Test here whether the string length is > INT_MAX.
6783         * lib/vsnprintf.c: Include errno.h, limits.h.
6784         (EOVERFLOW): New fallback definition.
6785         (vsnprintf): Fix bug when generated string was too long for the buffer.
6786         Test here whether the string length is > INT_MAX.
6787
6788 2006-08-28  Bruno Haible  <bruno@clisp.org>
6789
6790         * lib/inttypes_.h (SCNX*): Remove definitions.
6791         Reported by Eric Blake.
6792
6793 2006-08-28  Bruno Haible  <bruno@clisp.org>
6794
6795         * lib/c-strstr.h: New file, from GNU gettext.
6796         * lib/c-strstr.c: New file, from GNU gettext.
6797
6798 2006-08-28  Bruno Haible  <bruno@clisp.org>
6799
6800         * gnulib-tool: Reorder some statements.
6801
6802 2006-08-28  Bruno Haible  <bruno@clisp.org>
6803
6804         * gnulib-tool: New option --makefile-name.
6805         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
6806         $makefile_name.
6807         (func_import): Write $makefile_name to the cache file, and read it from
6808         there unless explicitly specified. Use $makefile_name as file name
6809         instead of Makefile.am. Adjust the recommendations accordingly.
6810
6811 2006-08-28  Bruno Haible  <bruno@clisp.org>
6812
6813         * gnulib-tool (func_verify_module): Check against misapplying patch.
6814
6815 2006-08-28  Bruno Haible  <bruno@clisp.org>
6816
6817         * gnulib-tool (func_relativize, func_relconcat): New functions.
6818         Give an error if --local-dir is given with --update.
6819         Remove trailing slashes from $local_gnulib_dir.
6820         (func_import): Store the relativized $local_gnulib_dir in
6821         gnulib-cache.m4, and read it from there if not specified explicitly.
6822
6823 2006-08-28  Bruno Haible  <bruno@clisp.org>
6824
6825         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
6826         is the current directory. Respect also $local_gnulib_dir.
6827
6828 2006-08-28  Bruno Haible  <bruno@clisp.org>
6829             Simon Josefsson  <jas@extundo.com>
6830
6831         BeOS portability.
6832         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
6833
6834 2006-08-27  Jim Meyering  <jim@meyering.net>
6835
6836         * doc/visibility.texi: Remove duplicate word: "pointer".
6837
6838 2006-08-26  Bruno Haible  <bruno@clisp.org>
6839
6840         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
6841         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
6842         (Makefile.am): Create inttypes.h from inttypes_.h.
6843         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
6844
6845         * modules/imaxabs: New file.
6846
6847         * modules/imaxdiv: New file.
6848
6849 2006-08-26  Bruno Haible  <bruno@clisp.org>
6850
6851         * m4/inttypes.m4: New file.
6852         * m4/_inttypes_h.m4: Remove file.
6853         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
6854         PRI_MACROS_BROKEN.
6855         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
6856
6857         * m4/imaxabs.m4: New file.
6858
6859         * m4/imaxdiv.m4: New file.
6860
6861 2006-08-26  Bruno Haible  <bruno@clisp.org>
6862
6863         * lib/inttypes_.h: New file.
6864         * lib/inttypes.h: Remove file.
6865         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
6866
6867         * lib/imaxabs.c: New file.
6868
6869         * lib/imaxdiv.c: New file.
6870
6871 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
6872
6873         New config-h module, so that "make" output needn't be cluttered
6874         by -DHAVE_CONFIG_H.
6875         * MODULES.html.sh (Support for building libraries and executables):
6876         Add config-h.
6877         * modules/config-h: New file.
6878         * gnulib-tool (nl, sed_transform_lib_file): New vars.
6879         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
6880         the config-h module is used.
6881
6882         New configmake module, so that "make" output needn't be cluttered
6883         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
6884         * MODULES.html.sh (Support for building libraries and executables):
6885         Add configmake.
6886         * modules/configmake: New file.
6887
6888 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
6889
6890         * m4/config-h.m4: New file.
6891
6892 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
6893
6894         * config/srclist.txt: Add elisp-comp.
6895
6896 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
6897
6898         * MODULES.html.sh (Support for building libraries and executables):
6899         Add elisp-comp.
6900         * build-aux/elisp-comp: New file.
6901         * modules/elisp-comp: New file.
6902
6903 2006-08-24  Bruno Haible  <bruno@clisp.org>
6904
6905         * gnulib-tool (func_create_testdir): Use non-default values of
6906         sourcebase and m4base.
6907
6908 2006-08-24  Bruno Haible  <bruno@clisp.org>
6909
6910         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
6911         HTML structure.
6912
6913 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
6914
6915         * modules/openat (Depends-on): Add lchown.
6916
6917 2006-08-23  Bruno Haible  <bruno@clisp.org>
6918
6919         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
6920         of gl_LOCK_EARLY instead of gl_LOCK.
6921
6922 2006-08-23  Bruno Haible  <bruno@clisp.org>
6923
6924         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
6925         on OSF/1 to no.
6926         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
6927
6928 2006-08-23  Bruno Haible  <bruno@clisp.org>
6929
6930         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
6931         as unusable.
6932
6933         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
6934         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
6935         (gl_LOCK): New macro.
6936
6937 2006-08-22  Simon Josefsson  <jas@extundo.com>
6938
6939         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
6940         to md5 module.
6941
6942 2006-08-22  Simon Josefsson  <jas@extundo.com>
6943
6944         * MODULES.html.sh: Add "Support for maintaining and release
6945         projects".
6946
6947         * build-aux/gnupload: New file, from coreutils.
6948
6949 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
6950
6951         Avoid the need for AC_LIBSOURCES in m4 macros.
6952         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
6953         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
6954         * modules/check-version (EXTRA_DIST): Add check-version.h.
6955         * modules/crc (EXTRA_DIST): Add crc.h.
6956         * modules/des (EXTRA_DIST): Add des.h.
6957         * modules/gc (EXTRA_DIST): Add gc.h.
6958         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
6959         * modules/getline (EXTRA_DIST): Add getline.h.
6960         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
6961         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
6962         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
6963         * modules/md2 (EXTRA_DIST): Add md2.h.
6964         * modules/md4 (EXTRA_DIST): Add md4.h.
6965         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
6966         * modules/read-file (EXTRA_DIST): Add read-file.h.
6967         * modules/readline (EXTRA_DIST): Add readline.h.
6968         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
6969         rijndael-api-fst.h.
6970
6971 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
6972
6973         * m4/rijndael.m4 (gl_ARCFOUR):
6974         * m4/arctwo.m4 (gl_ARCTWO):
6975         * m4/check-version.m4 (gl_CHECK_VERSION):
6976         * m4/crc.m4 (gl_CRC):
6977         * m4/des.m4 (gl_DES):
6978         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
6979         * m4/gc.m4 (gl_GC):
6980         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
6981         * m4/getline.m4 (gl_FUNC_GETLINE):
6982         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
6983         * m4/hmac-md5.m4 (gl_HMAC_MD5):
6984         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
6985         * m4/md2.m4 (gl_MD2):
6986         * m4/md4.m4 (gl_MD4):
6987         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
6988         * m4/read-file.m4 (gl_FUNC_READ_FILE):
6989         * m4/readline.m4 (gl_FUNC_READLINE):
6990         * m4/rijndael.m4 (gl_RIJNDAEL):
6991         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
6992         to get the necessary .h files and whatnot.
6993
6994 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
6995
6996         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
6997         gnulib rather than the other way around.
6998         * config/srclistvars.sh (COREUTILS): Remove.
6999
7000 2006-08-22  Jim Meyering  <jim@meyering.net>
7001
7002         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
7003
7004         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
7005
7006 2006-08-22  Eric Blake  <ebb9@byu.net>
7007
7008         * modules/regexprops-generic: New file.
7009         * MODULES.html.sh (Support for building documentation): List it.
7010
7011 2006-08-22  Eric Blake  <ebb9@byu.net>
7012
7013         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
7014         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
7015         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
7016         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
7017
7018 2006-08-22  Bruno Haible  <bruno@clisp.org>
7019
7020         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
7021         and lib_LTLIBRARIES like the other lib_* variables.
7022
7023 2006-08-22  Bruno Haible  <bruno@clisp.org>
7024
7025         * build-aux/x-to-1.in: New file, from GNU gettext.
7026
7027 2006-08-22  Bruno Haible  <bruno@clisp.org>
7028
7029         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
7030         <utmpx.h> exists.
7031
7032 2006-08-22  Bruno Haible  <bruno@clisp.org>
7033
7034         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
7035         <utmpx.h> exists.
7036
7037 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
7038
7039         BeOS portability.
7040         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
7041         exist.
7042         Problem reported by Bruno Haible.
7043
7044 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
7045
7046         Avoid the need for AC_LIBSOURCES in m4 macros.
7047         * modules/acl (EXTRA_DIST): Add acl.h.
7048         * modules/argmatch (Files): Add m4/argmatch.m4.
7049         (configure.ac): Add gl_ARGMATCH.
7050         (EXTRA_DIST): Renamed from lib_SOURCES, for
7051         consistency with the other modules.  Remove argmatch.c.
7052         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
7053         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
7054         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
7055         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
7056         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
7057         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
7058         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
7059         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
7060         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
7061         * modules/closeout (EXTRA_DIST): Add closeout.h.
7062         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
7063         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
7064         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
7065         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
7066         dirname.h; remove basename.c and stripslash.c.
7067         * modules/exclude (EXTRA_DIST): Add exclude.h.
7068         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
7069         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
7070         * modules/file-type (EXTRA_DIST): Add file-type.h.
7071         * modules/filemode (EXTRA_DIST): Add filemode.h.
7072         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
7073         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
7074         * modules/fpending (EXTRA_DIST): Add __fpending.h.
7075         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
7076         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
7077         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
7078         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
7079         * modules/getdate (EXTRA_DIST): Add getdate.c.
7080         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
7081         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
7082         * modules/getpass (EXTRA_DIST): Add getpass.h.
7083         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
7084         * modules/group-member (EXTRA_DIST): Add group-member.h.
7085         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
7086         * modules/hash (EXTRA_DIST): Add hash.h.
7087         * modules/human (EXTRA_DIST): Add human.h.
7088         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
7089         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
7090         * modules/lchown (EXTRA_DIST): Add lchown.h.
7091         * modules/long-options (EXTRA_DIST): Add long-options.h.
7092         * modules/lstat (EXTRA_DIST): Add lstat.h.
7093         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
7094         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
7095         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
7096         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
7097         * modules/memxor (EXTRA_DIST): Add memxor.h.
7098         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
7099         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
7100         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
7101         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
7102         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
7103         * modules/physmem (EXTRA_DIST): Add physmem.h.
7104         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
7105         * modules/posixver (EXTRA_DIST): Add posixver.h.
7106         * modules/quote (EXTRA_DIST): Add quote.h.
7107         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
7108         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
7109         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
7110         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
7111         regex_internal.h regexec.c.
7112         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
7113         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
7114         * modules/same (EXTRA_DIST): Add same.h.
7115         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
7116         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
7117         * modules/savedir (EXTRA_DIST): Add savedir.h.
7118         * modules/sha1 (EXTRA_DIST): Add sha1.h.
7119         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
7120         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
7121         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
7122         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
7123         * modules/strdup (EXTRA_DIST): Add strdup.h.
7124         * modules/strftime (EXTRA_DIST): Add strftime.h.
7125         * modules/strndup (EXTRA_DIST): Add strndup.h.
7126         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
7127         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
7128         * modules/time_r (EXTRA_DIST): Add time_r.h.
7129         * modules/timespec (EXTRA_DIST): Add timespec.h.
7130         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
7131         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
7132         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
7133         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
7134         * modules/userspec (EXTRA_DIST): Add userspec.h.
7135         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
7136         * modules/utimens (EXTRA_DIST): Add utimens.h.
7137         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
7138         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
7139         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
7140         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
7141         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
7142         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
7143         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
7144         * modules/yesno (EXTRA_DIST): Add yesno.h.
7145
7146 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
7147
7148         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
7149
7150         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
7151         * m4/dev-ino.m4, same-inode.m4: Remove.
7152
7153         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
7154         * m4/acl.m4 (AC_FUNC_ACL):
7155         * m4/backupfile.m4 (gl_BACKUPFILE):
7156         * m4/c-strtod.m4 (gl_C99_STRTOLD):
7157         * m4/canon-host.m4 (gl_CANON_HOST):
7158         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
7159         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
7160         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
7161         * m4/cloexec.m4 (gl_CLOEXEC):
7162         * m4/close-stream.m4 (gl_CLOSE_STREAM):
7163         * m4/closeout.m4 (gl_CLOSEOUT):
7164         * m4/dirfd.m4 (gl_FUNC_DIRFD):
7165         * m4/dirname.m4 (gl_DIRNAME):
7166         * m4/exclude.m4 (gl_EXCLUDE):
7167         * m4/exitfail.m4 (gl_EXITFAIL):
7168         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
7169         * m4/file-type.m4 (gl_FILE_TYPE):
7170         * m4/filemode.m4 (gl_FILEMODE):
7171         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
7172         * m4/fpending.m4 (gl_FUNC_FPENDING):
7173         * m4/fprintftime.m4 (gl_FPRINTFTIME):
7174         * m4/fts.m4 (gl_FUNC_FTS):
7175         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
7176         * m4/getdate.m4 (gl_GETDATE):
7177         * m4/gethrxtime.m4 (gl_GETHRXTIME):
7178         * m4/getpagesize.m4 (gl_GETPAGESIZE):
7179         * m4/getpass.m4 (gl_FUNC_GETPASS):
7180         * m4/gettime.m4 (gl_GETTIME):
7181         * m4/getugroups.m4 (gl_GETUGROUPS):
7182         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
7183         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
7184         * m4/hard-locale.m4 (gl_HARD_LOCALE):
7185         * m4/hash.m4 (gl_HASH):
7186         * m4/idcache.m4 (gl_IDCACHE):
7187         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
7188         * m4/lchown.m4 (gl_FUNC_LCHOWN):
7189         * m4/long-options.m4 (gl_LONG_OPTIONS):
7190         * m4/lstat.m4 (gl_FUNC_LSTAT):
7191         * m4/md5.m4 (gl_MD5):
7192         * m4/memcasecmp.m4 (gl_MEMCASECMP):
7193         * m4/memcoll.m4 (gl_MEMCOLL):
7194         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
7195         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
7196         * m4/memxor.m4 (gl_MEMXOR):
7197         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
7198         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
7199         * m4/modechange.m4 (gl_MODECHANGE):
7200         * m4/mountlist.m4 (gl_MOUNTLIST):
7201         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
7202         * m4/openat.m4 (gl_FUNC_OPENAT):
7203         * m4/pathmax.m4 (gl_PATHMAX):
7204         * m4/physmem.m4 (gl_PHYSMEM):
7205         * m4/posixtm.m4 (gl_POSIXTM):
7206         * m4/posixver.m4 (gl_POSIXVER):
7207         * m4/quote.m4 (gl_QUOTE):
7208         * m4/quotearg.m4 (gl_QUOTEARG):
7209         * m4/readtokens.m4 (gl_READTOKENS):
7210         * m4/readutmp.m4 (gl_READUTMP):
7211         * m4/regex.m4 (gl_REGEX):
7212         * m4/safe-read.m4 (gl_SAFE_READ):
7213         * m4/safe-write.m4 (gl_SAFE_WRITE):
7214         * m4/same.m4 (gl_SAME):
7215         * m4/save-cwd.m4 (gl_SAVE_CWD):
7216         * m4/savedir.m4 (gl_SAVEDIR):
7217         * m4/settime.m4 (gl_SETTIME):
7218         * m4/sha1.m4 (gl_SHA1):
7219         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
7220         * m4/stat-macros.m4 (gl_STAT_MACROS):
7221         * m4/stat-time.m4 (gl_STAT_TIME):
7222         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
7223         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
7224         * m4/strdup.m4 (gl_FUNC_STRDUP):
7225         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
7226         * m4/strndup.m4 (gl_FUNC_STRNDUP):
7227         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
7228         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
7229         * m4/time_r.m4 (gl_TIME_R):
7230         * m4/timespec.m4 (gl_TIMESPEC):
7231         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
7232         * m4/unlinkdir.m4 (gl_UNLINKDIR):
7233         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
7234         * m4/userspec.m4 (gl_USERSPEC):
7235         * m4/utimecmp.m4 (gl_UTIMECMP):
7236         * m4/utimens.m4 (gl_UTIMENS):
7237         * m4/xalloc.m4 (gl_XALLOC):
7238         * m4/xgetcwd.m4 (gl_XGETCWD):
7239         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
7240         * m4/xreadlink.m4 (gl_XREADLINK):
7241         * m4/xstrtod.m4 (gl_XSTRTOD):
7242         * m4/yesno.m4 (gl_YESNO):
7243         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
7244         to get the necessary .h files and whatnot.
7245
7246 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
7247             Bruno Haible  <bruno@clisp.org>
7248
7249         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
7250         /bin/sh understanding of '!' conditional negation.
7251
7252 2006-08-21  Jim Meyering  <jim@meyering.net>
7253
7254         * modules/openat (Depends-on): Really alphabetize.
7255
7256         * modules/acl (Depends-on): Add error and quote.
7257
7258         * check-module (find_included_lib_files): Add at-func.c to the
7259         ok-to-include-more-than-once white list.
7260
7261         * modules/openat (Depends-on): Add lstat.  Alphabetize.
7262
7263 2006-08-21  Bruno Haible  <bruno@clisp.org>
7264
7265         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7266         Emit a pkgdata_DATA variable only if some snippets add contents to it.
7267         Reported by Martin Lambers <marlam@marlam.de>.
7268
7269 2006-08-21  Bruno Haible  <bruno@clisp.org>
7270
7271         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
7272         specify an installation location, don't emit a noinst_LIBRARIES or
7273         noinst_LTLIBRARIES assignment.
7274
7275 2006-08-21  Bruno Haible  <bruno@clisp.org>
7276
7277         BeOS portability.
7278         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
7279         BeOS has mbrtowc() but no <wctype.h>.
7280
7281 2006-08-21  Bruno Haible  <bruno@clisp.org>
7282
7283         BeOS portability.
7284         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
7285         exist.
7286
7287 2006-08-21  Bruno Haible  <bruno@clisp.org>
7288
7289         BeOS portability.
7290         * lib/mbchar.h: Include <wctype.h> only if it exists.
7291
7292 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
7293
7294         Remove files that are no longer needed by their respective modules.
7295         * m4/obstack.m4: Remove.
7296         * m4/strerror_r.m4: Remove.
7297         * m4/uint32_t.m4: Remove.
7298         * m4/uintptr_t.m4: Remove.
7299         * m4/ullong_max.m4: Remove.
7300         * m4/xstrtoimax.m4: Remove.
7301         * m4/xstrtoumax.m4: Remove.
7302
7303         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
7304         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
7305         dependencies now capture this.
7306
7307         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
7308         Do not use AC_LIBSOURCES, since gnulib modules now do this.
7309         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
7310         * m4/human.m4 (gl_HUMAN): Likewise.
7311         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
7312         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
7313
7314         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
7315
7316         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
7317         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
7318         stdint.
7319         * m4/human.m4 (gl_HUMAN): Likewise.
7320         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
7321         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
7322         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
7323         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
7324         * m4/xstrtol (gl_XSTRTOL): Likewise.
7325
7326         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
7327         AC_TYPE_LONG_LONG_INT.
7328         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
7329         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
7330         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
7331         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
7332
7333         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
7334         on stdbool.
7335
7336         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
7337         (gl_PREREQ_XSTRTOUL): Remove.
7338
7339         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
7340
7341         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
7342         mode.
7343
7344 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
7345
7346         Add and change modules to make it easier for coreutils to use
7347         gnulib-tool.
7348         * modules/backupfile (Files): Remove m4/d-ino.m4.
7349         (Depends-on): Add d-ino.
7350         * modules/cycle-check (Depends-on): Add stdint.
7351         (lib_SOURCES): Add cycle-check.h.
7352         * modules/d-ino: New module.
7353         * modules/d-type: New module.
7354         * modules/error (Files): Remove m4/strerror_r.m4.
7355         * modules/filemode (Files): Add m4/st_dm_mode.m4.
7356         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
7357         m4/inttypes_h.m4, m4/uintmax_t.m4.
7358         (Depends-on): Add stdint.
7359         (lib_SOURCES): Add fsusage.h.
7360         * modules/getcwd (Files): Remove d-ino.m4.
7361         (Depends-on): Add d-ino.
7362         * modules/getndelim2 (Depends-on): Add stdint.
7363         * modules/glob (Files): Remove m4/d-type.m4.
7364         (Depends-on): Add d-type.
7365         * modules/host-os: New module.
7366         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
7367         m4/inttypes_h.m4, m4/uintmax_t.m4.
7368         * Depends-on: Add stdint.
7369         (lib_SOURCES): Add human.h.
7370         * modules/inttostr (Files): Remove m4/intmax_t.m4,
7371         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
7372         m4/uintmax_t.m4, m4/ulonglong.m4.
7373         (Depends-on): Add stdint.
7374         (EXTRA_DIST): Add inttostr.h.
7375         * modules/lchmod: New module.
7376         * modules/link-follow: New module.
7377         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
7378         (Depends-on): Add lchmod.
7379         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
7380         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
7381         (Depends-on): Add stdint.
7382         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
7383         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
7384         (Depends-on): Add stdint.
7385         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
7386         * modules/perl: New module.
7387         * modules/regex (Depends-on): Add stdint.
7388         * modules/rmdir-errno: New module.
7389         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
7390         m4/intmax_t.m4.
7391         (Depends-on): Add stdint.
7392         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
7393         m4/uintmax_t.m4.
7394         (Depends-on): Add stdint.
7395         * modules/unlink-busy: New module.
7396         * modules/utimecmp (Depends-on): Add stdint.
7397         * modules/uptime: New module.
7398         * modules/winsz-ioctl: New module.
7399         * modules/winsz-termios: New module.
7400         * modules/xnanosleep (Depends-on): Add nanosleep.
7401         * modules/ullong_max: Remove.
7402         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
7403         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
7404         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
7405         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
7406         (Depends-on): Add inttypes.
7407         (lib_SOURCES): Add xstrtol.h.
7408         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
7409         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
7410         * MODULES.html.sh: Move 'assert' into the assert section.
7411         Move 'dummy' into the linking section.
7412         Remove ullong_max.
7413         Add section for compatibility checks for POSIX:2001 functions,
7414         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
7415         winsz-ioctl, and winsz-termios into it.
7416         Add lchmod.
7417         Add top-level Misc section and put host-os, perl, and uptime
7418         into it.
7419
7420 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
7421
7422         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
7423         now assume the stdint module.  Do not include inttypes.h.
7424         * lib/fsusage.h: Likewise.
7425         * lib/getndelim2.c: Likewise.
7426         * lib/human.h: Likewise.
7427         * lib/inttostr.h: Likewise.
7428         * lib/obstack.c: Likewise.
7429         * lib/regex_internal.h: Likewise.
7430         * lib/tempname.c: Likewise.
7431         * lib/utimecmp.c: Likewise.
7432         * lib/xstrtol.h: Likewise.
7433
7434         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
7435
7436         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
7437         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
7438         * lib/xtime.h: Likewise.
7439
7440 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
7441
7442         * modules/openat (Files): Add lib/fchmodat.c.
7443         Fixes problem reported by Jay Youngman.
7444
7445 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
7446
7447         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
7448         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
7449
7450 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
7451             Bruno Haible  <bruno@clisp.org>
7452
7453         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
7454         and is a script that invokes bison. Tighten the code. Add comments.
7455
7456 2006-08-18  Jim Meyering  <jim@meyering.net>
7457
7458         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
7459         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
7460         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
7461         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
7462
7463 2006-08-18  Bruno Haible  <bruno@clisp.org>
7464
7465         * modules/bison-i18n: New file.
7466         * MODULES.html.sh (Internationalization functions): Add it.
7467
7468 2006-08-18  Bruno Haible  <bruno@clisp.org>
7469
7470         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
7471         sys/statvfs.h. When getmntinfo was found, check its declaration and
7472         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
7473
7474 2006-08-18  Bruno Haible  <bruno@clisp.org>
7475
7476         * m4/bison-i18n.m4: New file, from bison.
7477
7478 2006-08-18  Bruno Haible  <bruno@clisp.org>
7479
7480         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
7481         (ME_DUMMY): Treat "kernfs" as a dummy.
7482         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
7483
7484 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
7485
7486         Update from coreutils.
7487
7488         2006-08-15  Jim Meyering  <jim@meyering.net>
7489
7490         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
7491
7492         2006-01-17  Jim Meyering  <jim@meyering.net>
7493
7494         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
7495
7496         2006-01-11  Jim Meyering  <jim@meyering.net>
7497
7498         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
7499         Check for the lchmod function.
7500
7501 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
7502
7503         Update from coreutils.
7504
7505         * lib/__fpending.h: Add copyright notice.
7506         * lib/fprintftime.h: Likewise.
7507         * lib/savedir.c: Use (C) in copyright notice.
7508         * lib/savedir.h: Likewise.
7509
7510         2006-08-15  Jim Meyering  <jim@meyering.net>
7511
7512         * lib/at-func.c: New file, with the logic of all emulated at-functions.
7513         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
7514         in support of the EXPECTED_ERRNO macro.
7515         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
7516         definitions.  Instead, define the appropriate symbols and include
7517         "at-func.c".
7518         * lib/mkdirat.c (mkdirat): Likewise.
7519         * lib/fchmodat.c (fchmodat): Likewise.
7520         (ENOSYS): Remove definition.
7521         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
7522         it.  Don't include "unistd--.h" -- it wasn't ever used.
7523
7524         2006-01-17  Jim Meyering  <jim@meyering.net>
7525
7526         Rewrite fts.c not to change the current working directory,
7527         by using openat, fstatat, fdopendir, etc..
7528
7529         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
7530         (HAVE_OPENAT_SUPPORT): Define.
7531         [_LIBC] (fchdir): Don't undef or define; no longer used.
7532         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
7533         Now, this `function' always succeeds, and consumes its file descriptor
7534         parameter -- so callers must not close such FDs.  Update callers.
7535         (diropen_fd, opendirat, cwd_advance_fd): New functions.
7536         (diropen): Add parameter, SP.  Adjust all callers.
7537         Implement using diropen_fd, rather than open.
7538         (fts_open): Initialize new member, fts_cwd_fd.
7539         Remove fts_rft-setting code.
7540         (fts_close): Close fts_cwd_fd, if necessary.
7541         (__opendir2): Define in terms of opendir or opendirat,
7542         depending on whether the FST_NOCHDIR flag is set.
7543         (fts_build): Since fts_safe_changedir consumes its FD, and since
7544         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
7545         and close the dup'd file descriptor upon failure.
7546         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
7547         (fts_safe_changedir): Tweak semantics to reflect that this function
7548         now calls cwd_advance_fd and hence consumes its FD argument.
7549         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
7550         [struct FTS] (fts_rft): Remove now-unused member.
7551         [struct FTS] (fts_cycle.state): Improve comment.
7552
7553         * lib/openat.c (openat_needs_fchdir): New function.
7554         * lib/openat.h (openat_needs_fchdir): Declare it.
7555
7556 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
7557
7558         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
7559         Problem and fix reported by Pádraig Brady in
7560         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
7561
7562 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
7563
7564         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
7565
7566 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
7567
7568         * lib/memcoll.c (memcoll): Optimize for the common case where the
7569         arguments are bytewise equal.
7570
7571 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
7572
7573         * doc/regexprops-generic.texi: Add a copyright notice.
7574
7575 2006-08-15  Bruno Haible  <bruno@clisp.org>
7576
7577         * modules/tmpdir (License): Change to LGPL.
7578
7579 2006-08-15  Bruno Haible  <bruno@clisp.org>
7580
7581         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
7582         module.
7583
7584 2006-08-14  Simon Josefsson  <jas@extundo.com>
7585
7586         * config/srclist.txt: Add gnupload.
7587
7588 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
7589
7590         Change copyright notice from LGPL 2 to GPL 2, since that's the
7591         standard form used in the gnulib repository.
7592         * tests/test-lock.c: Likewise.
7593         * tests/test-stdint.c: Likewise.
7594         * tests/test-tls.c: Likewise.
7595
7596         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
7597         prelude-manager.  User shorter URLs for GNU projects, without '?'.
7598         Add copyright notice.
7599
7600         * check-module: Add copyright notice.  Output a copyright
7601         notice if "--version" is specified.
7602         * modules/COPYING: New file.
7603         * tests/test-getaddrinfo.c: Add copyright notice.
7604         * tests/test-verify.c: Likewise.
7605
7606 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
7607
7608         Change copyright notice from LGPL 2 to GPL 2, since that's the
7609         standard form used in the gnulib repository.
7610         * lib/lock.c: LGPL -> GPL.
7611         * lib/lock.h: Likewise.
7612         * lib/strnlen1.c: Likewise.
7613         * lib/strnlen1.h: Likewise.
7614         * lib/tls.c: Likewise.
7615         * lib/tls.h: Likewise.
7616         * lib/tmpdir.c: Likewise.
7617
7618         * lib/TODO: Remove; this belongs only in coreutils.
7619
7620 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
7621
7622         Add copyright notices to long-enough files that lack them, since
7623         otherwise the files aren't clearly free.  Use the same notice that
7624         getdate.texi already uses.
7625         * doc/alloca-opt.texi: Add copyright notice.
7626         * doc/alloca.texi: Likewise.
7627         * doc/ctime.texi: Likewise.
7628         * doc/functions.texi: Likewise.
7629         * doc/gcd.texi: Likewise.
7630         * doc/gnulib-tool.texi: Likewise.
7631         * doc/inet_ntoa.texi: Likewise.
7632         * doc/visibility.texi: Likewise.
7633
7634         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
7635         * doc/quote.texi: Add copyright notice.
7636
7637         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
7638         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
7639         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
7640         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
7641         is now obsolete, and give a pointer to the Sun list.
7642         Add copyright notice.
7643
7644 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
7645
7646         * config/srclistvars.sh: Add copyright notice.
7647
7648 2006-08-14  Eric Blake  <ebb9@byu.net>
7649
7650         Import the following change from libc:
7651
7652         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
7653
7654         Upstream bug 2997.
7655         * lib/misc/error.c: Add space between program name and message if file
7656         name is missing.
7657
7658 2006-08-12  Karl Berry  <karl@gnu.org>
7659
7660         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
7661         remove, these originate in gnulib now.
7662
7663 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7664
7665         * doc/Makefile (standards.info standards.html standards.dvi):
7666         Also depend on make-stds.texi.
7667
7668 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
7669
7670         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
7671         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
7672
7673         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
7674         in wchar_t.  Problem reported by Eric Blake.
7675
7676         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
7677         LEN is smaller than SIZE.  Suggested by Bruno Haible.
7678         Also, help the compiler to keep LEN in a register.
7679
7680 2006-08-11  Eric Blake  <ebb9@byu.net>
7681
7682         * users.txt: Sort.  Add tar.
7683
7684 2006-08-11  Bruno Haible  <bruno@clisp.org>
7685
7686         * users.txt: New file.
7687
7688 2006-08-11  Bruno Haible  <bruno@clisp.org>
7689
7690         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
7691         before <wchar.h>. Needed for OSF/1 and BSD/OS.
7692
7693 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
7694
7695         * modules/snprintf (Depends-on): Remove minmax.
7696         (Maintainer): Add self and Bruno.
7697
7698 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
7699
7700         * lib/.cppi-disable: Add snprintf.h, socket_.h.
7701         * lib/snprintf.c: Include <errno.h> and <limits.h>.
7702         (EOVERFLOW): Define if the system does not.
7703         Do not include "minmax.h"; it wasn't used.
7704         (snprintf): Don't assume size_t promotes to an unsigned type.
7705         Fix bug when generated string was too long for the buffer: the
7706         buffer's contents are supposed to be the initial prefix of the
7707         output.  Don't assume vasnprintf returns EOVERFLOW if the size
7708         exceeds INT_MAX; do the check ourselves.
7709
7710         Import the following changes from libc:
7711
7712         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
7713
7714         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
7715         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
7716         set wc to the byte which couldn't be converted.
7717         (re_string_reconstruct): Don't clear valid_raw_len before calling
7718         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
7719         tip_context using re_string_context_at.
7720
7721         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
7722
7723         * lib/posix/regex.h: g++ still cannot handled [restrict].
7724
7725         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
7726
7727         * lib/posix/regex.h: Remove special handling for VMS.
7728
7729 2006-08-10  Jim Meyering  <jim@meyering.net>
7730
7731         * modules/same-inode: New module.
7732         * modules/dev-ino: New module.
7733         * modules/cycle-check: Depend on these modules, rather than simply
7734         including their .h files.
7735         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
7736         required via m4/cycle-check.m4.
7737         * modules/same: Depend on new same-inode module, rather than
7738         including same-inode.h.
7739         * modules/chdir-safer: New file.
7740
7741         * modules/chown (Depends-on): Add stat-macros.
7742
7743 2006-08-10  Jim Meyering  <jim@meyering.net>
7744
7745         * m4/cycle-check.m4: New file.
7746         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
7747         * m4/dev-ino.m4, m4/same-inode.m4: New files.
7748
7749 2006-08-10  Eric Blake  <ebb9@byu.net>
7750
7751         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
7752         in from original proposal.
7753
7754 2006-08-10  Eric Blake  <ebb9@byu.net>
7755         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7756
7757         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
7758         namespace.
7759
7760 2006-08-10  Bruno Haible  <bruno@clisp.org>
7761
7762         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
7763         as well.
7764
7765 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
7766
7767         Sync from coreutils.
7768
7769         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
7770
7771         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
7772         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
7773
7774 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
7775
7776         * modules/restrict: Remove; no longer needed now that we assume
7777         Autoconf 2.59 or later.
7778         * MODULES.html.sh: Remove 'restrict'.
7779         * modules/argp (Depends-on): Remove 'restrict'.
7780         * modules/base64 (Depends-on): Likewise.
7781         * modules/gc (Depends-on): Likewise.
7782         * modules/getaddrinfo (Depends-on): Likewise.
7783         * modules/glob (Depends-on): Likewise.
7784         * modules/inet_ntop (Depends-on): Likewise.
7785         * modules/inet_pton (Depends-on): Likewise.
7786         * modules/memxor (Depends-on): Likewise.
7787         * modules/regex (Depends-on): Likewise.
7788         * modules/strtok_r (Depends-on): Likewise.
7789         * modules/time_r (Depends-on): Likewise.
7790
7791 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
7792
7793         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
7794         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
7795         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
7796         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
7797         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
7798         * m4/memxor.m4 (gl_MEMXOR): Likewise.
7799         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
7800         gl_C_RESTRICT replaced by AC_C_RESTRICT.
7801
7802         Merge from coreutils.
7803         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
7804         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
7805         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
7806         * m4/time_r.m4 (gl_TIME_R): Likewise.
7807
7808 2006-08-09  Karl Berry  <karl@gnu.org>
7809
7810         * config/srclist.txt: no more gettext-tools, per Bruno.
7811
7812 2006-08-08  Eric Blake  <ebb9@byu.net>
7813
7814         * modules/verror: New module.
7815         * MODULES.html.sh: Document it.
7816
7817 2006-08-08  Eric Blake  <ebb9@byu.net>
7818
7819         * lib/verror.h, lib/verror.c: New files.
7820
7821 2006-08-08  Eric Blake  <ebb9@byu.net>
7822
7823         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
7824         verror_at_line output complies with GNU Coding Standards even when
7825         file is NULL.
7826
7827 2006-08-07  Bruno Haible  <bruno@clisp.org>
7828
7829         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
7830         versions of AIX.
7831         Reported by Ralf Wildenhues.
7832
7833 2006-08-07  Bruno Haible  <bruno@clisp.org>
7834
7835         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
7836         in an AC_DEFUN. Needed so that the autoconf snippets can use
7837         AC_REQUIRE.
7838
7839 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7840
7841         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7842         Initialize pkgdata_DATA.
7843         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
7844         overriding it.
7845
7846 2006-08-06  Eric Blake  <ebb9@byu.net>
7847
7848         * lib/error.h: Fold in some upstream changes from glibc.
7849         * lib/error.c: Likewise.
7850
7851 2006-08-04  Bruno Haible  <bruno@clisp.org>
7852
7853         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7854         Make the mostlyclean-local rule depend on mostlyclean-generic.
7855         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
7856
7857 2006-07-31  Bruno Haible  <bruno@clisp.org>
7858
7859         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
7860         <stdlib.h>, <string.h>.
7861
7862 2006-07-30  Bruno Haible  <bruno@clisp.org>
7863
7864         * modules/readlink (License): Change to LGPL.
7865
7866 2006-07-30  Bruno Haible  <bruno@clisp.org>
7867
7868         * modules/javaversion (Makefile.am): Distribute javaversion.java and
7869         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
7870         set PKGDATADIR to point to it.
7871
7872 2006-07-30  Bruno Haible  <bruno@clisp.org>
7873
7874         * modules/csharpexec (configure.ac): Comment out macro invocation.
7875         * modules/javaexec (configure.ac): Likewise.
7876         * modules/javacomp-script (configure.ac): Likewise.
7877
7878         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
7879
7880 2006-07-30  Bruno Haible  <bruno@clisp.org>
7881
7882         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
7883         linked-list.
7884
7885 2006-07-30  Bruno Haible  <bruno@clisp.org>
7886
7887         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
7888
7889 2006-07-30  Bruno Haible  <bruno@clisp.org>
7890
7891         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7892         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
7893         get removed.
7894
7895 2006-07-29  Bruno Haible  <bruno@clisp.org>
7896
7897         Make it possible for gnulib-tool to work with locally modified or
7898         augmented gnulib repositories.
7899         * gnulib-tool (func_usage): Document --local-dir option.
7900         (local_gnulib_dir): New variable.
7901         Handle --local-dir option.
7902         (func_lookup_file): New function.
7903         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
7904         (func_get_description, func_get_filelist, func_get_description,
7905         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
7906         func_get_automake_snippet, func_get_include_directive,
7907         func_get_license, func_get_maintainer): Use func_lookup_file.
7908         (func_import, func_create_testdir): Use func_lookup_file.
7909
7910 2006-07-29  Bruno Haible  <bruno@clisp.org>
7911
7912         * modules/setenv (Depends-on): Add unistd.
7913
7914 2006-07-29  Bruno Haible  <bruno@clisp.org>
7915
7916         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
7917
7918 2006-07-29  Bruno Haible  <bruno@clisp.org>
7919
7920         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
7921
7922 2006-07-29  Bruno Haible  <bruno@clisp.org>
7923
7924         * gnulib-tool (import, update): If there is no Makefile.am, look at
7925         aclocal.m4, instead of bailing out.
7926
7927 2006-07-29  Bruno Haible  <bruno@clisp.org>
7928
7929         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
7930         Categorize the options by when they are useful.
7931
7932 2006-07-29  Bruno Haible  <bruno@clisp.org>
7933
7934         * gnulib-tool (func_usage): Document option --no-libtool.
7935         Handle option --no-libtool.
7936         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
7937         for changed semantics of $libtool variable.
7938         (func_import): Likewise. If libtool is not used, show this through
7939         an option --no-libtool.
7940         (func_create_testdir): Update.
7941
7942 2006-07-29  Bruno Haible  <bruno@clisp.org>
7943
7944         * gnulib-tool (func_import): Extend error message about missing
7945         --doc-base.
7946
7947 2006-07-29  Bruno Haible  <bruno@clisp.org>
7948
7949         * gnulib-tool (func_import): Don't create the $docbase directory if
7950         there is no file to store there.
7951
7952 2006-07-29  Bruno Haible  <bruno@clisp.org>
7953
7954         * gnulib-tool (autoconf_minversion): If a --dir option is given and
7955         relevant, look for configure.ac there, not in the current directory.
7956         Also use a simple search for AC_PREREQ, not "autoconf --trace".
7957
7958 2006-07-29  Bruno Haible  <bruno@clisp.org>
7959
7960         * gnulib-tool (SORT): New variable.
7961         (func_usage): Undocument --assume-autoconf option.
7962         Remove --assume-autoconf option handling.
7963         (autoconf_minversion): Determine from the contents of configure.ac.
7964         (func_import): Remove autoconf_minversion handling.
7965         Suggested by Eric Blake.
7966
7967 2006-07-29  Bruno Haible  <bruno@clisp.org>
7968
7969         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
7970
7971 2006-07-29  Bruno Haible  <bruno@clisp.org>
7972
7973         * config/srclist.txt (*setenv.[ch]): Remove rules.
7974
7975 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7976
7977         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
7978
7979 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7980
7981         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
7982         arpa/inet.h.
7983
7984 2006-07-28  Simon Josefsson  <jas@extundo.com>
7985
7986         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
7987         * modules/inet_pton (Depends-on): Likewise.
7988
7989 2006-07-28  Simon Josefsson  <jas@extundo.com>
7990
7991         * m4/netinet_in_h.m4: New file.
7992
7993 2006-07-28  Simon Josefsson  <jas@extundo.com>
7994
7995         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
7996         #include's.
7997
7998 2006-07-28  Simon Josefsson  <jas@extundo.com>
7999
8000         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
8001         #include's.
8002
8003 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
8004
8005         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
8006         setgid on directories only if they set these bits.
8007         * lib/modechange.h: Remove obsolete comment about masks.
8008
8009 2006-07-28  Eric Blake  <ebb9@byu.net>
8010
8011         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
8012         macro expansion.
8013
8014 2006-07-28  Bruno Haible  <bruno@clisp.org>
8015
8016         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
8017
8018 2006-07-28  Bruno Haible  <bruno@clisp.org>
8019
8020         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
8021
8022 2006-07-28  Bruno Haible  <bruno@clisp.org>
8023
8024         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
8025         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
8026         Define fallbacks.
8027         Avoids link error on FreeBSD 4.x.
8028         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
8029
8030         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
8031         encoding.
8032         * lib/mbswidth.c (iswcntrl): Likewise.
8033
8034 2006-07-27  Bruno Haible  <bruno@clisp.org>
8035
8036         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
8037         test.
8038
8039 2006-07-27  Bruno Haible  <bruno@clisp.org>
8040
8041         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
8042         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
8043         defined.
8044
8045 2006-07-26  Eric Blake  <ebb9@byu.net>
8046
8047         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
8048
8049 2006-07-26  Eric Blake  <ebb9@byu.net>
8050
8051         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
8052         like mingw that lack mkstemp.
8053         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
8054         avoid compilation warning on mingw.
8055
8056 2006-07-26  Bruno Haible  <bruno@clisp.org>
8057
8058         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
8059         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
8060         INT_FAST*_MIN, INTPTR_MIN.
8061
8062 2006-07-25  Bruno Haible  <bruno@clisp.org>
8063
8064         * modules/version-etc (Depends-on): Add stdarg.
8065
8066 2006-07-25  Bruno Haible  <bruno@clisp.org>
8067
8068         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
8069         complex commands.
8070
8071 2006-07-25  Bruno Haible  <bruno@clisp.org>
8072
8073         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
8074         defined in <stdarg.h> or config.h.
8075
8076 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
8077
8078         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
8079         (gl_STDIO_SAFER): Remove.
8080
8081 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
8082
8083         * MODULES.html.sh (File stream based Input/Output):
8084         Add fopen-safer, tmpfile-safer; remove stdio-safer.
8085         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
8086         * modules/fopen-safer, modules/tmpfile-safer: New files.
8087         * modules/stdio-safer: Remove.
8088
8089 2006-07-24  Bruno Haible  <bruno@clisp.org>
8090
8091         * modules/tmpdir: New file.
8092         * MODULES.html.sh (File system functions): Add it.
8093
8094 2006-07-24  Bruno Haible  <bruno@clisp.org>
8095
8096         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
8097         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
8098
8099 2006-07-24  Bruno Haible  <bruno@clisp.org>
8100
8101         * modules/clean-temp: New file.
8102
8103 2006-07-24  Bruno Haible  <bruno@clisp.org>
8104
8105         * m4/tmpdir.m4: New file, from GNU gettext.
8106
8107 2006-07-24  Bruno Haible  <bruno@clisp.org>
8108
8109         * lib/tmpdir.h: New file, from GNU gettext.
8110         * lib/tmpdir.c: New file, from GNU gettext.
8111
8112 2006-07-24  Bruno Haible  <bruno@clisp.org>
8113
8114         * lib/clean-temp.h: New file, from GNU gettext.
8115         * lib/clean-temp.c: New file, from GNU gettext.
8116
8117 2006-07-23  Eric Blake  <ebb9@byu.net>
8118
8119         * modules/stdio-safer (Files): Add tmpfile-safer.c.
8120         (Depends-on): Add binary-io.
8121
8122 2006-07-23  Eric Blake  <ebb9@byu.net>
8123
8124         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
8125
8126 2006-07-23  Eric Blake  <ebb9@byu.net>
8127
8128         * lib/tmpfile-safer.c: New file.
8129         * lib/stdio-safer.h (fopen_safer): Add prototype.
8130         * lib/stdio--.h (tmpfile): Make safer.
8131
8132 2006-07-23  Bruno Haible  <bruno@clisp.org>
8133
8134         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
8135         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
8136         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
8137         gl_linked_remove_at): Use it.
8138
8139 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
8140         and Simon Josefsson <jas@extundo.com>
8141
8142         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
8143
8144         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
8145
8146 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
8147
8148         * modules/close-stream: New file.
8149         * modules/closeout (Description): Make it clear that it exits
8150         with a diagnostic on error.
8151         (Depends-on): Add close-stream.  Remove fpending, stdbool.
8152         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
8153
8154 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
8155
8156         * m4/close-stream.m4: New file.
8157
8158 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
8159
8160         * lib/close-stream.c, lib/close-stream.h: New files.
8161
8162 2006-07-22  Bruno Haible  <bruno@clisp.org>
8163
8164         Merge from GNU gettext 0.15.
8165
8166         2006-05-01  Bruno Haible  <bruno@clisp.org>
8167
8168                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
8169
8170         2006-07-22  Bruno Haible  <bruno@clisp.org>
8171
8172                 * modules/javaversion: New file.
8173                 * MODULES.html.sh (Java): Add javaversion.
8174
8175         2006-03-12  Bruno Haible  <bruno@clisp.org>
8176
8177                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
8178
8179         2005-12-04  Bruno Haible  <bruno@clisp.org>
8180
8181                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
8182                 (untested).
8183
8184         2006-06-21  Bruno Haible  <bruno@clisp.org>
8185
8186                 Avoid warnings from recent versions of mcs.
8187                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
8188                 -o, -L, -r any more. Use options documented since mcs-1.0
8189                 instead. Similarly for -g.
8190
8191         2005-12-04  Bruno Haible  <bruno@clisp.org>
8192
8193                 * build-aux/csharpcomp.sh.in: Suffix for resources is
8194                 .resources, not .resource.
8195
8196         2005-07-09  Bruno Haible  <bruno@clisp.org>
8197
8198                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
8199                 add a .dll suffix.
8200                 Reported by Mark Junker <mjscod@gmx.de>.
8201
8202         2006-07-22  Bruno Haible  <bruno@clisp.org>
8203
8204                 * modules/gettext: Upgrade to gettext-0.15.
8205                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
8206                 m4/visibility.m4.
8207                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
8208
8209 2006-07-22  Bruno Haible  <bruno@clisp.org>
8210
8211         Merge from GNU gettext 0.15.
8212
8213         2006-03-25  Bruno Haible  <bruno@clisp.org>
8214
8215                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
8216
8217         2006-07-21  Bruno Haible  <bruno@clisp.org>
8218
8219                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
8220                 "1.1".
8221
8222         2006-05-09  Bruno Haible  <bruno@clisp.org>
8223
8224                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
8225                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
8226                 for the conftestver execution.
8227
8228         2006-05-01  Bruno Haible  <bruno@clisp.org>
8229
8230                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
8231                 optional target-version argument. Verify that the compiler
8232                 groks source of the specified source-version, or add -source
8233                 option as necessary. Verify that the compiler produces
8234                 bytecode in the specified target-version, or add -target and
8235                 -source options as necessary. Make the result of the test
8236                 available as variable CONF_JAVAC. Also log error output in
8237                 config.log.
8238
8239         2006-03-11  Bruno Haible  <bruno@clisp.org>
8240
8241                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
8242
8243         2006-05-09  Bruno Haible  <bruno@clisp.org>
8244
8245                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
8246                 CLASSPATH_SEPARATOR to a semicolon.
8247
8248         2006-03-12  Bruno Haible  <bruno@clisp.org>
8249
8250                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
8251                 available as variable CONF_JAVA, for subsequent autoconf
8252                 tests. Also log error output in config.log.
8253
8254         2006-07-19  Bruno Haible  <bruno@clisp.org>
8255
8256                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
8257                 that getline works on glibc2 systems. Needed to avoid trouble
8258                 in relocatable.c.
8259                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
8260
8261         2005-12-04  Bruno Haible  <bruno@clisp.org>
8262
8263                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
8264                 launcher (untested).
8265
8266         2005-12-04  Bruno Haible  <bruno@clisp.org>
8267
8268                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
8269
8270         2006-07-22  Bruno Haible  <bruno@clisp.org>
8271
8272                 * gettext.m4: Update from GNU gettext-0.15.
8273                 * nls.m4: Likewise.
8274                 * po.m4: Likewise.
8275                 * inttypes-pri.m4: Likewise.
8276                 * inttypes-h.m4: Renamed from inttypes.m4.
8277                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
8278
8279 2006-07-22  Bruno Haible  <bruno@clisp.org>
8280
8281         Merge from GNU gettext 0.15.
8282
8283         2005-07-05  Bruno Haible  <bruno@clisp.org>
8284
8285                 * printf-args.c (printf_fetchargs): Work around broken
8286                 definition of wint_t on mingw.
8287
8288         2005-02-12  Bruno Haible  <bruno@clisp.org>
8289
8290                 * xallocsa.h: Add extern "C" for C++.
8291
8292         2006-05-17  Bruno Haible  <bruno@clisp.org>
8293
8294                 Cygwin portability.
8295                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
8296
8297         2006-04-30  Bruno Haible  <bruno@clisp.org>
8298
8299                 * progreloc.c: Include <mach-o/dyld.h> if available.
8300                 (find_executable): Use _NSGetExecutablePath when possible.
8301
8302         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
8303
8304                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
8305                 function.
8306
8307         2005-12-29  Bruno Haible  <bruno@clisp.org>
8308
8309                 * progreloc.c (set_program_name_and_installdir): Fix
8310                 compilation error.
8311
8312         2005-12-04  Bruno Haible  <bruno@clisp.org>
8313
8314                 Cygwin portability.
8315                 * progreloc.c: Include <windows.h> also on Cygwin.
8316                 (find_executable): Add support for Cygwin.
8317                 (set_program_name_and_installdir): Handle also platforms with
8318                 nonempty EXEEXT.
8319
8320         2006-07-11  Bruno Haible  <bruno@clisp.org>
8321
8322                 * javacomp.c: Fix a comment.
8323                 Reported by Jim Meyering.
8324
8325         2006-04-30  Bruno Haible  <bruno@clisp.org>
8326
8327                 * javacomp.h (compile_java_class): Add source_version,
8328                 target_version arguments.
8329                 * javacomp.c: Rewritten to choose only a compiler that
8330                 respects the specified source_version and target_version.
8331
8332         2006-06-27  Bruno Haible  <bruno@clisp.org>
8333
8334                 Assume correct S_ISDIR macro.
8335                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
8336
8337         2006-07-22  Bruno Haible  <bruno@clisp.org>
8338
8339                 * javaversion.h: New file, from GNU gettext.
8340                 * javaversion.c: New file, from GNU gettext.
8341                 * javaversion.java: New file, from GNU gettext.
8342                 * javaversion.class: New file, from GNU gettext.
8343
8344         2006-05-17  Bruno Haible  <bruno@clisp.org>
8345
8346                 Cygwin portability.
8347                 * javaexec.c (execute_java_class): Test for jview program
8348                 also on Cygwin.
8349
8350         2006-04-09  Bruno Haible  <bruno@clisp.org>
8351
8352                 * fatal-signal.c: Don't include string.h.
8353                 (at_fatal_signal): Use a copying loop instead of memcpy.
8354
8355         2005-12-04  Bruno Haible  <bruno@clisp.org>
8356
8357                 * csharpexec.c: Add support for 'clix' launcher (untested).
8358                 (execute_csharp_using_sscli): New function.
8359                 (execute_csharp_program): Call it.
8360
8361         2006-06-21  Bruno Haible  <bruno@clisp.org>
8362
8363                 Avoid warnings from recent versions of mcs.
8364                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
8365                 -o, -L, -r any more. Use options documented since mcs-1.0
8366                 instead. Similarly for -g.
8367
8368         2005-07-09  Bruno Haible  <bruno@clisp.org>
8369
8370                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
8371                 add a .dll suffix.
8372                 Reported by Mark Junker <mjscod@gmx.de>.
8373
8374         2006-06-17  Bruno Haible  <bruno@clisp.org>
8375
8376                 * config.charset: Update for NetBSD 3.0.
8377
8378         2006-05-17  Bruno Haible  <bruno@clisp.org>
8379
8380                 Cygwin portability.
8381                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
8382
8383         2006-05-16  Bruno Haible  <bruno@clisp.org>
8384
8385                 * localcharset.c [CYGWIN]: Include <windows.h>.
8386                 (get_charset_aliases): For Cygwin, return the same CPxxx
8387                 aliases list as under WIN32.
8388                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
8389                 the environment variables. Fall back to GetACP().
8390
8391         2006-04-05  Bruno Haible  <bruno@clisp.org>
8392
8393                 * config.charset: Update Juan Manuel Guerrero's address.
8394
8395         2005-02-12  Bruno Haible  <bruno@clisp.org>
8396
8397                 * allocsa.h: Add extern "C" for C++.
8398
8399         2005-02-10  Bruno Haible  <bruno@clisp.org>
8400
8401                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
8402                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
8403
8404         2006-07-22  Bruno Haible  <bruno@clisp.org>
8405
8406                 * gettext.h: Update to GNU gettext-0.15.
8407
8408 2006-07-22  Bruno Haible  <bruno@clisp.org>
8409
8410         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
8411         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
8412         lib-prefix.m4, longdouble.m4, ssize_t.m4.
8413
8414 2006-07-21  Eric Blake  <ebb9@byu.net>
8415
8416         * modules/stdlib-safer: New file.
8417         * MODULES.html.sh (File stream based Input/Output): Add
8418         stdlib-safer.
8419
8420 2006-07-21  Eric Blake  <ebb9@byu.net>
8421
8422         * lib/stdlib-safer.h: New file from coreutils, required by
8423         stdlib--.h.
8424
8425 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
8426
8427         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
8428
8429 2006-07-20  Bruno Haible  <bruno@clisp.org>
8430
8431         * gnulib-tool: Recognize new option --assume-autoconf.
8432         (autoconf_minversion): New variable.
8433         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
8434
8435 2006-07-20  Bruno Haible  <bruno@clisp.org>
8436
8437         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
8438
8439 2006-07-19  Derek R. Price  <derek@ximbiot.com>
8440
8441         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
8442         Reindent and repaginate.
8443
8444 2006-07-19  Derek Price  <derek@ximbiot.com>
8445
8446         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
8447         Correct grammar.
8448
8449 2006-07-17  Bruno Haible  <bruno@clisp.org>
8450
8451         * modules/list: New file.
8452         * modules/array-list: New file.
8453         * modules/carray-list, modules/carray-list-tests: New files.
8454         * modules/linked-list, modules/linked-list-tests: New files.
8455         * modules/avltree-list, modules/avltree-list-tests: New files.
8456         * modules/rbtree-list, modules/rbtree-list-tests: New files.
8457         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
8458         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
8459         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
8460         * modules/oset: New file.
8461         * modules/array-oset: New file.
8462         * modules/avltree-oset, modules/avltree-oset-tests: New files.
8463         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
8464         * tests/test-carray_list.c: New file.
8465         * tests/test-linked_list.c: New file.
8466         * tests/test-avltree_list.c: New file.
8467         * tests/test-rbtree_list.c: New file.
8468         * tests/test-linkedhash_list.c: New file.
8469         * tests/test-avltreehash_list.c: New file.
8470         * tests/test-rbtreehash_list.c: New file.
8471         * tests/test-avltree_oset.c: New file.
8472         * tests/test-rbtree_oset.c: New file.
8473         * MODULES.html.sh (Container data structures): New section.
8474
8475 2006-07-17  Bruno Haible  <bruno@clisp.org>
8476
8477         * m4/gl_list.m4: New file.
8478
8479 2006-07-17  Bruno Haible  <bruno@clisp.org>
8480
8481         * lib/gl_list.h: New file.
8482         * lib/gl_list.c: New file.
8483         * lib/gl_array_list.h: New file.
8484         * lib/gl_array_list.c: New file.
8485         * lib/gl_carray_list.h: New file.
8486         * lib/gl_carray_list.c: New file.
8487         * lib/gl_linked_list.h: New file.
8488         * lib/gl_linked_list.c: New file.
8489         * lib/gl_anylinked_list1.h: New file.
8490         * lib/gl_anylinked_list2.h: New file.
8491         * lib/gl_avltree_list.h: New file.
8492         * lib/gl_avltree_list.c: New file.
8493         * lib/gl_anyavltree_list1.h: New file.
8494         * lib/gl_anyavltree_list2.h: New file.
8495         * lib/gl_rbtree_list.h: New file.
8496         * lib/gl_rbtree_list.c: New file.
8497         * lib/gl_anyrbtree_list1.h: New file.
8498         * lib/gl_anyrbtree_list2.h: New file.
8499         * lib/gl_anytree_list1.h: New file.
8500         * lib/gl_anytree_list2.h: New file.
8501         * lib/gl_linkedhash_list.h: New file.
8502         * lib/gl_linkedhash_list.c: New file.
8503         * lib/gl_anyhash_list1.h: New file.
8504         * lib/gl_anyhash_list2.h: New file.
8505         * lib/gl_avltreehash_list.h: New file.
8506         * lib/gl_avltreehash_list.c: New file.
8507         * lib/gl_rbtreehash_list.h: New file.
8508         * lib/gl_rbtreehash_list.c: New file.
8509         * lib/gl_anytreehash_list1.h: New file.
8510         * lib/gl_anytreehash_list2.h: New file.
8511
8512         * lib/gl_oset.h: New file.
8513         * lib/gl_oset.c: New file.
8514         * lib/gl_array_oset.h: New file.
8515         * lib/gl_array_oset.c: New file.
8516         * lib/gl_avltree_oset.h: New file.
8517         * lib/gl_avltree_oset.c: New file.
8518         * lib/gl_rbtree_oset.h: New file.
8519         * lib/gl_rbtree_oset.c: New file.
8520         * lib/gl_anytree_oset.h: New file.
8521
8522 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
8523
8524         * m4/mkancesdirs.m4: New file.
8525         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
8526         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
8527         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
8528         it.
8529
8530 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
8531
8532         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
8533         * lib/mkancesdirs.h: New files.
8534         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
8535         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
8536         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
8537         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
8538         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
8539         callers changed.  Revamp internals significantly, by not
8540         attempting to create directories that are temporarily more
8541         permissive than the final results.  Do not attempt to use
8542         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
8543         This removes some race conditions, fixes some bugs, and simplifies
8544         things.  Use new dirchownmod function to do owner and mode changes.
8545         * lib/mkdir-p.h: Likewise.
8546         * lib/modechange.c (octal_to_mode): New function.
8547         (struct mode_change): New member mentioned.
8548         (make_node_op_equals): New arg mentioned.  All callers changed.
8549         (mode_compile): Keep track of which mode bits the user has explicitly
8550         mentioned.
8551         (mode_adjust): New arg DIR, so that we implement the X op correctly.
8552         New arg PMODE_BITS, to keep track of which mode bits the user
8553         mentioned; it treats S_ISUID and S_ISGID speciall.
8554         All callers changed.
8555         * lib/modechange.h: Likewise.
8556
8557 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
8558
8559         * MODULES.html.sh: Add mkancestors.
8560         * modules/mkancesdirs: New module.
8561         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
8562         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
8563         The chdir-safer and afs files are now orphans; I'll remove them
8564         unless someone speaks up.
8565         Add lib/dirchownmod.c, lib/dirchownmod.h.
8566         (Depends-on): Remove alloca, chown, save-cwd, dirname.
8567         Add lchown, mkancesdirs.
8568         (Maintainer): Add self.
8569
8570 2006-07-15  Karl Berry  <karl@gnu.org>
8571
8572         * gnulib-tool: help message wording/arrangement.
8573
8574 2006-07-14  Simon Josefsson  <jas@extundo.com>
8575
8576         * doc/gnulib.texi (Libtool and Windows): New section.
8577
8578 2006-07-12  Simon Josefsson  <jas@extundo.com>
8579
8580         * modules/gendocs (License): Fix license, approved by Karl.
8581
8582 2006-07-12  Eric Blake  <ebb9@byu.net>
8583
8584         * MODULES.html.sh: Add gendocs.
8585
8586 2006-07-11  Eric Blake  <ebb9@byu.net>
8587
8588         * modules/fdl: New module, to install doc/fdl.texi.
8589         * MODULES.html.sh: Add new section for documentation modules.
8590         * gnulib-tool: Avoid space-tab.
8591         (--doc-base): New option, to manage files from doc.
8592
8593 2006-07-11  Eric Blake  <ebb9@byu.net>
8594
8595         * m4/absolute-header.m4: Fix comments to match recent change.
8596
8597 2006-07-11  Eric Blake  <ebb9@byu.net>
8598
8599         * gnulib-tool: List --doc-base before --tests-base.
8600
8601 2006-07-11  Derek R. Price  <derek@ximbiot.com>
8602
8603         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
8604
8605 2006-07-11  Bruno Haible  <bruno@clisp.org>
8606
8607         * README: Mention where to put documentation.
8608
8609 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8610
8611         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
8612
8613 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
8614
8615         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
8616         to stdint.m4.
8617
8618 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
8619
8620         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
8621         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
8622         "no/such/file/stdint.h" when there is no such file, so that
8623         the resulting C code can be parsed by dodgy compilers.
8624         Problems reported by Bob Proulx.
8625
8626 2006-07-10  Derek R. Price  <derek@ximbiot.com>
8627
8628         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
8629         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
8630         macros into the GNU _D_EXACT_NAMLEN.
8631         * lib/savedir.c:  Likewise.
8632         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
8633
8634 2006-07-10  Derek R. Price  <derek@ximbiot.com>
8635         and Paul Eggert  <eggert@cs.ucla.edu>
8636
8637         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
8638         * m4/savedir.m4:
8639         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
8640         macros into the GNU _D_EXACT_NAMLEN.
8641
8642 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
8643
8644         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
8645         around the absolute name, to work around a problem with the HP-UX
8646         11.23 native C compiler, reported by Bob Proulx.
8647
8648 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
8649
8650         * doc/maintain.texi, make-stds.texi: Sync from
8651         <http://savannah.gnu.org/projects/gnustandards>.
8652
8653 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
8654
8655         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
8656
8657 2006-07-09  Jim Meyering  <jim@meyering.net>
8658
8659         * m4/glob.m4: Remove a doubled word in a comment.
8660
8661 2006-07-09  Jim Meyering  <jim@meyering.net>
8662
8663         * lib/argp-pv.c: Remove a doubled word in a comment.
8664         * lib/check-version.c (check_version): Likewise.
8665         * lib/javacomp.c (compile_java_class): Likewise.
8666
8667 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
8668
8669         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
8670         for the benefit of people using Autoconf 2.60.  If you want to
8671         support older Autoconf versions you can copy m4/onceonly_2_57.m4
8672         (or m4/onceonly.m4, if pre-2.57) manually.
8673
8674 2006-07-08  Jim Meyering  <jim@meyering.net>
8675
8676         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
8677         comment.
8678         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
8679         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
8680         comment.
8681
8682 2006-07-08  Jim Meyering  <jim@meyering.net>
8683
8684         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
8685
8686 2006-07-07  Simon Josefsson  <jas@extundo.com>
8687
8688         * tests/test-crc.c: Change expected crc value, the test vector
8689         were probably computed using the old broken crc.c?
8690
8691 2006-07-06  Simon Josefsson  <jas@extundo.com>
8692
8693         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
8694         now the canonical place for the M4 file).
8695
8696         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
8697         from the sys_socket dependency now.
8698
8699         * modules/inet_pton (Files): Ditto.
8700
8701         * modules/inet_ntop (Files): Ditto.
8702
8703 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
8704
8705         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
8706         not gl_PREREQ_GETUSERSHELL.
8707
8708 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8709
8710         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
8711         with only one argument, for Autoconf 2.60.
8712         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
8713         expand to nothing, so add a shell command to avoid syntax error.
8714         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
8715
8716 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8717
8718         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
8719
8720 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
8721
8722         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
8723         no longer needed.  Check for isblank decl.
8724         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
8725         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
8726         of existence.
8727
8728 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
8729
8730         * lib/getloadavg.c: Use __VMS, not VMS.
8731         * lib/getopt.c: Likewise.
8732         * lib/getpagesize.h: Likewise.
8733         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
8734         and probably does not work.
8735
8736 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
8737
8738         * lib/.cppi-disable: Add wcwidth.
8739         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
8740         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
8741         (ISGRAPH): Remove.  All uses changed to isgraph.
8742         (FOLD) [!defined _LIBC]: Remove special case.
8743         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
8744         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
8745         HAVE_ISBLANK.
8746         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
8747         case.
8748
8749 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
8750
8751         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
8752         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
8753         brackets.  Other minor changes to suppress some compiler
8754         warnings.
8755
8756 2006-07-06  Derek R. Price  <derek@ximbiot.com>
8757         and Paul Eggert  <eggert@cs.ucla.edu>
8758
8759         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
8760         of invoking obsolescent AC_HEADER_DIRENT macro.
8761         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
8762         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
8763         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
8764         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
8765         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
8766         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
8767         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
8768         * m4/readdir.m4: Remove; no longer needed.
8769
8770 2006-07-06  Derek R. Price  <derek@ximbiot.com>
8771         and Paul Eggert  <eggert@cs.ucla.edu>
8772
8773         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
8774         Don't worry about this obsolete case any more.
8775         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
8776         directories.
8777         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
8778         worry about this obsolete case any more.
8779         * lib/fts.c: Likewise.
8780         * lib/getcwd.c: Likewise.
8781         * lib/glob.h: Likewise.
8782         * lib/savedir.c: Likewise.
8783
8784 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
8785
8786         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
8787         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
8788         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
8789         needed.
8790         All uses removed.
8791         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
8792         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
8793         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
8794         needed.
8795         * m4/getdate.m4 (gl_GETDATE): Likewise.
8796         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
8797         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
8798         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
8799         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
8800         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
8801         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
8802         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
8803         needed.
8804
8805 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
8806
8807         * lib/memcasecmp.c: Include <limits.h>.
8808         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
8809         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
8810         Don't assume isdigit succeeds only on '0' through '9'.
8811
8812 2006-07-05  Eric Blake  <ebb9@byu.net>
8813
8814         * modules/getaddrinfo (Depends-on): Add snprintf.
8815
8816 2006-07-05  Eric Blake  <ebb9@byu.net>
8817
8818         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
8819         to avoid 'header present but could not be compiled' on cygwin.
8820
8821 2006-07-05  Eric Blake  <ebb9@byu.net>
8822
8823         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
8824         missing from netdb.h.
8825         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
8826
8827 2006-07-05  Derek R. Price  <derek@ximbiot.com>
8828
8829         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
8830         no longer needed.
8831         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
8832         * m4/getdate.m4 (gl_GETDATE): Likewise.
8833         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
8834         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
8835         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
8836         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
8837         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
8838
8839 2006-07-05  Derek R. Price  <derek@ximbiot.com>
8840
8841         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
8842         All uses of is_space replaced by isspace.
8843         * lib/exit.h: Don't talk about STDC_HEADERS.
8844         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
8845         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
8846         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
8847         replaced by isprint etc.
8848         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
8849         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
8850         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
8851         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
8852         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
8853         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
8854
8855 2006-07-05  Bruno Haible  <bruno@clisp.org>
8856
8857         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
8858         the function exists, before testing against AIX.
8859         Reported by Martin Lambers <marlam@marlam.de>.
8860
8861 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
8862
8863         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
8864         From Mark D. Baushke.
8865
8866 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
8867
8868         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
8869         to the absolute name, not just one, to bypass Sun C 5.8's
8870         "warning: #include of /usr/include/... may be non-portable".
8871
8872 2006-07-04  Eric Blake  <ebb9@byu.net>
8873
8874         * modules/dirname-tests: New test module.
8875         * tests/test-dirname.c: New file, replacing dirname.c
8876         TEST_DIRNAME section that was recently deleted.
8877
8878 2006-07-04  Bruno Haible  <bruno@clisp.org>
8879
8880         Assume ANSI C header files and <ctype.h> functions.
8881         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
8882         (mbsnwidth): Use isprint, iscntrl instead.
8883
8884 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
8885
8886         Merge from coreutils.
8887         * MODULES.html.sh: Add xstrtold.
8888         * modules/xstrtold: New file.
8889         * modules/cycle-check (Files): Add lib/same-inode.h.
8890         * modules/dirname (Files): Add m4/double-slash-root.m4.
8891         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
8892         * modules/mkdir-p (Files): Add lib/same-inode.h.
8893         * modules/same (Files): Add lib/same-inode.h.
8894
8895 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
8896
8897         * m4/absolute-header.m4: Renamed from full-header-path.m4.
8898         This is to keep the terminology clean; POSIX talks about
8899         "absolute pathnames", not "full pathnames", but the GNU
8900         Coding Standards say to use "path" for something else;
8901         so use "absolute" to keep both sides happy.
8902         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
8903         Set gl_absolute_header, not gl_full_header_path.
8904         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
8905         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
8906         All uses changed.
8907
8908         Merge from coreutils.
8909
8910         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
8911
8912         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
8913         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
8914         want to require the building of c-strtod.o.
8915         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
8916         needs -lm directly.
8917         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
8918
8919         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
8920
8921         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
8922         --as-needed option if available.  Problem reported by Albert Chin in
8923         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
8924         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
8925         cc merely issues a bunch of annoying warnings for --as-needed
8926         (this problem was reported by Bob Proulx).  Also, try linking with
8927         -lm to detect a bug in binutils 2.16 (this problem was reported
8928         by Ralf Wildenhues).
8929
8930         2006-06-18  Jim Meyering  <jim@meyering.net>
8931
8932         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
8933         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
8934         macro.
8935         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
8936         also check for glibc-2.4's abort-inducing bug.
8937
8938         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
8939         Low-probability clean-up should be to use rmdir to get rid of
8940         the just-created directory, not unlink.
8941
8942         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
8943         configure fail, and request a bug report to inform us about it.
8944         Add a comment that, barring reports to the contrary, in 2007 we'll
8945         assume ftruncate is universally available.
8946
8947         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
8948
8949         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
8950
8951         2006-03-12  Jim Meyering  <jim@meyering.net>
8952
8953         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
8954         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
8955         * m4/same.m4 (gl_SAME): Likewise.
8956         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
8957
8958         2006-03-11  Eric Blake  <ebb9@byu.net>
8959
8960         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
8961         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
8962         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
8963         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
8964
8965 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
8966
8967         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
8968         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
8969         reported by Mark D. Baushke, one in
8970         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
8971
8972         Merge from coreutils.
8973
8974         * lib/.cppi-disable: Add stdint_.h.
8975         * lib/.cvsignore: Add stdint.h.
8976
8977         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
8978
8979         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
8980         both double and long double versions.
8981         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
8982         * lib/xstrtold.c: New file.
8983         * lib/xstrtod.h (xstrtold): New decl.
8984
8985         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
8986
8987         * lib/filemode.c (setst): Remove.
8988         (strmode): Rewrite to avoid setst.  This makes the code shorter,
8989         (arguably) clearer, and the generated code is a bit smaller on my
8990         Debian GNU/Linux stable x86 host.
8991
8992         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
8993
8994         * lib/filemode.c: Include "filemode.h" first, to test the interface.
8995         Assume that filemode.h includes sys/types.h and sys/stat.h.
8996         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
8997         (ftypelet): Reorder to put common cases first, for efficiency.
8998         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
8999         to do 'M'.
9000         (strmode): Renamed from mode_string, and now stores 12 bytes instead
9001         of 10, for compatibility with FreeBSD.  All callers changed.
9002         (filemodestring): Now stores 12 bytes instead of 10, and sets file
9003         types that can't be deduced solely from st_mode.  First arg is now a
9004         const pointer.
9005         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
9006         (strmode): Renamed from mode_string.
9007         (filemodestring): New decl.
9008         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
9009         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
9010         needed.
9011         (S_ISPORT, S_ISWHT): New macros, if not already defined.
9012
9013         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
9014
9015         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
9016         fsusage.h now does that.  Include fsusage.h first, to test interface.
9017         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
9018         at most one method (the old code could have generated decls that
9019         didn't conform to C89, not that this was ever exercised).
9020         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
9021
9022         2006-03-19  Jim Meyering  <jim@meyering.net>
9023
9024         Work even in a chroot where d_ino values for entries in "/"
9025         don't match the stat.st_ino values for the same names.
9026         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
9027         number, iterate through all entries again, using lstat instead.
9028         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
9029         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
9030
9031         * lib/getcwd.c (__getcwd): Clarify a comment.
9032         Use memcpy in place of a call to strcpy.
9033
9034         2006-03-12  Jim Meyering  <jim@meyering.net>
9035
9036         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
9037         matches that of the current directory (which we're about to chdir ".."
9038         out of), then save the dev-ino of the parent, instead.
9039
9040         * lib/same-inode.h (SAME_INODE): New file/macro.
9041         * lib/chdir-safer.c (SAME_INODE): Remove definition.
9042         Include "same-inode.h", instead.
9043         * lib/same.c: Likewise.
9044         * lib/cycle-check.h: Include "same-inode.h".
9045         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
9046         * lib/cycle-check.c (SAME_INODE): Remove definition.
9047         * lib/root-dev-ino.h: Include "same-inode.h".
9048
9049         2006-03-11  Eric Blake  <ebb9@byu.net>
9050
9051         * lib/same.c (same_name): s/base_name/last_component/
9052         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
9053         * lib/filenamecat.c (file_name_concat): Likewise.
9054
9055         2006-03-11  Eric Blake  <ebb9@byu.net>,
9056                     Paul Eggert  <eggert@cs.ucla.edu>
9057
9058         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
9059         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
9060         drive prefix.
9061         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
9062         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
9063         (last_component): New method.
9064         * lib/dirname.c (dir_len): Determine when drive letters need a
9065         subsequent slash.  Preserve // when it is special.
9066         (dir_name): Don't append dot when drive letter is absolute.
9067         [TEST_DIRNAME]: Move into a full-blown gnulib test.
9068         * lib/basename.c (base_name): New semantics - malloc the result.
9069         Preserve // when it is special.  Preserve relative files that look
9070         like drive letters.
9071         (base_len): Preserve // when it is special.
9072         (last_component): New method, similar to old base_name semantics.
9073         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
9074         base_name.  Strip redundant slashes from ///.
9075
9076 2006-07-03  Jim Meyering  <jim@meyering.net>
9077
9078         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
9079         macro is used before the first cycle_check call.
9080
9081 2006-07-03  Eric Blake  <ebb9@byu.net>
9082
9083         * modules/dirname (Depends-on): Add xstrndup.
9084
9085 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
9086
9087         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
9088         test cases, so that config.log is a bit easier to follow.
9089
9090 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
9091
9092         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
9093         both are 64 bits, since this seems to be the tradition, and this
9094         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
9095         we ever run into a host that prefers long long to long in this
9096         case, we'll need another configure-time test.  Problem reported by
9097         Jim Meyering.
9098
9099 2006-07-02  Eric Blake  <ebb9@byu.net>
9100
9101         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
9102
9103 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
9104
9105         * modules/inttypes (Depends-on): No longer depends on stdint.
9106         * modules/stdint (Description): Say more about assumptions.
9107         Say that the fast types might differ.  Say macros are used.
9108         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
9109         (Makefile.am): Revise list of substituted symbols to match
9110         new stdint.m4.
9111         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
9112         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
9113         * tests/test-stdint.c (verify_same_types)
9114         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
9115         the code conforms to C99/C89.
9116         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
9117         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
9118
9119 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
9120
9121         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
9122         but fix a bug, by requiring at least 64 bits.
9123         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
9124         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
9125         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
9126         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
9127
9128         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
9129         changes.  Make 2.59 a prerequisite.  Check and substitute for
9130         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
9131         inttypes.h.  Do not use special include files; just use the
9132         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
9133         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
9134         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
9135         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
9136         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
9137         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
9138         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
9139         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
9140         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
9141         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
9142         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
9143         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
9144         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
9145         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
9146         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
9147         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
9148         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
9149         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
9150         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
9151         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
9152         WINT_MAX.  Check for C99 conformance more strictly, by detecting
9153         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
9154         not check for things that C99 does not require, e.g., int8_t.  If
9155         a test isn't needed unless <stdint.h> isn't working, and is
9156         unlikely to be needed for any other reason, then don't do it
9157         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
9158         size_t, since we assume C89 freestanding at least.  Do not check
9159         for sig_atomic_t, wchar_t, or wint_t, since the code now does
9160         the right thing even if the types are not defined.  Instead use:
9161         (gl_STDINT_TYPE_PROPERTIES): New macro.
9162         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
9163         testing whether <sys/types.h> clashes, as Autoconf does this for
9164         us now.  All uses removed.
9165         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
9166         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
9167         (gl_CHECK_TYPE_SAME):
9168         Remove; no longer needed.
9169         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
9170         exists, since we'll return 0 anyway in that case.
9171         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
9172
9173 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
9174
9175         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
9176         possible collision with system files.
9177         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
9178         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
9179         WCHAR_MIN and WCHAR_MAX in this case.
9180         (<stddef.h>): Do not include; no longer needed.
9181         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
9182         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
9183         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
9184         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
9185         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
9186         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
9187         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
9188         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
9189         !defined(__c99))]: Include in this case too, since it's harmless
9190         now.
9191         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
9192         dangerous to do so.
9193         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
9194         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
9195         (_STDINT_MIN, _STDINT_MAX): New macros.
9196         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
9197         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
9198         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
9199         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
9200         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
9201         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
9202         macros, not typedefs; this simplifies things quite a bit.
9203         Use long int for all types narrower than int64_t.
9204         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
9205         Define in terms of long long int or int64_t or long int,
9206         not int64_t or int32_t.  This saves some compile-time testing.
9207         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
9208         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
9209         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
9210         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
9211         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
9212         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
9213         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
9214         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
9215         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
9216         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
9217         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
9218         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
9219         undef any previous version and define our own version, for
9220         simplicity and consistency with the new macros for types.
9221         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
9222         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
9223         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
9224         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
9225         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
9226         @WINT_T_SUFFIX@ to keep things simple here.
9227         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
9228         Simplify by assuming typical 8/16/32/64 host, since we're
9229         already doing that elsewhere anyway.
9230         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
9231         and assume long long int is 64 bits if available.  This
9232         speeds up 'configure'.
9233
9234 2006-07-01  Eric Blake  <ebb9@byu.net>
9235
9236         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
9237         Reported by Andreas Buening.
9238
9239 2006-07-01  Eric Blake  <ebb9@byu.net>
9240
9241         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
9242
9243 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
9244
9245         * lib/getaddrinfo.c: fixed typo
9246
9247 2006-06-29  Jim Meyering  <jim@meyering.net>
9248
9249         * modules/strftime (Maintainer): Add my name, since with the
9250         FPRINTFTIME changes strftime.c has forked from glibc.
9251
9252 2006-06-29  Eric Blake  <ebb9@byu.net>
9253
9254         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
9255
9256 2006-06-29  Eric Blake  <ebb9@byu.net>
9257
9258         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
9259
9260 2006-06-29  Eric Blake  <ebb9@byu.net>
9261
9262         * lib/stat_.h: New file.
9263
9264 2006-06-29  Eric Blake  <ebb9@byu.net>
9265
9266         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
9267         unused static function.
9268
9269 2006-06-29  Eric Blake  <ebb9@byu.net>
9270
9271         * doc/functions.texi (Function Portability): Document missing lstat
9272         on mingw.
9273
9274 2006-06-29  Eric Blake  <ebb9@byu.net>
9275
9276         * MODULES.html.sh: Add sys_stat.
9277         * modules/sys_stat: New module.
9278         * modules/mkstemp (Depends-on): Add sys_stat.
9279
9280 2006-06-29  Derek R. Price  <derek@ximbiot.com>
9281
9282         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
9283
9284 2006-06-29  Derek R. Price  <derek@ximbiot.com>
9285
9286         * m4/c-bs-a.m4: Removed.
9287
9288 2006-06-29  Derek R. Price  <derek@ximbiot.com>
9289
9290         * lib/strftime.c: Assume strftime() exists.
9291
9292 2006-06-29  Derek Price  <derek@ximbiot.com>
9293
9294         * modules/c-bs-a: Removed - \a is C89.
9295         * MODULES.html.sh: Remove c-bs-a.
9296
9297 2006-06-29  Bruno Haible  <bruno@clisp.org>
9298
9299         * modules/wcwidth (License): Change to LGPL.
9300
9301 2006-06-28  Simon Josefsson  <jas@extundo.com>
9302
9303         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
9304         on _WIN32.
9305
9306         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
9307         getnameinfo.
9308
9309 2006-06-28  Simon Josefsson  <jas@extundo.com>
9310
9311         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
9312
9313 2006-06-28  Simon Josefsson  <jas@extundo.com>
9314
9315         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
9316         functions there.  It will succeed on Windows XP, but on Windows
9317         2000 and (presumably) earlier, it will fail, and use the internal
9318         re-implementation.
9319         (use_win32_p): New function.
9320         (getaddrinfo): Use strtoul on servname, to support numeric ports.
9321         Support AI_NUMERICSERV to disable getservbyname.
9322         (getnameinfo): New function, only supports
9323         NI_NUMERICHOST|NI_NUMERICSERV for now.
9324
9325         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
9326         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
9327         getnameinfo.
9328
9329 2006-06-28  Eric Blake  <ebb9@byu.net>
9330
9331         * modules/wcwidth: New file.
9332         * modules/mbchar (Depends-on): Add wcwidth.
9333         * modules/mbswidth (Depends-on): Add wcwidth.
9334         * MODULES.html.sh: Add wcwidth.
9335
9336 2006-06-28  Eric Blake  <ebb9@byu.net>
9337
9338         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
9339         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
9340
9341 2006-06-28  Eric Blake  <ebb9@byu.net>
9342
9343         * lib/xvasprintf.h: Fix comments.
9344
9345 2006-06-28  Eric Blake  <ebb9@byu.net>
9346
9347         * lib/mbchar.h (wcwidth): Include wcwidth.h.
9348         * lib/mbswidth.c (wcwidth): Move from here...
9349         * lib/wcwidth.h: ...to this new file.
9350
9351 2006-06-28  Derek R. Price  <derek@ximbiot.com>
9352
9353         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
9354
9355         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
9356         it's obsolete.
9357         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
9358
9359 2006-06-28  Derek R. Price  <derek@ximbiot.com>
9360
9361         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
9362         Autoconf 2.60 says this stuff was obsolete.
9363
9364 2006-06-28  Bruno Haible  <bruno@clisp.org>
9365
9366         * modules/wcwidth (Files): Add m4/wchar_t.m4.
9367
9368 2006-06-28  Bruno Haible  <bruno@clisp.org>
9369
9370         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
9371         gt_TYPE_WCHAR_T.
9372
9373 2006-06-28  Bruno Haible  <bruno@clisp.org>
9374
9375         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
9376         declaration for wcwidth.
9377         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
9378
9379 2006-06-28  Bruno Haible  <bruno@clisp.org>
9380
9381         * lib/mkdtemp.c [MINGW]: Include <io.h>.
9382         (mkdir): Define using _mkdir.
9383
9384 2006-06-28  Bruno Haible  <bruno@clisp.org>
9385
9386         * lib/getaddrinfo.h: Fix POSIX URL.
9387         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
9388         _WIN32.
9389         (use_win32_p): Make static.
9390         (getaddrinfo): Reject service name if it is empty or does not consist
9391         solely of decimal digits, or if its value is > 65535.
9392         (getnameinfo): Remove useless casts.
9393
9394 2006-06-27  Simon Josefsson  <jas@extundo.com>
9395
9396         * modules/sys_select: New file, suggested by Bruno Haible, Paul
9397         Eggert and Martin Lambers.
9398
9399 2006-06-27  Simon Josefsson  <jas@extundo.com>
9400
9401         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
9402         Eggert and Martin Lambers.
9403
9404 2006-06-27  Bruno Haible  <bruno@clisp.org>
9405
9406         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
9407         result to 0, not to empty.
9408         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
9409
9410 2006-06-27  Bruno Haible  <bruno@clisp.org>
9411
9412         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
9413
9414 2006-06-26  Simon Josefsson  <jas@extundo.com>
9415
9416         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
9417         present.
9418
9419 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
9420
9421         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
9422         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
9423         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
9424
9425 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
9426
9427         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
9428
9429 2006-06-26  Bruno Haible  <bruno@clisp.org>
9430
9431         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
9432
9433 2006-06-26  Bruno Haible  <bruno@clisp.org>
9434
9435         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
9436
9437 2006-06-26  Bruno Haible  <bruno@clisp.org>
9438
9439         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
9440         SGI C compiler in pre-C99 mode.
9441         Suggested by Mark D. Baushke and Larry Jones.
9442
9443 2006-06-26  Bruno Haible  <bruno@clisp.org>
9444
9445         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
9446         WCHAR_MAX.
9447         Reported by Mark D. Baushke and Larry Jones.
9448
9449 2006-06-26  Bruno Haible  <bruno@clisp.org>
9450
9451         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
9452         in pre-C99 mode.
9453         Suggested by Mark D. Baushke and Larry Jones.
9454
9455 2006-06-23  Simon Josefsson  <jas@extundo.com>
9456             Bruno Haible  <bruno@clisp.org>
9457
9458         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
9459         Emit mostlyclean-local rule.
9460         (func_emit_tests_Makefile_am): Likewise.
9461         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
9462
9463 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
9464
9465         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
9466
9467 2006-06-23  Bruno Haible  <bruno@clisp.org>
9468
9469         * tests/test-stdint.c: Update to match ISO C 99 Technical
9470         Corrigendum 1.
9471
9472 2006-06-23  Bruno Haible  <bruno@clisp.org>
9473
9474         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
9475
9476 2006-06-23  Bruno Haible  <bruno@clisp.org>
9477
9478         * lib/stdint_.h: Treat IRIX like OpenBSD.
9479
9480 2006-06-23  Bruno Haible  <bruno@clisp.org>
9481
9482         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
9483         ISO C 99 Technical Corrigendum 1.
9484
9485 2006-06-22  Simon Josefsson  <jas@extundo.com>
9486
9487         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
9488         MinGW.
9489
9490 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
9491
9492         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
9493         needed.  Some compiler complained about some of them.  Problem reported
9494         by Larry Jones in
9495         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
9496
9497 2006-06-21  Simon Josefsson  <jas@extundo.com>
9498
9499         * tests/test-getaddrinfo.c: New file.
9500
9501         * modules/getaddrinfo-tests: New file.
9502
9503         * MODULES.html.sh: Add inet_pton.
9504
9505         * modules/inet_pton: New file.
9506
9507 2006-06-21  Simon Josefsson  <jas@extundo.com>
9508
9509         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
9510         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
9511         of using the (limited) gnulib implementation on Windows XP.
9512
9513         * m4/inet_pton.m4: New file.
9514
9515 2006-06-21  Simon Josefsson  <jas@extundo.com>
9516
9517         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
9518         variable.
9519
9520         * lib/socket_.h: Don't define WINVER.
9521
9522         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
9523         slightly modified to work in gnulib.
9524
9525 2006-06-21  Simon Josefsson  <jas@extundo.com>
9526
9527         * doc/gnulib.texi (Windows sockets): Add.
9528
9529 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
9530
9531         * lib/read-file.c (fread_file): Start with buffer allocation of
9532         0 bytes rather than 1 byte; this simplifies the code.
9533         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
9534         code to free buffer and save/restore errno.
9535         (internal_read_file): Remove unused local.
9536
9537 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
9538
9539         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
9540         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
9541         Problem reported by Denis Excoffier in
9542         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
9543
9544 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
9545
9546         * modules/sys_socket, modules/socklen: Include sys/types since
9547         FreeBSD 4.x's sys/socket.h needs it.
9548
9549 2006-06-19  Simon Josefsson  <jas@extundo.com>
9550
9551         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
9552
9553 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
9554
9555         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
9556
9557 2006-06-19  Bruno Haible  <bruno@clisp.org>
9558
9559         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
9560         and FULL_PATH_INTTYPES_H in angle brackets.
9561         Reported by Mark D. Baushke <mdb@gnu.org>.
9562
9563 2006-06-17  Eric Blake  <ebb9@byu.net>
9564
9565         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
9566         errno.
9567
9568 2006-06-17  Bruno Haible  <bruno@clisp.org>
9569
9570         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
9571         <sys/inttypes.h>.
9572
9573 2006-06-17  Bruno Haible  <bruno@clisp.org>
9574
9575         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
9576         whether errno is declared. Assume <errno.h> declares errno.
9577
9578 2006-06-17  Bruno Haible  <bruno@clisp.org>
9579
9580         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
9581
9582 2006-06-17  Bruno Haible  <bruno@clisp.org>
9583
9584         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
9585         problem on Solaris 2.5.1.
9586
9587 2006-06-16  Eric Blake  <ebb9@byu.net>
9588
9589         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
9590         * lib/unicodeio.c [!defined errno]: Likewise.
9591         * lib/strtol.c [!defined errno]: Likewise.
9592         * lib/strtod.c [!defined errno]: Likewise.
9593
9594 2006-06-15  Eric Blake  <ebb9@byu.net>
9595
9596         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
9597
9598 2006-06-15  Eric Blake  <ebb9@byu.net>
9599
9600         * config/srclist.txt (ssize_t.m4): Lose sync.
9601
9602 2006-06-15  Bruno Haible  <bruno@clisp.org>
9603
9604         * modules/stdint (Files): Include m4/full-header-path.m4,
9605         m4/size_max.m4, m4/wchar_t.m4.
9606         (Makefile.am): Many more substitutions.
9607         * modules/stdint-tests: New file.
9608         * tests/test-stdint.c: New file.
9609
9610 2006-06-15  Bruno Haible  <bruno@clisp.org>
9611
9612         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
9613         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
9614         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
9615         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
9616         gl_CHECK_TYPE_SAME): New macros.
9617
9618 2006-06-15  Bruno Haible  <bruno@clisp.org>
9619
9620         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
9621
9622 2006-06-15  Bruno Haible  <bruno@clisp.org>
9623
9624         * lib/stdint_.h: Rewritten to be fully auto-configured.
9625         Fixes bug on HP-UX/IA64.
9626
9627 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
9628
9629         * lib/getdate.y (__attribute__): Don't define if already defined.
9630         Problem reported by Larry Jones.
9631         * lib/utimens.c (__attribute__): Likewise.
9632
9633 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
9634
9635         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
9636         reported by Andreas Schwab.
9637
9638 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9639             Bruno Haible  <bruno@clisp.org>
9640
9641         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
9642         check for the declaration of strnlen and a run test that exposes the
9643         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
9644         rpl_strndup.
9645
9646 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9647             Bruno Haible  <bruno@clisp.org>
9648
9649         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
9650
9651 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9652
9653         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
9654         compile test, for Tru64 4.0D.
9655
9656 2006-05-28  Karl Berry  <karl@gnu.org>
9657
9658         * config/srclist.txt (printf-args.c): lose sync.
9659
9660 2006-05-26  Martin Lambers  <marlam@marlam.de>
9661
9662         * lib/getpass.c: Updates the test for the native W32 API, and adds
9663         missing includes, thus fixing compilation warnings.
9664
9665 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
9666
9667         * lib/exclude.c (exclude_fnmatch): New function.
9668         (excluded_file_name): Call exclude_fnmatch.
9669         * lib/exclude.h (excluded_file_name): New prototype
9670
9671 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
9672
9673         * lib/tempname.c (small_open, large_open): New macros.
9674         (__open, __open64) [!_LIBC]: Remove.
9675         (__gen_tempname): Use small_open and large_open instead of __open
9676         and __open64.  This fixes a portability bug on HP-UX 11.11i
9677         reported by Simon Wing-Tang in
9678         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
9679
9680 2006-05-24  Bruno Haible  <bruno@clisp.org>
9681
9682         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
9683         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
9684         Reported by Thorsten Maerz <torte@netztorte.de> via
9685         Aaron Stone <aaron@serendipity.cx>.
9686
9687 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
9688
9689         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
9690         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
9691         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
9692         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
9693         not really conditional on the cache.
9694         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
9695
9696 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
9697
9698         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
9699         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
9700         (my_usleep): Don't mishandle maximum value.
9701
9702 2006-05-19  Jim Meyering  <jim@meyering.net>
9703
9704         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
9705
9706 2006-05-17  Bruno Haible  <bruno@clisp.org>
9707
9708         Cygwin portability.
9709         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
9710
9711 2006-05-17  Bruno Haible  <bruno@clisp.org>
9712
9713         * lib/stdint_.h: Fix recognition of Cygwin.
9714
9715 2006-05-15  Bruno Haible  <bruno@clisp.org>
9716
9717         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
9718         on libtool patch by Ralf Wildenhues.
9719
9720 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
9721
9722         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
9723         test for C99 conformance; (bool) 0.5 is an integer constant
9724         expression, but (bool) -0.5 is not.  Problem reported by Fedor
9725         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
9726
9727 2006-05-11  Simon Josefsson  <jas@extundo.com>
9728
9729         * m4/xvasprintf.m4: Fix obvious typo.
9730
9731 2006-05-11  Jim Meyering  <jim@meyering.net>
9732
9733         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
9734         James Lemley.
9735
9736 2006-05-10  Simon Josefsson  <jas@extundo.com>
9737
9738         * lib/md4.c: Typo fix, update copyright years.
9739         (K1, K2): Don't use L because it turn computations into 64-bit on
9740         64-bit platforms.
9741
9742 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
9743
9744         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
9745         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
9746         unwanted sign propagation, e.g., on hosts with 64-bit int.
9747         There still are some problems with reeelly weird theoretical hosts
9748         (e.g., 33-bit int) but it's not worth worrying about now.
9749         * lib/sha1.c (rol): Likewise.
9750         (K1, K2, K3, K4): Remove unnecessary L suffix.
9751
9752 2006-05-10  Bruno Haible  <bruno@clisp.org>
9753
9754         * lib/des.c: Cast to avoid warnings.
9755
9756 2006-05-09  Bruno Haible  <bruno@clisp.org>
9757
9758         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
9759         (Depends-on): Depend also on xsize, stdarg.
9760         (configure.ac): Add gl_XVASPRINTF.
9761
9762 2006-05-09  Bruno Haible  <bruno@clisp.org>
9763
9764         * m4/xvasprintf.m4: New file.
9765
9766 2006-05-09  Bruno Haible  <bruno@clisp.org>
9767
9768         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
9769         (EOVERFLOW): Define fallback value.
9770         (xstrcat): New function.
9771         (xvasprintf): Recognize the special case of a string concatenation.
9772
9773 2006-05-08  Eric Blake  <ebb9@byu.net>
9774
9775         * gnulib-tool (func_version): Base copyright year on CVS date.
9776         (func_emit_copyright_notice): New function.
9777         (func_emit_lib_Makefile_am): Use it.
9778         (func_emit_tests_Makefile_am): Likewise.
9779         (func_import): Likewise.
9780
9781 2006-05-08  Bruno Haible  <bruno@clisp.org>
9782
9783         * modules/stdarg: New file.
9784         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
9785
9786 2006-05-08  Bruno Haible  <bruno@clisp.org>
9787
9788         * m4/stdarg.m4: New file, from GNU gettext.
9789
9790 2006-05-08  Bruno Haible  <bruno@clisp.org>
9791
9792         * config/srclist.txt (build-aux/config.rpath): different from latest
9793         release.
9794
9795 2006-05-08  Bruno Haible  <bruno@clisp.org>
9796
9797         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
9798
9799 2006-05-05  Jim Meyering  <jim@meyering.net>
9800
9801         * m4/warning.m4: New file, derived from bison's file by the same name.
9802
9803 2006-05-03  Bruno Haible  <bruno@clisp.org>
9804
9805         * lib/stdint_.h: Shorter URL.
9806         * lib/inttypes.h: Likewise.
9807
9808 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
9809
9810         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
9811
9812 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
9813
9814         * lib/verify.h: Document the internals better.  Most of this change
9815         was written by Bruno Haible.
9816
9817 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
9818
9819         * doc/verify.texi: New file, partly based on a proposal by
9820         Bruno Haible.
9821
9822 2006-05-02  Bruno Haible  <bruno@clisp.org>
9823
9824         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
9825         test from here...
9826         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
9827
9828 2006-04-29  Bruno Haible  <bruno@clisp.org>
9829
9830         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
9831         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
9832
9833 2006-04-29  Bruno Haible  <bruno@clisp.org>
9834
9835         * gnulib-tool: Make --update option actually work.
9836
9837 2006-04-29  Bruno Haible  <bruno@clisp.org>
9838
9839         * doc/gcd.texi: New file.
9840         * doc/gnulib.texi: Include it.
9841
9842 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
9843
9844         * lib/getdate.y (get_date): When adding relative date, start with the
9845         initial time, not with the result of the first mktime call.
9846
9847 2006-04-25  Bruno Haible  <bruno@clisp.org>
9848
9849         * gnulib-tool (func_import): Output the include directives in three
9850         blocks, sorted separately.
9851         Reported by Ben Pfaff <blp@cs.stanford.edu>.
9852
9853 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
9854
9855         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
9856         to define main with arguments, for C++.  Reported by Eric Blake.
9857         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
9858         Prefer 'int main ()' to 'int main (void)', for C++.
9859         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
9860         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
9861         for 'main', for C99 and C++.
9862
9863 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
9864
9865         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
9866         Don't assume that exit status -1 is valid.
9867         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
9868         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
9869         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
9870         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
9871         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
9872         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
9873         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
9874         functions can be used without declaring them, or that you can
9875         exit with status -1.
9876         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
9877
9878 2006-04-24  Karl Berry  <karl@gnu.org>
9879
9880         * config/srclist.txt (longdouble.m4): sync lost.
9881
9882 2006-04-24  Eric Blake  <ebb9@byu.net>
9883
9884         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
9885
9886 2006-04-24  Bruno Haible  <bruno@clisp.org>
9887
9888         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
9889         poll() implementation in AIX.
9890         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9891
9892 2006-04-24  Bruno Haible  <bruno@clisp.org>
9893
9894         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
9895         assigned exactly once.
9896
9897 2006-04-23  Claudio Fontana  <claudio@gnu.org>
9898             Bruno Haible  <bruno@clisp.org>
9899
9900         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
9901         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
9902         for AM_CPPFLAGS.
9903
9904 2006-04-23  Bruno Haible  <bruno@clisp.org>
9905
9906         * modules/copy-file: Depend on unistd.
9907         * modules/execute: Likewise.
9908         * modules/fatal-signal: Likewise.
9909         * modules/findprog: Likewise.
9910         * modules/mkdtemp : Likewise.
9911         * modules/pipe: Likewise.
9912         * modules/wait-process: Likewise.
9913
9914 2006-04-23  Bruno Haible  <bruno@clisp.org>
9915
9916         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
9917         condition was already detected.
9918         Reported by Ben Pfaff <blp@cs.stanford.edu>.
9919
9920 2006-04-23  Bruno Haible  <bruno@clisp.org>
9921
9922         * lib/copy-file.c: Include <unistd.h> unconditionally.
9923         * lib/execute.c: Likewise.
9924         * lib/fatal-signal.c: Likewise.
9925         * lib/findprog.c: Likewise.
9926         * lib/mkdtemp.c: Likewise.
9927         * lib/pipe.h: Likewise.
9928         * lib/pipe.c: Likewise.
9929         * lib/wait-process.h: Likewise.
9930
9931 2006-04-23  Bruno Haible  <bruno@clisp.org>
9932
9933         * gnulib-tool (func_usage): Fix --import description. Document
9934         --update.
9935         (func_import): Create temporary file in a temporary directory, if
9936         --dry-run is specified. Silence errors from 'grep' when there are no
9937         m4 files in $m4dir.
9938         (func_create_testdir): Silence errors from 'grep' when there are no
9939         m4 files in $m4dir.
9940         Reported by Karl Berry <karl@freefriends.org>.
9941
9942 2006-04-20  Bruno Haible  <bruno@clisp.org>
9943
9944         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
9945         one argument, so that the code will be portable to Autoconf 2.60.
9946         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
9947         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
9948         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
9949
9950 2006-04-19  Derek Price  <derek@ximbiot.com>
9951             Eric Blake  <ebb9@byu.net>
9952
9953         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
9954         rather than "/full/path.h".  Update comment to match.  Shorten &
9955         generalize m4_translit call via AS_TR_CPP.
9956
9957 2006-04-19  Derek Price  <derek@ximbiot.com>
9958             Eric Blake  <ebb9@byu.net>
9959
9960         * lib/inttypes.h: Correct grammar in comment.
9961
9962 2006-04-18  Derek Price  <derek@ximbiot.com>
9963             Paul Eggert  <eggert@cs.ucla.edu>
9964
9965         * modules/inttypes: New file.
9966         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
9967
9968 2006-04-18  Derek Price  <derek@ximbiot.com>
9969             Paul Eggert  <eggert@cs.ucla.edu>
9970
9971         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
9972         New files.
9973
9974 2006-04-18  Derek Price  <derek@ximbiot.com>
9975             Paul Eggert  <eggert@cs.ucla.edu>
9976
9977         * lib/inttypes.h: New file.
9978         * lib/strtoimax.c: Assume <inttypes.h>.
9979
9980 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
9981
9982         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
9983         isn't mounted.  Problem reported by Kir Kolyshkin.
9984
9985 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
9986
9987         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
9988         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
9989         Derek R. Price.
9990         * lib/regex.h (RE_DUP_MAX): Update comment to match current
9991         implementation.
9992
9993 2006-04-12  Eric Blake  <ebb9@byu.net>
9994
9995         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
9996         is now done automatically by the corresponding Autoconf macro.
9997
9998 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
9999
10000         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
10001         time_r.h.
10002
10003 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
10004
10005         Merge regex changes from libc, removing some of our
10006         POSIX-conformance changes that were rejected and redoing them in a
10007         less-intrusive way.
10008
10009         * lib/regcomp.c (re_compile_internal, init_dfa):
10010         Length arg is now size_t, not Idx.  All uses changed.
10011         (peek_token): Forward decl now says internal_function.
10012         (__re_error_msgid, __re_error_msgid_idx):
10013         Now static rather than extern with attribute_hidden.
10014         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
10015         For some reason libc prefers K&R style defns for external functions.
10016         (regerror) [!defined _LIBC]: Likewise.
10017         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
10018         (seek_collating_symbol_entry, lookup_collation_sequence_value):
10019         (build_range_exp, build_collating_symbol):
10020         Use K&R-style defn.
10021         (re_compile_fastmap): Use '\0' to memset, not 0.
10022         (utf8_sb_map): Make the calculations more obvious.
10023         (init_dfa, parse_bracket_exp, build_charclass_op):
10024         Call calloc and cast result, as glibc does.
10025         (init_word_char, fetch_token, peek_token, peek_token_bracket):
10026         (build_range_exp, build_collating_symbol):
10027         Now internal functions.
10028
10029         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
10030
10031         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
10032         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
10033         Don't depend on VMS; depend on __VMS instead, for POSIX
10034         namespace cleanness.
10035         (regoff_t): Define to ssize_t, not long int.
10036
10037         Remove the REG_ macros named below.  Instead, make the old names
10038         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
10039         __USE_GNU_REGEX.
10040         (REG_BACKSLASH_ESCAPE_IN_LISTS):
10041         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
10042         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
10043         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
10044         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
10045         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
10046         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
10047         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
10048         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
10049         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
10050         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
10051         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
10052         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
10053         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
10054         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
10055         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
10056         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
10057         (REG_NREGS):
10058         Remove.  All uses replaced by the old RE_* names.
10059         (RE_BACKSLASH_ESCAPE_IN_LISTS):
10060         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
10061         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
10062         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
10063         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
10064         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
10065         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
10066         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
10067         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
10068         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
10069         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
10070         Don't bother having these macros be independent of each others'
10071         values, since they no longer exist in the POSIX name space.
10072
10073         Rename the following member names back to their old names,
10074         unless !__USE_GNU_REGEX.  All uses changed back.
10075         (buffer): Renamed from re_buffer.
10076         (allocated): Renamed from re_allocated.
10077         (used): Renamed from re_used.
10078         (syntax): Renamed from re_syntax.
10079         (fastmap): Renamed from re_fastmap.
10080         (translate): Renamed from re_translate.
10081         (can_be_null): Renamed from re_can_be_null.
10082         (regs_allocated): Renamed from re_regs_allocated.
10083         (fastmap_accurate): Renamed from re_fastmap_accurate.
10084         (no_sub): Renamed from re_no_sub.
10085         (not_bol): Renamed from re_not_bol.
10086         (not_eol): Renamed from re_not_eol.
10087         (newline_anchor): Renamed from re_newline_anchor.
10088         (num_regs): Renamed from rm_num_regs.
10089         (start): Renamed from rm_start.
10090         (end): Renamed from rm_end.
10091
10092         (free_state): Move up a bit.
10093
10094         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
10095         #define to be empty.
10096         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
10097         when that is what is intended.
10098         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
10099         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
10100         (MAX): New macro.
10101         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
10102         All uses changed back to re_malloc, etc.  It's now the caller's
10103         responsibility to check for overflow; all callers changed.
10104         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
10105         (re_x2nrealloc): Remove.
10106         (free_state): Remove decl.
10107
10108         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
10109         (re_set_registers, re_exec):
10110         Use K&R-style defn.
10111
10112         2006-01-31  Roland McGrath  <roland@redhat.com>
10113
10114         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
10115         Reported by Mike Frysinger <vapier@gentoo.org>.
10116
10117         2006-01-15  Andreas Jaeger  <aj@suse.de>
10118
10119         [BZ #1950]
10120         * lib/regex_internal.c (re_string_reconstruct): Adjust for
10121         build_wcs_upper_buffer change.
10122         (build_wcs_upper_buffer): Change return type.
10123
10124         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
10125
10126         * lib/regex_internal.h: Include <stdint.h> if available.
10127
10128         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
10129
10130         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
10131
10132         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
10133
10134         * lib/regcomp.c: Adjust for changed secondary hash function.
10135
10136         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
10137
10138         * lib/regex.h: Pretty printing.
10139         Clean up namespace a bit.
10140
10141         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
10142
10143         * lib/regexec.c (update_cur_sifted_state, check_arrival,
10144         check_arrival_add_next_nodes): Avoid using uninitialized variable.
10145
10146         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
10147                     Ulrich Drepper  <drepper@redhat.com>
10148
10149         [BZ #1302]
10150         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
10151         changed.
10152         (bitset_word_t): Renamed from bitset_word.  All uses changed.
10153
10154         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
10155
10156         [BZ #281]
10157         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
10158         * lib/regcomp.c: Remove unnecessary uses of
10159         unsigned RE_TRANSLATE_TYPE.
10160         * lib/regex_internal.h: Likewise.
10161         * lib/regex_internal.c: Likewise.
10162         * lib/regexec.c: Likewise.
10163         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
10164
10165         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
10166
10167         * lib/regexec.c (find_recover_state): Remove unnecessary
10168         initialization.
10169         (transit_state_bkref): Make DFA a const pointer.
10170         (get_subexp): Likewise.
10171         (check_arrival): Likewise.
10172         (update_cur_sifted_state): Likewise.
10173         (re_search_internal): Likewise.
10174         (prune_impossible_nodes): Likewise.
10175         (acquire_init_state_context): Likewise.
10176         (proceed_next_node): Likewise.
10177         (set_regs): Likewise.
10178         (free_fail_stack_return): Likewise.
10179         (check_arrival_expand_ecl): Mark DFA parameter as const.
10180         (check_arrival_expand_ecl_sub): Likewise.
10181         (check_subexp_limits): Likewise.
10182         (sub_epsilon_src_nodes):  Likewise.
10183         (add_epsilon_src_nodes):  Likewise.
10184         (merge_state_array): Likewise.
10185         (update_regs): Likewise.
10186         (build_trtable): Likewise.
10187         (sift_states_backward): Mark MCTX parameter as const.
10188         (build_sifted_states): Likewise.
10189         (update_cur_sifted_state): Likewise.
10190         (sift_states_mkref): Likewise.
10191         (check_arrival_expand_ecl): Mark eclosure as const.
10192         (check_dst_limits_calc_pos_1): Likewise.
10193         * lib/regex_internal.h (re_match_context_t): Make dfa a const
10194         pointer.
10195
10196         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
10197
10198         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
10199         (transit_state_sb): Likewise.
10200         (transit_state_mb): Likewise.
10201         (sift_states_iter_mb): Likewise.
10202         (check_arrival_add_next_nodes): Likewise.
10203         (check_node_accept_bytes): Change first parameter to pointer-to-const.
10204         [_LIBC] (re_search_2_stub): Use mempcpy.
10205
10206         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
10207         mbrtowc for very simple UTF-8 case.
10208
10209         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
10210         a pointer-to-const.
10211         (re_acquire_state_context): Likewise.
10212         * lib/regex_internal.h: Adjust prototypes.
10213
10214         * lib/regex.c: Prevent using C++ compilers.
10215
10216         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
10217         (re_acquire_state_context): Likewise.
10218
10219 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
10220
10221         * modules/regex (Depends-on): Add ssize_t.
10222
10223 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
10224
10225         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
10226         translation table.
10227
10228 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
10229
10230         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
10231
10232 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
10233             Bruno Haible  <bruno@clisp.org>
10234
10235         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
10236         <sys/types.h> and <inttypes.h>.
10237
10238 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10239
10240         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
10241         `__error_t_defined', so argp.h will not typedef the former.
10242
10243 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
10244
10245         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
10246         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
10247         glibc names.  Even if glibc is changed to conform to POSIX, the
10248         traditional names will be available anyway, since regex depends on
10249         the extensions module.  Also, fix a longstanding typo in the
10250         implementation of Spencer ERE test #75 from grep 2.3.  Problems
10251         reported by Emanuele Giaquinta.  Also, change sense of cached
10252         variable, so that the message makes sense.
10253
10254 2006-03-24  Simon Josefsson  <jas@extundo.com>
10255
10256         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
10257         including some doc fixes.
10258         (base64_encode_alloc): Fix +1 bug on allocation failures.
10259
10260 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10261
10262         * lib/base64.c (base64_encode): Do not read past end of array with
10263         unsanitized input on systems with CHAR_BIT > 8.
10264
10265 2006-03-24  Eric Blake  <ebb9@byu.net>
10266
10267         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
10268
10269 2006-03-22  Karl Berry  <karl@gnu.org>
10270
10271         * config/srclist.txt (*setenv.[ch]): get from coreutils.
10272         * config/srclistvars.sh (COREUTILS): new var.
10273
10274 2006-03-17  Jim Meyering  <jim@meyering.net>
10275
10276         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
10277         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
10278
10279 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
10280
10281         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
10282         no longer needs it.  Instead, check that regoff_t is as least
10283         as wide as ptrdiff_t.
10284
10285         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
10286         so that our regex.h stays compatible with the installed regex.
10287         This is helpful for installers who configure --without-included-regex.
10288         Problem reported by Emanuele Giaquinta.
10289
10290 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
10291
10292         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
10293         Typedef to long int, not to off_, as POSIX will likely change
10294         in that direction.
10295
10296 2006-03-15  Eric Blake  <ebb9@byu.net>
10297
10298         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
10299
10300 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
10301
10302         * lib/argp-help.c (validate_uparams): Fix typo
10303         * lib/argp-parse.c (argp_default_options): Consistently begin help
10304         messages with a lowercase letter.
10305
10306 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
10307
10308         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
10309         overrun buffers and shouldn't be used (much as gets shouldn't be
10310         used).
10311         * lib/time_r.c (asctime_r, ctime_r): Likewise.
10312
10313 2006-03-08  Simon Josefsson  <jas@extundo.com>
10314
10315         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
10316         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10317
10318 2006-03-08  Simon Josefsson  <jas@extundo.com>
10319
10320         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
10321         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10322
10323 2006-03-08  Simon Josefsson  <jas@extundo.com>
10324
10325         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
10326         signal that configure disabled the device.
10327
10328 2006-03-08  Simon Josefsson  <jas@extundo.com>
10329
10330         * build-aux/maint.mk: Fix refresh-po, to handle no translated
10331         languages.
10332
10333 2006-03-07  Simon Josefsson  <jas@extundo.com>
10334
10335         * modules/getopt (Depends-on): Add unistd.
10336
10337         * modules/unistd: New file.
10338
10339 2006-03-07  Simon Josefsson  <jas@extundo.com>
10340
10341         * modules/gc-random: New file.
10342
10343 2006-03-07  Simon Josefsson  <jas@extundo.com>
10344
10345         * m4/unistd_h.m4: New file.
10346
10347 2006-03-07  Simon Josefsson  <jas@extundo.com>
10348
10349         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
10350         test to be side-effect free by storing the result in the cache
10351         variable gl_cv_lib_readline, and moving the assignment of
10352         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
10353         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10354
10355 2006-03-07  Simon Josefsson  <jas@extundo.com>
10356
10357         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
10358         error on missing devices (the functions will return an error).
10359
10360         * m4/gc.m4: Move random stuff to gc-random.m4
10361
10362 2006-03-07  Simon Josefsson  <jas@extundo.com>
10363
10364         * lib/unistd_.h: New file.
10365
10366 2006-03-07  Simon Josefsson  <jas@extundo.com>
10367
10368         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
10369
10370 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
10371
10372         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
10373         Problem reported by Juan Manuel Guerrero.
10374
10375 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
10376
10377         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
10378         the unistd module.
10379         * lib/getlogin_r.c: Likewise.
10380         * lib/getlogin_r.h: Likewise.
10381         * lib/glob.c: Likewise.
10382         * lib/pagealign_alloc.c: Likewise.
10383         * lib/unistd_.h: Remove; no longer needed.
10384
10385 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
10386
10387         * MODULES.html.sh (Support for systems lacking POSIX:2001):
10388         Add unistd.
10389         * modules/c-stack (Depends-on): Add unistd.
10390         * modules/getlogin_r: Likewise.
10391         * modules/glob: Likewise.
10392         * modules/pagealign_alloc: Likewise.
10393         * modules/unistd (Files): Remove lib/unistd_.h.
10394         (EXTRA_DIST): Remove.
10395         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
10396         need unistd_.h.
10397         (MOSTLYCLEANFILES): Remove unistd.h-t.
10398
10399 2006-03-03  Simon Josefsson  <jas@extundo.com>
10400
10401         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
10402
10403 2006-03-03  Simon Josefsson  <jas@extundo.com>
10404
10405         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
10406         libidn and bison.
10407
10408 2006-03-03  Simon Josefsson  <jas@extundo.com>
10409
10410         * build-aux/maint.mk: Add indent target.
10411
10412 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
10413
10414         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
10415         our replacement poll.h in any case, to avoid a differing
10416         declaration from a system header.  Seen on AIX.
10417
10418 2006-03-01  Simon Josefsson  <jas@extundo.com>
10419
10420         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
10421         <kasal@ucw.cz>.
10422
10423 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
10424
10425         * modules/gettime (Depends-on): Add extensions module.
10426         * modules/nanosleep (Depends-on): Likewise.
10427         * modules/settime (Depends-on): Likewise.
10428
10429 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
10430
10431         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
10432         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
10433         pedantically.
10434         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
10435         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
10436
10437         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
10438         not "==".  Reported by Ralf Wildenhues.
10439
10440 2006-03-01  Karl Berry  <karl@gnu.org>
10441
10442         * doc/Copyright/request-*: new files, synced from gnuorg.
10443
10444 2006-03-01  Karl Berry  <karl@gnu.org>
10445
10446         * config/srclist.txt (Copyright/*): new entries.
10447
10448 2006-02-28  Simon Josefsson  <jas@extundo.com>
10449
10450         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
10451
10452 2006-02-27  Simon Josefsson  <jas@extundo.com>
10453
10454         * lib/base64.h: Indent #define's.  From Jim Meyering
10455         <jim@meyering.net>.
10456
10457 2006-02-27  Jim Meyering  <jim@meyering.net>
10458
10459         Revert the change of 2006-02-24, so these files can continue
10460         to be sync'd from gettext.
10461         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
10462         of `config.h'.
10463
10464 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
10465
10466         * modules/intprops: New file.
10467         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
10468         Add intprops.
10469         * modules/getloadavg (Files): Remove lib/intprops.h.
10470         (Depends-on): Add intprops.
10471         * modules/human: Likewise.
10472         * modules/inttostr: Likewise.
10473         * modules/openat: Likewise.
10474         * modules/sig2str: Likewise.
10475         * modules/userspec: Likewise.
10476         * modules/utimecmp: Likewise.
10477         * modules/xnanosleep: Likewise.
10478         * modules/xstrtol: Likewise.
10479
10480 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
10481
10482         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
10483         * modules/lock-tests (TESTS): Use $(EXEEXT).
10484         * modules/tls-tests: Likewise.
10485         * modules/argp-tests: Likewise.
10486         (check_PROGRAMS): New var, replacing...
10487         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
10488
10489 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10490
10491         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
10492         `config.h'.
10493
10494 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
10495
10496         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
10497
10498 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10499
10500         Sync from coreutils.
10501         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
10502         gl_CHDIR_SAFER.
10503
10504 2006-02-22  Jim Meyering  <jim@meyering.net>
10505
10506         Sync from coreutils.
10507         * m4/chdir-safer.m4: New file.
10508
10509 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
10510
10511         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
10512         AT_FDCWD exceeds INT_MAX.
10513         * lib/openat.h (AT_FDCWD): Likewise.
10514
10515 2006-02-17  Eric Blake  <address@hidden>
10516
10517         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
10518
10519 2006-02-16  Simon Josefsson  <jas@extundo.com>
10520
10521         * modules/getaddrinfo (Depends-on): Add sys_socket.
10522
10523 2006-02-15  Simon Josefsson  <jas@extundo.com>
10524
10525         * build-aux/maint.mk: Add dsyntax-check rule.
10526
10527 2006-02-15  Eric Blake  <ebb9@byu.net>
10528
10529         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
10530         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
10531         'present but cannot compile' warnings on cygwin.
10532         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
10533         use ws2tcpip.h if sys/socket.h works.
10534         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
10535         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
10536
10537 2006-02-14  Simon Josefsson  <jas@extundo.com>
10538
10539         * modules/maintainer-makefile (Files): Rename.
10540
10541         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
10542         and (the local) Makefile.cfg to maint-cfg.mk.
10543
10544         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
10545         to the latter.
10546
10547         * modules/maintainer-makefile: New module.
10548
10549         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
10550         severaly stripped to make it possible to build it up from scratch
10551         with reliable tests.
10552
10553         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
10554         fixes to permit overriding the default actions when configure and
10555         makefile are not available.
10556
10557 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
10558
10559         Sync from coreutils.
10560         * modules/lstat (Depends-on): Don't depend on xalloc.
10561         (License): Change from GPL to LGPL, since this is now simply a
10562         replacement for a libc function.
10563
10564 2006-02-14  Jim Meyering  <jim@meyering.net>
10565
10566         Sync from coreutils.
10567
10568         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
10569         failure on deficient systems, and simplify gnulib lgpl dependencies.
10570         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
10571         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
10572
10573         * lib/xalloc-die.c: Remove unused definition of N_.
10574
10575 2006-02-14  Jim Meyering  <jim@meyering.net>
10576
10577         Sync from coreutils.
10578         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
10579         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
10580         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
10581         double-quote uses of that variable, to accommodate the rare case in
10582         which getmntent is available in none of the libraries checked.  This
10583         happens at least on FreeBSD 5.0.
10584
10585 2006-02-13  Simon Josefsson  <jas@extundo.com>
10586
10587         * gnulib-tool (Usage): Fix --import, from
10588         karl@freefriends.org (Karl Berry).
10589
10590 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
10591
10592         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
10593
10594 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
10595
10596         * lib/argp-namefrob.h: Restore changes accidentally lost during the
10597         "autoupdate" on 2005-12-12.
10598
10599 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
10600
10601         * modules/closeout (Depends-on): Remove atexit.
10602
10603 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
10604
10605         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
10606         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
10607
10608 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
10609
10610         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
10611         __EXTENSIONS__ if this causes compilation to fail.  Problem
10612         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
10613         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
10614
10615 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
10616
10617         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
10618         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
10619         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
10620         All uses changed.
10621
10622 2006-01-26  Simon Josefsson  <jas@extundo.com>
10623
10624         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
10625         prototype is visible on mingw32.
10626
10627         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
10628         for mingw32.
10629
10630         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
10631         mingw32).
10632
10633 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
10634
10635         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
10636         attempt to open for write; this always fails, at least on POSIX
10637         hosts.  This reinstates the 2006-01-09 change, which was
10638         inadvertently removed.
10639
10640 2006-01-26  Bruno Haible  <bruno@clisp.org>
10641
10642         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
10643         Reported by Paul Eggert.
10644
10645 2006-01-26  Bruno Haible  <bruno@clisp.org>
10646             Paul Eggert  <eggert@cs.ucla.edu>
10647
10648         * lib/stdbool_.h (_Bool)
10649         [(! (defined __cplusplus || defined __BEOS__)
10650           && !defined __GNUC__
10651           && !(defined __HP_cc || defined __xlc__
10652                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
10653                || defined __sgi))]:
10654         #define to signed char in these cases too; this simplifies
10655         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
10656         etc., separately) and makes it more conservative.
10657
10658 2006-01-25  Simon Josefsson  <jas@extundo.com>
10659
10660         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
10661         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
10662         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
10663
10664 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
10665
10666         * lib/argp-namefrob.h: Bugfix. Remove stray #
10667
10668 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
10669
10670         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
10671         so that we test the test.
10672         Check for yet another HP-UX cc bug involving *bool |= bool.
10673
10674 2006-01-25  Karl Berry  <karl@gnu.org>
10675
10676         * config/srclist.txt (vasnprintf.c): sync lost.
10677
10678 2006-01-25  Jim Meyering  <jim@meyering.net>
10679
10680         Sync from the stable (b5) branch of coreutils:
10681
10682         * lib/fts.c (fts_children): Don't let close() clobber errno from
10683         failed fchdir().
10684
10685         * lib/fts.c (fts_stat): When following a symlink-to-directory,
10686         don't necessarily interpret stat-fails+lstat-succeeds as indicating
10687         a dangling symlink.  That can also happen at least for ELOOP.
10688         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
10689         FYI, this bug predates the inclusion of fts.c in coreutils.
10690
10691         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
10692         in their own block, so pre-c99 compilers don't object.
10693
10694         Avoid the double-free (first in fts_read, second in fts_close) that
10695         would occur when an `active' directory is made inaccessible (e.g.,
10696         via chmod a-x) during a traversal.
10697         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
10698         before returning.  Reproduce this failure by
10699         mkdir -p a/b; cd a; chmod a-x . b
10700         Reported by Stavros Passas.
10701
10702 2006-01-25  Jim Meyering  <jim@meyering.net>
10703
10704         * lib/fileblocks.c: Remove more useless parentheses.
10705         * lib/readutmp.h: Likewise.
10706
10707 2006-01-25  Bruno Haible  <bruno@clisp.org>
10708
10709         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
10710         warnings.
10711         Reported by Paul Eggert.
10712
10713 2006-01-25  Bruno Haible  <bruno@clisp.org>
10714
10715         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
10716         rid of a trap command. For Solaris sh.
10717         Reported by Mark D. Baushke <mdb@gnu.org>.
10718
10719 2006-01-24  Simon Josefsson  <jas@extundo.com>
10720
10721         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
10722         Bruno.
10723
10724 2006-01-24  Karl Berry  <karl@gnu.org>
10725
10726         * config/srclist.txt (argp-namefrob.h): sync lost.
10727
10728 2006-01-24  Jim Meyering  <jim@meyering.net>
10729
10730         * modules/openat (Files): Add lib/intprops.h.
10731         From Mark D. Baushke.
10732
10733 2006-01-24  Jim Meyering  <jim@meyering.net>
10734
10735         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
10736         Reported by Mark D. Baushke.
10737
10738 2006-01-24  Jim Meyering  <jim@meyering.net>
10739
10740         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
10741
10742 2006-01-24  Bruno Haible  <bruno@clisp.org>
10743
10744         * modules/strnlen (Maintainer): Change from glibc to all.
10745
10746 2006-01-24  Bruno Haible  <bruno@clisp.org>
10747
10748         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
10749         Patch by Paul Eggert.
10750
10751 2006-01-24  Bruno Haible  <bruno@clisp.org>
10752
10753         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
10754         already has it.
10755         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
10756         2005-11-26.
10757
10758         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
10759         'signed char' to avoid problems with the built-in _Bool type.
10760         Reported by Paul Eggert on 2005-11-26.
10761
10762 2006-01-24  Bruno Haible  <bruno@clisp.org>
10763
10764         * gnulib-tool (func_import): Avoid constructing complicated sed
10765         expressions inside backquote.
10766         Report and solution by Mark D. Baushke <mdb@gnu.org>.
10767
10768 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
10769
10770         These changes imported from libc.
10771         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
10772         test and two separate function calls.
10773         * lib/strndup.c (__strndup): Add libc_hidden_def.
10774
10775 2006-01-23  Simon Josefsson  <jas@extundo.com>
10776
10777         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
10778         Remove the test_*_SOURCES variable: automake infers it by default.
10779         * modules/tls-tests: Likewise.
10780
10781 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
10782
10783         Work around porting bugs reported by Dieter in
10784         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
10785         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
10786         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
10787         Include "getopt.h" first, to check interface.
10788         (getenv): Declare only if defined HAVE_DECL_GETENV &&
10789         !HAVE_DECL_GETENV.
10790         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
10791         (__strndup): Revert to K&R-style function dfns, the glibc style.
10792         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
10793         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
10794         Include strnlen.h first, to get prototype properly.
10795         (strnlen): Renamed from __strnlen.
10796         Remove weak alias.
10797
10798 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
10799
10800         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
10801
10802 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
10803
10804         * config/srclist.txt: Adjust to reflect glibc reorganization.
10805         This affects only comments.
10806
10807 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
10808
10809          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
10810          Reported by Bruce Korb <bkorb@gnu.org>.
10811
10812 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
10813
10814         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
10815         to pacify gcc -Wswitch-default.
10816
10817 2006-01-22  Bruno Haible  <bruno@clisp.org>
10818
10819         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
10820         temporary buffer for sprintf, take into account the precision also
10821         for 'd', 'i', 'u', 'o', 'x', 'X'.
10822
10823 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
10824
10825         * modules/argp-tests: New module
10826         * tests/test-argp.c: New file
10827         * tests/test-argp-2.sh: New file
10828
10829 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
10830
10831         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
10832         (__argp_base_name): Removed
10833         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
10834         typo.
10835         (__argp_base_name): Provide macro definition or extern declaration
10836         depending on the configuration
10837
10838 2006-01-20  Simon Josefsson  <jas@extundo.com>
10839
10840         * modules/inet_ntop (Depends-on): Depend on sys_socket.
10841
10842 2006-01-20  Simon Josefsson  <jas@extundo.com>
10843
10844         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
10845
10846 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
10847
10848         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
10849         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
10850         Suggested by Bruno Haible.
10851
10852 2006-01-20  Karl Berry  <karl@gnu.org>
10853
10854         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
10855         until changes propagate, I guess.
10856
10857 2006-01-19  Simon Josefsson  <jas@extundo.com>
10858
10859         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
10860
10861 2006-01-19  Simon Josefsson  <jas@extundo.com>
10862
10863         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
10864
10865 2006-01-19  Simon Josefsson  <jas@extundo.com>
10866
10867         * gnulib-tool: Set check_PROGRAMS.
10868
10869         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
10870         modules/des-tests, modules/gc-arcfour-tests,
10871         modules/gc-arctwo-tests, modules/gc-des-tests,
10872         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
10873         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
10874         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
10875         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
10876         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
10877         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
10878         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
10879         test_*_SOURCES.
10880
10881 2006-01-18  Simon Josefsson  <jas@extundo.com>
10882
10883         * modules/socklen (Depends-on): Depend on sys_socket.
10884
10885 2006-01-18  Simon Josefsson  <jas@extundo.com>
10886
10887         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
10888         modules/des-tests, modules/gc-arcfour-tests,
10889         modules/gc-arctwo-tests, modules/gc-des-tests,
10890         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
10891         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
10892         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
10893         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
10894         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
10895         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
10896         $(EXEEXT) to automake TESTS variable, for mingw32.
10897
10898 2006-01-17  Simon Josefsson  <jas@extundo.com>
10899
10900         * modules/socklen (Include): Need sys/socket.h.
10901
10902 2006-01-17  Bruno Haible  <bruno@clisp.org>
10903
10904         * modules/ssize_t (Include): Add <sys/types.h>.
10905
10906 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
10907
10908         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
10909         it's not portable and it doesn't work with cross-compiles.
10910         Problem reported by Bruno Haible.  Fix missing-$ typo in
10911         'test "gl_cv_ignore_unused_libraries" ...' that prevented
10912         -zignore from being used with Sun's C compiler.
10913
10914 2006-01-12  Simon Josefsson  <jas@extundo.com>
10915
10916         * lib/base64.c: Fix warning, reported by Bruno Haible
10917         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
10918
10919 2006-01-12  Bruno Haible  <bruno@clisp.org>
10920
10921         * modules/ldd: New file.
10922         * build-aux/ldd.sh.in: New file.
10923         * MODULES.html.sh (Support for building libraries and executables): Add
10924         ldd.
10925
10926 2006-01-12  Bruno Haible  <bruno@clisp.org>
10927
10928         * m4/ldd.m4: New file.
10929
10930 2006-01-12  Bruno Haible  <bruno@clisp.org>
10931
10932         * gnulib-tool (func_import, func_create_testdir): Don't go into an
10933         endless loop while replacing $auxdir with build-aux.
10934
10935 2006-01-11  Simon Josefsson  <jas@extundo.com>
10936
10937         * lib/stdint_.h (SIZE_MAX): Add missing (.
10938
10939 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
10940
10941         Sync from coreutils.
10942         * lib/md5.c: Fix commentary typos.
10943         (alignof, UNALIGNED_P): No need for a GCC-specific version.
10944         * lib/md5.h (__attribute__): Remove; unused.
10945         * lib/sha1.c: Fix commentary to match md5 better.
10946         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
10947         so that we don't need to worry about alignment.  All uses changed.
10948         This merges the 2005-10-28 md5 change into sha1.
10949
10950 2006-01-11  Jim Meyering  <jim@meyering.net>
10951
10952         Sync from coreutils.
10953         * lib/md5.c (OP): Fix spacing.
10954
10955 2006-01-11  Bruno Haible  <bruno@clisp.org>
10956
10957         Ensure automatic ordering between gl_LOCK and gl_ARGP.
10958         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
10959         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
10960
10961 2006-01-11  Bruno Haible  <bruno@clisp.org>
10962
10963         Ensure automatic ordering between gl_LOCK and gl_ARGP.
10964         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
10965         the "early" section as well.
10966
10967 2006-01-11  Bruno Haible  <bruno@clisp.org>
10968
10969         Avoid "ar: no archive members specified" error on MacOS X.
10970         * gnulib-tool (func_modules_add_dummy): New function.
10971         (func_import, func_create_testdir): Invoke it.
10972
10973 2006-01-11  Bruno Haible  <bruno@clisp.org>
10974
10975         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
10976         with $auxdir in AC_CONFIG_FILES statements.
10977
10978 2006-01-11  Bruno Haible  <bruno@clisp.org>
10979
10980         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
10981         Initialize also noinst_HEADERS to empty.
10982
10983 2006-01-11  Bruno Haible  <bruno@clisp.org>
10984
10985         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
10986         variables.
10987         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
10988         autoreconf.
10989
10990 2006-01-11  Bruno Haible  <bruno@clisp.org>
10991
10992         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
10993         overridable by the user.
10994         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10995
10996 2006-01-10  Simon Josefsson  <jas@extundo.com>
10997
10998         * modules/sys_socket: New file.
10999
11000 2006-01-10  Simon Josefsson  <jas@extundo.com>
11001
11002         * m4/sys_socket_h.m4: New file.
11003
11004 2006-01-10  Simon Josefsson  <jas@extundo.com>
11005
11006         * lib/socket_.h: New file.
11007
11008 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
11009
11010         * modules/readutmp (Maintainer): Add myself.
11011
11012 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
11013
11014         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
11015         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
11016         People who are still concerned with buggy memcmp implementations
11017         can invoke gl_FUNC_MEMCMP themselves.
11018
11019 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
11020
11021         * lib/regex_internal.h (BITSET_WORD_BITS):
11022         Work around a bug in 64-bit PGC (before version 6.1-2), where the
11023         preprocessor mishandles large unsigned values as if they were signed.
11024         Problem reported by Claudio Fontana in
11025         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
11026
11027 2006-01-10  Jim Meyering  <jim@meyering.net>
11028
11029         Avoid the double-free (first in fts_read, second in fts_close) that
11030         would occur when an `active' directory is made inaccessible (e.g.,
11031         via chmod a-x) during a traversal.
11032         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
11033         before returning.  Reproduce this failure by
11034         mkdir -p a/b; cd a; chmod a-x . b
11035         Reported by Stavros Passas.
11036
11037         Sync from coreutils.
11038         * lib/sha1.c: Tweak grammar in a comment.
11039
11040 2006-01-10  Jim Meyering  <jim@meyering.net>
11041
11042         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
11043         Patch by Joerg Sonnenberger.
11044
11045 2006-01-10  Bruno Haible  <bruno@clisp.org>
11046
11047         * modules/readutmp: Depend on module free.
11048         * modules/strtok_r: Depend on module restrict.
11049
11050 2006-01-10  Bruno Haible  <bruno@clisp.org>
11051
11052         * modules/gettext (configure.ac): Add an invocation of
11053         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
11054
11055 2006-01-10  Bruno Haible  <bruno@clisp.org>
11056
11057         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
11058         Reported by Werner Lemberg <wl@gnu.org>.
11059
11060 2006-01-10  Bruno Haible  <bruno@clisp.org>
11061
11062         * lib/localcharset.c: Update from GNU gettext.
11063
11064 2006-01-10  Bruno Haible  <bruno@clisp.org>
11065
11066         * lib/argp.h (__const): Remove macro. Use const instead.
11067         * lib/argp-fmtstream.h (__const): Likewise.
11068         * lib/glob_.h (__const): Remove macro.
11069         * lib/glob-libc.h: Use const instead of __const.
11070
11071 2006-01-10  Bruno Haible  <bruno@clisp.org>
11072
11073         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
11074         variable.
11075         Needed to avoid an automake error regarding the 'gettext' module.
11076
11077 2006-01-09  Simon Josefsson  <jas@extundo.com>
11078
11079         * modules/inet_ntop (Depends-on): Add restrict.
11080
11081 2006-01-09  Simon Josefsson  <jas@extundo.com>
11082
11083         * modules/gc-rijndael-tests (License): Put under LGPL.
11084
11085         * modules/gc-des-tests (License): Likewise.
11086
11087         * modules/gc-arcfour-tests (License): Likewise.
11088
11089         * modules/gc-arctwo-tests (License): Likewise.
11090
11091         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
11092
11093         * modules/gc-hmac-sha1-tests (Files): Likewise.
11094
11095         * modules/gc-hmac-md5-tests (License): Likewise.
11096
11097         * modules/gc-sha1-tests (License): Likewise.
11098
11099         * modules/gc-md5-tests (License): Likewise.
11100
11101         * modules/gc-md4-tests (License): Likewise.
11102
11103         * modules/gc-md2-tests (License): Likewise.
11104
11105         * modules/gc-tests (License): Likewise.
11106
11107         * modules/des-tests (License): Likewise.
11108
11109         * modules/md4-tests (License): Likewise.
11110
11111         * modules/md2-tests (License): Likewise.
11112
11113 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
11114
11115         Sync from coreutils:
11116
11117         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
11118         * modules/lib-ignore: New file.
11119         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
11120         chdir-safer.m4, lchmod.m4.
11121         * modules/openat: Add mkdirat.c, openat-priv.h.
11122
11123 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
11124
11125         Sync from coreutils.
11126         * m4/lib-ignore.m4: New file.
11127         * m4/lchmod.m4: New file.
11128
11129 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
11130
11131         Sync from coreutils.
11132         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
11133         for write access: POSIX says that must fail.
11134         * lib/fts.c (diropen): Likewise.
11135         * lib/save-cwd.c (save_cwd): Likewise.
11136         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
11137         well, for minor improvements on hosts that lack O_DIRECTORY.
11138         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
11139         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
11140         Fall back on chown if open failed with EACCES.
11141
11142         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
11143         Report an error at compile-time if only a 1-second nominal clock
11144         resolution is found.
11145
11146         * lib/lchmod.h: New file.
11147         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
11148         (make_dir_parents): Use lchown rather than chown, and
11149         lchmod rather than chmod.
11150
11151         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
11152         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
11153         "proc" reported by n0dalus.
11154
11155         * lib/mountlist.c: Include <limits.h>.
11156         (dev_from_mount_options)
11157         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
11158         New function.  It no longer assumes "dev=" has the System V meaning
11159         on Linux (since it doesn't).  It also parses "dev=" more carefully.
11160         (read_file_system_list)
11161         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
11162         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
11163         dev= in that case.
11164
11165         * lib/posixtm.h (PDS_PRE_2000): New macro.
11166         * lib/posixtm.c (year): Arg is now syntax_bits rather than
11167         allow_century.  All usages changed.  Reject dates outside the range
11168         1969-1999 if PDS_PRE_2000 is used.
11169
11170 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
11171
11172         Sync from coreutils.
11173         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
11174         (Time of day items): Mention the possibility of leap seconds.
11175         Problem reported by Dr. David Alan Gilbert.
11176
11177 2006-01-09  Jim Meyering  <jim@meyering.net>
11178
11179         Sync from coreutils.
11180
11181         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
11182
11183         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
11184
11185         * lib/modechange.c (mode_compile): Reject an invalid mode string
11186         that starts with an octal digit.  From Andreas Gruenbacher.
11187
11188         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
11189         and dup to open_safer and dup_safer, respectively.
11190         (openat_permissive): Fix typo in comment.
11191
11192         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
11193         "gettext.h"; either no longer needed or are guaranteed by openat.h.
11194         (_): Remove; no longer needed.
11195         (openat): Renamed from rpl_openat; no need for rpl_openat
11196         since openat.h renames openat for us.
11197         Replace most of the body with a call to openat_permissive,
11198         to avoid duplicate code.
11199         Port to (probably hypothetical) environments were mode_t is
11200         wider than int.
11201         (openat_permissive): Require mode arg, so that we can check
11202         types better.  Put it just after flags.  Change cwd failure
11203         indicator from pointer-to-bool to pointer-to-errno-value.
11204         All callers changed.
11205         Invoke openat_save_fail and/or openat_restore_fail if
11206         cwd_errno is null, so that openat can call us.
11207         (openat_permissive, fdopendir, fstatat, unlinkat):
11208         Simplify errno handling to avoid some duplicate code,
11209         as it's OK to set errno on success.
11210         * lib/openat.h: Revamp code so that function macros depend on
11211         __OPENAT_PREFIX only, not also on AT_FDCWD.
11212         (openat_ro): Remove.  Caller changed to use openat_permissive.
11213         (openat_permissive): Now a macro, if not a function.
11214         (openat_restore_fail, openat_save_fail): Now always functions,
11215         since mkdirat needs them even if __OPENAT_PREFIX is defined.
11216
11217         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
11218         and openat.c.
11219         * lib/mkdirat.c: Include openat-priv.h.
11220         Remove definitions of macros defined therein.
11221         * lib/openat.c: Likewise.
11222
11223         * lib/mkdirat.c (mkdirat): New file and function.
11224         * lib/openat.h (mkdirat): Declare.
11225
11226         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
11227
11228         * lib/openat.h (openat_permissive): Declare.
11229         (openat_ro): Define.
11230
11231         * lib/openat.c (EXPECTED_ERRNO): New macro.
11232         (openat_permissive): New function -- used in remove.c rewrite.
11233         (all functions): Set errno just before returning, only if there
11234         was an actual failure.
11235         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
11236
11237         Emulate openat-family functions using Linux's procfs, if possible.
11238         Idea and some code based on Ulrich Drepper's glibc changes.
11239
11240         * lib/openat.c: (BUILD_PROC_NAME): New macro.
11241         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
11242         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
11243         before falling back on save_cwd and restore_cwd.
11244         (fdopendir, fstatat, unlinkat): Likewise.
11245
11246         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
11247         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
11248
11249         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
11250         as second argument to va_arg.  Otherwise, some versions of gcc
11251         warn that `if this code is reached, the program will abort'.
11252
11253 2006-01-09  Jim Meyering  <jim@meyering.net>
11254
11255         Sync from coreutils.
11256         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
11257         Require openat-priv.h.
11258
11259 2006-01-09  Bruno Haible  <bruno@clisp.org>
11260
11261         * modules/strnlen (Include): Use strnlen.h.
11262
11263 2006-01-09  Bruno Haible  <bruno@clisp.org>
11264
11265         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
11266
11267 2006-01-09  Bruno Haible  <bruno@clisp.org>
11268
11269         * lib/sysexit_.h (EX_OK): New macro.
11270         Suggested by Martin Lambers <marlam@marlam.de>.
11271
11272 2006-01-09  Bruno Haible  <bruno@clisp.org>
11273
11274         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
11275         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
11276
11277 2006-01-09  Bruno Haible  <bruno@clisp.org>
11278
11279         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
11280         numbers.
11281
11282 2006-01-09  Bruno Haible  <bruno@clisp.org>
11283
11284         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
11285         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
11286         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
11287         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
11288
11289 2006-01-09  Bruno Haible  <bruno@clisp.org>
11290
11291         * build-aux/javacomp.sh.in: New file, moved from lib/.
11292         * modules/javacomp-script (Files): Update.
11293         (configure.ac): Add AC_CONFIG_FILES invocation.
11294         (EXTRA_DIST): Remove variable.
11295
11296         * build-aux/javaexec.sh.in: New file, moved from lib/.
11297         * modules/javaexec (Files): Update.
11298         (configure.ac): Add AC_CONFIG_FILES invocation.
11299         (EXTRA_DIST): Remove javaexec.sh.in.
11300
11301         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
11302         * modules/csharpcomp-script (Files): Update.
11303         (configure.ac): Add AC_CONFIG_FILES invocation.
11304         (EXTRA_DIST): Remove variable.
11305
11306         * build-aux/csharpexec.sh.in: New file, moved from lib/.
11307         * modules/csharpexec (Files): Update.
11308         (configure.ac): Add AC_CONFIG_FILES invocation.
11309         (EXTRA_DIST): Remove csharpexec.sh.in.
11310
11311 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
11312
11313         Sync from coreutils.
11314
11315         Add POSIX ACL support
11316         * lib/acl.h (copy_acl, set_acl): Add declarations.
11317         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
11318         systems other than Linux.
11319         (chmod_or_fchmod): New function: use fchmod when possible,
11320         and chmod otherwise.
11321         (file_has_acl): Add a POSIX ACL implementation, with a
11322         Linux-specific subcase.
11323         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
11324         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
11325         acls are unsupported.
11326         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
11327         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
11328         are unsupported.
11329
11330 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
11331
11332         Sync from coreutils.
11333         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
11334
11335 2006-01-07  Bruno Haible  <bruno@clisp.org>
11336
11337         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
11338         gl_EARLY.
11339
11340 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
11341
11342         * lib/strftime.c (tzname): Don't declare if it is already #defined.
11343         Problem reported for Mingw by Mark Junker.
11344
11345 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
11346
11347         * README: Gnulib normally doesn't generate a tarball.
11348
11349 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
11350
11351         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
11352         long int, not int, for nanosecond counts, so that people who are
11353         used to POSIX struct timespec won't be surprised.  Reported by Jim
11354         Meyering.
11355
11356 2005-12-28  Bruno Haible  <bruno@clisp.org>
11357
11358         * build-aux/config.rpath: Update from GNU gettext.
11359
11360 2005-12-16  Jim Meyering  <jim@meyering.net>
11361
11362         * modules/fprintftime: New module.
11363         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
11364
11365 2005-12-16  Jim Meyering  <jim@meyering.net>
11366
11367         * m4/fprintftime.m4: New file.
11368
11369 2005-12-16  Jim Meyering  <jim@meyering.net>
11370
11371         * lib/fprintftime.c, lib/fprintftime.h: New files.
11372
11373 2005-12-15  Simon Josefsson  <jas@extundo.com>
11374
11375         * modules/socklen (configure.ac): Fix M4 macro name, to align with
11376         new m4/socklen.m4.
11377
11378 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
11379
11380         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
11381         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
11382
11383 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
11384
11385         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
11386         * lib/argp-help.c (fill_in_uparams): Check if the constructed
11387         struct uparams is valid. Fall back to the default values if it is
11388         not.
11389
11390 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
11391
11392         * modules/argp (Files): Add argp-pin.c
11393         (Depends-on): dirname
11394         (lib_SOURCES): Add argp-pin.c
11395
11396 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
11397
11398         * m4/argp.m4:  Check if program_invocation_name and
11399         program_invocation_short_name are declared and define appropriate
11400         macros if they are not.
11401
11402 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
11403
11404         * lib/argp-help.c (__argp_base_name): New function
11405         (__argp_short_program_name): Rewrite using __argp_base_name
11406         * lib/argp-namefrob.h: Define program_invocation_name and
11407         program_invocation_short_name if requested
11408         (__argp_base_name): Add prototype
11409         * lib/argp-parse.c (argp_def): Use gettext wrappers
11410         (argp_default_parser): Use __argp_base_name
11411         * lib/argp-pin.c: New file. Defines program_invocation_name and
11412         program_invocation_short_name on systems that lack them.
11413
11414 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
11415
11416         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
11417         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
11418         porting problem reported by Georg Schwarz in
11419         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
11420
11421 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
11422
11423         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
11424         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
11425         porting problem reported by Georg Schwarz in
11426         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
11427
11428 2005-12-05  Bruno Haible  <bruno@clisp.org>
11429
11430         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
11431         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
11432         Reported by Mark Junker <mjscod@gmx.de>.
11433
11434 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
11435
11436         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
11437         Use implementation from Albert Chin, with some
11438         comments/corrections by Stepan Kasal and myself.
11439
11440 2005-12-02  Bruno Haible  <bruno@clisp.org>
11441
11442         * gnulib-tool (func_import): Accept GPLed build tool modules when
11443         --lgpl is given.
11444         * modules/csharpcomp-script: New file.
11445         * modules/csharpcomp: Depend on it.
11446         * modules/javacomp-script: New file.
11447         * modules/javacomp: Depend on it.
11448         Suggested by Simon Josefsson.
11449
11450 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
11451
11452         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
11453         statement, to work around an HP-UX 10.20 compiler bug reported by
11454         Peter O'Gorman.
11455
11456 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
11457
11458         * modules/savedir (Depends-on): Add openat.
11459
11460 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
11461
11462         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
11463         (uintmax_t) [defined uintmax_t]: Do not declare.
11464         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
11465         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
11466         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
11467         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
11468         sake of portability to weird hosts that C allows (though we don't
11469         know of any practical examples).
11470
11471         * lib/savedir.h (fdsavedir): New decl.
11472         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
11473         contains most of the former guts of savedir.
11474         (savedir): Use savedirstream.
11475         Include "openat.h".
11476
11477 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
11478
11479         * modules/obstack (Files): Add m4/ulonglong.m4.
11480         Problem reported by Davide Angelocola.
11481
11482 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
11483
11484         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
11485         coreutils no longer futzes with rounding modes.
11486
11487 2005-11-14  Jim Meyering  <jim@meyering.net>
11488
11489         * lib/mkstemp-safer.c: Include <config.h>, required for possible
11490         replacement of mkstemp.
11491
11492 2005-11-10  Simon Josefsson  <jas@extundo.com>
11493
11494         * lib/readline.c: Remove EOL.
11495
11496 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
11497
11498         * modules/gethrxtime (Depends-on): Add gettime.
11499
11500 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
11501
11502         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
11503         or gettimeofday; no longer needed.
11504
11505 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
11506
11507         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
11508         time business.
11509         (gethrxtime) [! (HAVE_NANOUPTIME
11510         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
11511         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
11512         our own approximation.
11513
11514 2005-11-08  Eric Blake  <ebb9@byu.net>
11515
11516         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
11517
11518 2005-11-08  Eric Blake  <ebb9@byu.net>
11519
11520         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
11521
11522 2005-11-04  Bruno Haible  <bruno@clisp.org>
11523
11524         * gnulib-tool: Implement --update mode.
11525
11526 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
11527
11528         Fix porting problem reported by Theodoros V. Kalamatianos.
11529         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
11530         Don't assume that futimes failing means we must fail.
11531
11532 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
11533
11534         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
11535         variables to suggest the intended function of the PATH_MAX check.
11536
11537 2005-10-30  Kean Johnston  <jkj@sco.com>
11538
11539         Trivial changes to support SCO systems.
11540         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
11541         as PATH_MAX.
11542         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
11543         where __ptr is null when no I/O is pending.
11544
11545 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
11546
11547         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
11548         leave errno alone.  Problem reported by Dmitry V. Levin.
11549
11550 2005-10-28  Simon Josefsson  <jas@extundo.com>
11551
11552         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
11553         Test more.
11554
11555         * tests/test-gc-md2.c, tests/test-md2.c: New files.
11556
11557         * modules/md2, modules/md2-tests: New files.
11558
11559 2005-10-28  Simon Josefsson  <jas@extundo.com>
11560
11561         * m4/inet_ntop.m4: More tests.
11562
11563         * m4/gc-md2.m4, md2.m4: New file.
11564
11565 2005-10-28  Simon Josefsson  <jas@extundo.com>
11566
11567         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
11568         "restrict" keywords, as per POSIX.  Protect the function
11569         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
11570         Don't use K&R prototypes.  Check the sprintf return values.
11571         Re-define EAFNOSUPPORT if not present.  Indent.
11572
11573         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
11574         suggested by Bruno Haible <bruno@clisp.org>.
11575
11576         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
11577
11578         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
11579
11580         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
11581         libgcrypt).
11582
11583         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
11584
11585         * lib/md2.h, lib/md2.c: New files.
11586
11587 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
11588
11589         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
11590         errno alone.  Problem reported by Frederic Jolliton.
11591
11592 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
11593
11594         * modules/verify (License): Change from GPL to LGPL.  This is a
11595         tiny module and there are apparently near-equivalents that are
11596         under the BSD license.
11597
11598 2005-10-24  Simon Josefsson  <jas@extundo.com>
11599
11600         * modules/sha1: Relicense to LGPL.
11601
11602 2005-10-24  Simon Josefsson  <jas@extundo.com>
11603
11604         * lib/md4.h: Shrink buffer size, now that we changed the type.
11605
11606 2005-10-23  Simon Josefsson  <jas@extundo.com>
11607
11608         * gnulib-tool (func_import): Fix --tests-base.
11609
11610 2005-10-22  Simon Josefsson  <jas@extundo.com>
11611
11612         * modules/arcfour (Depends-on): Need stdint.
11613
11614 2005-10-22  Simon Josefsson  <jas@extundo.com>
11615
11616         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
11617         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
11618
11619 2005-10-22  Simon Josefsson  <jas@extundo.com>
11620
11621         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
11622         suggested by Bruno Haible <bruno@clisp.org>.
11623
11624 2005-10-22  Simon Josefsson  <jas@extundo.com>
11625
11626         * lib/crc.h: Include stddef.h, for size_t.
11627
11628 2005-10-22  Simon Josefsson  <jas@extundo.com>
11629
11630         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
11631         arcfour_context struct (simplify test vector testing in GNU
11632         Shishi).
11633
11634 2005-10-21  Simon Josefsson  <jas@extundo.com>
11635
11636         * modules/des, modules/des-tests: New files.
11637
11638         * modules/gc-des, modules/gc-des-tests: New files.
11639
11640         * tests/test-des.c, tests/test-gc-des.c: New file.
11641
11642 2005-10-21  Simon Josefsson  <jas@extundo.com>
11643
11644         * modules/arctwo, modules/arctwo-tests: New files.
11645
11646         * tests/test-arctwo.c: New file.
11647
11648         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
11649
11650         * tests/test-gc-arctwo.c: New file.
11651
11652 2005-10-21  Simon Josefsson  <jas@extundo.com>
11653
11654         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
11655         Bruno Haible <bruno@clisp.org>.
11656
11657         * m4/gc-des.m4: New file.
11658
11659 2005-10-21  Simon Josefsson  <jas@extundo.com>
11660
11661         * m4/arctwo.m4: New file.
11662
11663         * m4/gc-arctwo.m4: New file.
11664
11665 2005-10-21  Simon Josefsson  <jas@extundo.com>
11666
11667         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
11668         block.
11669
11670 2005-10-21  Simon Josefsson  <jas@extundo.com>
11671
11672         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
11673         <bruno@clisp.org>.
11674
11675         * lib/hmac-sha1.c (hmac_sha1): Likewise.
11676
11677         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
11678         Bruno Haible <bruno@clisp.org>.
11679
11680         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
11681         <bruno@clisp.org>.
11682
11683 2005-10-21  Simon Josefsson  <jas@extundo.com>
11684
11685         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
11686
11687 2005-10-21  Simon Josefsson  <jas@extundo.com>
11688
11689         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
11690
11691 2005-10-21  Simon Josefsson  <jas@extundo.com>
11692
11693         * lib/des.h, lib/des.c: New files.
11694
11695         * lib/gc-gnulib.c: Support DES.c
11696
11697 2005-10-21  Simon Josefsson  <jas@extundo.com>
11698
11699         * lib/arctwo.h, lib/arctwo.c: New files.
11700
11701         * lib/gc-gnulib.c: Support ARCTWO.
11702
11703 2005-10-21  Simon Josefsson  <jas@extundo.com>
11704
11705         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
11706         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
11707
11708 2005-10-21  Simon Josefsson  <jas@extundo.com>
11709
11710         * gnulib-tool (func_import, func_create_testdir): Define automake
11711         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
11712         Makefile.am snippet),
11713         suggested by Bruno Haible <bruno@clisp.org>.
11714
11715         * modules/gc (Makefile.am): Use it.
11716
11717 2005-10-21  Bruno Haible  <bruno@clisp.org>
11718
11719         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
11720         patch.
11721
11722 2005-10-19  Simon Josefsson  <jas@extundo.com>
11723
11724         * tests/test-gc-rijndael.c: New file.
11725
11726         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
11727
11728 2005-10-19  Simon Josefsson  <jas@extundo.com>
11729
11730         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
11731         interface too.
11732
11733 2005-10-19  Simon Josefsson  <jas@extundo.com>
11734
11735         * tests/test-gc-arcfour.c: New file.
11736
11737         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
11738
11739 2005-10-19  Simon Josefsson  <jas@extundo.com>
11740
11741         * modules/gc-md4, modules/gc-md4-tests: New file.
11742
11743         * tests/test-gc-md4.c: New file.
11744
11745 2005-10-19  Simon Josefsson  <jas@extundo.com>
11746
11747         * m4/gc-md4.m4: New file.
11748
11749 2005-10-19  Simon Josefsson  <jas@extundo.com>
11750
11751         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
11752         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
11753         <kasal@ucw.cz>.
11754
11755 2005-10-19  Simon Josefsson  <jas@extundo.com>
11756
11757         * m4/gc-arcfour.m4: New file.
11758
11759         * m4/gc-rijndael.m4: New file.
11760
11761 2005-10-19  Simon Josefsson  <jas@extundo.com>
11762
11763         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
11764
11765 2005-10-19  Simon Josefsson  <jas@extundo.com>
11766
11767         * lib/gc-gnulib.c: Support ARCFOUR.
11768
11769 2005-10-19  Simon Josefsson  <jas@extundo.com>
11770
11771         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
11772         support.
11773
11774         * lib/gc.h: Add ECB enum type.
11775
11776         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
11777
11778 2005-10-18  Simon Josefsson  <jas@extundo.com>
11779
11780         * tests/test-md5.c: New file.
11781
11782         * modules/md5-tests: New file.
11783
11784 2005-10-18  Simon Josefsson  <jas@extundo.com>
11785
11786         * tests/test-md4.c: New file.
11787
11788         * modules/md4, modules/md4-tests: New files.
11789
11790 2005-10-18  Simon Josefsson  <jas@extundo.com>
11791
11792         * m4/md4.m4: New file.
11793
11794 2005-10-18  Simon Josefsson  <jas@extundo.com>
11795
11796         * lib/md4.h, lib/md4.c: New files, based on md5.?.
11797
11798 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
11799
11800         * gnulib-tool (func_create_testdir): Omit the second check whether
11801         BUILT_SOURCES in nonempty.
11802
11803 2005-10-17  Simon Josefsson  <jas@extundo.com>
11804
11805         * tests/test-rijndael.c: New file.
11806
11807 2005-10-17  Simon Josefsson  <jas@extundo.com>
11808
11809         * modules/sha1: Depend on stdint instead of md5.
11810
11811         * modules/md5: Depend on stdint, remove uint32_t.
11812
11813 2005-10-17  Simon Josefsson  <jas@extundo.com>
11814
11815         * modules/gc-sha1-tests: New file.
11816
11817         * tests/test-gc-sha1.c: New file.
11818
11819 2005-10-17  Simon Josefsson  <jas@extundo.com>
11820
11821         * m4/md5.m4: Remove call to uint32_t.m4.
11822
11823 2005-10-17  Simon Josefsson  <jas@extundo.com>
11824
11825         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
11826
11827         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
11828         md5.h.
11829
11830         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
11831
11832         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
11833
11834 2005-10-17  Simon Josefsson  <jas@extundo.com>
11835
11836         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
11837
11838 2005-10-17  Simon Josefsson  <jas@extundo.com>
11839
11840         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
11841
11842 2005-10-17  Simon Josefsson  <jas@extundo.com>
11843
11844         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
11845
11846         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
11847
11848 2005-10-17  Bruno Haible  <bruno@clisp.org>
11849
11850         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
11851         that it can also be used in a test.
11852
11853 2005-10-16  Bruno Haible  <bruno@clisp.org>
11854
11855         * gnulib-tool (func_emit_tests_Makefile_am): Also define
11856         TESTS_ENVIRONMENT, so that individual tests can augment it.
11857
11858         * gnulib-tool (func_create_testdir): Use an intermediate target for
11859         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
11860         macros, like $(ALLOCA_H), which cannot be passed through the command
11861         line.
11862
11863 2005-10-15  Simon Josefsson  <jas@extundo.com>
11864
11865         * modules/rijndael-tests: New file.
11866
11867         * modules/rijndael: New file.
11868
11869 2005-10-15  Simon Josefsson  <jas@extundo.com>
11870
11871         * m4/rijndael.m4: New file.
11872
11873 2005-10-15  Simon Josefsson  <jas@extundo.com>
11874
11875         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
11876
11877         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
11878
11879 2005-10-14  Simon Josefsson  <jas@extundo.com>
11880
11881         * tests/test-arcfour.c: New file.
11882
11883         * modules/arcfour, modules/arcfour-tests: New files.
11884
11885 2005-10-14  Simon Josefsson  <jas@extundo.com>
11886
11887         * m4/arcfour.m4: New file.
11888
11889 2005-10-14  Simon Josefsson  <jas@extundo.com>
11890
11891         * lib/arcfour.h, lib/arcfour.c: New files.
11892
11893 2005-10-14  Roland McGrath  <roland@redhat.com>
11894
11895         Import from libc.  [BZ #1331]
11896         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
11897         macro argument.
11898         Reported by Matej Vela <vela@debian.org>.
11899
11900 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
11901
11902         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
11903         include <wchar.h>; no longer needed.
11904
11905 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
11906
11907         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
11908
11909 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
11910         and  Ulrich Drepper  <drepper@redhat.com>
11911
11912         Import from libc.
11913         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
11914         instead of inline stream orientation test and two separate
11915         function calls.  Pay no attention to USE_IN_LIBIO.
11916
11917 2005-10-13  Simon Josefsson  <jas@extundo.com>
11918
11919         * modules/gc-hmac-md5-tests: New file.
11920
11921         * tests/test-gc-hmac-sha1.c: New file.
11922
11923         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
11924
11925         * modules/gc-hmac-md5-tests: New file.
11926
11927         * tests/test-gc-md5.c: New file.
11928
11929         * modules/gc-md5-tests: New file.
11930
11931 2005-10-13  Simon Josefsson  <jas@extundo.com>
11932
11933         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
11934         Move memory allocation outside of loop.
11935
11936 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
11937
11938         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
11939         intermediate directory is in a read-only file system.  Problem
11940         reported by Eric Blake.
11941
11942 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
11943
11944         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
11945
11946 2005-10-12  Simon Josefsson  <jas@extundo.com>
11947
11948         * tests/test-hmac-sha1.c: New file.
11949
11950         * modules/hmac-sha1-tests: New file.
11951
11952         * modules/hmac-sha1: New file.
11953
11954 2005-10-12  Simon Josefsson  <jas@extundo.com>
11955
11956         * modules/gc-sha1: New file.
11957
11958 2005-10-12  Simon Josefsson  <jas@extundo.com>
11959
11960         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
11961
11962         * tests/test-gc-pbkdf2-sha1.c: New file.
11963
11964 2005-10-12  Simon Josefsson  <jas@extundo.com>
11965
11966         * modules/gc-md5, modules/gc-hmac-md5: New files.
11967
11968         * modules/gc (Files): Remove md5, memxor and hmac files.
11969
11970 2005-10-12  Simon Josefsson  <jas@extundo.com>
11971
11972         * m4/gc-pbkdf2-sha1.m4: New file.
11973
11974         * m4/gc-hmac-sha1.m4: New file.
11975
11976         * m4/gc-sha1: New file.
11977
11978         * m4/hmac-sha1.m4: New file.
11979
11980 2005-10-12  Simon Josefsson  <jas@extundo.com>
11981
11982         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
11983
11984         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
11985
11986 2005-10-12  Simon Josefsson  <jas@extundo.com>
11987
11988         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
11989         suggested by Bruno Haible <bruno@clisp.org>.
11990
11991 2005-10-12  Simon Josefsson  <jas@extundo.com>
11992
11993         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
11994
11995 2005-10-12  Simon Josefsson  <jas@extundo.com>
11996
11997         * lib/gc-pbkdf2-sha1.c: New file.
11998
11999         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
12000
12001 2005-10-12  Simon Josefsson  <jas@extundo.com>
12002
12003         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
12004
12005         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
12006
12007 2005-10-12  Simon Josefsson  <jas@extundo.com>
12008
12009         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
12010         GC_USE_HMAC_MD5, respectively.
12011
12012         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
12013         (gc_md5): Fix typo.
12014
12015         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
12016
12017         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
12018
12019         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
12020
12021 2005-10-12  Bruno Haible  <bruno@clisp.org>
12022
12023         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
12024         Reported by Stepan Kasal <kasal@ucw.cz>.
12025
12026 2005-10-11  Simon Josefsson  <jas@extundo.com>
12027
12028         * tests/test-crc.c: New file.
12029
12030         * modules/crc, modules/crc-tests: New files.
12031
12032 2005-10-11  Simon Josefsson  <jas@extundo.com>
12033
12034         * m4/crc.m4: New file.
12035
12036 2005-10-11  Simon Josefsson  <jas@extundo.com>
12037
12038         * lib/gc.h: Add gc_hash and gc_hash_buffer.
12039
12040         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
12041
12042         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
12043
12044 2005-10-11  Simon Josefsson  <jas@extundo.com>
12045
12046         * lib/crc.h, lib/crc.c: New files.
12047
12048         * lib/gc.h (gc_hash_buffer): Add doc.
12049
12050 2005-10-11  Bruno Haible  <bruno@clisp.org>
12051
12052         * modules/c-strcasestr: New file.
12053         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
12054
12055 2005-10-11  Bruno Haible  <bruno@clisp.org>
12056
12057         * modules/c-strcase: New file.
12058         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
12059
12060 2005-10-11  Bruno Haible  <bruno@clisp.org>
12061
12062         * lib/strcasecmp.c: Include limits.h.
12063         (strcasecmp): Avoid integer overflow on exotic platforms.
12064         * lib/strncasecmp.c: Include limits.h.
12065         (strncasecmp): Avoid integer overflow on exotic platforms.
12066         Reported by Paul Eggert.
12067
12068 2005-10-11  Bruno Haible  <bruno@clisp.org>
12069
12070         * lib/c-strcasestr.h: New file, from GNU gettext.
12071         * lib/c-strcasestr.c: New file, from GNU gettext.
12072
12073 2005-10-11  Bruno Haible  <bruno@clisp.org>
12074
12075         * lib/c-strcase.h: New file, from GNU gettext.
12076         * lib/c-strcasecmp.c: New file, from GNU gettext.
12077         * lib/c-strncasecmp.c: New file, from GNU gettext.
12078
12079 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
12080
12081         * modules/mempcpy (License): GPL -> LGPL.
12082         * modules/strchrnul (License): Likewise.
12083         * modules/sysexits (License): Likewise.
12084
12085 2005-10-08  Simon Josefsson  <jas@extundo.com>
12086
12087         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
12088
12089 2005-10-07  Simon Josefsson  <jas@extundo.com>
12090
12091         * m4/memxor.m4: Remove gl_C_RESTRICT call.
12092
12093 2005-10-06  Simon Josefsson  <jas@extundo.com>
12094
12095         * tests/test-hmac-md5.c: New file.
12096
12097         * modules/hmac-md5-tests: New file.
12098
12099         * modules/hmac-md5: New file.
12100
12101 2005-10-06  Simon Josefsson  <jas@extundo.com>
12102
12103         * m4/hmac-md5.m4: New file.
12104
12105         * m4/memxor.m4: Require gl_C_RESTRICT.
12106
12107 2005-10-06  Simon Josefsson  <jas@extundo.com>
12108
12109         * lib/memxor.c (memxor): Avoid casts and warnings.
12110
12111 2005-10-06  Simon Josefsson  <jas@extundo.com>
12112
12113         * lib/hmac-md5.c: New file.
12114
12115         * lib/hmac.h: New file.
12116
12117 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
12118
12119         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
12120         promotes to int, not unsigned int, to catch the AIX 5.3
12121         compiler bug.
12122
12123 2005-10-05  Simon Josefsson  <jas@extundo.com>
12124
12125         * modules/memxor: New file.
12126
12127         * modules/iconv (Files): Move config.rpath to havelib, it is used
12128         there.
12129
12130         * modules/havelib (Files): Add config.rpath.
12131
12132 2005-10-05  Simon Josefsson  <jas@extundo.com>
12133
12134         * m4/memxor.m4: New file.
12135
12136 2005-10-05  Simon Josefsson  <jas@extundo.com>
12137
12138         * lib/memxor.c (memxor): Fix compiler error.
12139
12140         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
12141         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
12142
12143         * lib/memxor.h, lib/memxor.c: New files.
12144
12145         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
12146         we assume all systems have it, suggested by Jim Meyering
12147         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
12148         any systems lack sys/socket.h; mingw32 is known to lack it, but we
12149         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
12150         same reasons.
12151
12152 2005-10-05  Simon Josefsson  <jas@extundo.com>
12153
12154         * config/srclist.txt: Add glibc bug 1423 for md5.h.
12155
12156 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
12157
12158         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
12159         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
12160         needed, since the source code now assumes these .h files.
12161
12162 2005-10-05  Derek Price  <derek@ximbiot.com>
12163
12164         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
12165
12166 2005-10-05  Bruno Haible  <bruno@clisp.org>
12167
12168         * modules/stdint (License): Change to LGPL.
12169
12170 2005-10-04  Simon Josefsson  <jas@extundo.com>
12171
12172         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
12173         D. Baushke" <mdb@gnu.org>.
12174
12175 2005-10-04  Bruno Haible  <bruno@clisp.org>
12176
12177         * lib/verify.h (verify_true): Provide alternative definition for C++.
12178
12179 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
12180
12181         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
12182         (SSIZE_MAX): New macro, if not already defined.
12183         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
12184         than 2 GiB.
12185
12186 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
12187
12188         Sync from coreutils.
12189         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
12190         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
12191         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
12192         ULLONG_MAX doesn't work with 2.7.2.1.
12193
12194 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
12195
12196         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
12197         From Ben Pfaff.
12198
12199         * modules/exclude (Depends-on): Depend on verify.
12200         * modules/strtoimax (Depends-on): Likewise.
12201         * modules/utimecmp (Depends-on): Likewise.
12202
12203 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
12204
12205         * lib/exclude.c: Include verify.h.
12206         (verify): Remove.  All callers changed to use verify.h's version.
12207         * lib/strtoimax.c: Likewise.
12208         * lib/utimecmp.c: Likewis.e
12209
12210         Sync from coreutils.
12211         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
12212         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
12213         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
12214         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
12215         bother returning ENOSYS if settimeofday or stime fails; just let
12216         them return whatever errno they want to return.
12217         * lib/utimens.c: Include unistd.h, for dup2.
12218         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
12219         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
12220
12221 2005-10-02  Jim Meyering  <jim@meyering.net>
12222
12223         Sync from coreutils.
12224         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
12225         from glibc-2.2.5 that fails for read-only files.
12226
12227 2005-10-02  Jim Meyering  <jim@meyering.net>
12228
12229         Sync from coreutils.
12230         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
12231         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
12232         `#if HAVE_CONFIG_H'.
12233         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
12234         Remove AT_FDCWD test.
12235         Do not consume the fd unless successful.
12236         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
12237         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
12238         block, so that we don't even try to compile it if settimeofday is
12239         available.  This works around a compilation failure on OSF1 V5.1,
12240         due to stime requiring a `long int*' while tv_sec is `int'.
12241
12242 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
12243
12244         Sync from coreutils.
12245         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
12246         against `yes', rather than just testing for nonempty.
12247
12248 2005-10-01  Simon Josefsson  <jas@extundo.com>
12249
12250         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
12251         and Darwin.
12252
12253         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
12254         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
12255         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
12256         freeaddrinfo and gai_strerror are declared by the POSIX headers.
12257         Check if struct addrinfo is declared.
12258
12259 2005-10-01  Simon Josefsson  <jas@extundo.com>
12260
12261         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
12262         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
12263         AI_* and EAI_* definitions.  Protect function declarations.
12264
12265 2005-10-01  Jim Meyering  <jim@meyering.net>
12266
12267         Sync from coreutils.
12268
12269         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
12270         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
12271         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
12272         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
12273         in the inet and nsl libraries.  Required on Solaris 5.7.
12274
12275 2005-10-01  Jim Meyering  <jim@meyering.net>
12276
12277         Sync from coreutils.
12278         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
12279         in the inet and nsl libraries.  Required on Solaris 5.7.
12280
12281 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
12282
12283         * lib/getdelim.c (getdelim): Remove unused variables.
12284
12285 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
12286
12287         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
12288         so that the code works even with ancient cpp.  Portability problem
12289         with GCC 2.7.2.1 reported by Thomas M.Ott.
12290
12291 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
12292
12293         * modules/regex (Depends-on): Add strcase.
12294
12295         * modules/gethostname (Licence): Change from GPL to LGPL, since
12296         gethostname.c is a trivial implementation of a standard library
12297         function.
12298         * modules/poll (License): Change from GPL to LGPL, since it's
12299         derived from LGPL code.
12300
12301 2005-09-27  Jim Meyering  <jim@meyering.net>
12302
12303         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
12304         HAVE_CONFIG_H.
12305
12306         * lib/intprops.h (signed_type_or_expr__): Define.
12307         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
12308         for unsigned types.
12309
12310 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
12311
12312         * lib/verify.h (verify_expr): Remove, replacing with:
12313         (verify_true): New macro that returns true instead of void.
12314         (verify_type__): Remove.
12315         (verify): Use verify_true rather than verify_type__.
12316
12317 2005-09-26  Bruno Haible  <bruno@clisp.org>
12318
12319         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
12320         is necessary.
12321         (lib_SOURCES): Remove mbchar.c.
12322         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
12323         (Files): Add m4/mbrtowc.m4.
12324         * modules/mbiter: Likewise.
12325         * modules/mbuiter: Likewise.
12326
12327 2005-09-26  Bruno Haible  <bruno@clisp.org>
12328
12329         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
12330         compile mbchar.c if they are not both present.
12331         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
12332         * m4/mbiter.m4 (gl_MBITER): Likewise.
12333         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
12334         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
12335         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
12336
12337 2005-09-25  Jim Meyering  <jim@meyering.net>
12338
12339         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
12340         also uses socklen_t.
12341
12342 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
12343
12344         * lib/utimens.c (ENOSYS): Define if not already defined.
12345         (futimens): Support having a null PATH if the file descriptor
12346         is nonnegative.
12347
12348         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
12349         Remove.
12350         (__attribute): Define to empty unless GCC 3.1 or later.
12351         This works around a core dump on OpenBSD 3.4, which has GCC
12352         2.95.3, which dumps core when given __attribute__(()).  It also
12353         simplifies other tests, since we really don't want to bother with
12354         worrying about which ancient version of GCC supported what.
12355         Original problem reported by Yoann Vandoorselaere, with part of
12356         the fix suggested by Derek Price.
12357
12358 2005-09-24  Jim Meyering  <jim@meyering.net>
12359
12360         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
12361         so we can once again use a positive bitfield width of 1 -- now we
12362         don't have to explain why we were using a bitfield width of 2.
12363
12364 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
12365
12366         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
12367         and similarly for the other external symbols.  Problem reported
12368         by James Gallager.
12369
12370         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
12371         bug reported by Jim Meyering.
12372
12373         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
12374         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
12375         not needed, since socklen is a prerequisite module.
12376
12377 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
12378
12379         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
12380         Problem reported by Eric Blake.
12381         (getaddrinfo): Initialize se so that it's not garbage.
12382         Redo internal storage allocation so that it doesn't make unportable
12383         assumptions about alignment.
12384         Fix a memory leak.
12385
12386         * lib/utimens.c (futimens): Use futimesat if available.
12387         Prefer it to futimes since it doesn't have the futimes bug.
12388
12389         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
12390         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
12391         Instead, declare a function that returns a pointer to an array,
12392         and use verify_type__ to declare the size of the array.
12393         Problem and germ of a solution reported by Bruno Haible.
12394         (verify_type__): Use 2, not 1, for bitfield size, to avoid
12395         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
12396
12397 2005-09-23  Jim Meyering  <jim@meyering.net>
12398
12399         Sync from coreutils.
12400         Correct build failure (socklen_t not defined) on at least
12401         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
12402         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
12403
12404 2005-09-23  Jim Meyering  <jim@meyering.net>
12405
12406         * modules/getaddrinfo (Depends-on): Add socklen.
12407
12408 2005-09-23  Bruno Haible  <bruno@clisp.org>
12409
12410         * tests/test-verify.c: New file.
12411
12412 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
12413
12414         Sync from coreutils.
12415
12416         * modules/argmatch (Depends-on): Add verify.
12417         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
12418         unistd-safer.
12419         * modules/save-cwd (Depends-on): Likewise.
12420
12421         * modules/openat (Files): Add lib/openat-die.c.
12422         (Depends-on): Remove error, exitfail.
12423         Add dirname.
12424
12425         * modules/verify: New file.
12426         * MODULES.html.sh (Diagnostics <assert.h>): New section,
12427         with "verify" module.
12428
12429 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
12430
12431         Sync from coreutils.
12432
12433         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
12434         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
12435         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
12436         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
12437         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
12438         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
12439         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
12440         Don't bother checking for string.h, stdlib.h, unistd.h.
12441         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
12442         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
12443         module's job.
12444         * m4/jm-macros.m4 (gl_MACROS): Likewise.
12445         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
12446
12447         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
12448         (gl_GETDATE): Use it.
12449
12450         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
12451
12452 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
12453
12454         Sync from coreutils.
12455
12456         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
12457         stat-time.h.
12458         * lib/argmatch.h: Include verify.h
12459         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
12460         (ARGMATCH_ASSERT): Remove; unused.
12461         * lib/canonicalize.c: Assume STDC_HEADERS.
12462         * lib/exclude.c: Include "strcase.h".
12463         * lib/regex_internal.h [!defined _LIBC]: Likewise.
12464         * lib/getusershell.c: Include stdio--.h rather than stdio.h
12465         and stdio-safer.h.
12466         (getusershell): Call fopen, not fopen_safer.
12467         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
12468         Do not include unistd-safer.h.
12469         (save_cwd): Don't call fd_safer; no longer needed
12470         now that we include fcntl--.h.
12471
12472         * lib/getdate.y (relative_time): New type.
12473         (RELATIVE_TIME_0): New constant.
12474         (parser_control): Use relative_time instead of doing it ourselves.
12475         (%union): Add new relative_time rel member.
12476         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
12477         Now typeless.
12478         (relunit, relunit_snumber): Now of type rel.
12479         (zone, rel, relunit, get_date): Adjust to above changes.
12480
12481         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
12482         Do not include unistd-safer.h.
12483         (getloadavg): Don't call fd_safer; no longer needed
12484         now that we include fcntl--.h.
12485
12486         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
12487         (make_dir_parents): Treat ENOSYS like EEXIST.
12488
12489         Improve quality of diagnostics on restore_cwd failure.
12490         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
12491         (make_dir_parents): Last arg is now int * (for errno), not bool *.
12492         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
12493         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
12494         each time through the loop.  Do not diagnose restore_cwd failure;
12495         that is the caller's job (and perhaps the caller does not care).
12496
12497         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
12498         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
12499         If the file already exists but is not a directory, don't bother
12500         to try to make its parents.
12501         Close potential file descriptor leak if we can't chdir("/") (!).
12502         Don't always return true if chdir($PWD) fails; return true only
12503         if the requested action was done successfully (except for the
12504         chdir($PWD)).
12505         Don't log final directory unless we actually made it.
12506         Refactor to avoid duplicate code to fix up permissions.
12507         Don't attempt to fix up parent permissions if chdir($PWD) fails.
12508
12509         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
12510         to make it a bit faster and (I hope) clearer.
12511         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
12512         Fix bug in formats like %2N.
12513
12514         * lib/verify.h: New file.
12515
12516 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
12517
12518         Sync from coreutils.
12519         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
12520
12521 2005-09-22  Jim Meyering  <jim@meyering.net>
12522
12523         Sync from coreutils.
12524
12525         * m4/lstat.m4 (gl_FUNC_LSTAT):
12526         Use AC_LIBSOURCES to require lstat.c and lstat.h.
12527         Remove obsolete comment.
12528         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
12529         * m4/xstrtod.m4: Likewise.
12530
12531         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
12532
12533 2005-09-22  Jim Meyering  <jim@meyering.net>
12534
12535         Sync from coreutils.
12536
12537         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
12538
12539         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
12540         the .tm_year member, since otherwise gcc-4.0 would now warn about
12541         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
12542
12543         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
12544         order to avoid an unsuppressible warning from gcc on 64-bit systems.
12545
12546         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
12547         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
12548         when run in a time zone for which daylight savings time is in effect
12549         for the starting date.
12550
12551         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
12552         stop us from restricting permissions of just-created absolute-named
12553         directories.
12554         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
12555         to restore initial working directory.
12556         * lib/mkdir-p.c (make_dir_parents): New parameter:
12557         different_working_dir, to tell caller if/when we change the working
12558         directory and are unable to return to the initial one.
12559         * lib/mkdir-p.h (make_dir_parents): Update prototype.
12560         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
12561         `return false'.  This fixes a bug introduced on 2004-07-30.
12562
12563         * lib/openat.c (fdopendir): Be sure to close the supplied
12564         file descriptor before returning.  This makes our replacement
12565         implementation a little closer to Solaris's, where fdopendir
12566         ties the file descriptor to the returned DIR* pointer.
12567         * lib/openat.c (unlinkat): New function.
12568         * lib/openat.h (unlinkat): Add prototype.
12569         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
12570         (openat_restore_fail): Rename from openat_restore_die.
12571         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
12572
12573         Provide an alternative to exiting immediately upon save_cwd or
12574         restore_cwd failure.  Now, an application can arrange e.g.,
12575         to perform a longjump in that case.
12576         * lib/openat.c: Include dirname.h.
12577         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
12578         (rpl_openat, fdopendir, fstatat): Call openat_save_die
12579         and openat_restore_die rather than calling error directly.
12580         Don't include "error.h" or "exitfail.h"; they're no longer needed.
12581
12582         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
12583         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
12584         define.
12585
12586         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
12587         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
12588                             int utc, int nanoseconds);
12589         Background:
12590         date should not have to allocate a megabyte of virtual memory to
12591         handle a format argument like +%1048575T.  When implemented with
12592         strftime, it must allocate such a buffer, use strftime to fill it
12593         in, print it, then free it.
12594         With fprintftime, it simply prints everything and exits.
12595         With no need for memory allocation, that's one fewer way to fail.
12596         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
12597         optional field width, not before, so we accept %9:z, not %:9z.
12598         (my_strftime): Be sure to use L_('x') for literals.
12599
12600         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
12601         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
12602         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
12603         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
12604         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
12605         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
12606         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
12607         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
12608         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
12609         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
12610         * lib/xgethostname.c, lib/xreadlink.c:
12611         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
12612
12613         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
12614         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
12615         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
12616         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
12617         and don't include <sys/file.h>).
12618
12619 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
12620
12621         Sync from coreutils.
12622
12623         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
12624         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
12625         [!LDAV_DONE]: Avoid unused variable warning.
12626
12627 2005-09-21  Bruno Haible  <bruno@clisp.org>
12628
12629         * lib/unicodeio.h (unicode_to_mb): New declaration.
12630
12631 2005-09-20  Derek Price  <derek@ximbiot.com>
12632
12633         * lib/getaddrinfo.c: Don't include <netdb.h> included from
12634         getaddrinfo.h.
12635
12636 2005-09-20  Bruno Haible  <bruno@clisp.org>
12637
12638         * gnulib-tool: Remove trailing slashes from the values specified for
12639         --source-base, --m4-base, --tests-base, --aux-dir.
12640         Suggested by Simon Josefsson <jas@extundo.com>.
12641
12642 2005-09-20  Bruno Haible  <bruno@clisp.org>
12643
12644         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
12645         func_modules_to_filelist, func_import, func_create_testdir): Make all
12646         sorting results locale-independent, so that gnulib-cache.m4 doesn't
12647         change when gnulib-tool is invoked in a different locale.
12648
12649 2005-09-19  Simon Josefsson  <jas@extundo.com>
12650
12651         * m4/socklen.m4: Fix typo.
12652
12653 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12654
12655         Use a consistent style for including <config.h>.
12656         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
12657         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
12658         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
12659         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
12660         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
12661         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
12662         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
12663         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
12664         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
12665         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
12666         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
12667         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
12668         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
12669         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
12670         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
12671         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
12672         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
12673         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
12674         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
12675         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
12676         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
12677         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
12678         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
12679         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
12680         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
12681         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
12682         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
12683         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
12684         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
12685         lib/xstrtoumax.c, lib/yesno.c:
12686         Standardize inclusion of config.h.
12687         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
12688         lib/inttostr.h:  Removed inclusion of config.h from header files.
12689         * lib/inttostr.c:  Adjusted in-tree users.
12690         * lib/timespec.h: Remove superfluous warning to include config.h.
12691         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
12692         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
12693         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
12694         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
12695         config.h with HAVE_CONFIG_H.
12696
12697 2005-09-19  Jim Meyering  <jim@meyering.net>
12698
12699         * modules/pathmax (License): Change to LGPL.
12700
12701 2005-09-19  Derek Price  <derek@ximbiot.com>
12702
12703         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
12704
12705 2005-09-19  Bruno Haible  <bruno@clisp.org>
12706
12707         * gnulib-tool (import): Provide default for --tests-base.
12708
12709 2005-09-19  Bruno Haible  <bruno@clisp.org>
12710
12711         * doc/quote.texi: New file, extracted from gnulib.texi.
12712         * doc/ctime.texi: New file, extracted from gnulib.texi.
12713         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
12714         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
12715         * doc/gnulib.texi: Include them.
12716
12717 2005-09-18  Bruno Haible  <bruno@clisp.org>
12718
12719         Portability fix.
12720         * gnulib-tool (func_readlink): New function.
12721         (func_ln_if_changed): Use it.
12722
12723 2005-09-18  Bruno Haible  <bruno@clisp.org>
12724
12725         * gnulib-tool: Support --with-tests also with --import.
12726         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
12727         (func_import): Use variables $testsbase and $inctests. Emit a
12728         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
12729         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
12730         SUBDIRS += $testsdir.
12731         (func_create_testdir): Update.
12732
12733 2005-09-18  Bruno Haible  <bruno@clisp.org>
12734
12735         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
12736         instead of $dry_run.
12737         (func_cp_if_changed, func_mv_if_changed): Remove functions.
12738         (func_ln_if_changed): Don't handle dry-run here.
12739         (func_import): In dry-run mode, detect more precisely which actions
12740         would be performed, and don't use "...ing" verbs.
12741
12742 2005-09-18  Bruno Haible  <bruno@clisp.org>
12743
12744         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
12745         (func_import): Use join on two temporary files instead of three nested
12746         loops, in order to determine which files are new or old.
12747
12748 2005-09-18  Bruno Haible  <bruno@clisp.org>
12749
12750         * gnulib-tool (func_import): Comment out code that spits out the
12751         new files with --dry-run.
12752
12753 2005-09-18  Bruno Haible  <bruno@clisp.org>
12754
12755         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
12756
12757 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
12758
12759         * lib/stat-time.h: New file.
12760         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
12761         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
12762         in a different way.
12763         (timespec_cmp): New function.
12764         * lib/utimecmp.c: Include stat-time.h.
12765         (SYSCALL_RESOLUTION): Depend on whether various struct stat
12766         members exist, not on the obsolescent ST_MTIM_NSEC.
12767         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
12768
12769 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
12770
12771         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
12772
12773 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
12774
12775         * MODULES.html.sh (File system functions): Add stat-time.
12776         * modules/stat-time: New file.
12777         * modules/timespec (Files): Remove m4/st_mtim.m4; this
12778         is now done in a different way, by the stat-time module.
12779         * modules/utimecmp (Depends-on): Add stat-time.
12780
12781 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
12782
12783         * m4/st_mtim.m4: Remove.  Superseded by...
12784         * m4/stat-time.m4: New file.
12785         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
12786         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
12787
12788 2005-09-15  Derek Price  <derek@ximbiot.com>
12789
12790         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
12791
12792 2005-09-15  Derek Price  <derek@ximbiot.com>
12793
12794         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
12795         * lib/regex_internal.c: Ditto, using this...
12796         (__GNUC_PREREQ): ...new macro.
12797         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
12798         using...
12799         (__GNUC_PREREQ): ...this new macro.
12800
12801         * lib/strstr.h: Include string.h. Define strstr as a macro here.
12802
12803 2005-09-15  Derek Price  <derek@ximbiot.com>
12804             Paul Eggert  <eggert@cs.ucla.edu>
12805
12806         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
12807         changes, consolidating in...
12808         * lib/regex_internal.h: ...this file.
12809
12810 2005-09-13  Jim Meyering  <jim@meyering.net>
12811
12812         * lib/canon-host.c: Filter through gnu indent and reword comments
12813         slightly.
12814         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
12815
12816 2005-09-13  Derek Price  <derek@ximbiot.com>
12817
12818         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
12819         failure.
12820         Reported by Jim Meyering  <jim@meyering.net>.
12821
12822 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
12823
12824         * lib/base64.c: Typo.
12825         (base64_encode): Put b64str in initialized data section.
12826
12827 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
12828
12829         Merge glibc and coreutils changes into gnulib, plus a few
12830         extra fixes.
12831         * lib/md5.c: Use #error rather than a string.
12832         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
12833         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
12834         (__attribute__): Define to empty for non recent-GCC.
12835         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
12836         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
12837         Renamed from their non-__ counterparts, with new macros replacing
12838         them if not _LIBC.  Add __THROW attribute.
12839         (rol): Remove.
12840         (struct md5_ctx): Align buffer if using GCC.
12841         * lib/sha1.h (struct sha1_ctx): Likewise.
12842         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
12843         The old name was backwards.
12844         (NOTSWAP): Remove; not used.
12845         (rol): New macro, moved here from md5.h.
12846         (sha1_process_block): Remove a FIXME that doesn't make sense.
12847
12848 2005-09-12  Derek Price  <derek@ximbiot.com>
12849
12850         Return usable errors from canon-host.
12851         * lib/canon-host.h: New file.
12852         * lib/canon-host.c (canon_host): Wrap...
12853         (canon_host_r): ...this new function, which now relies exclusively on
12854         getaddrinfo.
12855         (ch_strerror): New function.
12856         (last_cherror): New global.
12857         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
12858         interface.
12859         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
12860         void *.
12861         (freeaddrinfo): Free ai->ai_canonname when set.
12862
12863 2005-09-12  Derek Price  <derek@ximbiot.com>
12864
12865         Make canon-host require getaddrinfo.
12866         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
12867         AC_LIBSOURCE canon-host.h.  Call...
12868         (gl_PREREQ_CANON_HOST): ...this new function, which requires
12869         gl_GETADDRINFO.
12870         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
12871
12872 2005-09-12  Derek Price  <derek@ximbiot.com>
12873
12874         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
12875         LGPL.
12876         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
12877
12878 2005-09-12  Derek Price  <derek@ximbiot.com>
12879
12880         * lib/gai_strerror.c: Include config.h when available.  Include
12881         getaddrinfo.h before other headers to test interface.
12882         Reported by Larry Jones <lawrence.jones@ugs.com>.
12883
12884 2005-09-12  Derek Price  <derek@ximbiot.com>
12885             Paul Eggert  <eggert@cs.ucla.edu>
12886
12887         * modules/glob (Files): Add glob-libc.h.
12888
12889 2005-09-12  Derek Price  <derek@ximbiot.com>
12890             Paul Eggert  <eggert@cs.ucla.edu>
12891
12892         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
12893         glob_.h, glob-libc.h.
12894         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
12895
12896 2005-09-12  Derek Price  <derek@ximbiot.com>
12897             Paul Eggert  <eggert@cs.ucla.edu>
12898
12899         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
12900         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
12901         protecting things that should be done only in gnulib contexts.
12902         * lib/glob_.h: New file, containing only the glob things needed for
12903         gnulib.
12904         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
12905         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
12906         (glob, globfree, glob_pattern_p): Now defined simply in terms of
12907         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
12908         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
12909         and to respect the namespace rules better.
12910
12911 2005-09-08  Simon Josefsson  <jas@extundo.com>
12912
12913         * modules/socklen: New file.
12914
12915 2005-09-08  Simon Josefsson  <jas@extundo.com>
12916
12917         * m4/socklen.m4: New file.
12918
12919 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
12920
12921         * modules/utimens (Files): Add m4/utimbuf.m4, since
12922         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
12923         Reported by Sergey Poznyakoff.
12924
12925 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
12926
12927         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
12928         definitions, since that's the preferred style in glibc.
12929         Fix a minor spacing issue, and update copyright notice to match
12930         glibc's.
12931
12932 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
12933
12934         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
12935
12936 2005-09-06  Simon Josefsson  <jas@extundo.com>
12937
12938         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
12939         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
12940
12941 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
12942
12943         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
12944         warning.
12945
12946 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
12947
12948         * config/srclist.txt: Add glibc bug 1302.
12949
12950 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
12951
12952         Change bitset word type from unsigned int to unsigned long int,
12953         as this has better performance on typical 64-bit hosts.
12954         Port bitset code to hosts with unusual word sizes.
12955         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
12956         (build_collating_symbol):
12957         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
12958         argument is a bitset.  This is merely a style issue, but it makes
12959         it clearer that an entire array is expected.
12960         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
12961         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
12962         Port to the case where bitset_word is not the same as unsigned int.
12963         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
12964         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
12965         Likewise.
12966         * lib/regexec.c (check_dst_limits_calc_pos_1,
12967         check_subexp_matching_top):
12968         (build_trtable, group_nodes_into_DFAstates):
12969         Likewise.
12970         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
12971         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
12972         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
12973         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
12974         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
12975         * lib/regcomp.c (optimize_subexps, lower_subexp):
12976         Work even if bitset_word has holes in its bitwise representation.
12977         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
12978         * lib/regexec.c (check_dst_limits_calc_pos_1,
12979         check_subexp_matching_top):
12980         Likewise.
12981         * lib/regex_internal.c (re_string_reconstruct):
12982         Don't assume UCHAR_MAX == 255.
12983         * lib/regex_internal.h (bitset_set_all): Likewise.
12984         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
12985         All uses changed.
12986         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
12987         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
12988         All uses changed.
12989         (BITSET_WORD_MAX): New macro.
12990         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
12991         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
12992         (bitset_empty, bitset_copy):
12993         Prefer sizeof (bitset) to multiplying it out ourselves.
12994         (bitset_not_merge): Remove; unused.
12995         (bitset_contain): Return bool, not unsigned int with one bit on.
12996         All callers changed.
12997         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
12998         alignment than re_node_set; do this by defining a new internal
12999         type struct dests_alloc and using it to allocate memory.
13000
13001 2005-09-05  Bruno Haible  <bruno@clisp.org>
13002
13003         * gnulib-tool (func_import): Fix comparison in handling of symbolic
13004         links.
13005
13006 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
13007
13008         * modules/size_max (Makefile.am): Add size_max.h
13009
13010 2005-09-04  Derek Price  <derek@ximbiot.com>
13011
13012         * gnulib-tool (func_import): Fix reversed $symbolic logic.
13013
13014 2005-09-03  Simon Josefsson  <jas@extundo.com>
13015
13016         * gnulib-tool: Fix typo.
13017
13018 2005-09-03  Simon Josefsson  <jas@extundo.com>
13019
13020         * config/srclist.txt: Add glibc bug 1293.
13021
13022 2005-09-03  Derek Price  <derek@ximbiot.com>
13023
13024         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
13025         From Larry Jones <lawrence.jones@ugs.com>.
13026
13027 2005-09-02  Simon Josefsson  <jas@extundo.com>
13028
13029         * modules/socklen: New file.
13030
13031 2005-09-02  Simon Josefsson  <jas@extundo.com>
13032
13033         * modules/havelib: New module.
13034
13035         * modules/gettext, modules/iconv, modules/lock, modules/readline:
13036         Use havelib.
13037
13038 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
13039
13040         Check for arithmetic overflow when calculating sizes, to prevent
13041         some buffer-overflow issues.  These patches are conservative, in the
13042         sense that when I couldn't determine whether an overflow was possible,
13043         I inserted a run-time check.
13044         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
13045         macros.
13046         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
13047         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
13048         (re_xnrealloc, re_x2nrealloc): New inline functions.
13049         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
13050         parse_bracket_exp):
13051         (build_equiv_class, build_charclass): Check for arithmetic overflow
13052         in size expression calculations.
13053         * lib/regex_internal.c (re_string_realloc_buffers):
13054         (build_wcs_upper_buffer, re_node_set_add_intersect):
13055         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
13056         (re_dfa_add_node, register_state): Likewise.
13057         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
13058         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
13059         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
13060         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
13061
13062 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
13063
13064         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
13065         m4/ulonglong.m4.  Problem reported by Martin Lambers.
13066
13067 2005-09-02  Bruno Haible  <bruno@clisp.org>
13068
13069         Support for lib vs. lib64 distinction on biarch platforms.
13070         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
13071         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
13072         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
13073
13074 2005-09-02  Bruno Haible  <bruno@clisp.org>
13075
13076         * gnulib-tool (import): In the other first-use case, provide defaults
13077         as well.
13078
13079 2005-09-02  Bruno Haible  <bruno@clisp.org>
13080
13081         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
13082         patches not yet found in the latest gettext release.
13083
13084 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
13085
13086         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
13087         to avoid a collision with bits/local_lim.h in glibc.
13088         All uses changed.  Problem reported by Dmitry V. Levin in
13089         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
13090
13091         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
13092         bugs in int versus size_t comparisons.
13093         (re_string_context_at): Fix bug where the code assumed that
13094         Idx is signed.
13095
13096         Use bool where appropriate.
13097         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
13098         All callers changed.
13099         (calc_eclosure_iter): Likewise, for ROOT arg.
13100         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
13101         (build_charclass_op): Likewise, for NON_MATCH arg.
13102         * lib/regex_internal.c (re_string_allocate, re_string_construct):
13103         (re_string_construct_common): Likewise, for ICASE arg.
13104         * lib/regexec.c (re_search_2_stub, re_search_stub):
13105         Likewise, for RET_LEN arg.
13106         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
13107         (set_regs): Likewise, for FL_BACKTRACK arg.
13108         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
13109         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
13110         (calc_eclosure_iter, parse_bracket_exp):
13111         Use bool for internal variables that are booleans.
13112         * lib/regexec.c (re_search_internal, check_matching,
13113         proceed_next_node):
13114         (set_regs, build_sifted_states, sift_states_bkref):
13115         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
13116         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
13117         (find_collation_sequence_value):
13118         Likewise.
13119         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
13120         (re_node_set_compare):
13121         Return bool, not int. All callers changed.
13122         * lib/regexec.c (check_halt_node_context, check_dst_limits):
13123         (build_trtable, check_node_accept): Likewise.
13124         * lib/regex_internal.h: Include stdbool.h.
13125
13126         Fix bugs uncovered when converting to bool.
13127         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
13128         failure instead of charging ahead blindly.
13129         * lib/regex_internal.c (register_state): Likewise.
13130         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
13131         for freeing internal storage.
13132         (group_nodes_into_DFA_states): Use unsigned int, not int, for
13133         bitset pieces used as boolean, to avoid undefined behavior
13134         on hosts that do int overflow checking.
13135
13136 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
13137
13138         * config/srclist.txt: Add glibc bugs 1285-1287.
13139
13140 2005-09-01  Jim Meyering  <jim@meyering.net>
13141
13142         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
13143         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
13144         Require gl_STAT_MACROS, too.
13145
13146 2005-09-01  Bruno Haible  <bruno@clisp.org>
13147
13148         * gnulib-tool (import): In the first-use case, provide defaults.
13149
13150 2005-09-01  Bruno Haible  <bruno@clisp.org>
13151
13152         * gnulib-tool (func_import): Remove the .tmp files.
13153
13154 2005-09-01  Bruno Haible  <bruno@clisp.org>
13155
13156         * gnulib-tool (func_import): Fix handling of symbolic links.
13157
13158 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
13159
13160         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
13161         old glibc regex code mishandles strings longer than 2**31 bytes.
13162         This patch fixes this when the regex code is used in gnulib
13163         (i.e., outside glibc).
13164
13165         This patch should not affect the use of the regex code inside
13166         glibc.  No doubt this problem also needs to be handled for glibc
13167         as well, but the result will be an incompatible change to the
13168         glibc ABI, and the old ABI will have to be supported too.  That
13169         can be the the subject for another patch.
13170
13171         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
13172         governing whether the rest of this patch is active.  By default,
13173         the macro is disabled and the patch has no effect.
13174         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
13175         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
13176         (struct re_pattern_buffer, re_search, re_search_2, re_match):
13177         (re_match_2, re_set_registers): Use the new types.
13178         * lib/regex_internal.h (Idx, re_hashval_t): New types.
13179         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
13180         New macros.
13181         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
13182         (re_string_context_at, bin_tree_t, re_dfastate_t):
13183         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
13184         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
13185         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
13186         (re_string_char_size_at, re_string_wchar_at):
13187         (re_string_elem_size_at):
13188         Use the new types and macros to port to 64-bit hosts.
13189         Use unsigned types for internal values, so that the code
13190         mostly works even for arrays larger than SSIZE_MAX.
13191         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
13192         (search_duplicated_node, calc_eclosure_iter, fetch_number):
13193         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
13194         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
13195         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
13196         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
13197         (calc_inveclosure, parse_dup_op, build_range_exp):
13198         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
13199         (fetch_number, create_token_tree, mark_opt_subexp):
13200         Likewise.
13201         * lib/regex_internal.c (re_string_construct_common,
13202         create_ci_newstate):
13203         (create_cd_newstate, re_string_allocate, re_string_construct):
13204         (re_string_realloc_buffers, build_wcs_upper_buffer):
13205         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
13206         (re_string_reconstruct, re_string_peek_byte_case):
13207         (re_string_fetch_byte_case, re_string_context_at):
13208         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
13209         (re_node_set_init_copy, re_node_set_add_intersect):
13210         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
13211         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
13212         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
13213         (re_acquire_state, re_acquire_state_context, register_state):
13214         Likewise.
13215         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
13216         search_cur_bkref_entry):
13217         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
13218         (re_search_internal, re_search_2_stub, re_search_stub)
13219         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
13220         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
13221         (update_cur_sifted_state, check_dst_limits):
13222         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
13223         (check_subexp_limits, sift_states_bkref, merge_state_array):
13224         (check_subexp_matching_top, get_subexp, get_subexp_sub):
13225         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
13226         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
13227         (expand_bkref_cache, check_node_accept_bytes):
13228         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
13229         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
13230         (acquire_init_state_context, check_halt_node_context):
13231         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
13232         (sift_states_backward, clean_state_log_if_needed):
13233         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
13234         (find_recover_state, transit_state_sb, transit_state_mb):
13235         (transit_state_bkref, build_trtable, match_ctx_clean):
13236         Likewise.
13237         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
13238         to work around an assumption that REG_MISSING is negative.
13239
13240         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
13241         (seek_collating_symbol_entry) [defined _LIBC]:
13242         (lookup_collation_sequence_value) [defined _LIBC]:
13243         (build_range_exp, build_collating_symbol) [defined _LIBC]:
13244         Use prototypes rather than old-style function definitions.
13245         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
13246         (transit_state_sb) [0]:
13247         (find_collation_sequence_value) [defined _LIBC]: Likewise.
13248
13249         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
13250         rm_eo.
13251
13252         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
13253         (optimize_subexps, lower_subexp):
13254         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
13255         since the signed shift might overflow.  Use 1u<<31 instead.
13256         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
13257         Likewise.
13258         * lib/regexec.c (check_dst_limits_calc_pos_1,
13259         check_subexp_matching_top): Likewise.
13260
13261         * lib/regcomp.c (optimize_subexps, lower_subexp):
13262         Use CHAR_BIT rather than 8, for clarity.
13263         * lib/regexec.c (check_dst_limits_calc_pos_1):
13264         (check_subexp_matching_top): Likewise.
13265         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
13266         have to worry about portability issues when shifting it left.
13267         Remove no-longer-needed test for table_size > 0.
13268         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
13269         in a word, as the resulting behavior is undefined.
13270         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
13271         in one case, a <= should have been an <, and in another case the
13272         whole test was missing.
13273         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
13274         the standard name CHAR_BIT.
13275         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
13276         this is not true on one's complement and signed-magnitude hosts.
13277
13278         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
13279         next_last_offset.
13280         (struct re_dfa_t): Remove unused member states_alloc.
13281         * lib/regcomp.c (init_dfa): Don't initialize unused members.
13282
13283 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
13284
13285         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
13286         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
13287         and large-file glibc and in 32-bit large-file Solaris.
13288
13289 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
13290
13291         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
13292         lengths fit in regoff_t; this isn't true if regoff_t is the same
13293         width as size_t.
13294         * lib/regex.c (re_search_internal): 5th arg is LAST_START
13295         (= START + RANGE) instead of RANGE.  This avoids overflow
13296         problems when regoff_t is the same width as size_t.
13297         All callers changed.
13298         (re_search_2_stub): Check for overflow when adding the
13299         sizes of the two strings.
13300         (re_search_stub): Check for overflow when adding START
13301         to RANGE; if it occurs, substitute the extreme value.
13302
13303 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
13304
13305         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
13306
13307 2005-08-31  Jim Meyering  <jim@meyering.net>
13308
13309         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
13310         a pointer-to-const.
13311         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
13312         (register_state): Likewise.
13313         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
13314         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
13315         (group_nodes_into_DFAstates): Likewise.
13316
13317 2005-08-31  Jim Meyering  <jim@meyering.net>
13318
13319         * check-module: Add a FIXME comment.
13320
13321 2005-08-31  Eric Blake  <ebb9@byu.net>
13322
13323         * modules/unistd-safer (Files): Add unistd--.h.
13324         * modules/stdio-safer (Files): Add stdio--.h.
13325
13326 2005-08-31  Derek Price  <derek@ximbiot.com>
13327
13328         * lib/getdelim.c (getdelim): Return EOF on EOF.
13329         Reported by Larry Jones <lawrence.jones@ugs.com>.
13330
13331 2005-08-31  Bruno Haible  <bruno@clisp.org>
13332
13333         Avoid unnecessary diffs in the generated lib/Makefile.am.
13334         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
13335         the generated files.
13336         (func_import): Don't set cmd.
13337
13338 2005-08-31  Bruno Haible  <bruno@clisp.org>
13339
13340         * lib/strstr.c: Include <stddef.h>, for NULL.
13341         * lib/strcasestr.c: Likewise.
13342         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
13343
13344 2005-08-31  Bruno Haible  <bruno@clisp.org>
13345
13346         * gnulib-tool: New option --macro-prefix.
13347         (func_import): Use macro_prefix.
13348         (import): Handle option --macro-prefix.
13349
13350 2005-08-31  Bruno Haible  <bruno@clisp.org>
13351
13352         * gnulib-tool (import): Rename most ac_* variables to cached_*.
13353         Also use new variables cached_lgpl, cached_libtool.
13354
13355 2005-08-31  Bruno Haible  <bruno@clisp.org>
13356
13357         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
13358         always instantiating them.
13359
13360 2005-08-31  Bruno Haible  <bruno@clisp.org>
13361
13362         * gnulib-tool (func_import): Read the previous cached settings
13363         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
13364         earlier added by gnulib but are now dropped. Warn when a gnulib file
13365         overwrites a non-gnulib file.
13366
13367 2005-08-31  Bruno Haible  <bruno@clisp.org>
13368
13369         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
13370         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
13371         projects that don't keep autogenerated files in CVS. Put into
13372         actioncmd only the specified modules, not the transitive closure.
13373
13374 2005-08-31  Bruno Haible  <bruno@clisp.org>
13375
13376         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
13377         Create directories that shall be filled.
13378         (import): Don't look for gl_* macros in configure.ac. Recurse across
13379         all directories containing a gnulib-cache.m4 files, if meaningful.
13380
13381 2005-08-31  Bruno Haible  <bruno@clisp.org>
13382
13383         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
13384         (import): Set seen_libtool when we see gl_LIBTOOL.
13385
13386 2005-08-31  Bruno Haible  <bruno@clisp.org>
13387
13388         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
13389         declaration macro definitions from generated gnulib.m4.
13390
13391 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
13392
13393         * lib/iconvme.h: Add prototype for iconv_alloc.
13394
13395 2005-08-29  Simon Josefsson  <jas@extundo.com>
13396
13397         * lib/iconvme.c: Fix errno.
13398
13399 2005-08-29  Bruno Haible  <bruno@clisp.org>
13400
13401         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
13402         that it works when the directory contains spaces.
13403
13404 2005-08-29  Bruno Haible  <bruno@clisp.org>
13405
13406         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
13407
13408 2005-08-29  Bruno Haible  <bruno@clisp.org>
13409
13410         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
13411         Emit more advice.
13412
13413 2005-08-29  Bruno Haible  <bruno@clisp.org>
13414         and Stepan Kasal  <kasal@ucw.cz>
13415
13416         * check-module: If more parameters are given, check each of them
13417         separately; add more exceptions, as noted by Jim Meyering.
13418         (check_module): New procedure.
13419         (%exempt_header): Now contains all exceptions.
13420
13421 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
13422
13423         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
13424
13425 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
13426
13427         * lib/iconvme.c: Split iconv_string into iconv_alloc.
13428
13429 2005-08-28  Bruno Haible  <bruno@clisp.org>
13430
13431         * m4/gnulib-tool.m4: New file.
13432
13433 2005-08-27  Jim Meyering  <jim@meyering.net>
13434
13435         * modules/unistd-safer (Files): Add pipe-safer.c.
13436         * modules/fcntl-safer (Files): Add creat-safer.c.
13437
13438 2005-08-27  Jim Meyering  <jim@meyering.net>
13439
13440         * m4/stdlib-safer.m4: New file.  From coreutils.
13441         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
13442         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
13443         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
13444         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
13445         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
13446
13447 2005-08-27  Jim Meyering  <jim@meyering.net>
13448
13449         * lib/fopen-safer.c: Merge minor changes from coreutils.
13450         * lib/dup-safer.c: Likewise.
13451         * lib/fd-safer.c: Likewise.
13452
13453         Merge from coreutils.
13454         * lib/stdio--.h: New file.
13455         * lib/stdlib--.h: New file.
13456         * lib/mkstemp-safer.c: New file.
13457
13458         GNU tar needs these.
13459         * lib/pipe-safer.c: New file.
13460         * lib/creat-safer.c: New file.
13461         * lib/fcntl--.h (creat): Define to creat_safer.
13462         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
13463         * lib/unistd--.h (pipe): Define to pipe_safer.
13464         * lib/unistd-safer.h: Declare pipe_safer.
13465
13466 2005-08-26  Simon Josefsson  <jas@extundo.com>
13467
13468         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
13469         Haible <bruno@clisp.org>.
13470
13471 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
13472
13473         * lib/regex_internal.h: Remove all references to
13474         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
13475         or better.
13476         (bitset_not, bitset_merge, bitset_not_merge):
13477         (bitset_mask, re_string_allocate, re_string_construct):
13478         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
13479         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
13480         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
13481         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
13482         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
13483         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
13484         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
13485         (re_acquire_state_context):
13486         Remove unnecessary forward decls.
13487         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
13488         Put __attribute at function definition,
13489         now that the function decl has been removed.
13490         * lib/regex_internal.c (re_string_peek_byte_case):
13491         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
13492         Likewise.
13493
13494 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
13495
13496         * m4/regex.m4: Add AC_PREREQ(2.50).
13497         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
13498
13499 2005-08-25  Simon Josefsson  <jas@extundo.com>
13500
13501         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
13502         __fsetlocking.
13503
13504 2005-08-25  Simon Josefsson  <jas@extundo.com>
13505
13506         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
13507         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
13508         GLIBC specific code.
13509
13510 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
13511
13512         Make regex safe for g++.  This fixes one real bug (an "err"
13513         that should have been "*err").  g++ problem reported by
13514         Sam Steingold.
13515         * lib/regex_internal.h (re_calloc): New macro, consistent with
13516         re_malloc etc.  All callers of calloc changed to use re_calloc.
13517         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
13518         not int.  All callers changed.
13519         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
13520         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
13521         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
13522         (find_recover_state): Change "err" to "*err"; this fixes what
13523         appears to be a real bug.
13524         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
13525         versus int.
13526
13527 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
13528
13529         * modules/regex (Depends-on): Add malloc, since the code
13530         assumes that !malloc(0) means failure.
13531
13532 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
13533
13534         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
13535
13536         alloca modernization/simplification for regex.
13537         * lib/regex.c: Remove portability cruft for alloca.  This no longer
13538         needs to be at the start of the file, and can be moved into
13539         regex_internal.h and simplified.
13540         * lib/regex_internal.h: Include <alloca.h>.
13541         (__libc_use_alloca) [!defined _LIBC]: New macro.
13542         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
13543         now works outside glibc.
13544
13545 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
13546
13547         * config/srclist.txt: Add glibc bugs 1241, 1245.
13548
13549 2005-08-25  Jim Meyering  <jim@meyering.net>
13550
13551         * lib/open-safer.c: Include <config.h>.
13552         Otherwise, we'd lose LARGEFILE support in any file using
13553         e.g. "fcntl--.h"
13554
13555 2005-08-25  Bruno Haible  <bruno@clisp.org>
13556
13557         * m4/minmax.m4: Require autoconf 2.52.
13558         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
13559         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
13560         alternatives of translit over the alphabet.
13561         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
13562
13563 2005-08-24  Simon Josefsson  <jas@extundo.com>
13564
13565         * tests/test-getpass.c: New file.
13566
13567 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
13568
13569         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
13570         for GNU regex features.
13571
13572 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
13573
13574         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
13575         * lib/regex.h (regerror): Likewise.
13576
13577         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
13578         requires this.  (The code never needed it.)
13579
13580         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
13581         All uses of recently-renamed identifiers changed to use the new,
13582         POSIX-compliant names.  The code will build and run just fine
13583         without these changes, but it's better to eat our own dog food
13584         and use the standard-conforming names.
13585
13586         * lib/regex.h: Fix a multitude of POSIX name space violations.
13587         These changes have an effect only for programs that define
13588         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
13589         do not change anything for programs compiled in the normal way.
13590         Also, there is no effect on the ABI.
13591
13592         (_REGEX_SOURCE): New macro.
13593         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
13594         defined and _GNU_SOURCE is not; this fixes a name space violation.
13595
13596         Rename the following macros to obey POSIX requirements.
13597         The old names are still visible as macros if _REGEX_SOURCE is defined.
13598         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
13599         RE_BACKSLASH_ESCAPE_IN_LISTS.
13600         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
13601         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
13602         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
13603         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
13604         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
13605         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
13606         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
13607         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
13608         (REG_INTERVALS): renamed from RE_INTERVALS.
13609         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
13610         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
13611         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
13612         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
13613         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
13614         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
13615         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
13616         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
13617         RE_UNMATCHED_RIGHT_PAREN_ORD.
13618         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
13619         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
13620         (REG_DEBUG): renamed from RE_DEBUG.
13621         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
13622         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
13623         unusual, since we can't clash with the POSIX REG_ICASE.
13624         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
13625         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
13626         (REG_NO_SUB): renamed from RE_NO_SUB.
13627         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
13628         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
13629         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
13630         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
13631         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
13632         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
13633         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
13634         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
13635         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
13636         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
13637         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
13638         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
13639         RE_SYNTAX_POSIX_MINIMAL_BASIC.
13640         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
13641         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
13642         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
13643         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
13644         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
13645         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
13646         (REG_FIXED): Renamed from REGS_FIXED.
13647         (REG_NREGS): Renamed from RE_NREGS.
13648
13649         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
13650         of other REG_* macros, since POSIX says the user is allowed to
13651         #undef these macros selectively.
13652
13653         (reg_errcode_t): Update comment stating what other tables need
13654         to be consistent.
13655
13656         Rename the following enum values to obey POSIX requirements.
13657         The old names are still visible as macros.
13658         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
13659         is not defined, since GNU is supposed to be a superset of POSIX as
13660         much as possible, and since we want reg_errcode_t to be a signed
13661         type for implementation consistency.
13662         (_REG_NOERROR): Renamed from REG_NOERROR.
13663         (_REG_NOMATCH): Renamed from REG_NOMATCH.
13664         (_REG_BADPAT): Renamed from REG_BADPAT.
13665         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
13666         (_REG_ECTYPE): Renamed from REG_ECTYPE.
13667         (_REG_EESCAPE): Renamed from REG_EESCAPE.
13668         (_REG_ESUBREG): Renamed from REG_ESUBREG.
13669         (_REG_EBRACK): Renamed from REG_EBRACK.
13670         (_REG_EPAREN): Renamed from REG_EPAREN.
13671         (_REG_EBRACE): Renamed from REG_EBRACE.
13672         (_REG_BADBR): Renamed from REG_BADBR.
13673         (_REG_ERANGE): Renamed from REG_ERANGE.
13674         (_REG_ESPACE): Renamed from REG_ESPACE.
13675         (_REG_BADRPT): Renamed from REG_BADRPT.
13676         (_REG_EEND): Renamed from REG_EEND.
13677         (_REG_ESIZE): Renamed from REG_ESIZE.
13678         (_REG_ERPAREN): Renamed from REG_ERPAREN.
13679         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
13680         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
13681         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
13682         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
13683
13684         (_REG_RE_NAME, _REG_RM_NAME): New macros.
13685         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
13686         changed.  But support the old name if the new one is not defined
13687         and if _REGEX_SOURCE.
13688
13689         Change the following member names in struct re_pattern_buffer.
13690         The old names are still supported if !_REGEX_SOURCE.
13691         The new names are always supported, regardless of _REGEX_SOURCE.
13692         (re_buffer): Renamed from buffer.
13693         (re_allocated): Renamed from allocated.
13694         (re_used): Renamed from used.
13695         (re_syntax): Renamed from syntax.
13696         (re_fastmap): Renamed from fastmap.
13697         (re_translate): Renamed from translate.
13698         (re_can_be_null): Renamed from can_be_null.
13699         (re_regs_allocated): Renamed from regs_allocated.
13700         (re_fastmap_accurate): Renamed from fastmap_accurate.
13701         (re_no_sub): Renamed from no_sub.
13702         (re_not_bol): Renamed from not_bol.
13703         (re_not_eol): Renamed from not_eol.
13704         (re_newline_anchor): Renamed from newline_anchor.
13705
13706         Change the following member names in struct re_registers.
13707         The old names are still supported if !_REGEX_SOURCE.
13708         The new names are always supported, regardless of _REGEX_SOURCE.
13709         (rm_num_regs): Renamed from num_regs.
13710         (rm_start): Renamed from start.
13711         (rm_end): Renamed from end.
13712
13713         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
13714         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
13715         Prepend __ to parameter names.
13716
13717         Undo yesterday's changes.
13718
13719 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
13720
13721         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
13722         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
13723         lib/regex.c.
13724
13725 2005-08-24  Jim Meyering  <jim@meyering.net>
13726
13727         Sync from coreutils.
13728         * m4/fcntl-safer.m4: New file.
13729
13730         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
13731         and object files for this module.
13732
13733 2005-08-24  Jim Meyering  <jim@meyering.net>
13734
13735         Sync from coreutils.
13736         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
13737
13738 2005-08-24  Jim Meyering  <jim@meyering.net>
13739
13740         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
13741         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
13742
13743 2005-08-24  Jim Meyering  <jim@meyering.net>
13744
13745         * modules/fcntl-safer: New module.
13746         * modules/fts (Depends-on): Add fcntl-safer.
13747         * MODULES.html.sh (File descriptor based Input/Output):
13748         Add fcntl-safer.
13749
13750 2005-08-24  Bruno Haible  <bruno@clisp.org>
13751
13752         Support for unit test modules.
13753         * modules/README: Mention tests modules.
13754         * modules/TEMPLATE-TESTS: New file.
13755         * gnulib-tool: New options --extract-tests-module, --with-tests and
13756         --tests-base (unused for the moment).
13757         (testsbase, inctests): New variables.
13758         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
13759         (func_verify_module): Exclude TEMPLATE-TESTS.
13760         (func_verify_nontests_module, func_verify_tests_module): New functions.
13761         (func_get_dependencies): Add implicit dependency for tests modules.
13762         (func_get_tests_module): New function.
13763         (func_modules_transitive_closure): When --with-tests was specified,
13764         include the unit tests as well, unless explicitly avoided.
13765         (func_emit_lib_Makefile_am): Ignore the tests modules here.
13766         (func_emit_tests_Makefile_am): New function.
13767         (func_create_testdir): When --with-tests was specified, emit a
13768         tests/ directory.
13769         * MODULES.html.sh (Future developments): Update.
13770
13771 2005-08-24  Bruno Haible  <bruno@clisp.org>
13772
13773         * modules/tls-tests: New file.
13774         * tests/test-tls.c: New file, from GNU gettext.
13775
13776 2005-08-24  Bruno Haible  <bruno@clisp.org>
13777
13778         * modules/lock-tests: New file.
13779         * tests/test-lock.c: New file, from GNU gettext.
13780
13781 2005-08-24  Bruno Haible  <bruno@clisp.org>
13782
13783         * lib/lock.h: Add multiple inclusion guard.
13784         * lib/tls.h: Add multiple inclusion guard.
13785
13786 2005-08-24  Bruno Haible  <bruno@clisp.org>
13787
13788         * gnulib-tool: Add support for the --aux-dir option to
13789         --create-testdir, --create-megatestdir, --test, --megatest.
13790         (func_create_testdir, func_create_megatestdir): Optionally emit a
13791         AC_CONFIG_AUX_DIR directive.
13792         (create-testdir, create-megatestdir, test, megatest): Provide a
13793         default value for $auxdir.
13794
13795 2005-08-24  Bruno Haible  <bruno@clisp.org>
13796
13797         * gnulib-tool (import): Use compound statement instead of subshell
13798         where possible.
13799
13800 2005-08-24  Bruno Haible  <bruno@clisp.org>
13801
13802         * gnulib-tool (import): Change --aux-dir default to "build-aux".
13803
13804 2005-08-24  Bruno Haible  <bruno@clisp.org>
13805
13806         * gnulib-tool (func_version): Update.
13807
13808 2005-08-24  Bruno Haible  <bruno@clisp.org>
13809
13810         * gnulib-tool (func_import, func_create_testdir,
13811         func_create_megatestdir): Quote all autoconf macro arguments.
13812
13813 2005-08-24  Bruno Haible  <bruno@clisp.org>
13814
13815         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
13816         option --force, because --force causes the aclocal.m4 of each
13817         subdirectory to be newer than the corresponding config.h.in.
13818
13819 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
13820
13821         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
13822         All contents moved to gl_REGEX.
13823         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
13824         assume that it does.
13825
13826 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
13827
13828         * lib/regex.h (REG_NOSYS)
13829         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
13830         Define, since POSIX requires it as of 2001.
13831         (_REG_ENOSYS)
13832         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
13833         New private symbol, used to keep the enum signed in all cases.
13834         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
13835         Youngman in
13836         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
13837
13838         * lib/regex_internal.c (re_string_skip_chars, register_state):
13839         (calc_state_hash):
13840         Remove forward decls; no longer needed now that we use prototypes.
13841         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
13842         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
13843         (clean_state_log_if_needed): Likewise.
13844
13845 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
13846
13847         * config/srclist.txt: Add glibc bugs 1231-1233.
13848
13849 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
13850
13851         Fix problems reported by Sam Steingold in
13852         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
13853         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
13854         assumed that reg_errcode_t is a signed type, which is not
13855         necessarily true if _XOPEN_SOURCE is not defined.
13856         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
13857         since some compilers warn about it otherwise.
13858
13859 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
13860
13861         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
13862         (init_word_char, create_initial_state, duplicate_node_closure):
13863         (fetch_token, peek_token_bracket, build_range_exp):
13864         (build_collating_symbol): Remove forward decls; no longer needed
13865         now that we use prototypes.
13866
13867         * lib/regcomp.c:
13868         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
13869         (re_compile_fastmap_iter, regcomp, regerror, regfree):
13870         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
13871         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
13872         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
13873         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
13874         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
13875         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
13876         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
13877         (build_range_exp, build_collating_symbol, parse_bracket_exp):
13878         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
13879         (build_charclass, build_charclass_op, fetch_number, create_tree):
13880         (create_token_tree, mark_opt_subexp, duplicate_tree):
13881         Use prototypes rather than old-style definitions.
13882
13883         * lib/regex_internal.c:
13884         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
13885         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
13886         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
13887         (re_string_reconstruct, re_string_peek_byte_case):
13888         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
13889         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
13890         (re_node_set_init_copy, re_node_set_add_intersect):
13891         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
13892         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
13893         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
13894         (re_acquire_state, re_acquire_state_context, register_state):
13895         (create_ci_newstate, create_cd_newstate, free_state):
13896         Likewise.
13897         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
13898         re_search_2):
13899         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
13900         (re_search_internal, prune_impossible_nodes):
13901         (acquire_init_state_context, check_matching, static):
13902         (check_halt_node_context, check_halt_state_context, proceed_next_node):
13903         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
13904         (update_regs, sift_states_backward, build_sifted_states):
13905         (clean_state_log_if_needed, merge_state_array):
13906         (update_cur_sifted_state, add_epsilon_src_nodes):
13907         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
13908         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
13909         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
13910         (find_recover_state, check_subexp_matching_top, transit_state_mb):
13911         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
13912         (check_arrival, check_arrival_add_next_nodes):
13913         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
13914         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
13915         (check_node_accept_bytes, check_node_accept, extend_buffers):
13916         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
13917         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
13918         (sift_ctx_init):
13919         Likewise.
13920
13921         * lib/regex_internal.h:
13922         (re_string_allocate, re_string_construct, re_string_reconstruct):
13923         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
13924         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
13925         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
13926         (re_string_context_at, re_string_peek_byte_case):
13927         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
13928         is defined, since we now use prototypes always.
13929
13930         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
13931         C89 or better.  All uses removed.
13932
13933 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
13934
13935         * config/srclist.txt: Add glibc bugs 1220-1227.
13936
13937 2005-08-20  Jim Meyering  <jim@meyering.net>
13938
13939         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
13940         of unused local, dfa.
13941
13942 2005-08-20  Bruno Haible  <bruno@clisp.org>
13943
13944         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
13945
13946 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
13947
13948         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
13949         (re_node_set_insert_last, re_dfa_add_node):
13950         Rename local variables to avoid GCC shadowing warnings.
13951
13952 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
13953
13954         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
13955         [defined lint]: Suppress bogus uninitialized-variable warnings.
13956
13957         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
13958         and let the caller return REG_ESPACE if out of space.  This
13959         removes an uninitialied-variable warning with GCC 4.0.1, and also
13960         avoids taking the address of a local variable.  All callers
13961         changed.
13962
13963 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
13964
13965         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
13966         $LIBCSRC/posix/regexec.c.
13967         Add glibc bug 1217 for regcomp.c.
13968
13969 2005-08-19  Jim Meyering  <jim@meyering.net>
13970
13971         * lib/regexec.c (proceed_next_node): Redo local variables to
13972         avoid GCC shadowing warnings.
13973
13974 2005-08-18  Bruno Haible  <bruno@clisp.org>
13975
13976         * lib/strstr.c (strstr): Fix return value in multibyte case.
13977         * lib/strcasestr.c (strcasestr): Likewise.
13978
13979 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
13980
13981         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
13982
13983 2005-08-17  Jim Meyering  <jim@meyering.net>
13984
13985         Make the %s format (seconds since the epoch) work for a negative
13986         number and when used with a zero-padded field width, e.g. %015s.
13987
13988         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
13989         label so that it precedes the code to set `digits'.  Otherwise,
13990         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
13991         print `00-22'.  Now, it prints `-0022', as it should.
13992
13993 2005-08-17  Bruno Haible  <bruno@clisp.org>
13994
13995         * modules/strstr (Files): Add m4/mbrtowc.m4.
13996         (Depends-on): Add mbuiter.
13997
13998 2005-08-17  Bruno Haible  <bruno@clisp.org>
13999
14000         * modules/strcasestr: New file.
14001         * MODULES.html.sh (String handling, based on ANSI C 89): Add
14002         strcasestr.
14003
14004 2005-08-17  Bruno Haible  <bruno@clisp.org>
14005
14006         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
14007
14008 2005-08-17  Bruno Haible  <bruno@clisp.org>
14009
14010         * modules/mbuiter: New file.
14011         * MODULES.html.sh (Extended multibyte and wide character utilities):
14012         Add mbuiter.
14013
14014 2005-08-17  Bruno Haible  <bruno@clisp.org>
14015
14016         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
14017         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
14018
14019 2005-08-17  Bruno Haible  <bruno@clisp.org>
14020
14021         * m4/strcasestr.m4: New file.
14022
14023 2005-08-17  Bruno Haible  <bruno@clisp.org>
14024
14025         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
14026         * lib/strstr.c: Completely rewritten, with multibyte locale support.
14027
14028 2005-08-17  Bruno Haible  <bruno@clisp.org>
14029
14030         * lib/strcasestr.h: New file.
14031         * lib/strcasestr.c: New file.
14032
14033 2005-08-17  Bruno Haible  <bruno@clisp.org>
14034
14035         * lib/strcasecmp.c: Use mbuiter.h.
14036
14037 2005-08-17  Bruno Haible  <bruno@clisp.org>
14038
14039         * lib/mbuiter.h: New file.
14040
14041 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
14042
14043         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
14044         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
14045         and gl_GETOPT are both invoked via different paths (as happens
14046         with GNU tar CVS because it uses both argp and getopt), the former
14047         wins.
14048
14049 2005-08-16  Bruno Haible  <bruno@clisp.org>
14050
14051         * modules/tls: New file.
14052         * MODULES.html.sh (Multithreading): Add tls.
14053
14054 2005-08-16  Bruno Haible  <bruno@clisp.org>
14055
14056         * modules/strnlen1: New file.
14057         * MODULES.html.sh (String handling): Add strnlen1.
14058
14059 2005-08-16  Bruno Haible  <bruno@clisp.org>
14060
14061         * modules/strcase (Files): Add m4/mbrtowc.m4.
14062         (Depends-on): Add strnlen1, mbchar.
14063
14064 2005-08-16  Bruno Haible  <bruno@clisp.org>
14065
14066         * modules/mbiter: New file.
14067         * MODULES.html.sh (Extended multibyte and wide character utilities):
14068         Add mbiter.
14069
14070 2005-08-16  Bruno Haible  <bruno@clisp.org>
14071
14072         * modules/mbfile: New file.
14073         * MODULES.html.sh (Extended multibyte and wide character utilities):
14074         Add mbfile.
14075
14076 2005-08-16  Bruno Haible  <bruno@clisp.org>
14077
14078         * modules/mbchar: New file.
14079         * MODULES.html.sh (Extended multibyte and wide character utilities):
14080         New section.
14081
14082 2005-08-16  Bruno Haible  <bruno@clisp.org>
14083
14084         * m4/tls.m4: New file, from GNU gettext.
14085
14086 2005-08-16  Bruno Haible  <bruno@clisp.org>
14087
14088         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
14089         always.
14090         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
14091
14092 2005-08-16  Bruno Haible  <bruno@clisp.org>
14093
14094         * m4/mbiter.m4: New file.
14095
14096 2005-08-16  Bruno Haible  <bruno@clisp.org>
14097
14098         * m4/mbfile.m4: New file.
14099
14100 2005-08-16  Bruno Haible  <bruno@clisp.org>
14101
14102         * m4/mbchar.m4: New file.
14103
14104 2005-08-16  Bruno Haible  <bruno@clisp.org>
14105
14106         * lib/tls.h: New file, from GNU gettext.
14107         * lib/tls.c: New file, from GNU gettext.
14108
14109 2005-08-16  Bruno Haible  <bruno@clisp.org>
14110
14111         * lib/strnlen1.h: New file.
14112         * lib/strnlen1.c: New file.
14113
14114 2005-08-16  Bruno Haible  <bruno@clisp.org>
14115
14116         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
14117         (mbi_init): Update.
14118         (mbi_avail, mbi_advance): Let the iteration end before the terminating
14119         NUL byte, not after it.
14120
14121 2005-08-16  Bruno Haible  <bruno@clisp.org>
14122
14123         * lib/strcase.h (strcasecmp): Add note in comments.
14124         * lib/strncasecmp.c: Use code from strcasecmp.c.
14125         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
14126         (strcasecmp): Work correctly in multibyte locales.
14127
14128 2005-08-16  Bruno Haible  <bruno@clisp.org>
14129
14130         * lib/mbiter.h: New file.
14131
14132 2005-08-16  Bruno Haible  <bruno@clisp.org>
14133
14134         * lib/mbfile.h: New file.
14135
14136 2005-08-16  Bruno Haible  <bruno@clisp.org>
14137
14138         * lib/mbchar.h: New file.
14139         * lib/mbchar.c: New file.
14140
14141 2005-08-16  Bruno Haible  <bruno@clisp.org>
14142
14143         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
14144         the valid ones. Makes the comparison operations transitive:
14145         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
14146         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
14147
14148 2005-08-15  Simon Josefsson  <jas@extundo.com>
14149
14150         * modules/ssize_t (License): Change to 'unlimited'.
14151
14152         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
14153
14154 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
14155
14156         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
14157         Add comments for each pending glibc patch.
14158
14159 2005-08-15  Bruno Haible  <bruno@clisp.org>
14160
14161         * lib/regex.h (__restrict_arr): Don't define to __restrict if
14162         __cplusplus is defined.
14163
14164 2005-08-14  Jim Meyering  <jim@meyering.net>
14165
14166         Sync from coreutils.
14167
14168         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
14169         Use the hash-table-based cycle-detection code not just when
14170         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
14171         Reported by James Youngman in
14172         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
14173         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
14174         FTS_TIGHT_CYCLE_CHECK.
14175         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
14176         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
14177         once again.
14178         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
14179         * lib/fts.c (fd_safer): Remove decl.
14180         Include fcntl--.h rather than unistd-safer.h
14181         (fts_safe_changedir): Don't call fd_safer; no longer needed
14182         now that we include fcntl--.h.
14183
14184 2005-08-12  Simon Josefsson  <jas@extundo.com>
14185
14186         * modules/getndelim2: Use ssize_t module.
14187         * modules/getnline: Likewise.
14188         * modules/safe-read: Likewise.
14189         * modules/xreadlink: Likewise.
14190
14191         * modules/ssize_t: New file.
14192
14193 2005-08-12  Simon Josefsson  <jas@extundo.com>
14194
14195         * m4/readline.m4: Look for termcap, curses or ncurses if required.
14196
14197 2005-08-12  Simon Josefsson  <jas@extundo.com>
14198
14199         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
14200         ssize_t.
14201
14202 2005-08-12  Simon Josefsson  <jas@extundo.com>
14203
14204         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
14205         readline, getdelim and check_version.
14206         (Support for systems lacking ISO C 99: Sizes of integer types):
14207         Add size_max.
14208
14209 2005-08-12  Bruno Haible  <bruno@clisp.org>
14210
14211         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
14212
14213 2005-08-11  Simon Josefsson  <jas@extundo.com>
14214
14215         * modules/readline: New file.
14216
14217         * modules/strnlen (Files): Add strnlen.h.
14218
14219 2005-08-11  Simon Josefsson  <jas@extundo.com>
14220
14221         * m4/readline.m4: New file.
14222
14223 2005-08-11  Simon Josefsson  <jas@extundo.com>
14224
14225         * lib/readline.h, readline.c: New file.
14226
14227 2005-08-11  Simon Josefsson  <jas@extundo.com>
14228
14229         * doc/gnulib.texi (Initial import, Finishing touches): Mention
14230         gl_AVOID.
14231
14232 2005-08-11  Bruno Haible  <bruno@clisp.org>
14233
14234         * lib/strnlen.h (strnlen): Change parameter name to match comment.
14235
14236 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
14237
14238         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
14239
14240 2005-08-10  Simon Josefsson  <jas@extundo.com>
14241
14242         * tests/test-iconvme.c: New file.
14243
14244 2005-08-10  Simon Josefsson  <jas@extundo.com>
14245
14246         * m4/strnlen.m4: New file.
14247
14248         * m4/strndup.m4: Don't check for strnlen declaration, done in
14249         strnlen.m4.
14250
14251 2005-08-10  Simon Josefsson  <jas@extundo.com>
14252
14253         * lib/strndup.c: Use strnlen.h.
14254
14255         * lib/strnlen.h: New file.
14256
14257 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
14258
14259         * README: Typos.
14260
14261 2005-08-02  Simon Josefsson  <jas@extundo.com>
14262
14263         * modules/readline: New file.
14264
14265 2005-08-02  Simon Josefsson  <jas@extundo.com>
14266
14267         * modules/getdelim: New file.
14268
14269         * modules/getline: Rewrite, don't use getndelim2.
14270
14271 2005-08-02  Simon Josefsson  <jas@extundo.com>
14272
14273         * m4/getline.m4: Separate out getdelim stuff into separate module.
14274
14275         * m4/getdelim.m4: New file.
14276
14277 2005-08-02  Simon Josefsson  <jas@extundo.com>
14278
14279         * lib/getline.h, getline.c: Rewrite.
14280
14281         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
14282
14283 2005-07-31  Bruno Haible  <bruno@clisp.org>
14284
14285         * lib/lock.h (gl_lock_initializer): New macro.
14286         (gl_lock_define_initialized): Use it.
14287         (gl_rwlock_initializer): New macro.
14288         (gl_rwlock_define_initialized): Use it.
14289         (gl_recursive_lock_initializer): New macro.
14290         (gl_recursive_lock_define_initialized): Use it.
14291
14292 2005-07-30  Karl Berry  <karl@gnu.org>
14293
14294         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
14295         Report from Ben Pfaff, regarding getopt.
14296
14297 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
14298
14299         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
14300         normal way.
14301         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
14302         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
14303         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
14304         (gl_GETOPT): Use the new macros.  Most of the implementation
14305         is moved to the new macros.  This is for programs like Emacs
14306         that don't want all the functionality of gl_GETOPT.
14307
14308 2005-07-26  Bruno Haible  <bruno@clisp.org>
14309
14310         * m4/lock.m4: Update from GNU gettext.
14311
14312 2005-07-26  Bruno Haible  <bruno@clisp.org>
14313
14314         * lib/lock.h: Update from GNU gettext.
14315         * lib/lock.c: Update from GNU gettext.
14316
14317 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
14318
14319         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
14320         obsolescent AC_TRY_RUN.  Include the default includes files, for
14321         'exit'.
14322
14323 2005-07-24  Bruno Haible  <bruno@clisp.org>
14324
14325         * modules/visibility: New file.
14326         * MODULES.html.sh (Misc): Add visibility.
14327
14328 2005-07-24  Bruno Haible  <bruno@clisp.org>
14329
14330         * m4/visibility.m4: New file.
14331
14332 2005-07-24  Bruno Haible  <bruno@clisp.org>
14333
14334         * doc/visibility.texi: New file.
14335
14336 2005-07-22  Bruno Haible  <bruno@clisp.org>
14337
14338         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
14339         $(ALLOCA_H), redundant through BUILT_SOURCES.
14340         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
14341         redundant through BUILT_SOURCES.
14342         * modules/byteswap (Makefile.am): Remove explicit dependency on
14343         $(BYTESWAP_H), redundant through BUILT_SOURCES.
14344         * modules/fnmatch (Makefile.am): Remove explicit dependency on
14345         $(FNMATCH_H), redundant through BUILT_SOURCES.
14346         * modules/getopt (Makefile.am): Remove explicit dependency on
14347         $(GETOPT_H), redundant through BUILT_SOURCES.
14348         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
14349         redundant through BUILT_SOURCES.
14350         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
14351         redundant through BUILT_SOURCES.
14352         * modules/stdbool (Makefile.am): Remove explicit dependency on
14353         $(STDBOOL_H), redundant through BUILT_SOURCES.
14354         * modules/stdint (Makefile.am): Remove explicit dependency on
14355         $(STDINT_H), redundant through BUILT_SOURCES.
14356         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
14357         Remove explicit dependency on $(SYSEXITS_H).
14358         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
14359
14360 2005-07-18  Simon Josefsson  <jas@extundo.com>
14361
14362         * lib/check-version.c (check_version): Accept identical versions too.
14363
14364 2005-07-18  Bruno Haible  <bruno@clisp.org>
14365
14366         * modules/lock: New file.
14367         * MODULES.html.sh (Multithreading): New section.
14368
14369 2005-07-18  Bruno Haible  <bruno@clisp.org>
14370
14371         * m4/lock.m4: New file, from GNU gettext.
14372
14373 2005-07-18  Bruno Haible  <bruno@clisp.org>
14374
14375         * lib/lock.h: New file, from GNU gettext.
14376         * lib/lock.c: New file, from GNU gettext.
14377
14378 2005-07-18  Bruno Haible  <bruno@clisp.org>
14379
14380         * lib/lock.h (gl_once_t): New type.
14381         (gl_once_define, gl_once): New macros.
14382         * lib/lock.c (fresh_once): New variable.
14383         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
14384         functions.
14385
14386 2005-07-16  Simon Josefsson  <jas@extundo.com>
14387
14388         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
14389         workaround, suggested by Bruno.
14390
14391 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
14392
14393         * modules/xalloc (Depends-on): Add xalloc-die.
14394         * modules/xvasprintf (Depends-on): Add xalloc-die.
14395
14396 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
14397
14398         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
14399         with a minor change.
14400
14401 2005-07-15  Bruno Haible  <bruno@clisp.org>
14402
14403         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
14404         When using lib/poll.c, define poll as rpl_poll.
14405
14406 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
14407
14408         * modules/argp (Depends-on): Remove unlocked-io.
14409
14410 2005-07-14  Derek Price  <derek@ximbiot.com>
14411
14412         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
14413         for glob symlink bug.
14414
14415 2005-07-14  Bruno Haible  <bruno@clisp.org>
14416
14417         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
14418         Instead, test for *_unlocked function declarations directly.
14419
14420 2005-07-11  Simon Josefsson  <jas@extundo.com>
14421
14422         * modules/size_max: New file.
14423
14424         * modules/xsize: Depend on size_max module for size_max.m4.
14425
14426 2005-07-11  Simon Josefsson  <jas@extundo.com>
14427
14428         * lib/size_max.h: New file.
14429
14430 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
14431
14432         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
14433         copyright symbol and the year.
14434         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
14435         (version_etc_va): Use parameterized copyright notice.
14436         Reword to conform to the current GNU coding standards.
14437
14438 2005-07-11  Karl Berry  <karl@gnu.org>
14439
14440         * doc/gnulib.texi (Quoting): new node.
14441         (Initial import): more info, from Patrice.
14442
14443 2005-07-11  Bruno Haible  <bruno@clisp.org>
14444
14445         * gnulib-tool (func_usage): Document option --avoid.
14446         (Command line options): Handle --avoid.
14447         (func_acceptable): New function.
14448         (func_modules_transitive_closure): Use it.
14449
14450 2005-07-11  Bruno Haible  <bruno@clisp.org>
14451
14452         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
14453         Reported by Jim Meyering.
14454
14455 2005-07-10  Bruno Haible  <bruno@clisp.org>
14456
14457         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
14458         Needed when size_t is smaller than 'unsigned int'.
14459         Reported by Paul Eggert.
14460
14461 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
14462
14463         * modules/argp (Depends-on): Add unlocked-io
14464
14465 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
14466
14467         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
14468         block of defines.
14469
14470 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
14471
14472         * config/srclist.txt: Comment out regcomp.c, since we have a porting
14473         fix now.
14474
14475 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
14476         and Paul Eggert  <eggert@cs.ucla.edu>
14477
14478         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
14479         in wint_t, not wchar_t.  Remove now-unnecessary cast.
14480
14481 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
14482
14483         * modules/regex (Files): Add lib/regex_internal.c,
14484         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
14485         (Depends-on): Add extensions.
14486         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
14487
14488 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
14489
14490         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
14491         pathconf.
14492         * m4/same.m4 (gl_SAME): Likewise.
14493         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
14494
14495         * m4/regex.m4: Adjust to new libc regex implementation.
14496         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
14497         all the .c and .h parts of (the new) regex.
14498         Quote the m4 stuff better.
14499         Check for RE_ICASE bug of old gnulib.
14500         Check for REG_STARTEND of recent libc.
14501         Rename local variables from jm_* to gl_*.
14502         Quote operand of "test -f".
14503         Say "recent enough" version of libc, not "version 2".
14504         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
14505         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
14506         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
14507         Remove check for btowc, isascii.
14508         Require AM_LANGINFO_CODESET.
14509
14510 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
14511
14512         * lib/regex.c, regex.h: Sync from libc.
14513         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
14514         * lib/regexec.c:
14515         New files, synced from libc, except that regex_internal.h
14516         currently has a small porting fix.
14517
14518 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
14519
14520         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
14521         regex_internal.c, regexec.c.
14522         Add regex_internal.h too, but as a comment, since the libc version
14523         is currently broken in gnulib mode.
14524
14525 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
14526
14527         Support programs like Emacs that use gnulib but not gettext.
14528         * MODULES.html.sh (Internationalization functions): Add gettext-h.
14529         * modules/gettext-h: New file.
14530         * modules/gettext (Files): Remove lib/gettext.h.
14531         (Depends-on): Add gettext-h.
14532         (Makefile.am): Remove lib_SOURCES.
14533         * modules/argmatch, modules/c-stack, modules/closeout:
14534         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
14535         * modules/execute, modules/file-type, modules/getaddrinfo:
14536         * modules/getopt, modules/human, modules/javacomp:
14537         * modules/javaexec, modules/mkdir-p, modules/obstack:
14538         * modules/openat, modules/pagealign_alloc, modules/pipe:
14539         * modules/quotearg, modules/regex, modules/rpmatch:
14540         * modules/unicodeio, modules/userspec, modules/version-etc:
14541         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
14542         * modules/xsetenv:
14543         Depend on gettext-h, not gettext.
14544
14545 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
14546
14547         * gnulib-tool (func_import): Add support for 'public domain' license.
14548         * modules/alloca, modules/atexit, modules/memmove:
14549         Now public domain, not GPL.
14550         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
14551         * modules/realloc, modules/strerror, modules/strtod:
14552         Now LGPL, not GPL.
14553
14554 2005-07-05  Bruno Haible  <bruno@clisp.org>
14555
14556         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
14557         autoconf CVS. Needed for mingw.
14558
14559 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
14560
14561         Remove the dependency of the strftime module on the tzset module.
14562         * modules/strftime (Depends-on): Remove dependency on tzset.
14563
14564 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
14565
14566         Remove the dependency of the strftime module on the tzset module.
14567         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
14568         gl_FUNC_TZSET_CLOBBER.
14569
14570 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
14571
14572         Remove the dependency of the strftime module on the tzset module.
14573         * lib/strftime.c (my_strftime)
14574         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
14575         Copy the input structure, to work around some of the bug with
14576         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
14577         Solaris releases, you should also use the tzset module, but we won't
14578         require it as a dependency any more since we don't want LGPLed code
14579         to depend on GPLed code.
14580
14581 2005-07-02  Jim Meyering  <jim@meyering.net>
14582
14583         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
14584         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
14585         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
14586         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
14587
14588 2005-07-02  Jim Meyering  <jim@meyering.net>
14589
14590         * lib/backupfile.c (backup_args): Change a `0' to NULL.
14591
14592 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
14593
14594         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
14595         declares only 'struct timespec;' (!).
14596
14597 2005-07-01  Jim Meyering  <jim@meyering.net>
14598
14599         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
14600         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
14601         * lib/save-cwd.c, tempname.c:
14602         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
14603         and don't include <sys/file.h>).
14604
14605 2005-06-29  Jim Meyering  <jim@meyering.net>
14606
14607         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
14608         type name.  Use the variable name instead.
14609         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
14610         Likewise.
14611
14612 2005-06-28  Simon Josefsson  <jas@extundo.com>
14613
14614         * modules/check-version (Files): Add check-version.m4.
14615
14616 2005-06-28  Simon Josefsson  <jas@extundo.com>
14617
14618         * m4/check-version.m4: New file, suggested by Jim Meyering
14619         <jim@meyering.net>.
14620
14621 2005-06-28  Simon Josefsson  <jas@extundo.com>
14622
14623         * lib/check-version.h, lib/check-version.c: New files.
14624
14625 2005-06-28  Simon Josefsson  <jas@extundo.com>
14626
14627         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
14628         collision with global variable.  Better indentation.  Don't
14629         increment buffer pointer beyond buffer end.  Based on comments
14630         from Paul Eggert <eggert@cs.ucla.edu>.
14631
14632         * lib/base64.h: Indent.
14633
14634 2005-06-28  Simon Josefsson  <jas@extundo.com>
14635
14636         * doc/gnulib.texi (Library version handling): New section.
14637
14638 2005-06-28  Jim Meyering  <jim@meyering.net>
14639
14640         * check-module (find_included_lib_files): Hard-code another
14641         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
14642         but modules/fts-lgpl (correctly) does not list those files.
14643
14644         * modules/canonicalize (Files): Add lib/pathmax.h.
14645
14646 2005-06-25  Simon Josefsson  <jas@extundo.com>
14647
14648         * modules/check-version: New file.
14649
14650 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
14651
14652         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
14653         initializer of struct addrinfo, as an indication that we don't
14654         care how many members the structure has.
14655
14656 2005-06-24  Derek Price  <derek@ximbiot.com>
14657         and Bruno Haible  <bruno@clisp.org>
14658
14659         Remove stat module & update lstat.
14660         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
14661         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
14662         * m4/stat.m4: Remove this file.
14663
14664 2005-06-24  Derek Price  <derek@ximbiot.com>
14665         and Bruno Haible  <bruno@clisp.org>
14666
14667         Remove stat module & update lstat.
14668         * lib/stat.c: Remove this file...
14669         (slash_aware_lstat): ...moving this content and its support...
14670         * lib/lstat.c (rpl_lstat): ...into here.
14671         * lib/lstat.h: New file.
14672
14673 2005-06-24  Derek Price  <derek@ximbiot.com>
14674         and Bruno Haible  <bruno@clisp.org>
14675
14676         Remove stat module & update lstat.
14677         * config/srclist.txt (libc sources): Remove stat.
14678
14679 2005-06-24  Derek Price  <derek@ximbiot.com>
14680         and Bruno Haible  <bruno@clisp.org>
14681
14682         Remove stat module & update lstat.
14683         * MODULES.html.sh (stat): Remove.
14684         * MODULES.html: Regenerated.
14685         * modules/lstat (Description): Correct function name.
14686         (Files): Add "lstat.h".
14687         (Depends-on): Remove stat, add xalloc, stat-macros.
14688         * modules/stat: Remove this file.
14689         (Include): Add "lstat.h", remove <sys/stat.h>.
14690
14691 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
14692
14693         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
14694         (ranged_convert): Don't save conversion in a temporary struct.
14695         This causes a warning with GCC 4.0.0, and anyway in the typical
14696         case it's not worth the extra 100 bytes or so of code.
14697         (ranged_convert, __mktime_internal): When calling a function via a
14698         pointer P, use P () rather than (*P) (), as we now assume C89 or
14699         better.
14700
14701 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
14702
14703         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
14704         "who -r" failed to give output.  Problem reported by Tim Waugh.
14705
14706         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
14707         (xcalloc): Use it to avoid needless tests.
14708         Problem reported by Jim Meyering.
14709
14710 2005-06-20  Derek Price  <derek@ximbiot.com>
14711
14712         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
14713         unnecessary for Autoconfs > 2.59c.
14714
14715 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14716
14717         * lib/argp.h (__option_is_short): Check upper limit of
14718         __key. Isprint() requires its argument to have the value
14719         of an unsigned char or EOF.
14720
14721 2005-06-16  Jim Meyering  <jim@meyering.net>
14722
14723         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
14724         when either N or S is zero.
14725
14726 2005-06-16  Derek Price  <derek@ximbiot.com>
14727
14728         * m4/bison.m4: Declare YACC & YFLAGS precious.
14729
14730 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
14731
14732         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
14733         multibyte string or pattern, fall back on unibyte matching.
14734         Problem reported by James Youngman.
14735
14736 2005-06-08  Bruno Haible  <bruno@clisp.org>
14737
14738         * modules/csharpcomp: New file.
14739         * MODULES.html.sh (C#): Add csharpcomp.
14740
14741 2005-06-08  Bruno Haible  <bruno@clisp.org>
14742
14743         * m4/csharpcomp.m4: New file, from GNU gettext.
14744
14745 2005-06-08  Bruno Haible  <bruno@clisp.org>
14746
14747         * lib/csharpcomp.h: New file, from GNU gettext.
14748         * lib/csharpcomp.c: New file, from GNU gettext.
14749         * lib/csharpcomp.sh.in: New file, from GNU gettext.
14750
14751 2005-06-08  Bruno Haible  <bruno@clisp.org>
14752
14753         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
14754         warning on mingw.
14755
14756 2005-06-07  Derek Price  <derek@ximbiot.com>
14757
14758         Sync from CVS.
14759         * lib/glob_.h: Indent nested #ifdef.
14760
14761 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
14762
14763         Sync from coreutils.
14764         Use "file name" when talking about file names, instead of "filename"
14765         or "path", as per the GNU coding standards.
14766         * lib/mkdir-p.c: Renamed from makepath.c.
14767         (make_dir_parents): Renamed from make_path.  All callers changed.
14768         * lib/mkdir-p.h: Likewise.  All includers changed.
14769         * lib/filenamecat.c: Renamed from path-concat.c.
14770         (file_name_concat): Renamed from path_concat.  All callers changed.
14771         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
14772         * lib/filenamecat.h: Likewise.  All includers changed.
14773         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
14774         in comments or local variable names.
14775         * lib/basename.c: Likewise.
14776         * lib/canonicalize.c, canonicalize.h: Likewise.
14777         * lib/dirname.c, dirname.h: Likewise.
14778         * lib/euidaccess.c: Likewise.
14779         * lib/exclude.c: Likewise
14780         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
14781         * lib/fsusage.c, fsuage.h: Likewise.
14782         * lib/fts.c, fts_.h: Likewise.
14783         * lib/getcwd.c: Likewise.
14784         * lib/getloadavg.c: Likewise.
14785         * lib/mkstemp.c: Likewise.
14786         * lib/mountlist.c, mountlist.h: Likewise.
14787         * lib/openat.c, openat.h: Likewise.
14788         * lib/readlink-stub.c: Likewise.
14789         * lib/readutmp.c, readutmp.h: Likewise.
14790         * lib/rename.c: Likewise.
14791         * lib/rmdir.c: Likewise.
14792         * lib/same.c: Likewise.
14793         * lib/savedir.c: Likewise.
14794         * lib/stripslash.c: Likewise.
14795         * lib/tempname.c: Likewise.
14796         * lib/xreadlink.c: Likewise.
14797         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
14798         All uses changed.
14799         * lib/exclude.h: Likewise.
14800
14801         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
14802         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
14803         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
14804         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
14805         * lib/pathmax.h: Include <limits.h> unconditionally, since other
14806         files have been getting away with it for years (MORE/BSD 4.3
14807         is extinct now).
14808         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
14809         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
14810
14811         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
14812         Define to 256, not 255, as per modern POSIX.
14813
14814 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
14815
14816         Sync from coreutils.
14817         Use "file name" when talking about file names, instead of "filename"
14818         or "path", as per the GNU coding standards.
14819         * MODULES.html.sh: mkdir-p renamed from makepath.
14820         filenamecat renamed from path-concat.
14821         * modules/filenamecat: Renamed from modules/path-concat.
14822         (Files): filenamecat.h and filenamecat.c renamed from
14823         path-concat.h and path-concat.c.
14824         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
14825         (Include): filenamecat.h, not path-concat.h.
14826         * modules/mkdir-p: Renamed from modules/makepath.
14827         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
14828         makepath.c.
14829         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
14830         (Include): mkdir-p.h, not makepath.h.
14831
14832 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
14833
14834         Sync from coreutils.
14835         * m4/mkdir-p.m4: Renamed from makepath.m4.
14836         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
14837         Rename files from makepath.c to mkdir-p.c, and from
14838         makepath.h to mkdir-p.h.
14839         * m4/filenamecat.m4: Renamed from path-concat.m4.
14840         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
14841         Rename files from path-concat.c to filenamecat.c,
14842         and from path-concat.h to filenamecat.h.
14843         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
14844         "file name" in local variables or comments.
14845         * m4/rename.m4: Likewise.
14846
14847 2005-06-01  Bruno Haible  <bruno@clisp.org>
14848
14849         * modules/csharpexec: New file.
14850         * MODULES.html.sh (C#): New section.
14851
14852 2005-06-01  Bruno Haible  <bruno@clisp.org>
14853
14854         * m4/csharp.m4: New file, from GNU gettext.
14855         * m4/csharpexec.m4: New file, from GNU gettext.
14856
14857 2005-06-01  Bruno Haible  <bruno@clisp.org>
14858
14859         * lib/csharpexec.h: New file, from GNU gettext.
14860         * lib/csharpexec.c: New file, from GNU gettext.
14861         * lib/csharpexec.sh.in: New file, from GNU gettext.
14862
14863 2005-05-31  Derek Price  <derek@ximbiot.com>
14864             Paul Eggert  <eggert@cs.ucla.edu>
14865
14866         Sync from cvs.
14867         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
14868
14869 2005-05-31  Derek Price  <derek@ximbiot.com>
14870             Paul Eggert  <eggert@cs.ucla.edu>
14871
14872         Sync from cvs.
14873         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
14874
14875 2005-05-29  Derek Price  <derek@ximbiot.com>
14876
14877         * config/srclist.txt (glob_.h, glob.c): Add these files.
14878
14879 2005-05-29  Derek Price  <derek@ximbiot.com>
14880
14881         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
14882         * modules/glob: New file.
14883         * modules/getlogin_r: Add link to POSIX spec in description.
14884
14885 2005-05-29  Derek Price  <derek@ximbiot.com>
14886             Paul Eggert  <eggert@cs.ucla.edu>
14887
14888         * m4/glob.m4: New file.
14889
14890 2005-05-29  Derek Price  <derek@ximbiot.com>
14891             Paul Eggert  <eggert@cs.ucla.edu>
14892
14893         * lib/glob_.h, lib/glob.c: New files.
14894
14895 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
14896
14897         * modules/fts (Files): Remove m4/inttypes-pri.m4.
14898         * modules/fts-lgpl (Depends-on): Remove gettext.
14899
14900 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
14901
14902         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
14903         and don't require gt_INTTYPES_PRI.
14904
14905 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
14906
14907         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
14908
14909         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
14910         the configuration hassle isn't worth it.
14911         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
14912         (LONGEST_MODIFIER, PRIuMAX): Remove.
14913
14914 2005-05-27  Bruno Haible  <bruno@clisp.org>
14915
14916         * lib/getlogin_r.h: Remove second include of <stddef.h>.
14917
14918 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
14919
14920         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
14921         _POSIX_PTHREAD_SEMANTICS for Solaris.
14922
14923 2005-05-25  Derek Price  <derek@ximbiot.com>
14924
14925         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
14926
14927 2005-05-25  Derek Price  <derek@ximbiot.com>
14928             Paul Eggert  <eggert@cs.ucla.edu>
14929
14930         * modules/getlogin_r, m4/getlogin_r.m4: New files.
14931         * lib/getlogin_r.c, getlogin_r.h: New files.
14932
14933 2005-05-25  Bruno Haible  <bruno@clisp.org>
14934             Derek Price  <derek@ximbiot.com>
14935
14936         * lib/getlogin_r.h: Simplify API documentation.
14937
14938 2005-05-23  Derek Price  <derek@ximbiot.com>
14939
14940         * modules/minmax (Files): Add m4/minmax.m4.
14941         (configure.ac): Add gl_MINMAX.
14942
14943 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
14944
14945         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
14946         so that unistd-safer.h (GPL'ed code) need not be included.
14947
14948 2005-05-22  Bruno Haible  <bruno@clisp.org>
14949
14950         * m4/minmax.m4: New file.
14951         Based on a patch by Derek Price <derek@ximbiot.com>.
14952
14953 2005-05-22  Bruno Haible  <bruno@clisp.org>
14954
14955         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
14956         (INT64_MIN): Fix definition.
14957         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
14958
14959         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
14960         NEED_SIGNED_INT_TYPES.
14961
14962         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
14963         HAVE_SYSTEM_INTTYPES.
14964
14965 2005-05-22  Bruno Haible  <bruno@clisp.org>
14966
14967         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
14968         Also include <sys/param.h> if it defines MIN, MAX.
14969         Based on a patch by Derek Price <derek@ximbiot.com>.
14970
14971 2005-05-21  Jim Meyering  <jim@meyering.net>
14972
14973         * modules/fts (Files): Add m4/inttypes-pri.m4.
14974         (Depends-on): Add lstat and remove gettext.  Alphabetize.
14975
14976 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
14977
14978         New fts module.
14979         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
14980         (setup_dir, free_dir): New functions.
14981         (enter_dir, leave_dir): Define trivial
14982         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
14983         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
14984         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
14985         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
14986         Move to fts-cycle.c.
14987         (fts_open): Use setup_dir.
14988         (fts_close): Use free_dir.
14989         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
14990         This adds a label and some gotos, but the alternatives were messier.
14991         Check for memory allocation failure when entering a dir.
14992         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
14993         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
14994         (FTS): New member fts_cycle, that is a union that contains the
14995         old active_dir_ht and cycle_state.  All uses changed to mention
14996         fts_cycle.ht and fts_cycle.state.
14997         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
14998         fts.c, with the following changes:
14999         (setup_dir, free_dir): New functions.
15000         (enter_dir): Now returns bool.  Return true if successful, false
15001         if memory exhausted.  All callers changed.
15002         Do not bother partly cleaning up on
15003         memory allocation failure; that is free_dir's job.
15004         However, free ad if hash_insert fails, to avoid memory leak.
15005         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
15006         fts->fts_options to see which union member to use.
15007
15008 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
15009
15010         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
15011         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
15012
15013 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
15014
15015         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
15016
15017 2005-05-20  Jim Meyering  <jim@meyering.net>
15018
15019         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
15020         Now a macro, to pacify GCC.
15021
15022 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
15023
15024         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
15025         of -1.
15026
15027 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
15028
15029         * lib/chown.c (rpl_chown): Return -1 on failure.
15030
15031 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
15032
15033         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
15034         Don't check for stddef.h.
15035         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
15036         don't use its results.
15037         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
15038         since we include them unconditionally.  Don't require
15039         AM_STDBOOL_H, since stdbool is a prerequisite.
15040         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
15041         since we assume C89 or better.
15042         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
15043         as we don't use their results.
15044         Don't check for fchdir, memmove, memset, strrchr, as we use
15045         them unconditionally.
15046         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
15047         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
15048
15049 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
15050
15051         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
15052         Include <stddef.h> unconditionally, since we assume C89 now.
15053         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
15054         * lib/fts.c: Include fts_.h first, to check interface.
15055         Do not include intprops.h; no longer needed.
15056         Include cycle-check.h and hash.h, since fts_.h no longer does.
15057         Remove unnecessary casts of closedir to void.
15058         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
15059         decide whether to decrement nlinks.
15060         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
15061         (FTS): Use struct hash_table * instead of Hash_table, so that
15062         we no longer need to include hash.h here.
15063
15064 2005-05-18  Jim Meyering  <jim@meyering.net>
15065
15066         * modules/dirfd (License): Change to LGPL.  Most of the code
15067         is already in the public domain.
15068
15069 2005-05-18  Jim Meyering  <jim@meyering.net>
15070
15071         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
15072         Reported by Yoann Vandoorselaere.
15073
15074 2005-05-17  Jim Meyering  <jim@meyering.net>
15075
15076         * m4/fts.m4: New file, from coreutils.
15077
15078 2005-05-17  Jim Meyering  <jim@meyering.net>
15079
15080         * lib/fts.c, lib/fts_.h: New files, from coreutils.
15081
15082 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
15083
15084         Sync from coreutils.
15085         * m4/unlinkdir.m4: New file.
15086
15087 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
15088
15089         Sync from coreutils.
15090         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
15091         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
15092         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
15093         White space changes only.
15094         * lib/makepath.c (make_path): Port to hosts where leading "//" is
15095         special.
15096         * lib/yesno.c: Include getline.h, not ctype.h.
15097         (yesno): Don't remove leading white space; POSIX doesn't allow it.
15098         Use getline to remove arbitrary restriction on response length.
15099
15100 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
15101
15102         * config/srclist-update: Spell out "Street" in FSF postal
15103         mail address; this is the style the FSF seems to prefer.
15104
15105         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
15106         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
15107         this updates FSF postal mail address.
15108
15109         Sync from coreutils.
15110         * modules/unlinkdir: New file.
15111         * modules/yesno (Depends-on): Add getline.
15112         * MODULES.html.sh (File system functions): Add unlinkdir.
15113
15114 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
15115
15116         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
15117         lib/strsep.h:
15118         Change the initial comment to refer to GPL, not LGPL.
15119         gnulib-tool will change it to LGPL as needed.
15120
15121         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
15122         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
15123         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
15124         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
15125         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
15126         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
15127         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
15128         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
15129         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
15130         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
15131         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
15132         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
15133         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
15134         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
15135         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
15136         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
15137         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
15138         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
15139         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
15140         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
15141         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
15142         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
15143         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
15144         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
15145         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
15146         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
15147         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
15148         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
15149         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
15150         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
15151         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
15152         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
15153         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
15154         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
15155         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
15156         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
15157         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
15158         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
15159         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
15160         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
15161         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
15162         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
15163         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
15164         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
15165         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
15166         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
15167         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
15168         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
15169         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
15170         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
15171         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
15172         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
15173         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
15174         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
15175         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
15176         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
15177         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
15178         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
15179         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
15180         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
15181         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
15182         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
15183         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
15184         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
15185         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
15186         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
15187         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
15188         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
15189         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
15190         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
15191         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
15192         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
15193         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
15194         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
15195         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
15196         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
15197         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
15198         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
15199         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
15200         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
15201         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
15202         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
15203         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
15204         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
15205         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
15206         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
15207         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
15208         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
15209         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
15210         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
15211         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
15212         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
15213         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
15214         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
15215         lib/yesno.c, lib/yesno.h:
15216         Update FSF postal mail address.
15217
15218 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
15219
15220         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
15221         tests/test-memmem.c, tests/test-stpncpy.c:
15222         Update FSF postal mail address.
15223
15224 2005-05-13  Bruno Haible  <bruno@clisp.org>
15225
15226         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
15227         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
15228         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
15229         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
15230         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
15231         Add support for 64-bit integers in the MSVC compiler.
15232
15233 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15234
15235         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
15236
15237 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
15238
15239         * gnulib-tool (func_import): Sort and uniquify recommended includes.
15240
15241 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
15242
15243         * doc/getdate.texi (General date syntax): Don't say that date
15244         date --iso-8601=ns generates acceptable dates; it doesn't yet.
15245         Problem reported by Nic Ferrier.
15246
15247 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
15248
15249         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
15250         specified in ai_socktype. Fix invalid ai_protocol
15251         check. ai_protocol is usually set to 0 or depending on
15252         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
15253         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
15254         ai_socktype / ai_protocol in the returned addrinfo structure.
15255
15256 2005-05-10  Simon Josefsson  <jas@extundo.com>
15257
15258         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
15259         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
15260
15261 2005-05-10  Karl Berry  <karl@gnu.org>
15262
15263         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
15264         (from http://www.gnu.org/licenses).
15265         * doc/COPYING.LIB: also rename to COPYING.LESSER.
15266         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
15267         fdl.texi suffices.
15268
15269 2005-05-10  Karl Berry  <karl@gnu.org>
15270
15271         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
15272         (COPYING.DOC): remove.
15273
15274         * config/srclist-update: new FSF address.
15275
15276 2005-05-10  Derek Price  <derek@ximbiot.com>
15277
15278         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
15279         possible.
15280
15281 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
15282             Bruno Haible  <bruno@clisp.org>
15283
15284         * modules/inet_ntop: New file.
15285         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
15286         inet_ntop.
15287
15288 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
15289             Bruno Haible  <bruno@clisp.org>
15290
15291         * m4/inet_ntop.m4: New file.
15292
15293 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
15294             Bruno Haible  <bruno@clisp.org>
15295
15296         * lib/inet_ntop.h: New file.
15297         * lib/inet_ntop.c: New file, from glibc with modifications.
15298
15299 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
15300
15301         * modules/time_r (License): Change to LGPL.
15302         * modules/extensions (License): Change to LGPL.  Actually,
15303         the license is more permissive than that, but currently gnulib-tool
15304         doesn't know how to handle more-permissive licenses.
15305
15306         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
15307         Problem reported by Dave Love.
15308
15309 2005-05-08  Jim Meyering  <jim@meyering.net>
15310
15311         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
15312         blank.
15313
15314 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
15315
15316         * modules/argmatch (Depends-on): Add stdbool.
15317         * modules/backupfile (Depends-on): Likewise.
15318         * modules/chdir-long (Depends-on): Likewise.
15319         * modules/closeout (Depends-on): Likewise.
15320         * modules/cycle-check (Depends-on): Likewise.
15321         * modules/dirname (Depends-on): Likewise.
15322         * modules/fnmatch (Depends-on): Likewise.
15323         * modules/fsusage (Depends-on): Likewise.
15324         * modules/fwriteerror (Depends-on): Likewise.
15325         * modules/getcwd (Depends-on): Likewise.
15326         * modules/getloadavg (Depends-on): Likewise.
15327         * modules/hard-locale (Depends-on): Likewise.
15328         * modules/makepath (Depends-on): Likewise.
15329         * modules/mountlist (Depends-on): Likewise.
15330         * modules/nanosleep (Depends-on): Likewise.
15331         * modules/posixtm (Depends-on): Likewise.
15332         * modules/quotearg (Depends-on): Likewise.
15333         * modules/readtokens (Depends-on): Likewise.
15334         * modules/readtokens0 (Depends-on): Likewise.
15335         * modules/readutmp (Depends-on): Likewise.
15336         * modules/save-cwd (Depends-on): Likewise.
15337         * modules/strftime (Depends-on): Likewise.
15338         * modules/userspec (Depends-on): Likewise.
15339         * modules/utimecmp (Depends-on): Likewise.
15340         * modules/xgetcwd (Depends-on): Likewise.
15341         * modules/xnanosleep (Depends-on): Likewise.
15342         * modules/xstrtod (Depends-on): Likewise.
15343         * modules/yesno (Depends-on): Likewise.
15344
15345 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
15346
15347         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
15348         needless checks.
15349
15350 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
15351
15352         Merge from coreutils.  Among other things,
15353         add bulletproofing for cases where stdin, stdout, or stderr are closed.
15354         * lib/fd-safer.c: New file.
15355         * lib/fcntl-safer.h, open-safer.c: Remove.
15356         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
15357         * lib/dup-safer.c: Include unistd-safer.h first.
15358         Don't include errno.h.
15359         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
15360         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
15361         * lib/file-type.c: Rely on file-type.h change.
15362         * lib/getloadavg.c: Include unistd-safer.h.
15363         (getloadavg): Use safer open.
15364         * lib/getusershell.c: Include "stdio-safer.h".
15365         (getusershell): Use safer fopen.
15366         * lib/long-options.c (long_options): Use NULL rather than 0.
15367         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
15368         'free'.
15369         * lib/modechange.c: Likewise.
15370         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
15371         (MODE_DONE): New constant.
15372         (struct mode_change): Remove 'next' member.
15373         (make_node_op_equals): New function; like the old one of the
15374         same name, except it allocates an array.
15375         (mode_compile, mode_create_from_ref): Use it.
15376         (mode_compile): Allocate result as an array, not a linked list.
15377         Parse octal string ourself, so that we catch mistakes like "+0".
15378         (mode_adjust): Arg is an array, not a linked list.
15379         * lib/modechange.c: Include stat-macros.h, xalloc.h.
15380         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
15381         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
15382         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
15383         Remove.  This is now stat-macros.h's job.
15384         (talloc): Remove.  All callers replaced by xalloc, so that
15385         our invokers don't have to worry about reporting memory failures.
15386         (make_node_op_equals): Remove.
15387         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
15388         New constants.
15389         (struct mode_change): Moved here from modechange.h.
15390         (mode_append_entry): Remove.
15391         (mode_compile): Remove MASKED_OPS arg, since it encouraged
15392         apps to have incorrect behavior.  Use simpler algorithm for head
15393         and tail.  Don't futz with umask; that's now the job of mode_adjust.
15394         Detect more invalid usages rather than having somewhat-random behavior.
15395         Don't insert an "a=" action, as that leads to incorrect behavior.
15396         (mode_compile, mode_create_from_ref): Return NULL on error instead
15397         of an enum, since now there's only one way to have an error.  All
15398         callers changed.
15399         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
15400         at the correct time.  Simplify calculation of "+u" and its ilk.
15401         Don't mishandle "+X".
15402         (mode_free): Remove "register" and localize decls.
15403         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
15404         (struct mode_change): Move to modechange.c; callers don't
15405         need to see this stuff.
15406         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
15407         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
15408         (mode_change, mode_adjust): Reflect the new signatures noted above.
15409         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
15410         that might redefine system include files.
15411         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
15412         (my_usleep): Use NULL rather than (void *) 0.
15413         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
15414         Use siginterrupt to specify that system calls should be interrupted.
15415         (rpl_nanosleep): Move initialization of suspended closer to call of
15416         my_usleep.
15417         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
15418         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
15419         (desirable_utmp_entry): New function.
15420         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
15421         using x2nrealloc, to simplify logic.
15422         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
15423         size calculation.  Do not assume utmp file is a regular file.
15424         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
15425         (READ_UTMP_CHECK_PIDS): New constant.
15426         * lib/save-cwd.c: Include unistd-safer.h.
15427         (save_cwd): Use fd_safer.
15428         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
15429         [!_LIBC] Include "stat-macros.h" instead.
15430         * lib/unistd-safer.h (fd_safer): New decl.
15431
15432 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
15433
15434         * modules/getloadavg (Depends-on): Add unistd-safer.
15435         * modules/getusershell (Depends-on): Add stdio-safer.
15436         * modules/lstat (Depends-on): Remove xalloc.
15437         * modules/mkstemp (Depends-on): Add stat-macros.
15438         * modules/modechange (Depends-on): Remove xstrtol.
15439         Add stat-macros, xalloc.
15440         * modules/save-cwd (Depends-on): Add unistd-safer.
15441         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
15442         * modules/unistd-safer (Files): Add lib/fd-safer.c
15443         (Makefile.am): Remove lib_SOURCES.
15444
15445         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
15446         Remove fcntl-safer; unistd-safer supersedes it.
15447
15448 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
15449
15450         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
15451         AC_HEADER_STAT.
15452         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
15453         (gl_PREREQ_CHOWN): Remove.
15454         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
15455         it.  Don't require AC_HEADER_STAT.
15456         (gl_PREREQ_LSTAT): Remove.
15457         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
15458         Don't require AC_HEADER_STAT.
15459         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
15460         (gl_PREREQ_RMDIR): Remove.
15461         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
15462         mention stat-macros.h or AC_HEADER_STAT, since we'll make
15463         the stat-macros module a prerequisite.
15464         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
15465         * m4/filemode.m4 (gl_FILEMODE): Likewise.
15466         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
15467         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
15468         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
15469         variable names.
15470         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
15471         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
15472         variable prefixes.
15473         * m4/fcntl-safer.m4: Remove.
15474         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
15475         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
15476         Invoke gl_PREREQ_FD_SAFER.
15477         (gl_PREREQ_FD_SAFER): New macro.
15478         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
15479         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
15480         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
15481         Remove duplicate call to AC_LIBOBJ(readutmp).
15482         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
15483
15484         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
15485         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
15486
15487 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
15488
15489         * MODULES.html.sh (Misc): Add byteswap.
15490
15491 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
15492
15493         * modules/getcwd (Depends-on): Add extensions.
15494         * modules/openat (Depends-on): Likewise.
15495
15496 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
15497
15498         * modules/byteswap: New file.
15499
15500 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
15501
15502         * m4/byteswap.m4: New file.
15503
15504 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
15505
15506         * lib/byteswap_.h: New file.
15507
15508 2005-04-25  Karl Berry  <karl@gnu.org>
15509
15510         * m4/gettext.m4: Update from GNU gettext 0.14.4.
15511
15512 2005-04-25  Albert Chin  <china@thewrittenword.com>
15513
15514         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
15515         Toolkit C bug.
15516
15517 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
15518
15519         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
15520         (func_ln_if_changed) Remove forcibly for no error message
15521         in case file does not exist.
15522
15523 2005-04-19  Simon Josefsson  <jas@extundo.com>
15524
15525         * gnulib-tool (Options): Make --symlink mean --symbolic.
15526
15527 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
15528
15529         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
15530
15531 2005-04-16  Simon Josefsson  <jas@extundo.com>
15532
15533         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
15534
15535 2005-04-15  Simon Josefsson  <jas@extundo.com>
15536
15537         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
15538
15539 2005-04-15  Simon Josefsson  <jas@extundo.com>
15540
15541         * gnulib-tool: Rename --symlink to --symbolic.
15542
15543 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
15544
15545         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
15546         symbolic links to files instead of copying/moving.  Add --aux-dir,
15547         specifying directory relative --dir where auxiliary build tools
15548         are placed.
15549
15550 2005-04-14  Bruno Haible  <bruno@clisp.org>
15551
15552         * modules/allocsa (License): Change to LGPL.
15553         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
15554
15555 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
15556
15557         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
15558         that "UTC +1 second" continues to work.  Problem reported
15559         by Dmitry V. Levin.
15560         (relunit_snumber): New rule.
15561         (relunit): Use it.
15562
15563 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
15564
15565         * lib/getdate.y (universal_time_zone_table): New constant.
15566         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
15567         universal_time_zone_table.
15568         (lookup_zone): Prefer universal_time_zone_table to
15569         local_time_zone_table, so that "GMT" time stamps are allowed in
15570         London during the summer.  Problem reported by Ian Abbott.
15571
15572 2005-04-12  Jim Meyering  <jim@meyering.net>
15573
15574         * lib/human.c (humblock): Set *options even when returning due to
15575         xstrtoumax conversion failure.  Thanks to a used-uninitialized
15576         warning from gcc-4.
15577
15578 2005-04-09  Jim Meyering  <jim@meyering.net>
15579
15580         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
15581         -Wuninitialized: initialize tm0.tm_year.
15582
15583 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
15584
15585         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
15586         count, since there's no maximum.  All uses changed.
15587         Add member dsts_seen.
15588         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
15589         not being INT_MAX.
15590         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
15591         Use pc_rels_seen to decide whther a date is absolute.
15592
15593         * lib/getdate.y (number): Don't overwrite year.
15594         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
15595         check.
15596
15597 2005-04-02  Simon Josefsson  <jas@extundo.com>
15598
15599         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
15600         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
15601
15602 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
15603
15604         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
15605         where no absolute path name can be longer than PATH_MAX.
15606
15607 2005-03-27  Jim Meyering  <jim@meyering.net>
15608
15609         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
15610
15611 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
15612
15613         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
15614         "one's complement" -> "ones' complement" in comment, as per Knuth.
15615         "value of type" -> "type or expression" in comment.
15616         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
15617
15618 2005-03-26  Jim Meyering  <jim@meyering.net>
15619
15620         Comment nits.
15621         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
15622         Correct typos: s/or/of/.
15623
15624 2005-03-26  Jim Meyering  <jim@meyering.net>
15625
15626         * modules/check-include-files: Move to ../ and rename to...
15627         * check-module: ...this.
15628
15629 2005-03-25  Jim Meyering  <jim@meyering.net>
15630
15631         * modules/xvasprintf (Files): Add xalloc.h.
15632
15633 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
15634
15635         * modules/gettext (Files): config/config.rpath ->
15636         build-aux/config.rpath
15637         * modules/iconv (Files): Likewise.
15638         Problem reported by Oskar Liljeblad.
15639
15640 2005-03-23  Jim Meyering  <jim@meyering.net>
15641
15642         * modules/check-include-files: New script to check for
15643         missing dependencies, multiple includes, etc.
15644
15645         * modules/c-strtold (Depends-on): Add xalloc.
15646         * modules/c-strtod (Depends-on): Add xalloc.
15647         * modules/hash (Depends-on): Add xalloc.
15648         (Files): Remove lib/xalloc.h.
15649
15650         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
15651         * modules/userspec (Files): Add lib/inttostr.h.
15652
15653 2005-03-23  Jim Meyering  <jim@meyering.net>
15654
15655         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
15656
15657 2005-03-22  Jim Meyering  <jim@meyering.net>
15658
15659         * modules/stat-macros: New module.
15660         * modules/canonicalize, modules/euidaccess, modules/file-type,
15661         * modules/filemode, modules/lchown, modules/makepath,
15662         * modules/rmdir, modules/stat: Depend on new stat-macros module
15663         rather than listing lib/stat-macros.h manually.
15664         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
15665
15666 2005-03-22  Jim Meyering  <jim@meyering.net>
15667
15668         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
15669
15670 2005-03-22  Bruno Haible  <bruno@clisp.org>
15671
15672         * config/srclist.txt: Replace target directory 'config' with
15673         'build-aux'.
15674         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
15675         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
15676         ../build-aux/.
15677
15678 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
15679
15680         * modules/chdir-long (Depends-on): Add mempcpy.
15681
15682         * modules/acl, modules/backupfile, modules/c-strtod,
15683         modules/c-strtold, modules/canon-host, modules/canonicalize,
15684         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
15685         modules/exclude, modules/exitfail, modules/file-type,
15686         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
15687         modules/getdate, modules/getline, modules/getpagesize,
15688         modules/getpass, modules/getugroups, modules/group-member,
15689         modules/hard-locale, modules/hash, modules/human, modules/idcache,
15690         modules/inttostr, modules/long-options, modules/makepath,
15691         modules/md5, modules/memcasecmp, modules/memcoll,
15692         modules/modechange, modules/mountlist, modules/path-concat,
15693         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
15694         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
15695         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
15696         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
15697         modules/strftime, modules/strndup, modules/strverscmp,
15698         modules/timespec, modules/unlocked-io, modules/userspec,
15699         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
15700         modules/yesno:
15701         Remove lib_SOURCES line from Makefile.am section, as this is now
15702         done automatically by the corresponding Autoconf macro.
15703
15704 2005-03-21  Jim Meyering  <jim@meyering.net>
15705
15706         Changes imported from coreutils.
15707
15708         * lib/cycle-check.c: Don't include xalloc.h.
15709
15710         * lib/path-concat.c: Don't include assert.h.
15711         (path_concat): Remove assertion that would have triggered
15712         for ABASE starting with more than one slash.
15713         Reported by Andreas Schwab.
15714
15715         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
15716         properly when ABASE is an absolute file name.
15717         Correct the description of this function.
15718         Include <assert.h>.
15719         Add an assertion and a test driver.
15720         This fixes a bug introduced on 2004-07-02.
15721         Andreas Schwab reported the resulting failure of cp --parents:
15722         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
15723
15724 2005-03-21  Jim Meyering  <jim@meyering.net>
15725
15726         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
15727         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
15728
15729 2005-03-21  Jim Meyering  <jim@meyering.net>
15730         and  Paul Eggert  <eggert@cs.ucla.edu>
15731
15732         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
15733         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
15734         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
15735         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
15736         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
15737         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
15738         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
15739         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
15740         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
15741         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
15742         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
15743         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
15744         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
15745         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
15746         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
15747         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
15748         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
15749         for these modules.
15750
15751 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
15752
15753         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
15754         (which shouldn't happen), generate nothing instead of returning 0
15755         immediately, so that nstrftime (NULL, ...) doesn't return 0.
15756
15757 2005-03-16  Bruno Haible  <bruno@clisp.org>
15758
15759         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
15760         HAVE_LONGLONG_64BIT.
15761
15762 2005-03-16  Bruno Haible  <bruno@clisp.org>
15763
15764         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
15765         HAVE_LONGLONG_64BIT.
15766
15767 2005-03-16  Bruno Haible  <bruno@clisp.org>
15768
15769         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
15770         HAVE_LONGLONG_64BIT.
15771
15772 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
15773
15774         * lib/strftime.c (my_strftime): Prepend space to format so that we can
15775         reliably distinguish strftime failure from empty output on POSIX
15776         hosts.
15777
15778 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
15779
15780         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
15781         (iconv_string): Don't guess a size-zero buffer, as that might cause
15782         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
15783         result would be 'too large', where 'too large' is (heuristically)
15784         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
15785         overflow concerns.  This will prevent some unwanted malloc failures
15786         when the inputs are very large.
15787
15788 2005-03-15  Karl Berry  <karl@gnu.org>
15789
15790         * config/srclist.txt (config.rpath): from gettext.
15791         * config/config.rpath: update.
15792
15793 2005-03-15  Bruno Haible  <bruno@clisp.org>
15794
15795         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
15796         to 'negate'.
15797
15798         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
15799         variable.
15800
15801         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
15802         results.
15803
15804 2005-03-14  Simon Josefsson  <jas@extundo.com>
15805
15806         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
15807         <fx@gnu.org>.
15808
15809 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
15810
15811         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
15812         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
15813         intprops.h.
15814         * lib/strtol.c: Likewise.
15815
15816 2005-03-14  Jim Meyering  <jim@meyering.net>
15817
15818         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
15819         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
15820         to be nonzero so that we (and caller) can detect the difference
15821         between a valid zero-length expansion and an error return, even
15822         when the underlying strftime fails before writing anything into
15823         that location.
15824
15825 2005-03-14  Bruno Haible  <bruno@clisp.org>
15826
15827         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
15828         Update from GNU gettext 0.14.3.
15829
15830 2005-03-10  Jim Meyering  <jim@meyering.net>
15831
15832         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
15833
15834 2005-03-10  Jim Meyering  <jim@meyering.net>
15835
15836         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
15837         so that this module works on systems without fchdir.
15838
15839 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
15840
15841         Factor int-properties macros into a single file, except for
15842         glibc-related files.
15843         * lib/intprops.h: New file.
15844         * lib/getloadavg.c: Include it instead of limits.h.
15845         (INT_STRLEN_BOUND): Remove.
15846         * lib/human.c: Include intprops.h.
15847         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
15848         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
15849         302/1000.
15850         * lib/inttostr.h: Include intprops.h instead of limits.h.
15851         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
15852         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
15853         for consistency with intprops.h.
15854         (time_t_is_integer, twos_complement_arithmetic): Use them.
15855         * lib/sig2str.h: Include <signal.h>, intprops.h.
15856         (INT_STRLEN_BOUND): Remove.
15857         * lib/strftime.c (TYPE_SIGNED): Remove.
15858         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
15859         * lib/strtol.c: Adjust comments to match intprops.h.
15860         * lib/userspec.c: Include intprops.h.
15861         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
15862         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
15863         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
15864         instead of rolling our own expressions.
15865         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
15866
15867         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
15868         instead of int.
15869         (my_strftime): Do not mishandle years close to INT_MAX, by doing
15870         the right thing even if adding 1900 would overflow.  Similarly
15871         for tm_mon + 1 and tm_yday + 1.
15872         Make %Y always equivalent to %C%y, and similarly for %G and %g.
15873         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
15874         (DO_SIGNED_NUMBER): New macro.
15875         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
15876
15877 2005-03-07  Bruno Haible  <bruno@clisp.org>
15878
15879         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
15880
15881 2005-03-07  Bruno Haible  <bruno@clisp.org>
15882
15883         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
15884
15885 2005-03-04  Derek R. Price  <derek@ximbiot.com>
15886
15887         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
15888         (func_import): Only replace files via --import when they have actually
15889         changed.
15890
15891 2005-03-03  Derek R. Price  <derek@ximbiot.com>
15892
15893         * m4/mmap-anon.m4: New file.
15894         * m4/pagealign_alloc.m4: New file.
15895
15896 2005-03-03  Derek R. Price  <derek@ximbiot.com>
15897             Bruno Haible  <bruno@clisp.org>
15898
15899         * modules/pagealign_alloc: New file.
15900         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
15901
15902 2005-03-03  Derek R. Price  <derek@ximbiot.com>
15903             Bruno Haible  <bruno@clisp.org>
15904
15905         * lib/pagealign_alloc.h: New file.
15906         * lib/pagealign_alloc.c: New file.
15907
15908 2005-03-03  Bruno Haible  <bruno@clisp.org>
15909
15910         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
15911         Use an all-permissive copyright notice, recommended by RMS.
15912
15913 2005-03-02  Bruno Haible  <bruno@clisp.org>
15914
15915         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
15916         of AIX, the replacement has to be done only after <string.h> is
15917         included, therefore not in config.h. stpncpy.h does the replacement,
15918         and stpncpy.c uses it.
15919
15920 2005-03-02  Bruno Haible  <bruno@clisp.org>
15921
15922         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
15923         stpncpy.c uses it.
15924
15925 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15926
15927         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
15928         The workaround isn't strictly needed for POSIX conformance, and
15929         it's too much of a pain to configure and maintain.  We'll ask
15930         people to fix their kernels instead.
15931         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
15932         (NANOSLEEP_BUG_WORKAROUND): Remove.
15933         (xnanosleep): Remove the workaround.
15934
15935 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15936
15937         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
15938         Reported by Derek Price.
15939         (Include): Add "timespec.h".
15940
15941         * modules/xnanosleep (Depends-on): Remove gethrxtime.
15942
15943 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15944
15945         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
15946         to detect nanosleep bug.
15947
15948 2005-03-01  Bruno Haible  <bruno@clisp.org>
15949
15950         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
15951
15952 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
15953
15954         * modules/gethrxtime: New file.
15955         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
15956         (Depends-on): Add gethrxtime.
15957         (configure.ac): Add gl_XNANOSLEEP.
15958         (Makefile.am): Remove lib_SOURCES line.
15959
15960 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
15961
15962         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
15963         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
15964
15965 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
15966
15967         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
15968         * lib/timespec.h (gettime): Return void, since it always
15969         succeeds now.  All uses changed.
15970         * lib/gettime.c (gettime) Likewise.
15971         [HAVE_NANOTIME]: Prefer nanotime.
15972         Assume gettimeofday succeeds, as POSIX requires.
15973         Assime time () succeeds, since other code already does.
15974         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
15975         (timespec_subtract): Remove.
15976         (NANOSLEEP_BUG_WORKAROUND): New constant.
15977         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
15978         things considerably.  Use it only on GNU/Linux hosts, since the
15979         workaround shouldn't be needed elsewhere.
15980
15981 2005-02-24  Bruno Haible  <bruno@clisp.org>
15982
15983         * modules/gettext (Files): Add m4/glibc2.m4.
15984
15985 2005-02-24  Bruno Haible  <bruno@clisp.org>
15986
15987         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
15988         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
15989         * m4/progtest.m4:
15990         Update from GNU gettext 0.14.2.
15991         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
15992
15993 2005-02-24  Bruno Haible  <bruno@clisp.org>
15994
15995         * lib/localcharset.c: Update from GNU gettext 0.14.2.
15996         * lib/config.charset: Update from GNU gettext 0.14.2.
15997
15998 2005-02-24  Bruno Haible  <bruno@clisp.org>
15999
16000         * lib/gettext.h: Update from GNU gettext 0.14.2.
16001
16002 2005-02-23  Simon Josefsson  <jas@extundo.com>
16003
16004         * m4/iconvme.m4: New file.
16005
16006 2005-02-23  Jim Meyering  <jim@meyering.net>
16007
16008         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
16009         change.
16010         Thanks to Bruno Haible for catching it.
16011
16012 2005-02-22  Simon Josefsson  <jas@extundo.com>
16013
16014         * modules/iconvme: New file.
16015
16016         * MODULES.html.sh: Add iconvme.
16017
16018 2005-02-22  Simon Josefsson  <jas@extundo.com>
16019
16020         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
16021
16022 2005-02-22  Simon Josefsson  <jas@extundo.com>
16023
16024         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
16025
16026 2005-02-22  Jim Meyering  <jim@meyering.net>
16027
16028         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
16029         s/ifndef/ifdef/.
16030
16031 2005-02-20  Neil Conway  <neilc@samurai.com>
16032
16033         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
16034         returned by OSX/Darwin if the specified buffer is not large
16035         enough for the hostname.
16036
16037 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16038
16039         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
16040         pass it to _help, otherwise the latter coredumps trying to
16041         dereference state.root_argp.
16042
16043 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
16044
16045         * modules/chdir-long (Depends-on): Add memrchr.
16046         * modules/memrchr (Files): Add lib/memrchr.h.
16047         (Include): "memrchr.h".
16048
16049 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
16050
16051         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
16052
16053 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
16054
16055         * lib/memrchr.h: New file.
16056         * lib/chdir-long.c: Include it.
16057         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
16058         Don't bother including stddef.h.
16059
16060 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
16061
16062         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
16063         inclusion.
16064         Include <sys/types.h>, for dev_t.
16065         (ME_DUMMY, ME_REMOTE): Move from here....
16066         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
16067         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
16068         Dmitry V. Levin.
16069         Include mountlist.h first, to test the interface.
16070
16071 2005-01-29  Bruno Haible  <bruno@clisp.org>
16072
16073         * lib/progname.c (program_name): Initialize.
16074         Needed when linking statically on MacOS X.
16075
16076 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
16077
16078         Sync from coreutils.
16079         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
16080         (Depends-on): Add c-strtod.
16081         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
16082
16083 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
16084
16085         Sync from coreutils.
16086         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
16087
16088         Remove files that are specific to coreutils.
16089         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
16090
16091 2005-01-28  Bruno Haible  <bruno@clisp.org>
16092
16093         * modules/javacomp: New file.
16094         * MODULES.html.sh (Java): Add javacomp.
16095
16096 2005-01-28  Bruno Haible  <bruno@clisp.org>
16097
16098         * m4/javacomp.m4: New file, from GNU gettext.
16099
16100 2005-01-28  Bruno Haible  <bruno@clisp.org>
16101
16102         * lib/javacomp.sh.in: New file, from GNU gettext.
16103         * lib/javacomp.h: New file, from GNU gettext.
16104         * lib/javacomp.c: New file, from GNU gettext.
16105
16106 2005-01-26  Simon Josefsson  <jas@extundo.com>
16107
16108         * lib/gai_strerror.c: Use GPL in header.
16109
16110 2005-01-26  Bruno Haible  <bruno@clisp.org>
16111
16112         * modules/javaexec: New file.
16113         * MODULES.html.sh (Java): Add javaexec.
16114
16115 2005-01-26  Bruno Haible  <bruno@clisp.org>
16116
16117         * m4/javaexec.m4: New file, from GNU gettext.
16118
16119 2005-01-26  Bruno Haible  <bruno@clisp.org>
16120
16121         * lib/javaexec.sh.in: New file, from GNU gettext.
16122         * lib/javaexec.h: New file, from GNU gettext.
16123         * lib/javaexec.c: New file, from GNU gettext.
16124
16125 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16126
16127         * modules/lchown (Depends-on): Remove lchown.h
16128
16129 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16130
16131         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
16132         must be defined if the header file was not found, in order
16133         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
16134
16135 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16136
16137         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
16138         initializers for struct pentry_state.
16139         (__argp_error): Check return value of __asprintf
16140         (__argp_failure): Translate error message
16141
16142         * lib/argp-parse.c: Removed braces around the expansion of N_()
16143
16144 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
16145
16146         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
16147         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
16148         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
16149         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
16150         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
16151         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
16152         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
16153         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
16154         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
16155         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
16156         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
16157         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
16158         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
16159         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
16160         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
16161         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
16162         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
16163         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
16164         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
16165         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
16166         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
16167         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
16168         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
16169         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
16170         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
16171         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
16172         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
16173         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
16174         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
16175         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
16176         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
16177         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
16178         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
16179         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
16180         xstrtol.m4, xstrtoumax.m4, yesno.m4:
16181         Use an all-permissive copyright notice, recommended by RMS.
16182
16183 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
16184
16185         * modules/chdir-long (Depends-on): Remove mempcpy.
16186
16187 2005-01-21  Jim Meyering  <jim@meyering.net>
16188
16189         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
16190         same value as for Solaris 9.
16191
16192         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
16193         component length.  This included changing the parameter to be
16194         of type `char *' rather than `char const *'.
16195         * lib/chdir-long.h (chdir_long): Update prototype.
16196
16197         * lib/openat.c (fdopendir, fstatat): New functions.
16198         * lib/openat.h: Include headers required for use of DIR and struct
16199         stat.
16200         [AT_SYMLINK_NOFOLLOW]: Define.
16201         (fdopendir, fstatat): Add prototypes.
16202
16203 2005-01-21  Bruno Haible  <bruno@clisp.org>
16204
16205         * modules/classpath: New file.
16206         * MODULES.html.sh (Java): Add classpath.
16207
16208 2005-01-21  Bruno Haible  <bruno@clisp.org>
16209
16210         * lib/classpath.h: New file, from GNU gettext.
16211         * lib/classpath.c: New file, from GNU gettext.
16212
16213 2005-01-20  Simon Josefsson  <jas@extundo.com>
16214
16215         * modules/version-etc-fsf: New file.
16216
16217 2005-01-20  Simon Josefsson  <jas@extundo.com>
16218
16219         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
16220         * lib/version-etc.c: Remove version_etc_copyright.
16221         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
16222         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
16223
16224 2005-01-20  Simon Josefsson  <jas@extundo.com>
16225
16226         * lib/base64.h (isbase64): Add.
16227
16228         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
16229         using a unsigned prototype, don't inline.
16230         (base64_decode): Use it.
16231
16232 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
16233
16234         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
16235         it.
16236
16237 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
16238
16239         * lib/save-cwd.c (save_cwd): Remove code to support the case
16240         where fchdir is missing or flaky.
16241
16242 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
16243
16244         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
16245
16246 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
16247
16248         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
16249         AC_LIBSOURCES now does this.
16250         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
16251         with new ullong_max module.
16252
16253 2005-01-19  Bruno Haible  <bruno@clisp.org>
16254
16255         * modules/sh-quote: New file.
16256         * MODULES.html.sh (Executing programs): Add sh-quote.
16257
16258 2005-01-19  Bruno Haible  <bruno@clisp.org>
16259
16260         * lib/sh-quote.h: New file, from GNU gettext.
16261         * lib/sh-quote.c: New file, from GNU gettext.
16262
16263 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
16264
16265         Merge from coreutils.
16266         * m4/ullong_max.m4: New file.
16267         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
16268         (gl_MACROS): Assume localeconv exists.
16269
16270 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
16271
16272         Merge changes from coreutils, as described below in several
16273         changelogs dated today.
16274
16275         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
16276         (O_DIRECTORY): Remove; not needed here, since "." must be
16277         a directory.  All uses removed.
16278         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
16279         universal on Suns, and we also need to test for IRIX.
16280         Revamp code to use 'if' rather than '#if'.
16281         Avoid unnecessary comparison of cwd->desc to 0.
16282
16283         * lib/utimens.c (futimens): Robustify the previous patch, by checking
16284         for known valid error numbers rather than observed invalid ones.
16285
16286 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
16287
16288         * modules/ullong_max: New file.
16289
16290         * modules/chdir-long, modules/openat: New files.
16291         * modules/save-cwd (Depends-on): Depend on chdir-long.
16292         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
16293
16294 2005-01-18  Jim Meyering  <jim@meyering.net>
16295
16296         Merge from coreutils.
16297         * m4/chdir-long.m4, m4/openat.m4: New files.
16298         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
16299         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
16300         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
16301         is sane and DOES follow symlinks.  Besides, testing 20 different
16302         systems found no broken chown implementations.
16303         Prompted by a change in rsync's copy of this macro.
16304         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
16305
16306         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
16307
16308         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
16309         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
16310         NULL-means-set-to-current-time semantics.
16311         Remove temporary file immediately, rather than waiting
16312         for configure's at-exit trap code to do it.
16313
16314 2005-01-18  Jim Meyering  <jim@meyering.net>
16315
16316         * lib/version-etc.c (version_etc_copyright): Update copyright date.
16317
16318         * lib/utimens.c (futimens): Account for the fact that futimes
16319         can also fail with errno == ENOSYS or errno == ENOENT.
16320         Patch from Dmitry V. Levin.
16321
16322         Change the name of the robust chdir function from chdir to chdir_long.
16323         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
16324         (restore_cwd): Use chdir_long, not chdir.
16325         * lib/chdir-long.c: Renamed from chdir.c.
16326         * lib/chdir-long.h: Renamed from chdir.h.
16327         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
16328         Hurd.
16329
16330 2005-01-18  Bruno Haible  <bruno@clisp.org>
16331
16332         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
16333         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
16334         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
16335         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
16336         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
16337         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
16338         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
16339         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
16340         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
16341         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
16342         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
16343         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
16344         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
16345         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
16346         Use an all-permissive copyright notice, recommended by RMS.
16347
16348 2005-01-18  Bob Proulx  <bob@proulx.com>
16349
16350         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
16351         simplify offsetof() macro construct to avoid compile failure with
16352         native HP-UX 11.0 ANSI C compiler.
16353
16354 2005-01-17  Bruno Haible  <bruno@clisp.org>
16355
16356         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
16357         redundant because stpncpy.m4 takes care of it.
16358
16359 2005-01-17  Bruno Haible  <bruno@clisp.org>
16360
16361         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
16362
16363 2005-01-17  Bruno Haible  <bruno@clisp.org>
16364
16365         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
16366         used.
16367
16368 2005-01-17  Bruno Haible  <bruno@clisp.org>
16369
16370         * lib/fwriteerror.h (fwriteerror): Change specification to include
16371         fclose.
16372         * lib/fwriteerror.c: Include <stdbool.h>.
16373         (fwriteerror): At the end, close the file stream. Record whether
16374         stdout was already closed.
16375
16376 2005-01-17  Bruno Haible  <bruno@clisp.org>
16377
16378         * lib/execute.c (environ): Declare if needed.
16379         * lib/pipe.c (environ): Likewise.
16380         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
16381
16382 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16383
16384         * modules/argp: Depend on vsnprintf
16385
16386 2005-01-10  Jim Meyering  <jim@meyering.net>
16387
16388         * modules/closeout (Depends-on): Add atexit.
16389
16390 2005-01-06  Bruno Haible  <bruno@clisp.org>
16391
16392         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
16393
16394 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
16395
16396         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
16397         definitions to be after all include files, to avoid collisions.
16398         Problem reported by Bob Proulx.
16399
16400 2005-01-04  Jim Meyering  <jim@meyering.net>
16401
16402         Changes imported from coreutils.
16403         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
16404         as the mkstemp template, use a temporary directory and an
16405         8.3-friendly template to avoid trouble on systems like DJGPP.
16406         Reported by Juan M. Guerrero via Stepan Kasal.
16407         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
16408         close. Remove the temporary directory right away, rather than waiting
16409         for configure's at-exit trap code to do it.
16410         Suggestion from Stepan Kasal.
16411
16412 2005-01-01  Simon Josefsson  <jas@extundo.com>
16413
16414         * gnulib-tool: Print #include directives when --import'ing.
16415
16416 2004-12-28  Simon Josefsson  <jas@extundo.com>
16417
16418         * tests/test-base64.c: Include required header files.  Remove
16419         unused variables.
16420
16421 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
16422
16423         * modules/error (Depends-on): Remove gettext.
16424
16425 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
16426
16427         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
16428         not needed.  This removes a dependency on the gettext module.
16429         [defined _LIBC]: Do not include <libintl.h>; not needed.
16430
16431 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
16432
16433         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
16434         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
16435
16436 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
16437
16438         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
16439         HAVE_DECL_STRTOLD.
16440
16441 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
16442
16443         * modules/getdate (Depends-on): Remove alloca-opt.
16444
16445 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
16446
16447         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
16448
16449 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
16450
16451         * lib/argp-parse.c: Include <stddef.h>.
16452         (alignof, alignto): New macros.
16453         (parser_init): Don't assume that void * is aligned sufficiently
16454         for struct option.
16455
16456         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
16457         need to extend the stack.
16458         (YYINITDEPTH): New macro, so that the initial stack isn't overly
16459         large.
16460
16461 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16462
16463         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
16464
16465 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
16466
16467         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
16468         (2004-10-24) change.  Apparently this was a false alarm.
16469
16470         * modules/getdate: Depend on alloca-opt, not alloca.
16471
16472 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
16473
16474         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
16475         Remove now-obsolete comment about AIX.
16476         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
16477         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
16478         (YYMAXDEPTH): New macro.
16479
16480 2004-12-18  Simon Josefsson  <jas@extundo.com>
16481
16482         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
16483
16484 2004-12-18  Bruno Haible  <bruno@clisp.org>
16485
16486         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
16487
16488 2004-12-18  Bruno Haible  <bruno@clisp.org>
16489
16490         * lib/fatal-signal.c (fatal_signals): Make non-const.
16491         (init_fatal_signals): New function.
16492         (uninstall_handlers, install_handlers): Ignore signals that were set to
16493         SIG_IGN.
16494         (at_fatal_signal): Call init_fatal_signals.
16495         (init_fatal_signal_set): Likewise. Ignore signals that were set to
16496         SIG_IGN.
16497         Reported by Paul Eggert.
16498
16499 2004-12-18  Bruno Haible  <bruno@clisp.org>
16500
16501         * doc/alloca.texi: New file.
16502         * doc/alloca-opt.texi: New file.
16503
16504 2004-12-17  Jim Meyering  <jim@meyering.net>
16505
16506         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
16507         Otherwise, install-sh could exit with improper exit status when
16508         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
16509
16510 2004-12-16  Simon Josefsson  <jas@extundo.com>
16511
16512         * tests/test-base64.c: Add license.
16513
16514 2004-12-15  Stepan Kasal  <address@hidden>
16515
16516         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
16517
16518 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
16519
16520         * modules/getcwd (Files): Add m4/d-ino.m4.
16521         Suggested by Mark D. Baushke.
16522
16523 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
16524
16525         * lib/getdate.y (textint): New member "negative".
16526         (time_zone_hhmm): New function.
16527         Expect 14 shift-reduce conflicts, not 13.
16528         (o_colon_minutes): New rule.
16529         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
16530         (yylex): Set the "negative" member of signed numbers.
16531
16532 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
16533
16534         * doc/getdate.texi (Time of day items, Time zone items):
16535         Describe new formats +00:00, UTC+00:00.
16536
16537 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
16538
16539         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
16540         spurious "-l"s.  Problem reported by Stepan Kasal.
16541
16542 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
16543
16544         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
16545         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
16546
16547 2004-12-04  Simon Josefsson  <jas@extundo.com>
16548
16549         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
16550         Vandoorselaere <yoann@prelude-ids.org>.
16551
16552 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
16553
16554         Changes imported from coreutils.
16555         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
16556         exist.
16557         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
16558
16559 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
16560
16561         Changes imported from coreutils.
16562         * lib/hard-locale.c: Assume <locale.h> exists.
16563         Include "strdup.h".
16564         (GLIBC_VERSION): New macro.
16565         (hard_locale): Assume setlocale exists.
16566         Rewrite to avoid #ifdef.
16567         Use strdup rather than malloc + strcpy.
16568         * lib/human.c: Assume <locale.h> exists.
16569         (human_readable): Assume localeconv exists.
16570
16571 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
16572
16573         * modules/hard-locale (Depends-on): Add strdup.
16574
16575 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
16576
16577         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
16578         convert T2, not T.  (Imported from libc.)
16579
16580 2004-11-30  Simon Josefsson  <jas@extundo.com>
16581
16582         * modules/restrict (License): Change to LGPL.
16583
16584 2004-11-30  Simon Josefsson  <jas@extundo.com>
16585
16586         * m4/restrict.m4: Add copyright and copying conditions.
16587
16588 2004-11-30  Simon Josefsson  <jas@extundo.com>
16589
16590         * m4/base64.m4: New file.
16591
16592 2004-11-30  Simon Josefsson  <jas@extundo.com>
16593
16594         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
16595         base64.
16596
16597         * tests/test-base64.c: New file.
16598
16599         * modules/base64: New file.
16600
16601 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
16602
16603         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
16604         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
16605
16606         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
16607
16608 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
16609
16610         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
16611         (__getcwd.c): Don't restore errno; glibc doesn't.
16612         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
16613         first, falling back to our code only if its results look suspicious.
16614         Ensure that the resulting buffer is only as large as necessary.
16615
16616         * lib/readutmp.c: Include readutmp.h first.
16617         Include <errno.h>, since readutmp.h no longer does that.
16618         * lib/readutmp.h: Don't include <errno.h>,
16619         <sys/param.h>, <time.h>; not needed to establish interface.
16620         (errno): Remove decl.
16621         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
16622         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
16623         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
16624
16625 2004-11-28  Simon Josefsson  <jas@extundo.com>
16626
16627         * lib/base64.h, base64.c: New file.
16628
16629 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
16630
16631         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
16632
16633 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
16634
16635         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
16636         (Depends-on): Remove pathmax, same.  Add mempcpy.
16637         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
16638         (Makefile.am): Append getcwd.h to lib_SOURCES.
16639         (Include): Add getcwd.h.
16640         (Maintainer): Change from Jim Meyering to "all, glibc",
16641         since getdate now uses intended-for-glibc code.
16642         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
16643         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
16644
16645 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
16646
16647         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
16648         HP's ANSI C compiler.
16649         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
16650         Declaring int functions causes warnings on some modern systems and
16651         shouldn't be needed to compile on ancient ones.
16652         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
16653         defined.
16654
16655         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
16656         with the following changes.
16657         (__set_errno): Parenthesize properly.
16658         Include <stdbool.h>.
16659         (MIN, MAX, MATCHING_INO): New macros.
16660         (__getcwd): Define with prototype, not K&R form.
16661         Use heuristics to allocate default buffer on stack if possible.
16662         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
16663         behavior, and to avoid the PATH_MAX limit when computing
16664         ../../../../...
16665         Use MATCHING_INO to compare inode number to file.
16666         Check for arithmetic overflow in size calculations.
16667         Fix bug in reallocation of dot array that caused getcwd to fail
16668         on directories nested deeper than 75.
16669         Be more careful about saving errno on error.
16670         Do not use realloc; use only free+malloc, as this is a bit
16671         more flexible and avoids a needless copy operation.
16672         Do not inspect st_dev and st_ino for symbolic links; POSIX
16673         doesn't specify the latter.
16674         Check for closedir errors.
16675         Avoid needless casts.
16676         Use "#ifdef weak_alias" around weak_alias, to be like other
16677         glibc code.
16678         The following changes to getcwd.c have effect only when used in
16679         gnulib; they have no effect inside glibc proper.
16680         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
16681         as alloca isn't used.
16682         (alloca, __alloca): Likewise.
16683         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
16684         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
16685         unconditionally, as gnulib assumes C89 or better.
16686         Do not include <sys/param.h>.
16687         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
16688         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
16689         better.
16690         (NULL) [!defined NULL]: Remove; we assume C89 or better.
16691         Include <dirent.h> in a way that is compatible with modern Autoconf.
16692         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
16693         New macros, if not already defined.
16694         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
16695         Use "_LIBC", not "defined _LIBC", for consistency.
16696         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
16697         a mempcpy module.
16698         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
16699         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
16700         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
16701         credit only to Jim Meyering and adjust the copyright dates.
16702         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
16703         <stdlib.h>, <unistd.h>, "pathmax.h".
16704         Instead, include "xgetcwd.h" (first) and "getcwd.h".
16705         (INITIAL_BUFFER_SIZE): Remove.
16706         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
16707
16708 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
16709
16710         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
16711         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
16712         Use the _ONCE methods, for efficiency.
16713         Check for fcntl.h.  In test program, include <errno.h>
16714         and <fcntl.h> if available.  Remove old K&R cruft from
16715         test program.  Check for common errors in GNU/Linux,
16716         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
16717         don't do AC_LIBOBJ, as that's getcwd.m4's job.
16718         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
16719         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
16720         name accordingly.
16721         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
16722         accommodate new getcwd.c.
16723         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
16724         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
16725         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
16726         that's all we need now.
16727
16728 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16729
16730         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
16731         argp-parse.c depends on getopt internals, that means we should
16732         always use our getopt, to be on the safe side.
16733         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
16734         order not to spoil the result of an eventual previous invocation
16735         of gl_GETOPT_SUBSTITUTE.
16736
16737 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16738
16739         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
16740         redefinition warnings. To avoid them, include the defines
16741         in `#if !defined __need_getopt ... #endif'. The only place
16742         where __getopt_argv_const is used is in definitions
16743         of getopt_long and getopt_long_only below, which are as well
16744         protected by `#ifndef __need_getopt'.
16745         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
16746         __need_getopt after including <stdio.h> and <unistd.h> These
16747         headers might have defined it.
16748
16749 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
16750
16751         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
16752
16753 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
16754
16755         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
16756         (futimens): New function, which uses futimes if available.
16757         (futimens, utimens): Support timespec==NULL, with same semantics
16758         as utime and utimens.
16759         * lib/utimens.h (futimens): New decl.
16760
16761 2004-11-23  Jim Meyering  <jim@meyering.net>
16762
16763         * lib/getopt_.h: Remove trailing blanks.
16764
16765 2004-11-23  Jim Meyering  <jim@meyering.net>
16766
16767         * lib/__fpending.c: Add comment.
16768
16769 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
16770
16771         * modules/canonicalize (Depends-on): Add xreadlink.
16772         Problem reported by James Youngman.
16773
16774 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
16775
16776         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
16777         New macros.
16778         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
16779         optopt): Use them instead of invoking ## directly; otherwise, the
16780         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
16781
16782 2004-11-19  Bruno Haible  <bruno@clisp.org>
16783
16784         * lib/strtok_r.c: Move comments from here...
16785         * lib/strtok_r.h: ... to here.
16786
16787 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
16788
16789         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
16790         implementations that mishandle size_t overflow.
16791
16792 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
16793
16794         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
16795         might fail.  Problem reported by Yoann Vandoorselaere.
16796         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
16797         implementations that mishandle size_t overflow.
16798
16799 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
16800
16801         * modules/canon-host (Depends-on): Add strdup.
16802
16803 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
16804
16805         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
16806
16807 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
16808
16809         * lib/canon-host.c: Include "strdup.h".
16810         (canon_host): Use getaddrinfo if available, so that IPv6 works.
16811         Use strdup instead of malloc/strcpy to duplicate strings.
16812
16813         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
16814         (human_space_before_unit): New constant.
16815         * lib/human.c (human_readable): Support it.
16816
16817         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
16818         (xgetcwd): Set errno correctly when failing.
16819         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
16820         the failure is actually due to a PATH_MAX problem.
16821
16822         Further getopt changes to make it more likely that glibc will
16823         buy the changes back.
16824         * lib/getopt.c (POSIXLY_CORRECT): New constant.
16825         (getopt): Use it, so to preserve glibc semantic
16826         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
16827         when compiling for libc.
16828         * lib/getopt_.h (__getopt_argv_const): Bring it back.
16829         (getopt_long, getopt_long_only): Use it.
16830
16831         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
16832         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
16833         (getopt): Argv is now char * const *, as per standard.
16834         (_getopt_internal_r, _getopt_internal): Argv is now char **,
16835         not char *__getopt_argv_const *.
16836         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
16837         _getopt_long_only_r): Likewise.
16838         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
16839         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
16840         _getopt_long_r, _getopt_long_only_r): Likewise.
16841         * lib/getopt_.h (__getopt_argv_const): Remove.
16842         (getopt): Argv is now char * const *, as per standard.
16843
16844         * lib/getdate.y (tORDINAL): New token.
16845         (day, relunit): Allow it for relative times.
16846         (relative_time_table): Use tORDINAL for ordinals.
16847
16848 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
16849
16850         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
16851         Document that "second" isn't allowed as an ordinal number.
16852
16853 2004-11-16  Jim Meyering  <jim@meyering.net>
16854
16855         * modules/closeout (Depends-on): Add fpending.
16856
16857 2004-11-15  Jim Meyering  <jim@meyering.net>
16858
16859         * lib/closeout.c: Include "__fpending.h" once again.
16860         Include <stdbool.h>.
16861         (close_stdout): Don't fail just because stdout was closed initially,
16862         since some programs don't write to stdout in the normal course of
16863         operation (other than --version and --help), and we don't want this
16864         function to make e.g. `touch file >&-' fail.
16865         But do fail if it was closed and someone has tried to write to it.
16866         E.g., `printf foo >&-' must fail.
16867
16868 2004-11-13  Jim Meyering  <jim@meyering.net>
16869
16870         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
16871
16872 2004-11-12  Simon Josefsson  <jas@extundo.com>
16873
16874         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
16875         small doc fix is still pending.
16876
16877 2004-11-11  Simon Josefsson  <jas@extundo.com>
16878
16879         * modules/strtok_r: New file.
16880
16881         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
16882         strtok_r.
16883
16884 2004-11-11  Simon Josefsson  <jas@extundo.com>
16885
16886         * m4/strtok_r.m4: New file.
16887
16888         * m4/getopt.m4: Replace opterr.
16889
16890 2004-11-11  Simon Josefsson  <jas@extundo.com>
16891
16892         * lib/strtok_r.h, strtok_r.c: New file.
16893
16894 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
16895
16896         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
16897         of replacing opterr, getopt, etc.  This should handle the
16898         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
16899
16900 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
16901
16902         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
16903         we can stop lying to compilers about the constness of argv when we
16904         are compiled outside glibc.
16905         (getopt, getopt_long, getopt_long_only): Use it.
16906         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
16907         _getopt_internal, getopt): Likewise.
16908         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
16909         _getopt_long_only_r): Likewise.
16910         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
16911         _getopt_long_r, _getopt_long_only_r): Likewise.
16912
16913         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
16914         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
16915         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
16916         the other external symbols.
16917         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
16918         declaration, since the above renaming now works around collisions.
16919
16920 2004-11-11  Jim Meyering  <jim@meyering.net>
16921
16922         * lib/linebreak.c: Remove trailing blanks.
16923         * lib/alloca_.h: Likewise.
16924         * lib/acosl.c: Likewise.
16925         * lib/euidaccess.c: Likewise.
16926         * lib/allocsa.h: Likewise.
16927
16928 2004-11-10  Simon Josefsson  <jas@extundo.com>
16929
16930         * m4/getaddrinfo.m4: New file.
16931
16932 2004-11-10  Simon Josefsson  <jas@extundo.com>
16933
16934         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
16935
16936 2004-11-10  Simon Josefsson  <jas@extundo.com>
16937
16938         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
16939         getaddrinfo.
16940
16941         * modules/getaddrinfo: New file.
16942
16943 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
16944
16945         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
16946
16947 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
16948
16949         * lib/mktime.c (SHR): New macro, which is a portable
16950         substitute for >> that should work even on Crays.
16951         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
16952         Problem reported by Mark D. Baushke in
16953         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
16954         * lib/getdate.y (SHR): Likewise.
16955         (tm_diff): Use it.
16956         * lib/strftime.c (SHR): Likewise.
16957         (tm_diff): Use it.
16958         * lib/quotearg.c (struct quoting_options): Use unsigned int for
16959         quote_these_too, so that right shifts are well defined.  All uses
16960         changed.
16961
16962 2004-11-10  Jim Meyering  <jim@meyering.net>
16963
16964         Ensure that no close failure goes unreported.
16965         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
16966         return early when it seems there's nothing to flush.
16967         Don't include __fpending.h.
16968
16969 2004-11-10  Jim Meyering  <jim@meyering.net>
16970
16971         * modules/closeout (Depends-on): Remove fpending.
16972
16973 2004-11-10  Jim Meyering  <jim@meyering.net>
16974
16975         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
16976
16977 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
16978
16979         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
16980         gl_FUNC_STRFTIME.
16981         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
16982         and AC_REQUIRE when possible, to avoid duplicate checks.
16983         Check for <wchar.h>.
16984
16985 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
16986
16987         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
16988
16989 2004-11-09  Bruno Haible  <bruno@clisp.org>
16990
16991         * m4/sockpfaf.m4: New file.
16992
16993 2004-11-05  Bruno Haible  <bruno@clisp.org>
16994
16995         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
16996         Reported by Mark D. Baushke <mdb@cvshome.org>.
16997
16998 2004-11-04  Bruno Haible  <bruno@clisp.org>
16999
17000         2004-09-11  Bruno Haible  <bruno@clisp.org>
17001                 * allocsa.valgrind: New file.
17002         2004-02-06  Bruno Haible  <bruno@clisp.org>
17003                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
17004                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
17005                 Reported by Christopher Seip <chris.seip@hp.com>.
17006
17007 2004-11-04  Bruno Haible  <bruno@clisp.org>
17008
17009         * modules/allocsa (Files): Add lib/allocsa.valgrind.
17010         (Makefile.am): Distribute it.
17011
17012 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
17013
17014         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
17015         with errno == ERANGE if the buffer is too small.
17016         Problem reported by Mark D. Baushke.
17017
17018 2004-11-03  Albert Chin  <china@thewrittenword.com>
17019             Paul Eggert  <eggert@cs.ucla.edu>
17020
17021         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
17022         equivalent, substitute $ac_type for equivalent type rather than
17023         blindly using uint32_t *always* which won't work if uint32_t is not
17024         available.  Define _UINT32_T to work around typedef of uint32_t if
17025         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
17026         2.5.1.
17027
17028 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
17029
17030         * m4/jm-macros.m4: Sync from coreutils.
17031         (gl_MACROS): Check for mbrlen, for pathchk.
17032         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
17033
17034 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
17035
17036         * lib/xreadlink.c (MAXSIZE): New macro.
17037         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
17038         size does not exceed MAXSIZE.  Avoid cast.
17039         As suggested by Mark D. Baushke in
17040         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
17041         if readlink fails with buffer size just under MAXSIZE, try again
17042         with MAXSIZE.
17043
17044 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
17045
17046         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
17047
17048 2004-11-02  Derek R. Price  <derek@ximbiot.com>
17049         and  Paul Eggert  <eggert@cs.ucla.edu>
17050
17051         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
17052         (get_date): Overparenthesize to avoid GCC warning.
17053
17054 2004-11-02  Bruno Haible  <bruno@clisp.org>
17055
17056         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
17057         returns void.
17058
17059 2004-11-02  Bruno Haible  <bruno@clisp.org>
17060
17061         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
17062         function returns void.
17063
17064 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
17065
17066         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
17067         fflush_unlocked, flockfile, funlockfile, funlockfile,
17068         fputs_unlocked, putc_unlocked.
17069
17070 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
17071
17072         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
17073         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
17074         already declared.
17075
17076 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
17077
17078         * modules/getdate (Files): Add doc/getdate.texi.
17079         (Depends-on): Add setenv, xalloc.
17080
17081 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
17082
17083         * lib/getdate.y: Add support for TZ="foo" within a date string.
17084         Fix some bugs near time_t boundaries.  Reject dates with
17085         out-of-range components, e.g., "Sept 31".
17086         Include <stdlib.h>, "setenv.h", "xalloc.h".
17087         (ISDIGIT_LOCALE): Remove; unused.
17088         Note that the TZ and time functions used here are not reentrant.
17089         (mktime_ok, get_tz): New functions.
17090         (TZBUFSIZE): New constant.
17091         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
17092         This requires that we sometimes generate our own TZ="XXX..." setting.
17093
17094 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
17095
17096         * doc/getdate.texi: New file, from coreutils with modifications for
17097         the new TZ parsing.
17098
17099 2004-10-27  Derek R. Price  <derek@ximbiot.com>
17100
17101         * lib/mktime.c (not_equal_tm): Remove redundant check.
17102
17103 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
17104
17105         * modules/regex (lib_SOURCES): Add regex.c.
17106         Reported by James Youngman in
17107         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
17108
17109 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
17110
17111         * lib/getdate.y: Use Bison 1.875 features, and some minor
17112         code cleanups.  This change does not affect semantics.
17113         Don't include <stdlib.h>; no longer needed.
17114         Don't include unlocked-io.h; only the "#if TEST" code uses
17115         stdio, and performance isn't crucial there.
17116         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
17117         Bison 1.875 features as described below.
17118         All uses of "PC." replaced by "pc->".
17119         (YYSTYPE): Add a forward declaration.
17120         (yylex, yyerror): Use full prototypes in forward decls.
17121         Use "%pure-parser" rather than obsolescent "%pure_parser".
17122         Use %parse-param and %lex-param instead of obsolescent
17123         YYPARSE_PARAM and YYLEX_PARAM.
17124         (meridian_table, month_and_day_table, time_units_table,
17125         relative_time_table, time_zone_table, military_table,
17126         lookup_zone, lookup_word, get_date):
17127         Use NULL instead of 0 where appropriate.
17128         (to_hour): Avoid abort (), to avoid a dependency on
17129         stdlib.h.
17130         (yyerror, yylex): Now accepts parser_control * arg.
17131         (main) [TEST]: Use '\0' rather than 0 for char.
17132
17133 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
17134
17135         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
17136
17137 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
17138
17139         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
17140         It's now the caller's responsibility to handle the case where
17141         !HAVE_GETPAGESIZE && !defined getpagesize.
17142
17143         * lib/mktime.c (leapyear): Arg is long int, not int.
17144
17145 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
17146
17147         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
17148
17149 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
17150
17151         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
17152         missing.  Problem reported by James Youngman.
17153
17154 2004-10-16  Simon Josefsson  <jas@extundo.com>
17155
17156         * gnulib-tool: Fix comments.  Fix parse problem.
17157         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
17158
17159 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
17160
17161         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
17162         implementation of getopt_long.  Problem reported by Alexander Taler in:
17163         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
17164
17165 2004-10-15  Bruno Haible  <bruno@clisp.org>
17166
17167         * gnulib-tool: Untabify. Initialize supplied_libname.
17168         (func_usage): More homogenous output.
17169         (func_modules_transitive_closure, func_modules_to_filelist,
17170         func_emit_lib_Makefile_am): New functions.
17171         (func_import): New function, extracted from big case statement. Use
17172         func_get_license, func_modules_transitive_closure,
17173         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
17174         opt_lgpl. Don't use test -a, as it's not portable.
17175         (func_create_testdir): Use func_modules_transitive_closure,
17176         func_modules_to_filelist, func_emit_lib_Makefile_am.
17177
17178 2004-10-15  Bruno Haible  <bruno@clisp.org>
17179
17180         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
17181
17182 2004-10-15  Bruno Haible  <bruno@clisp.org>
17183
17184         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
17185         the portions belonging to each module.
17186         Suggested by Derek Robert Price <derek@ximbiot.com>.
17187
17188 2004-10-12  Simon Josefsson  <jas@extundo.com>
17189
17190         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
17191         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
17192         to real functions.
17193
17194 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
17195
17196         * modules/vsnprintf: New file.
17197
17198 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
17199
17200         * m4/vsnprintf.m4: New file.
17201
17202 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
17203
17204         * lib/vsnprintf.h: New file.
17205         * lib/vsnprintf.c: New file.
17206
17207 2004-10-11  Bruno Haible  <bruno@clisp.org>
17208
17209         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
17210         vsnprintf.
17211
17212 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
17213
17214         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
17215
17216 2004-10-07  Bruno Haible  <bruno@clisp.org>
17217
17218         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
17219         fits into the provided buffer.
17220
17221 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
17222
17223         * lib/diacrit.c, diacrit.h: Add GPL notice.
17224
17225         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
17226         notice.
17227         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
17228         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
17229         This avoids a potential constant-folding bug.
17230
17231 2004-10-05  Bruno Haible  <bruno@clisp.org>
17232
17233         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
17234         for the declaration of strsep.
17235
17236 2004-10-05  Bruno Haible  <bruno@clisp.org>
17237
17238         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
17239
17240 2004-10-04  Simon Josefsson  <jas@extundo.com>
17241
17242         * modules/memmem: New file.
17243         * tests/test-memmem.c: New file.
17244         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
17245
17246 2004-10-04  Simon Josefsson  <jas@extundo.com>
17247
17248         * m4/memmem.m4: New file.
17249
17250 2004-10-04  Simon Josefsson  <jas@extundo.com>
17251
17252         * lib/memmem.h: New file.
17253         * lib/memmem.c: New file, taken from glibc.
17254
17255 2004-10-04  Simon Josefsson  <jas@extundo.com>
17256
17257         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
17258         '#ifdef USE_UNLOCKED_IO'.
17259
17260 2004-10-04  Simon Josefsson  <jas@extundo.com>
17261
17262         * config/srclist.txt: Add memmem from glibc.
17263
17264 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
17265
17266         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
17267
17268         * modules/argmatch, modules/argp, modules/closeout, modules/error,
17269         modules/exclude, modules/getdate, modules/getline,
17270         modules/getndelim2, modules/getpass, modules/getpass-gnu,
17271         modules/getusershell, modules/linebuffer, modules/md5,
17272         modules/mountlist, modules/posixtm, modules/readtokens,
17273         modules/readutmp, modules/regex, modules/sha1,
17274         modules/version-etc, modules/yesno:
17275         Remove dependency on unlocked-io.
17276
17277 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
17278
17279         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
17280
17281         * m4/unlocked-io.m4: Add copyright notice.
17282         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
17283
17284 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
17285
17286         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
17287         * lib/xmalloc.c (xmemdup): Likewise.
17288         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
17289         XFREE): Remove these long-obsolescent macros.
17290         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
17291         * lib/xstrdup.c: Remove.
17292
17293         * lib/regex.c (re_comp): Cast gettext return value to char *,
17294         Problem reported by Martin Neitzel via Mark D. Baushke.
17295
17296 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
17297
17298         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
17299         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
17300         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
17301         regex.c, sha1.c, version-etc.c, yesno.c:
17302         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
17303         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
17304         the includer's responsibility.
17305
17306         Sync from coreutils.
17307
17308         * lib/modechange.c (mode_compile): Don't decrement a pointer that
17309         points to the start of a string, as the C Standard says the
17310         resulting behavior is undefined.
17311
17312         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
17313         simple -> simple_backups, numbered_existing ->
17314         numbered_existing_backups, numbered -> numbered_backups
17315         to avoid shadowing problems.  All uses changed.
17316         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
17317         * lib/backupfile.c (check_extension, numbered_backup):
17318         Rename locals to avoid shadowing 'basename'.
17319         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
17320         once.
17321
17322         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
17323         * lib/.cvsignore: Add getopt.h.
17324
17325 2004-10-04  Bruno Haible  <bruno@clisp.org>
17326
17327         * modules/README: New file.
17328         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
17329         not a module.
17330
17331 2004-10-02  Jim Meyering  <jim@meyering.net>
17332
17333         * lib/dirfd.h, getpagesize.h: Add copyright notice.
17334
17335 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
17336
17337         * modules/strsep: New file.
17338
17339 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
17340
17341         * m4/strsep.m4: New file.
17342
17343 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
17344
17345         * lib/strsep.h: New file.
17346         * lib/strsep.c: New file.
17347
17348 2004-10-01  Simon Josefsson  <jas@extundo.com>
17349
17350         * lib/snprintf.c (snprintf): Handle size==0.
17351
17352 2004-10-01  Simon Josefsson  <jas@extundo.com>
17353             Bruno Haible  <bruno@clisp.org>
17354
17355         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
17356         (snprintf): Declare 'args'.
17357
17358 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
17359
17360         * lib/snprintf.c: Remove comments as to why each header is needed.
17361
17362 2004-10-01  Bruno Haible  <bruno@clisp.org>
17363
17364         * MODULES.html.sh: Add strsep.
17365
17366 2004-09-30  Simon Josefsson  <jas@extundo.com>
17367
17368         * modules/snprintf: New file.
17369
17370 2004-09-30  Simon Josefsson  <jas@extundo.com>
17371
17372         * m4/snprintf.m4: New file.
17373
17374 2004-09-30  Simon Josefsson  <jas@extundo.com>
17375
17376         * lib/snprintf.h, lib/snprintf.c: New files.
17377
17378 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17379
17380         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
17381         (hol_entry_help): Never translate an empty string.
17382         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
17383         * lib/argp.h (OPTION_NO_TRANS): New option.
17384
17385 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
17386
17387         * modules/argp (Maintainer): Replace Simon Josefsson
17388         by Sergey Poznyakoff.
17389
17390 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
17391
17392         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
17393         changes merged back into glibc.
17394
17395 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
17396
17397         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
17398
17399 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
17400
17401         * lib/xvasprintf.c: Include xalloc.h.
17402         (xvasprintf): Use xalloc_die, not xmalloc_die.
17403
17404 2004-09-29  Bruno Haible  <bruno@clisp.org>
17405
17406         * modules/alloca-opt: New file, derived from modules/alloca.
17407         * modules/allocsa: Depend on alloca-opt instead of alloca.
17408         * modules/setenv: Likewise.
17409         * modules/vasnprintf: Likewise.
17410         * MODULES.html.sh: Add alloca-opt.
17411
17412 2004-09-28  Simon Josefsson  <jas@extundo.com>
17413
17414         * gnulib-tool: New parameter --lgpl, to asseert that modules are
17415         LGPL, and to replace license template from GPL to LGPL.
17416
17417 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
17418
17419         * modules/dummy: Change license to LGPL.
17420
17421 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
17422
17423         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
17424
17425 2004-09-24  Simon Josefsson  <jas@extundo.com>
17426
17427         * modules/minmax (License): Change from GPL to LGPL.
17428
17429 2004-09-23  Simon Josefsson  <jas@extundo.com>
17430
17431         * gnulib-tool (--import): Typo.
17432
17433 2004-09-23  Simon Josefsson  <jas@extundo.com>
17434
17435         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
17436
17437 2004-09-22  Bruno Haible  <bruno@clisp.org>
17438
17439         * modules/*: Add 'License' field.
17440         * gnulib-tool: Accept --extract-license option.
17441         (func_get_license): New function.
17442
17443 2004-09-21  Bruno Haible  <bruno@clisp.org>
17444
17445         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
17446         Reported by Simon Josefsson.
17447
17448 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
17449
17450         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
17451         gl_AC_TYPE_LONG_LONG.
17452
17453 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
17454
17455         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
17456
17457 2004-09-18  Simon Josefsson  <jas@extundo.com>
17458         and  Paul Eggert  <eggert@cs.ucla.edu>
17459
17460         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
17461         calls with autoreconf.  Define GL_LIB.
17462
17463 2004-09-14  Karl Berry  <karl@gnu.org>
17464
17465         * config/srclist.txt: unsync setenv.c, sigh.
17466
17467 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
17468
17469         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
17470         Problem reported by Bruno Haible in:
17471         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
17472
17473 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
17474
17475         * config/srclist.txt: Comment out argp-pvh.c.
17476
17477 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
17478
17479         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
17480         in case some system header has #define'd it.  Problem reported by
17481         Soeren D. Schulze in
17482         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
17483
17484 2004-09-09  Karl Berry  <karl@gnu.org>
17485
17486         * regex.[ch]: delete from the root.  These were supposed to be
17487                 synced with emacs cvs, but this has not happened for about
17488                 a year, and anyway nothing else uses emacs regex.[ch].
17489                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
17490                 lib/regex[.ch] is untouched.
17491
17492 2004-09-09  Bruno Haible  <bruno@clisp.org>
17493
17494         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
17495
17496 2004-09-09  Bruno Haible  <bruno@clisp.org>
17497
17498         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
17499         modifications.
17500         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
17501
17502 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
17503
17504         * modules/xvasprintf: New file.
17505         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
17506
17507 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
17508
17509         * lib/xvasprintf.h: New file.
17510         * lib/xvasprintf.c: New file.
17511         * lib/xasprintf.c: New file.
17512
17513 2004-09-08  Bruno Haible  <bruno@clisp.org>
17514
17515         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
17516
17517 2004-09-08  Bruno Haible  <bruno@clisp.org>
17518
17519         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
17520         length is > INT_MAX.
17521         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
17522         more.
17523
17524 2004-09-08  Bruno Haible  <bruno@clisp.org>
17525
17526         * lib/stdint_.h: New file, taken from GNU clisp.
17527
17528 2004-09-08  Bruno Haible  <bruno@clisp.org>
17529             Oskar Liljeblad  <oskar@osk.mine.nu>
17530
17531         * modules/stdint: New file.
17532         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
17533
17534 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
17535
17536         Import from coreutils.
17537         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
17538         strings on unbounded length.  alloca's performance benefits aren't
17539         that important here.
17540         (V_STRDUP): Remove.
17541         (parse_with_separator): New function, with most of the internals
17542         of the old parse_user_spec.  Allow user to omit both user and group,
17543         for compatibility with FreeBSD.
17544         Clone only the user name, not the entire spec.
17545         Do not set *uid, *gid unless entirely successful.
17546         Avoid memory leak in some failing cases.
17547         Fix regression for USER.GROUP reported by Dmitry V. Levin in
17548         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
17549         (parse_user_spec): Rewrite to use parse_with_separator.
17550
17551 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
17552
17553         * modules/userspec: Don't depend on alloca.
17554
17555 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
17556
17557         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
17558
17559 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
17560
17561         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
17562         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
17563         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
17564
17565 2004-08-16  Simon Josefsson  <jas@extundo.com>
17566
17567         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
17568         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
17569         Add --dry-run for --import.
17570         Let user provided command line parameters override configure.ac
17571         settings.
17572
17573 2004-08-12  Simon Josefsson  <jas@extundo.com>
17574
17575         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
17576         as discussed with Paul Eggert in threads rooted at
17577         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
17578         and
17579         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
17580         Before, the test was empty, and relied on ELIDE_CODE in source
17581         code.)
17582         (gl_PREREQ_GETOPT): New macro.
17583         (gl_GETOPT): Use them.
17584
17585 2004-08-12  Simon Josefsson  <jas@extundo.com>
17586
17587         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
17588         * lib/getopt_.h: Renamed from getopt.h.
17589
17590 2004-08-12  Simon Josefsson  <jas@extundo.com>
17591
17592         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
17593         Change default library name from libfoo to libgnu.
17594         Now, if you have a configure.ac that says:
17595                 gl_SOURCE_BASE(gl)
17596                 gl_M4_BASE(gl/m4)
17597                 gl_MODULES(error getopt etcetera)
17598                 gl_INIT
17599         you can import all you need by running:
17600                 ../gnulib/gnulib-tool --import
17601
17602         * modules/getopt (Files): Rename getopt.h to getopt_.h.
17603         (Makefile.am): Rewrite, use logic from argz.
17604         (Include): Use <getopt.h> instead of "getopt.h".
17605
17606 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
17607
17608         * modules/argp (Files): Add m4/unlocked-io.m4.
17609         (Depends-on): Add extensions.
17610
17611 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
17612
17613         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
17614         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
17615         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
17616         Check for program_invocation_name, program_invocation_short_name,
17617         flockfile, funlockfile, features.h, _getopt_long_only_r.
17618
17619 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
17620
17621         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
17622         its complicated substitute.
17623         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
17624         and program_invocation_name.
17625         (__argp_basename) [!_LIBC]: Remove; the only use was
17626         replaced by its body.
17627         (__argp_short_program_name): Change condition from
17628         !defined __argp_short_program_name to
17629         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
17630         to match argp-namefrob.h.
17631         (__argp_failure): Don't assume strerror_r returns char *.
17632         * lib/argp-parse.c (N_): Define unconditionally.
17633         (argp_default_options): Fill out initializers with 0 to avoid
17634         gcc warnings.
17635
17636 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
17637
17638         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
17639         getopt1.c.
17640
17641 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
17642
17643         Merge from coreutils.
17644
17645         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
17646
17647         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
17648         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
17649
17650 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
17651
17652         Merge from coreutils.
17653
17654         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
17655         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
17656         for Reliant Unix 5.43.
17657
17658         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
17659         (union fooround): Use uintmax_t, not long int.
17660         The rest is a merge from libc:
17661         [defined _LIBC]: Include <shlib-compat.h>.
17662         (_obstack) [defined _LIBC]: Remove after 2.3.4.
17663
17664         * lib/settime.c (settime): Recode to avoid warning with
17665         Sun Forte C 6U2.
17666
17667         * lib/strverscmp.c: Convert to UTF-8.
17668
17669 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
17670
17671         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
17672         m4/uintmax_t.m4.
17673
17674 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
17675
17676         * modules/xalloc-die: New file.
17677         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
17678
17679         * modules/md5 (Files): Add m4/uint32_t.m4.
17680         * modules/sha1: Renamed from modules/sha.
17681         (Files):
17682         Rename lib/sha.h to lib/sha1.h.
17683         Rename lib/sha.c to lib/sha1.c.
17684         Rename m4/sha.m4 to m4/sha1.m4.
17685         (lib_SOURCES): Likewise.
17686         (configure.ac): Rename gl_SHA to gl_SHA1.
17687         (Include): sha.h -> sha1.h.
17688
17689 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
17690
17691         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
17692         * m4/sha1.m4: Renamed from sha.m4.
17693         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
17694
17695 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
17696
17697         * lib/obstack.h (obstack_empty_p):
17698         Don't assume that chunk->contents is suitably aligned.
17699         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
17700         Likewise. Problem reported by Benno in
17701         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
17702
17703         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
17704         readable.  This could be improved further but it'd take some work.
17705
17706 2004-08-08  Simon Josefsson  <jas@extundo.com>
17707
17708         * modules/xgethostname (Depends-on): Remove exit and error (not
17709         used).
17710
17711         * modules/getpass-gnu: Add getpass.h.
17712         (Depends-on): Add stdbool.
17713         * modules/getpass: Add getpass.h.
17714
17715 2004-08-08  Simon Josefsson  <jas@extundo.com>
17716
17717         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
17718         Check getpass declaration.
17719
17720 2004-08-08  Simon Josefsson  <jas@extundo.com>
17721
17722         * lib/xgethostname.c: Don't include error.h (not used).
17723
17724         * lib/getpass.h: Add.
17725         * lib/getpass.c: Include getpass.h first.
17726
17727 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
17728
17729         * lib/xalloc-die.c: New file.
17730         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
17731         All uses removed.
17732         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
17733         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
17734         xalloc-die.c.
17735         (_, N_, xalloc_die): Move to xalloc-die.c.
17736         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
17737         so that we needn't mess with xalloc_msg_memory_exhausted.
17738
17739         * lib/sha1.h: Renamed from sha.h.
17740         (SHA1_H): Renamed from _SHA_H.
17741         (sha1_ctx): Renamed from sha_ctx.
17742         (sha1_init_ctx): Renamed from sha_init_ctx.
17743         (sha1_process_block): Renamed from sha_process_block.
17744         (sha1_process_bytes): Renamed from sha_process_bytes.
17745         (sha1_finish_ctx): Renamed from sha_finish_ctx.
17746         (sha1_read_ctx): Renamed from sha_read_ctx.
17747         (sha1_stream): Renamed from sha_stream.
17748         (sha1_buffer): Renamed from sha_buffer.
17749         * lib/sha1.c: Likewise; renamed from sha.c.
17750         Do not include <sys/types.h>.
17751         Include <stddef.h> rather than <stdlib.h>.
17752
17753 2004-08-08  Bruno Haible  <bruno@clisp.org>
17754
17755         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
17756         FILESYSTEM_PREFIX_LEN.
17757         * lib/progreloc.c: Likewise.
17758         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
17759
17760 2004-08-06  Simon Josefsson  <jas@extundo.com>
17761
17762         * modules/progname (Depends-on): Don't depend on stdbool.
17763
17764 2004-08-06  Simon Josefsson  <jas@extundo.com>
17765
17766         * modules/getsubopt: New file.
17767         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
17768         getsubopt.
17769
17770 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
17771
17772         More merge from coreutils.
17773
17774         * m4/utimens.m4, m4/utimecmp.m4: New files.
17775         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
17776         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
17777         prereq.m4, sha.m4: Import changes from coreutils.
17778
17779 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
17780
17781         More merge from coreutils.
17782         * modules/raise, modules/readtokens0, modules/utimens:
17783         * modules/utimecmp, module/xnanosleep: New files.
17784         * modules/strftime: Add lib/strftime.h.
17785         Change include from <time.h> to "strftime.h".
17786         * modules/yesno: Add lib/yesno.h.
17787         * modules/backupfile: Remove lib/addext.c.
17788         * modules/euidaccess: Add stat-macros.h.
17789         * modules/canonicalize, modules/euidaccess,
17790         modules/filemode, modules/lchown, modules/makepath,
17791         modules/rmdir, modules/stat: Likewise.
17792
17793 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
17794
17795         Merge from tar.
17796         * lib/argp-help.c (make_hol, hol_append): Don't assume that
17797         SIZE_MAX is a valid preprocessor constant.
17798         (__argp_basename): Change from "#ifndef _LIBC"
17799         to "#ifndef __argp_short_program_name", so that
17800         we don't compile these functions for tar.
17801
17802         More merges from coreutils.
17803         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
17804         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
17805         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
17806         * lib/addext.c: Remove; no longer needed.
17807         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
17808         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
17809         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
17810         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
17811         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
17812         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
17813         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
17814         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
17815         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
17816         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
17817         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
17818         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
17819         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
17820         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
17821         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
17822         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
17823         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
17824         Import changes from coreutils.
17825
17826 2004-08-05  Simon Josefsson  <jas@extundo.com>
17827
17828         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
17829
17830 2004-08-05  Simon Josefsson  <jas@extundo.com>
17831
17832         * m4/getsubopt.m4: New file.
17833
17834 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
17835
17836         Merge from coreutils.
17837
17838         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
17839         * m4/getcwd-path-max.m4: New files.
17840
17841         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
17842         FILESYSTEM_PREFIX_LEN ->
17843         FILE_SYSTEM_PREFIX_LEN.
17844         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
17845         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
17846         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
17847         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
17848
17849         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
17850         prerequisite modules now handle the DOS stuff.
17851         Don't check for unistd.h.
17852
17853 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
17854
17855         Merge from coreutils.
17856
17857         * lib/.gdb-history: Remove; this doesn't belong here.
17858
17859         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
17860         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
17861         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
17862         * lib/getcwd.c: New files.
17863
17864         * lib/dirname.h: Include <stdbool.h>.
17865         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
17866         for consistency with POSIX terminology.  All uses changed.
17867         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
17868         (strip_trailing_slashes): Use bool for booleans.
17869         * lib/stripslash.c (strip_trailing_slashes): Likewise.
17870
17871         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
17872         sometimes returns a positive errno value even when it succeeds.
17873         (print_errno_message) [!LIBC]: Fall back on strerror if
17874         __strerror_r fails.
17875
17876         * lib/path-concat.c (mempcpy): Don't define if a system header defines
17877         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
17878         (longest_relative_suffix): New function.
17879         (path_concat): Use it.  Assume first argument is not NULL.
17880         Port to DOS.  Omit redundant separators.
17881         Report an error instead of returning NULL.
17882         Use mempcpy instead of memcpy.
17883         (xpath_concat): Remove: not declared or used.
17884
17885         * lib/same.h: Include <stdbool.h>
17886         (same_name): Return bool, not int.
17887         * lib/same.c (same_name): Likewise.
17888         (errno): Don't declare; we assume C89 or better now.
17889
17890         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
17891         if not already defined.
17892
17893         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
17894         * lib/dup-safer.c (errno): Likewise.
17895
17896 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
17897
17898         Merge from coreutils.
17899         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
17900         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
17901         * modules/path-concat: Don't depend on strdup.
17902
17903 2004-08-03  Simon Josefsson  <jas@extundo.com>
17904
17905         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
17906         * lib/progname.h: Don't include stdbool.h.
17907
17908 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
17909
17910         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
17911         * MODULES.html.sh (func_all_modules): Remove fatal.
17912
17913 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
17914
17915         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
17916
17917 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
17918
17919         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
17920         working.
17921
17922 2004-08-02  Simon Josefsson  <jas@extundo.com>
17923
17924         * lib/getsubopt.h: New file, with comments from Bruno Haible.
17925         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
17926         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
17927
17928 2004-08-01  Simon Josefsson  <jas@extundo.com>
17929
17930         * lib/xgetdomainname.c: Include stdlib.h, for free().
17931
17932 2004-07-19  Bruno Haible  <bruno@clisp.org>
17933
17934         * MODULES.html.sh (func_all_modules): Add dummy.
17935
17936 2004-07-16  Simon Josefsson  <jas@extundo.com>
17937
17938         * modules/dummy: New file.
17939
17940 2004-07-16  Simon Josefsson  <jas@extundo.com>
17941
17942         * lib/dummy.c: New file.
17943
17944 2004-07-16  Bruno Haible  <bruno@clisp.org>
17945
17946         * lib/backupfile.h: Add extern "C" for C++.
17947         * lib/closeout.h: Likewise.
17948         * lib/copy-file.h: Likewise.
17949         * lib/findprog.h: Likewise.
17950         * lib/full-write.h: Likewise.
17951         * lib/pathname.h: Likewise.
17952         * lib/progname.h: Likewise.
17953         * lib/stpcpy.h: Likewise.
17954         * lib/stpncpy.h: Likewise.
17955         * lib/strcase.h: Likewise.
17956         * lib/strstr.h: Likewise.
17957         * lib/xalloc.h: Likewise.
17958
17959         * lib/mbswidth.h: Add extern "C" for C++.
17960         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
17961
17962 2004-07-13  Robert Millan  <robertmh@gnu.org>
17963
17964         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
17965
17966 2004-07-09  Simon Josefsson  <jas@extundo.com>
17967
17968         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
17969         failed without this.)
17970
17971 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
17972
17973         * modules/chown (Files): Add lib/fchown-stub.c, since
17974         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
17975
17976 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
17977
17978         * lib/fchown-stub.c: New file.
17979
17980 2004-06-24  Jim Meyering  <jim@meyering.net>
17981
17982         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
17983
17984 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17985
17986         * modules/argz: Omit "#include".
17987
17988         * MODULES.html.sh (func_all_modules): Add calloc, to match
17989         2004-06-01 addition of calloc module.
17990
17991 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17992
17993         * m4/argz.m4: New file, which is autoupdated from libtool.
17994
17995 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17996
17997         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
17998         libtool.
17999
18000 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
18001
18002         * config/srclist-update: Don't insist on "USA." before the
18003         close-comment, as libtool omits the period and puts the */ on a
18004         separate line.
18005         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
18006         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
18007
18008 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
18009
18010         * modules/argz: New file.
18011         * MODULES.html.sh (func_all_modules): Add argz.
18012
18013 2004-06-12  Jim Meyering  <jim@meyering.net>
18014         and  Paul Eggert  <eggert@cs.ucla.edu>
18015
18016         * modules/hash (Files): Add lib/xalloc.h.
18017         * modules/pipe (Depends-on): Add wait-process.
18018         * modules/stat (Depends-on): Add xalloc.
18019         * modules/userspec (Files): Add lib/userspec.h.
18020         * modules/xstrto
18021
18022         Upgrade from gettext-0.13.
18023         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
18024         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
18025         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
18026
18027 2004-06-10  Jim Meyering  <jim@meyering.net>
18028
18029         * lib/calloc.c: New file.
18030
18031 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
18032
18033         * lib/getdate.y (yylex): Allow space between sign and number.
18034         Problem reported by Dan Jacobson.
18035
18036 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
18037
18038         Merge from coreutils CVS.
18039
18040         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
18041         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
18042         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
18043         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
18044         xstrtol.m4: Fix copyright date and/or serial number.
18045
18046         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
18047         See if we need an fchown replacement.
18048         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
18049         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
18050         and use the replacement function if we detect either defect.
18051
18052         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
18053         gl_UTIMECMP.
18054
18055 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
18056         and  Jim Meyering  <jim@meyering.net>
18057
18058         Merge from coreutils CVS.
18059
18060         * lib/stat-macros.h: New file, with contents from file-type.h
18061         and coreutils' system.h.
18062         * lib/file-type.c: Include "stat-macros.h".
18063         * lib/file-type.h (file_type): Move all macro definitions to new file,
18064         stat-macros.h.
18065
18066         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
18067         Wrap old code with this conditional.
18068         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
18069         function that does not dereference symlinks.
18070         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
18071
18072         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
18073         dependency problems.
18074         (xreadlink): Accept new arg SIZE, for efficiency.
18075         All decls and uses changed.
18076         * lib/xreadlink.h: Include <stddef.h>, for size_t.
18077
18078         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
18079         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
18080
18081         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
18082         sysexits.h.
18083
18084 2004-06-01  Jim Meyering  <jim@meyering.net>
18085
18086         * m4/calloc.m4: New file.
18087
18088 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
18089
18090         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
18091         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
18092         Also, fix a typo in a diagnostic.
18093
18094 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
18095
18096         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
18097         or AC_FUNC_REALLOC.
18098
18099 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
18100
18101         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
18102         macros to be defined.
18103         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
18104         the allocator returns NULL because the requested size is zero.
18105
18106 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
18107
18108         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
18109         var.  Add comment explaining why libc still defines it.  This
18110         merges the following patch from glibc:
18111         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
18112
18113 2004-05-20  Andreas Schwab  <schwab@suse.de>
18114
18115         * m4/free.m4: Replace free if it not known to work, not the other
18116         way round.
18117
18118 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
18119
18120         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
18121         present in glibc since revision 1.1 of this file.
18122         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
18123         obstack_alignment_mask, obstack_alloc, obstack_base,
18124         obstack_blank, obstack_blank_fast, obstack_chunk_size,
18125         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
18126         obstack_grow0, obstack_init, obstack_int_grow,
18127         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
18128         obstack_next_free, obstack_object_size, obstack_ptr_grow,
18129         obstack_ptr_grow_fast, obstack_room): Remove declarations of
18130         nonexistent functions.
18131
18132 2004-05-18  Karl Berry  <karl@gnu.org>
18133
18134         * config/srclist.txt: break link for vasnprintf.c.
18135
18136 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
18137
18138         Port obstack to the AS/400, where pointers are 16 bytes wide and
18139         you cannot cast an integer to a valid pointer.  This patch is
18140         currently waiting to be integrated into glibc; see
18141         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
18142
18143         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
18144         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
18145         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
18146         (struct obstack): temp member is now a union of a pointer and
18147         an integer, instead of an integer.  All integer uses changed.
18148         This does not affect the physical layout of struct obstack,
18149         except on hosts (like the AS/400) where the size or alignment of
18150         void * is greater than that of ptrdiff_t.
18151         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
18152         __STDC__)]: Store temporary in pointer member of union, not
18153         integer member.
18154         * lib/obstack.c: Include <stddef.h>, for offsetof.
18155         (struct fooalign): Remove; it doesn't need a name.
18156         (union fooround): Change double to long double, and add void *.
18157         (DEFAULT_ALIGNMENT): Use offsetof to compute.
18158         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
18159         not a macro.  Hence the values are always int; so remove all
18160         casts-to-int in uses.
18161
18162 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
18163
18164         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
18165         we can get this patch merged into glibc.
18166
18167 2004-05-17  Derek R. Price  <derek@ximbiot.com>
18168             Paul Eggert  <eggert@cs.ucla.edu>
18169
18170         * m4/argp: Depend on alloca.
18171
18172 2004-05-17  Derek R. Price  <derek@ximbiot.com>
18173             Paul Eggert  <eggert@cs.ucla.edu>
18174
18175         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
18176         freecoding.
18177
18178 2004-05-17  Bruno Haible  <bruno@clisp.org>
18179
18180         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
18181         precision that consists of a '.' followed by an empty digit string.
18182         Patch by Tor Lillqvist <tml@iki.fi>.
18183
18184 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
18185
18186         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
18187         for backward compatibility with older code.  We need our own
18188         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
18189         it under some other name, and our alloca.h will define it.
18190
18191 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
18192             Derek Price  <derek@ximbiot.com>
18193
18194         * lib/alloca.c: Include <alloca.h>, to get our interface.
18195         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
18196         include <alloca.h> first.  Use C89 prototype for alloca; this
18197         requires including <stddef.h> for size_t.  Use extern "C" if C++.
18198         Use #elif for simplicity, since we can assume C89 now.
18199         Don't try to source the system alloca.h since it will not be found
18200         and to prevent recursively including its replacement.
18201         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
18202         * lib/regex.c: Likewise.
18203
18204 2004-05-16  Derek Price  <derek@ximbiot.com>
18205             Paul Eggert  <eggert@cs.ucla.edu>
18206
18207         getline cleanup.  This changes the getndelim2 API: both order of
18208         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
18209         no delimiter).
18210
18211         * lib/getline.c: Don't include stddef.h or stdio.h, since our
18212         interface does that.
18213         (getline): Always use getdelim, so that we don't have two
18214         copies of this code.
18215         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
18216         if available.
18217         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
18218         (GETNDELIM2_MAXIMUM): New macro.
18219         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
18220         instead of the old practice of delim2==0.  All callers changed.
18221         Return -1 on overflow, instead of returning junk.
18222         Do not set *linesize unless allocation succeeds.
18223         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
18224         that we include sys/types.h.
18225         * lib/getnline.h: Likewise.
18226         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
18227         (getndelim2): Reorder arguments.
18228         * lib/getnline.c (getnline, getndelim):
18229         Don't discard the NMAX argument.
18230         (getnline): Invoke getndelim, to avoid code duplication.
18231         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
18232         of (size_t) -1 by callers of the getnline family.
18233
18234 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
18235
18236         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
18237         Check for gettimeofday.
18238         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
18239         Check for settimeofday, stime.
18240
18241 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
18242
18243         * lib/nanosleep.c (suspended): Change its type from int to
18244         sig_atomic_t volatile.
18245         (first_call): Make it private to rpl_nanosleep, and have it
18246         be zero initially as that's a bit faster.
18247         (my_usleep): Round up fractional times instead of truncating them,
18248         as this is the usual meaning for 'sleep'.
18249
18250         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
18251         doesn't work.
18252         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
18253         (ENOSYS): Define if not defined.
18254         (settime): Fall back on stime if it exists and settimeofday fails.
18255         But don't bother with fallbacks if a method fails with errno == EPERM.
18256
18257 2004-05-11  Jim Meyering  <jim@meyering.net>
18258
18259         Prior to this change, the save_cwd caller required read access to the
18260         current directory on most systems (ones with the fchdir function).
18261
18262         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
18263         fails, try write-only, and finally, resort to using xgetcwd.
18264
18265 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
18266
18267         * lib/obstack.c, obstack.h: Import changes from libc.
18268
18269 2004-04-28  Bruno Haible  <bruno@clisp.org>
18270
18271         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
18272         also implicitly appends .exe to executables.
18273         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
18274         accepts Windows pathnames.
18275         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
18276         Treat Cygwin like Windows, since it now accepts Windows pathnames.
18277         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
18278         Treat Cygwin like Windows, since it now accepts Windows pathnames.
18279         Reported by Derek Robert Price <derek@ximbiot.com>.
18280
18281 2004-04-21  Karl Berry  <karl@gnu.org>
18282
18283         * config/srclist.txt (localcharset.c): break sync.
18284
18285 2004-04-20  Paul Eggert  <eggert@twinsun.com>
18286
18287         * m4/host-os.m4: Add a copyright notice.
18288
18289 2004-04-20  Jim Meyering  <jim@meyering.net>
18290
18291         Change UTILS_ to gl_ in AC_DEFINE'd names.
18292         Change utils_- and jm_-prefixed variables, too.
18293         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
18294         UTILS_FUNC_MKDIR_TRAILING_SLASH.
18295         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
18296
18297         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
18298         Don't emit trailing blanks.
18299         Also rename jm_-prefixed variables to have gl_ prefix.
18300
18301         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
18302         Also rename jm_-prefixed variables to have gl_ prefix.
18303
18304         * m4/jm-macros.m4: Reflect the renamings.
18305         * m4/prereq.m4: Likewise.
18306
18307 2004-04-20  Jim Meyering  <jim@meyering.net>
18308
18309         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
18310         memory.
18311
18312 2004-04-20  Jim Meyering  <jim@meyering.net>
18313             Bruno Haible  <bruno@clisp.org>
18314
18315         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
18316         memory when realloc fails.
18317
18318 2004-04-19  Jim Meyering  <jim@meyering.net>
18319
18320         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
18321         now that readutmp.c may call `free (0)'.
18322
18323 2004-04-19  Bruno Haible  <bruno@clisp.org>
18324
18325         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
18326         * m4/inttypes_h.m4: Likewise.
18327         * m4/stdint_h.m4: Likewise.
18328         * m4/intmax_t.m4: Likewise.
18329         * m4/uintmax_t.m4: Likewise.
18330
18331 2004-04-18  Jim Meyering  <jim@meyering.net>
18332
18333         * m4/prereq.m4: Don't forbid jm_ prefix.
18334
18335         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
18336         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
18337         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
18338         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
18339         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
18340         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
18341         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
18342         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
18343         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
18344         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
18345         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
18346         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
18347         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
18348         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
18349         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
18350         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
18351         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
18352         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
18353         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
18354
18355 2004-04-18  Jim Meyering  <jim@meyering.net>
18356
18357         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
18358         failure, don't leak memory and do call END_UTMP_ENT.
18359
18360 2004-04-16  Jim Meyering  <jim@meyering.net>
18361
18362         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
18363         coreutils' stat program.
18364         (gl_PREREQ): Don't require jm_PREREQ_STAT.
18365
18366 2004-04-11  Paul Eggert  <eggert@twinsun.com>
18367
18368         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
18369         C89.
18370         (CHAR_BIT): Remove, since we assume C89.
18371         Include <stdint.h> if available, as per current Autoconf CVS advice.
18372
18373 2004-03-31  Jim Meyering  <jim@meyering.net>
18374
18375         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
18376         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
18377         * m4/xalloc.m4: Likewise.
18378
18379 2004-03-30  Paul Eggert  <eggert@twinsun.com>
18380
18381         Merge from coreutils.
18382
18383         * m4/inttostr.m4: New file.
18384         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
18385         Require AM_STDBOOL_H and gl_TIMESPEC instead.
18386         Require gl_CLOCK_TIME.
18387         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
18388
18389 2004-03-30  Paul Eggert  <eggert@twinsun.com>
18390
18391         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
18392         not bool, to be more consistent with Unix conventions.
18393         Suggested by Bruno Haible.
18394
18395         Merge from coreutils.
18396
18397         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
18398         * lib/umaxtostr.c: New files.
18399
18400         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
18401         the usual <time.h> dance.
18402         (get_date): Change signature to support fractional time stamps.
18403         All callers changed.
18404         * lib/getdate.y: Include "getdate.h" first, as we can now
18405         assume C89 and don't need to worry about 'const'.
18406         Similarly, include "unlocked-io.h" near start, not in middle.
18407         Include <limits.h>.
18408         (textint.value): Use long int rather than int.
18409         (textint.digits): Use size_t rather than int.
18410         (BILLION, LOG10_BILLION): New constants.
18411         (parser_control): New member rel_ns.  Members day_ordinal,
18412         time_zone, month, day, hour, minutes, rel_year, rel_month,
18413         rel_day, rel_hour, rel_minutes, rel_seconds
18414         are now long int, not int.  Member seconds is now struct timespec,
18415         not int.  New member timespec_seen.  Members dates_seen, days_seen,
18416         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
18417         not int.
18418         (%union.intval): Now long int, not int.
18419         New member timespec.
18420         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
18421         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
18422         (spec): Now is a timespec or an item list.
18423         (timespec, items): New nonterminals.
18424         (time, rel, relunit, number, get_date):
18425         Add support for fractional seconds.
18426         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
18427         (gmtime, localtime, mktime): Remove decls; not needed with C89.
18428         (to_hour): First arg is now long int, not int.
18429         (to_year): Returns long int, not int.
18430         Don't treat year -70 like 70.
18431         (tm_diff): Returns long int, not int.
18432         (lookup_word): Use bool instead of int when appropriate.
18433         (yylex): Use size_t for count, not int.
18434         Detect overflow when parsing large integer constants.
18435         Add support for fractions.
18436         (get_date): Make pointers 'const' if possible.
18437         Use more-portable code to detect integer overflow.
18438         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
18439         Don't use ctime; it's not reliable if the year has >4 digits.
18440
18441         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
18442         This is for compatibility with BSD.
18443
18444         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
18445         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
18446         From coreutils' system.h.
18447
18448         * lib/userspec.c: Don't include "posixver.h".
18449         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
18450         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
18451         compatible extension.  Simplify code by removing a boolean int
18452         that was always nonzero if a string was nonnull.
18453
18454 2004-03-30  Jim Meyering  <jim@meyering.net>
18455
18456         Merge from coreutils.
18457
18458         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
18459         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
18460         on some systems one must include <grp.h> before it.
18461         Reported by Christian Krackowizer.
18462
18463 2004-03-30  Jim Meyering  <jim@meyering.net>
18464
18465         Merge from coreutils.
18466
18467         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
18468
18469         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
18470         an empty input stream.
18471
18472         * lib/readtokens.c: Include <stdbool.h>.
18473         (readtoken): Use `size_t' rather than int/long.
18474         All callers adjusted.
18475         Use `bool' rather than `int' where appropriate.
18476         Use memset rather than an explicit loop.
18477         Use x2nrealloc rather than xrealloc.
18478         Allow the use of `\0' as a delimiter.
18479         (readtokens): Likewise.
18480         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
18481
18482 2004-03-30  Jim Meyering  <jim@meyering.net>
18483
18484         * m4/realloc.m4: Remove file, since now it does no more than
18485         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
18486         the `configure.ac' section of module/realloc.
18487         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
18488
18489 2004-03-30  Bruno Haible  <bruno@clisp.org>
18490
18491         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
18492         nonnull.
18493
18494 2004-03-29  Paul Eggert  <eggert@twinsun.com>
18495
18496         Merge changes to getloadavg.c from coreutils and Emacs.
18497
18498         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
18499         Define to an expression, not to the empty string.
18500         Include cloexec.h and xalloc.h.
18501         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
18502         Use set_cloexec_flag rather than rolling our own.
18503         * lib/cloexec.c, lib/cloexec.h: New files.
18504
18505 2004-03-29  Paul Eggert  <eggert@twinsun.com>
18506
18507         * m4/cloexec.m4: New file.
18508
18509 2004-03-18  Paul Eggert  <eggert@twinsun.com>
18510
18511         * lib/getopt.h: Sync with libc CVS.
18512
18513 2004-03-18  Paul Eggert  <eggert@twinsun.com>
18514             Bruno Haible  <bruno@clisp.org>
18515
18516         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
18517         mbswidth.
18518
18519 2004-03-18  Paul Eggert  <eggert@twinsun.com>
18520             Bruno Haible  <bruno@clisp.org>
18521
18522         * lib/mbswidth.h: Include <wchar.h> only if
18523         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
18524         <wchar.h>.
18525         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
18526
18527 2004-03-09  Paul Eggert  <eggert@twinsun.com>
18528
18529         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
18530         Sync with libc CVS.
18531         * lib/getopt_int.h: New file, also synced from libc.
18532
18533 2004-03-09  Paul Eggert  <eggert@twinsun.com>
18534
18535         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
18536         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
18537         Bring back getopt.c, getopt.h, getopt1.c.
18538
18539 2004-03-07  Paul Eggert  <eggert@twinsun.com>
18540
18541         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
18542         All uses changed.  Check for sa_sigaction member; this fixes
18543         a bug first reported by Jason Andrade in
18544         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
18545
18546 2004-03-07  Paul Eggert  <eggert@twinsun.com>
18547
18548         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
18549         '#if' expressions.  Unlike the code it replaces, it does not
18550         depend on (defined _SC_PAGESIZE).  However, it does depend on
18551         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
18552         first reported by Jason Andrade in
18553         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
18554
18555 2004-02-25  Simon Josefsson  <jas@extundo.com>
18556
18557         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
18558
18559 2004-02-25  Simon Josefsson  <jas@extundo.com>
18560
18561         * lib/strdup.h: New file.
18562         * lib/strdup.c: Include it.
18563         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
18564         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
18565
18566 2004-02-23  Karl Berry  <karl@gnu.org>
18567
18568         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
18569         (from fencepost.gnu.org:/gd/gnuorg).
18570
18571 2004-02-23  Karl Berry  <karl@gnu.org>
18572
18573         * config/srclistvars.sh (GNUORG) [karl]: redefine.
18574         * config/srclist.txt: add maintain/standards documents.
18575
18576 2004-02-18  Bruno Haible  <bruno@clisp.org>
18577
18578         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
18579         Reported by Derek Robert Price <derek@ximbiot.com>.
18580
18581 2004-02-16  Karl Berry  <karl@gnu.org>
18582
18583         * config/mkinstalldirs, install-sh: update from automake.
18584
18585 2004-02-06  Karl Berry  <karl@gnu.org>
18586
18587         * m4/po.m4: update from gettext 0.14.1.
18588
18589 2004-02-06  Karl Berry  <karl@gnu.org>
18590
18591         * lib/config.charset: update from gettext 0.14.1.
18592
18593 2004-02-05  Paul Eggert  <eggert@twinsun.com>
18594
18595         Add comments and code, prompted by suggestions from Bruno Haible
18596         for sh-quote.
18597         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
18598         describing the enum quoting_style values.
18599         * lib/quotearg.c (quotearg_alloc): New function.
18600         (quotearg_buffer_restyled): Treat lone { and } as special.
18601         Treat = as special.  Work around bug with older shells
18602         that "see" a '\' that is really the 2nd byte of a multibyte char.
18603         Quote empty string with shell_quoting_style.
18604
18605 2004-02-03  Bruno Haible  <bruno@clisp.org>
18606
18607         * m4/pipe.m4: New file, from GNU gettext.
18608
18609 2004-02-03  Bruno Haible  <bruno@clisp.org>
18610
18611         * lib/pipe.h: New file, from GNU gettext.
18612         * lib/pipe.c: New file, from GNU gettext.
18613
18614 2004-01-27  Bruno Haible  <bruno@clisp.org>
18615
18616         * m4/execute.m4: New file, from GNU gettext.
18617
18618 2004-01-27  Bruno Haible  <bruno@clisp.org>
18619
18620         * lib/execute.h: New file, from GNU gettext.
18621         * lib/execute.c: New file, from GNU gettext.
18622         * lib/w32spawn.h: New file, from GNU gettext.
18623
18624 2004-01-24  Paul Eggert  <eggert@twinsun.com>
18625
18626         Merge from diffutils.
18627
18628         * lib/file-type.c (file_type): Add typed memory objects.
18629         * lib/file-type.h (S_TYPEISTMO): New macro.
18630
18631         * lib/c-stack.h (c_stack_action): Remove argv argument.
18632         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
18633         (die): Don't calculate message unless segv_action returns.
18634         (get_stack_location, min_address_from_argv, max_address_from_argv,
18635         volatile stack_base, volatile_stack_size): Remove.
18636         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
18637         that every segmentation violation is a stack overflow.  (Ouch!)
18638         See Debian bug 136249 (still outstanding) for more info about why
18639         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
18640
18641 2004-01-24  Paul Eggert  <eggert@twinsun.com>
18642
18643         Exit-status fix from coreutils.
18644
18645         Use exit_failure consistently in place of EXIT_FAILURE,
18646         so that program exit statuses are consistent on failure.
18647
18648         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
18649         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
18650         * lib/argmatch.h: Comment fix to match the above.
18651         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
18652         Now a macro referring to exit_failure, instead of a separate
18653         variable.  Include "exitfail.h" to get it.
18654         * lib/xstrtol.h: Include "exitfail.h".
18655         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
18656
18657         * lib/long-options.c (parse_long_options): Use prototype
18658         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
18659         for clarity.
18660
18661 2004-01-21  Jim Meyering  <jim@meyering.net>
18662
18663         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
18664         so as not to conflict with a different-sized __mktime_internal
18665         function in GNU libc.
18666         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
18667         Problem building statically-linked `ls' reported by Michael Brunnbauer.
18668
18669 2004-01-20  Karl Berry  <karl@gnu.org>
18670
18671         * config/config.guess: update from config.
18672
18673         * config/srclistvars.sh: GNUWWWLICENSES for karl.
18674
18675 2004-01-20  Bruno Haible  <bruno@clisp.org>
18676
18677         Safer stack allocation.
18678         * lib/setenv.c: Include allocsa.h.
18679         (alloca): Remove fallback definition.
18680         (freea): Remove macro.
18681         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
18682         instead of freea.
18683
18684 2004-01-20  Bruno Haible  <bruno@clisp.org>
18685
18686         * m4/eealloc.m4: New file, from GNU gettext.
18687
18688 2004-01-20  Bruno Haible  <bruno@clisp.org>
18689
18690         * m4/allocsa.m4: New file, from GNU gettext.
18691
18692 2004-01-20  Bruno Haible  <bruno@clisp.org>
18693
18694         * lib/xallocsa.h: New file, from GNU gettext.
18695         * lib/xallocsa.c: New file, from GNU gettext.
18696
18697 2004-01-20  Bruno Haible  <bruno@clisp.org>
18698
18699         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
18700
18701 2004-01-20  Bruno Haible  <bruno@clisp.org>
18702
18703         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
18704         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
18705         specially.
18706
18707 2004-01-20  Bruno Haible  <bruno@clisp.org>
18708
18709         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
18710         patch.
18711
18712 2004-01-20  Bruno Haible  <bruno@clisp.org>
18713
18714         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
18715
18716 2004-01-20  Bruno Haible  <bruno@clisp.org>
18717
18718         * lib/eealloc.h: New file.
18719
18720 2004-01-20  Bruno Haible  <bruno@clisp.org>
18721
18722         * lib/binary-io.h: Avoid warnings on Cygwin.
18723
18724 2004-01-20  Bruno Haible  <bruno@clisp.org>
18725
18726         * lib/allocsa.h: New file, from GNU gettext.
18727         * lib/allocsa.c: New file, from GNU gettext.
18728
18729 2004-01-18  Karl Berry  <karl@gnu.org>
18730
18731         * doc/gpl.texi, doc/lgpl.texi: new files.
18732
18733 2004-01-18  Karl Berry  <karl@gnu.org>
18734
18735         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
18736         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
18737
18738 2004-01-15  Paul Eggert  <eggert@twinsun.com>
18739
18740         Merge from coreutils.
18741
18742         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
18743         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
18744         (gl_DEFAULT_POSIX2_VERSION): Move
18745         the documentation from 'configure' into 'config.hin',
18746         so that 'configure --help' isn't burdened by it and
18747         we don't have to worry about its formatting there.
18748         Reword the documentation so that it's more succinct
18749         and can be run together into a single paragraph.
18750         * m4/same.m4 (gl_SAME): Check for pathconf.
18751
18752 2004-01-15  Paul Eggert  <eggert@twinsun.com>
18753
18754         Merge from coreutils.
18755
18756         * lib/posixver.c: Include posixver.h.
18757
18758         * lib/same.c: Include <stdbool.h>, <limits.h>.
18759         (_POSIX_NAME_MAX): Define if not defined.
18760         (MIN): New macro.
18761         (same_name): If file names are silently truncated, report
18762         that the file names are the same if they are the same after
18763         the silent truncation.
18764
18765         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
18766         conversion function.
18767         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
18768         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
18769         longer needed.
18770
18771 2004-01-15  Jim Meyering  <jim@meyering.net>
18772
18773         Merge from coreutils.
18774
18775         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
18776         if no library is required.
18777         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
18778         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
18779         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
18780         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
18781         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
18782         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
18783         value, $ac_cv_search_crypt, if it's "none required".
18784         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
18785         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
18786         not gl_FUNC_GETLOADAVG.
18787         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
18788         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
18789
18790 2004-01-15  Jim Meyering  <jim@meyering.net>
18791
18792         Merge from coreutils.
18793
18794         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
18795         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
18796         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
18797
18798         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
18799         optional configure-time default.
18800
18801         * lib/version-etc.c (version_etc_copyright): Update copyright date.
18802
18803         * lib/xreadlink.c (xreadlink): Correct outdated comment.
18804
18805 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
18806
18807         Merge from coreutils.
18808
18809         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
18810         value, $ac_cv_search_nanosleep, if it's "none required".
18811
18812 2004-01-14  Paul Eggert  <eggert@twinsun.com>
18813
18814         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
18815         with like-named macro in fnmatch.c.
18816         (EXT): Use an internal constant instead.
18817
18818         Merge fnmatch patches from glibc.
18819         * lib/fnmatch.c (mbsinit): Remove define.
18820         Add libc_hidden_ver (__fnmatch, fnmatch).
18821         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
18822         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
18823
18824 2004-01-14  Karl Berry  <karl@gnu.org>
18825
18826         * config/install-sh: update from automake.
18827
18828 2004-01-13  Karl Berry  <karl@gnu.org>
18829
18830         * config/install-sh: update from automake.
18831
18832 2004-01-09  Karl Berry  <karl@gnu.org>
18833
18834         * config/install-sh: update from automake.
18835
18836 2004-01-05  Karl Berry  <karl@gnu.org>
18837
18838         * config/config.{sub,guess}: update from config.
18839
18840 2003-12-31  Karl Berry  <karl@gnu.org>
18841
18842         * config/depcomp: update from automake.
18843
18844 2003-12-14  Karl Berry  <karl@gnu.org>
18845
18846         * lib/config.charset: update from gettext-runtime.
18847
18848 2003-12-03  Paul Eggert  <eggert@twinsun.com>
18849
18850         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
18851         Bug reported by Alfred M. Szmidt.
18852
18853 2003-12-03  Bruno Haible  <bruno@clisp.org>
18854
18855         * m4/gettext.m4: Upgrade from gettext-0.13.
18856         * m4/po.m4: Upgrade from gettext-0.13.
18857         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
18858         * m4/intmax.m4: New file, from gettext-0.13.
18859         * m4/printf-posix.m4: New file, from gettext-0.13.
18860
18861 2003-11-29  Karl Berry  <karl@gnu.org>
18862
18863         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
18864
18865 2003-11-25  Paul Eggert  <eggert@twinsun.com>
18866             Bruno Haible  <bruno@clisp.org>
18867
18868         * lib/printf-parse.h: Don't include sys/types.h.
18869         (ARG_NONE): New macro.
18870         (char_directive): Change type of *arg_index fields to size_t.
18871         * lib/printf-parse.c: Don't include sys/types.h.
18872         (SSIZE_MAX): Remove macro.
18873         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
18874         Remove unnecessary overflow check.
18875         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
18876         fields.
18877
18878 2003-11-25  Bruno Haible  <bruno@clisp.org>
18879
18880         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
18881
18882 2003-11-25  Bruno Haible  <bruno@clisp.org>
18883
18884         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
18885         gt_TYPE_SSIZE_T.
18886
18887 2003-11-24  Paul Eggert  <eggert@twinsun.com>
18888
18889         * modules/alloca: Remove dependency on xalloc.
18890
18891 2003-11-24  Paul Eggert  <eggert@twinsun.com>
18892
18893         * lib/alloca.c: Remove dependency on xalloc module.
18894         (xalloc_die): Remove.
18895         (memory_full) [!defined emacs]: New macro.
18896         [!defined emacs]: Don't include xalloc.h.
18897         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
18898         address arithmetic overflows.  Change datatypes a bit to avoid
18899         unnecessary casts.
18900
18901 2003-11-22  Jim Meyering  <jim@meyering.net>
18902
18903         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
18904         s/size/size_t/.
18905
18906 2003-11-21  Karl Berry  <karl@gnu.org>
18907
18908         * config/config.{sub,guess}: update from config.
18909
18910 2003-11-18  Karl Berry  <karl@gnu.org>
18911
18912         * config/config.{sub,guess}: update from config.
18913
18914         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
18915
18916 2003-11-17  Paul Eggert  <eggert@twinsun.com>
18917
18918         * README: Mention that S+T cannot overflow if S is the size of
18919         an existing object and T is sufficiently small.
18920
18921 2003-11-17  Jim Meyering  <jim@meyering.net>
18922
18923         On systems without utime and without a utimes function capable of
18924         dealing with a NULL struct utimbuf* argument, this utime replacement
18925         could -- in unusual circumstances -- leak a file descriptor.
18926         * lib/utime.c: Include <unistd.h> and <errno.h>.
18927         (utime_null): Be sure to close `fd' and to preserve errno.
18928         Reported by Geoff Collyer via Arnold Robbins.
18929
18930 2003-11-17  Bruno Haible  <bruno@clisp.org>
18931
18932         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
18933         (Depends-on): Add xsize.
18934
18935 2003-11-17  Bruno Haible  <bruno@clisp.org>
18936
18937         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
18938
18939 2003-11-17  Bruno Haible  <bruno@clisp.org>
18940
18941         * lib/vasnprintf.c (alloca): Remove fallback definition.
18942         (freea): Remove definition.
18943         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
18944         Reported by Paul Eggert.
18945
18946 2003-11-16  Paul Eggert  <eggert@twinsun.com>
18947             Bruno Haible  <bruno@clisp.org>
18948
18949         Protect against address arithmetic overflow.
18950         * lib/printf-args.h: Include stddef.h.
18951         (arguments): Change type of field 'count' to size_t.
18952         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
18953         'unsigned int' where appropriate.
18954         * lib/printf-parse.h: Include sys/types.h.
18955         (char_directive): Change type of *arg_index fields to ssize_t.
18956         (char_directives): Change type of fields 'count', max_*_length to
18957         size_t.
18958         * lib/printf-parse.c: Include sys/types.h and xsize.h.
18959         (SSIZE_MAX): Define fallback value.
18960         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
18961         instead of 'int' where appropriate. Check a_allocated, d_allocated
18962         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
18963         * lib/vasnprintf.c: Include xsize.h.
18964         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
18965         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
18966         overflow. Avoid wraparound when converting a width or precision from
18967         decimal to binary.
18968
18969 2003-11-16  Bruno Haible  <bruno@clisp.org>
18970
18971         Update from GNU gettext.
18972         * lib/printf-parse.c: Generalize to it can be compiled for wide
18973         strings.
18974         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
18975         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
18976         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
18977         SNPRINTF): New macros.
18978         Don't include <alloca.h> if the file is used inside libintl.
18979         (local_wcslen): New function, for Solaris 2.5.1.
18980         (VASNPRINTF): Use it instead of wcslen.
18981
18982 2003-11-16  Bruno Haible  <bruno@clisp.org>
18983
18984         * lib/xsize.h (xmax): New function.
18985         (xsum, xsum3, xsum4): Declare as "pure" functions.
18986
18987 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18988
18989         * modules/xalloc (Files): Undo latest change, since xalloc.h
18990         no longer needs SIZE_MAX or PTRDIFF_MAX.
18991
18992 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18993
18994         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
18995         gl_PTRDIFF_MAX.
18996
18997 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18998
18999         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
19000         "return", to pacify some unknown compiler.  Problem reported
19001         by Joerg Schilling.
19002
19003 2003-11-12  Paul Eggert  <eggert@twinsun.com>
19004
19005         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
19006         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
19007         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
19008         heuristic is just as accurate as far as we know, and it removes a
19009         dependency on size_max.m4 and ptrdiff_max.m4.
19010
19011 2003-11-11  Bruno Haible  <bruno@clisp.org>
19012
19013         * modules/xsize (Files): Add m4/size_max.m4.
19014         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
19015
19016 2003-11-11  Bruno Haible  <bruno@clisp.org>
19017
19018         * m4/size_max.m4: New file.
19019         * m4/ptrdiff_max.m4: New file.
19020         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
19021         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
19022         (gl_XALLOC): Invoke it.
19023
19024 2003-11-11  Bruno Haible  <bruno@clisp.org>
19025
19026         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
19027         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
19028         defined.
19029
19030 2003-11-10  Paul Eggert  <eggert@twinsun.com>
19031
19032         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
19033         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
19034         rejected some allocations of exactly SIZE_MAX - 2 bytes.
19035         From Bruno Haible.
19036         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
19037         not (size_t) -1, since it's defined here.
19038
19039 2003-11-09  Karl Berry  <karl@gnu.org>
19040
19041         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
19042
19043 2003-11-06  Paul Eggert  <eggert@twinsun.com>
19044
19045         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
19046         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
19047         Reject sizes of exactly SIZE_MAX bytes.
19048         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
19049         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
19050
19051 2003-11-05  Bruno Haible  <bruno@clisp.org>
19052
19053         * lib/xsize.h: Include limits.h, to avoid a possible collision with
19054         SIZE_MAX defined in <limits.h> on Solaris.
19055
19056 2003-11-04  Jim Meyering  <jim@meyering.net>
19057
19058         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
19059         variable names, rather than @VAR@.
19060         * modules/poll: Likewise.
19061
19062 2003-11-04  Bruno Haible  <bruno@clisp.org>
19063
19064         * modules/xsize: New file.
19065         * modules/linebreak: Depend on xsize.
19066         * MODULES.html.sh (func_all_modules): Add xsize.
19067
19068 2003-11-04  Bruno Haible  <bruno@clisp.org>
19069
19070         * m4/xsize.m4: New file.
19071
19072 2003-11-04  Bruno Haible  <bruno@clisp.org>
19073
19074         * lib/xsize.h: New file.
19075         * lib/linebreak.c: Include xsize.h.
19076         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
19077         argument for overflow.
19078         Suggested by Paul Eggert.
19079
19080 2003-11-03  Karl Berry  <karl@gnu.org>
19081
19082         * config/config.{guess,sub}: update from config.
19083
19084 2003-11-03  Jim Meyering  <jim@meyering.net>
19085
19086         * modules/userspec (lib_SOURCES): Add userspec.h.
19087         (Include): Add "userspec.h".
19088         Improve description.
19089
19090 2003-11-03  Jim Meyering  <jim@meyering.net>
19091
19092         * lib/userspec.c: Include "userspec.h".
19093         * lib/userspec.h: New file.
19094
19095 2003-11-03  Bruno Haible  <bruno@clisp.org>
19096
19097         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
19098
19099 2003-11-03  Bruno Haible  <bruno@clisp.org>
19100
19101         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
19102         available, to avoid (extremely rare) race condition.
19103         Suggested by Paul Eggert.
19104
19105 2003-11-02  Karl Berry  <karl@gnu.org>
19106
19107         * config/srclist.txt (vasprintf.c): sync broken, sigh.
19108
19109 2003-10-31  Paul Eggert  <eggert@twinsun.com>
19110
19111         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
19112         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
19113         (read_filesystem_list): Set and use me_type_malloced.
19114         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
19115         whatever the type happens to be), for brevity and consistency.
19116         Check for size calculation overflow on Alphas running OSF/1.
19117
19118 2003-10-31  Jim Meyering  <jim@meyering.net>
19119
19120         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
19121
19122         * lib/linebuffer.c: Include <string.h> for declaration of memset.
19123
19124 2003-10-30  Paul Eggert  <eggert@twinsun.com>
19125             Bruno Haible  <bruno@clisp.org>
19126
19127         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
19128         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
19129
19130 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
19131
19132         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
19133         netbsd*-gnu*.  Suggested by Robert Millan.
19134
19135 2003-10-29  Paul Eggert  <eggert@twinsun.com>
19136
19137         * modules/group-member: Depend on stdbool.
19138
19139 2003-10-29  Paul Eggert  <eggert@twinsun.com>
19140
19141         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
19142
19143 2003-10-29  Paul Eggert  <eggert@twinsun.com>
19144
19145         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
19146         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
19147         after the 'gnu' in these cases.  This fixes some bugs in the
19148         previous change, and is based on suggestions by Robert Millan.
19149
19150 2003-10-29  Paul Eggert  <eggert@twinsun.com>
19151
19152         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
19153         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
19154         no longer needed.
19155         * lib/quotearg.c (quotearg_n_options): Use it.
19156         * lib/group-member.c: Include <stdbool.h>.
19157         (free_group_info): Arg is now const *; don't free arg.
19158         (get_group_info): Now returns bool and accepts struct group_info *,
19159         rather than returning a malloc'ed struct group_info *.
19160         All uses changed.  Check for overflow in internal size calculation.
19161
19162         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
19163         rather than xmalloc/xrealloc.
19164         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
19165         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
19166         conformance bug: the old code used a pointer after freeing the
19167         storage that it addressed.
19168         * lib/hash.c (hash_initialize): Simplify the code by using
19169         xalloc_oversized rather than doing it by hand.
19170         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
19171         the buffer preserved.  Use free and xmalloc instead.
19172         * lib/quotearg.c (quotearg_n_options): Likewise.
19173         Use a simpler test for size overflow.  Don't use xalloc_oversized
19174         because unsigned int might be wider than size_t (!); this suggests
19175         that we should switch from unsigned int to size_t for slot numbers.
19176
19177 2003-10-28  Paul Eggert  <eggert@twinsun.com>
19178
19179         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
19180         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
19181         NetBSD kernels.  Requested by Richard Stallman.
19182
19183 2003-10-27  Paul Eggert  <eggert@twinsun.com>
19184
19185         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
19186         to allocate the returned structure.  Do not allocate a subarray,
19187         as x2nrealloc will do that.
19188         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
19189         instead of xnrealloc.
19190         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
19191
19192 2003-10-27  Bruno Haible  <bruno@clisp.org>
19193
19194         * lib/stdbool_.h: Better support for BeOS.
19195
19196 2003-10-26  Paul Eggert  <eggert@twinsun.com>
19197
19198         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
19199         now uses inline.
19200
19201 2003-10-26  Paul Eggert  <eggert@twinsun.com>
19202
19203         * lib/xalloc.h (xalloc_oversized): New static inline function, for
19204         callers that want to do their own size-overflow checking.  Include
19205         <stdbool.h>, since xalloc_oversized returns bool.
19206         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
19207         to use xalloc_oversized.
19208
19209         Add two functions x2realloc, x2nrealloc, for programs that grow
19210         arrays dynamically by doubling their sizes.
19211         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
19212         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
19213         New functions.
19214
19215         Port to C99 semantics for 'inline' of external functions.
19216         Bug reported by Bruno Haible.
19217         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
19218         with the old contents of xnmalloc.
19219         (xnmalloc, xmalloc): Use it.
19220         (xnrealloc_inline): New static inline function,
19221         with the old contents of xnrealloc.
19222         (xnrealloc, xrealloc): Use it.
19223
19224         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
19225         that.
19226
19227 2003-10-26  Karl Berry  <karl@gnu.org>
19228
19229         * config/srclist.txt (COPYING.DOC): no longer available from
19230         /gd/gnuorg; don't know where the ultimate source is.
19231
19232 2003-10-25  Paul Eggert  <eggert@twinsun.com>
19233
19234         Fix several address-calculation bugs in the hash modules,
19235         plus some minor code cleanup.
19236
19237         * lib/hash.h: Include <stdbool.h>, for bool.
19238         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
19239         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
19240         hash_get_n_entries, hash_get_max_bucket_length,
19241         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
19242         hash_rehash): Use size_t rather than unsigned.
19243         * lib/hash.c (struct hash_table, hash_get_n_buckets,
19244         hash_get_n_buckets_used, hash_get_n_entries,
19245         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
19246         hash_get_entries, hash_do_for_each, hash_string, is_prime,
19247         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
19248         Likewise.
19249         (SIZE_MAX): Define if not defined.
19250         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
19251         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
19252         hash_print):
19253         Use const * when possible.
19254         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
19255         (check_tuning): Fix bug: if tuning parameters were very close to
19256         0 or 1, rounding errors could have caused subscript violations.
19257         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
19258         (hash_initialize): Add 'fail:' label
19259         to free table and return NULL, and use it to simplify code.
19260         Use calloc rather than clearing the storage ourself.
19261         (hash_initialize, hash_rehash): Check for arithmetic overflow in
19262         buffer size calculations.
19263         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
19264         Include <stddef.h>, for size_t.
19265         * lib/hash-pjw.c (hash_pjw): Likewise.
19266         Switch to method described by Bruno Haible.
19267         Include <limits.h>, for CHAR_BIT.
19268         (SIZE_BITS): New macro.
19269
19270 2003-10-23  Paul Eggert  <eggert@twinsun.com>
19271
19272         * m4/getline.m4 (AM_FUNC_GETLINE):
19273         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
19274         hosts.  Problem reported by Derek Robert Price in
19275         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
19276         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
19277         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
19278
19279 2003-10-21  Paul Eggert  <eggert@twinsun.com>
19280
19281         * lib/getndelim2.c (getndelim2): When size calculation overflows,
19282         ceiling the allocation at NMAX bytes rather than silently
19283         discarding input bytes before NMAX is reached.  This makes
19284         a difference only if NMAX exceeds SIZE_MAX / 2.
19285
19286         * lib/obstack.c: Merge from glibc.
19287         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
19288         Add libc_hidden_def (_obstack_newchunk).
19289         (_obstack_free) [! defined _LIBC]: Remove.
19290         [defined _LIBC]: Make a strong alias from obstack_free, rather than
19291         a clone of the function body.
19292         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
19293         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
19294
19295         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
19296         glibc.
19297         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
19298         arg to memcpy.
19299
19300         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
19301         (obstack_ptr_grow_fast, obstack_int_grow_fast):
19302         Don't use lvalue casts, as GCC plans to remove support for them
19303         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
19304         was also present in the non-GCC version, indicating that this
19305         code had always been buggy and had never been widely used.
19306         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
19307         Use the fast variant of each macro, rather than copying the
19308         definiens of the fast variant; that way, we'll be more likely to
19309         catch future bugs in the fast variants.
19310
19311 2003-10-20  Bruno Haible  <bruno@clisp.org>
19312
19313         * modules/wait-process: New file.
19314         * MODULES.html.sh (func_all_modules): Add wait-process.
19315
19316 2003-10-20  Bruno Haible  <bruno@clisp.org>
19317
19318         * m4/wait-process.m4: New file.
19319
19320 2003-10-20  Bruno Haible  <bruno@clisp.org>
19321
19322         * lib/wait-process.h: New file, from GNU gettext.
19323         * lib/wait-process.c: New file, from GNU gettext.
19324
19325 2003-10-19  Jim Meyering  <jim@meyering.net>
19326
19327         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
19328         HPUX 10.20.
19329
19330 2003-10-18  Karl Berry  <karl@gnu.org>
19331
19332         * config/config.guess: update from config.
19333
19334 2003-10-16  Paul Eggert  <eggert@twinsun.com>
19335
19336         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
19337         (getgroups): First arg is int, not size_t.
19338         Don't let 'free' mangle errno.
19339
19340 2003-10-16  Paul Eggert  <eggert@twinsun.com>
19341
19342         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
19343
19344 2003-10-16  Karl Berry  <karl@gnu.org>
19345
19346         * config/config.{guess,sub}: update from config.
19347
19348 2003-10-16  Jim Meyering  <jim@meyering.net>
19349
19350         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
19351         memcpy.
19352
19353 2003-10-15  Paul Eggert  <eggert@twinsun.com>
19354
19355         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
19356         (SIZE_MAX): Remove.
19357         (new_exclude, add_exclude_file): Initial size no longer needs to
19358         be a power of 2.
19359         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
19360         our own address arithmetic overflow checking.
19361
19362         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
19363         (fnmatch): Do not alloca more than 2000 wide characters;
19364         instead, use malloc for large buffers.
19365         Check for address arithmetic overflow, and return -1
19366         with errno set to ENOMEM in that case.
19367         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
19368         (NEW_PATTERN): Do not alloca more than 8000 bytes;
19369         instead, return -1.  Check for address arithmetic overflow.
19370
19371 2003-10-14  Paul Eggert  <eggert@twinsun.com>
19372
19373         Handle invalid suffixes and overflow independently, so that
19374         callers can treat them independently as needed.  Fix some bugs in
19375         suffix handling, e.g., "100k@" was not diagnosed as an invalid
19376         suffix for a human-readable blocksize.  The major caller-visible
19377         change is the addition of a new
19378         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
19379         that both overflow and suffix chars were found.
19380
19381         * lib/human.c (humblock): Don't check separately for invalid suffix
19382         char; that is xstrtoumax's job (now that its bug is fixed).
19383         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
19384         INTMAX_MAX]: New macros.
19385         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
19386         TYPE_MAXIMUM): New macros.
19387         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
19388         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
19389         if overflow occurs, as it's what __strtol does and it's more useful
19390         in practice.
19391         (__xstrtol): If __strtol reports some error other than ERANGE,
19392         reflect it to the caller as LONGINT_INVALID.  If it reports
19393         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
19394         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
19395         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
19396         value.
19397         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
19398         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
19399         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
19400         [defined UINTMAX_MAX]: New macros.
19401
19402 2003-10-14  Bruno Haible  <bruno@clisp.org>
19403
19404         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
19405
19406 2003-10-14  Bruno Haible  <bruno@clisp.org>
19407
19408         * m4/sig_atomic_t: New file, from GNU gettext.
19409         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
19410
19411 2003-10-14  Bruno Haible  <bruno@clisp.org>
19412
19413         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
19414         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
19415         Also use volatile where needed.
19416
19417 2003-10-12  Paul Eggert  <eggert@twinsun.com>
19418
19419         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
19420         Change maintainer from Bruno Haible to 'all'.
19421
19422 2003-10-12  Paul Eggert  <eggert@twinsun.com>
19423
19424         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
19425
19426 2003-10-12  Paul Eggert  <eggert@twinsun.com>
19427
19428         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
19429         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
19430         and define in terms of the other primitives.
19431         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
19432         (SIZE_MAX): Define if not already defined.
19433         (array_size_overflow): New function.
19434         (xalloc_die): Abort instead of exiting if 'error' returns.
19435         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
19436         (xmalloc, xrealloc): Use them.
19437         (xcalloc): Check for address arithmetic overflow.
19438         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
19439         a bit faster than strcpy.
19440
19441 2003-10-10  Simon Josefsson  <jas@extundo.com>
19442
19443         * modules/argp (Depends-on): Add restrict and strcase.
19444
19445 2003-10-10  Simon Josefsson  <jas@extundo.com>
19446
19447         * m4/argp.m4: Add AC_C_INLINE.
19448
19449 2003-10-08  Paul Eggert  <eggert@twinsun.com>
19450
19451         Merge getpass from libc, plus a few fixes.
19452
19453         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
19454         Include <stdbool.h>.
19455         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
19456         __fsetlocking to empty.
19457         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
19458         do include <bits/libc-lock.h>.
19459         Do not include <fcntl.h>; not needed.
19460         [_LIBC]: Include <wchar.h>.
19461         (NOTCANCEL_MODE): New macro.
19462         (flockfile, funlockfile) [_LIBC]: New macros.
19463         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
19464         [!_LIBC]: New macros.
19465         (call_fclose): New function.
19466         (getpass): Use it.  Save tty stream separately; this simplifies the
19467         code and makes it more reliable if stdin happens to equal stdout.
19468         Invoke __fsetlocking on tty.
19469         Handle thread cancellation if needed.
19470         Namespace cleanup (use __tcgetattr, __getline).
19471         Use bool for Booleans.
19472         [USE_IN_LIBIO]: Handle wide streams.
19473         [!_LIBC]: Unconditionally do the fseek, since we don't know what
19474         stream might go where.
19475
19476         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
19477         doesn't have to include <stdio.h> before us.
19478         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
19479         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
19480         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
19481         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
19482         if not declared, so that we can use getpass.c code from libc without
19483         rewriting it.
19484         (flockfile, ftrylockfile, funlockfile): New macros.
19485
19486 2003-10-08  Paul Eggert  <eggert@twinsun.com>
19487
19488         * modules/getpass: Depend on stdbool.
19489
19490 2003-10-08  Paul Eggert  <eggert@twinsun.com>
19491
19492         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
19493
19494 2003-10-07  Karl Berry  <karl@gnu.org>
19495
19496         * config/config.{guess,sub}: update from config.
19497
19498 2003-10-06  Jim Meyering  <jim@meyering.net>
19499             Bruno Haible  <bruno@clisp.org>
19500
19501         This lets translators provide better translations for the
19502         "Written by ..." part of --version output.
19503         * lib/version-etc.h: Include stdarg.h.
19504         (version_etc_copyright): Declare as readonly.
19505         (version_etc): Make this function variadic with a NULL-terminated list
19506         of author name strings.
19507         (version_etc_va): New declaration.
19508         * lib/version-etc.c: Include stdarg.h, stdlib.h.
19509         (version_etc_copyright): Declare as readonly.
19510         (version_etc_va): New function. Provide a different translatable string
19511         for each possible number of authors < 10. Abbreviate when there are 10
19512         authors or more.
19513         (version_etc): Make this function variadic. Call version_etc_va.
19514         Suggestion from Gary V. Vaughan.
19515
19516         * lib/long-options.h (parse_long_options): Change prototype: the
19517         authors string is moved to the end and becomes variadic.
19518         * lib/long-options.c: Include stdarg.h.
19519         (parse_long_options): Make this function variadic, too.
19520         Call version_etc_va, not version_etc.
19521
19522 2003-10-06  Bruno Haible  <bruno@clisp.org>
19523
19524         * modules/version-etc-2: Remove file.
19525         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
19526
19527 2003-10-06  Bruno Haible  <bruno@clisp.org>
19528
19529         * modules/fatal-signal: New file.
19530         * MODULES.html.sh (func_all_modules): Add fatal-signal.
19531
19532 2003-10-06  Bruno Haible  <bruno@clisp.org>
19533
19534         * m4/fatal-signal.m4: New file.
19535         * m4/signalblocking.m4: New file, from GNU gettext.
19536
19537 2003-10-06  Bruno Haible  <bruno@clisp.org>
19538
19539         * lib/version-etc-2.h: Remove file.
19540         * lib/version-etc-2.c: Remove file.
19541
19542 2003-10-06  Bruno Haible  <bruno@clisp.org>
19543
19544         * lib/fatal-signal.h: New file, from GNU gettext.
19545         * lib/fatal-signal.c: New file, from GNU gettext.
19546
19547 2003-10-05  Paul Eggert  <eggert@twinsun.com>
19548
19549         * README: Rework advice for preventing empty .o files.
19550         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
19551         not <sys/types.h>.
19552
19553 2003-10-04  Karl Berry  <karl@gnu.org>
19554
19555         * lib/argp*: update from libc.
19556
19557 2003-10-04  Karl Berry  <karl@gnu.org>
19558
19559         * config/config.{guess,sub}: update from config.
19560
19561 2003-10-02  Bruno Haible  <bruno@clisp.org>
19562
19563         * modules/lchown (Include): Add lchown.h.
19564         * modules/time_r (Include): Use "..." syntax.
19565         * modules/xgetdomainname (Include): Add xgetdomainname.h.
19566
19567 2003-10-01  Simon Josefsson  <jas@extundo.com>
19568
19569         * MODULES.html.sh (func_all_modules): Move gethostname from section
19570         'based on' to section 'lacking' POSIX:2001.
19571
19572 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
19573
19574         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
19575         to output mode on the same stream.
19576
19577 2003-09-29  Paul Eggert  <eggert@twinsun.com>
19578
19579         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
19580         Fix arg typo in previous patch.
19581
19582 2003-09-28  Jim Meyering  <jim@meyering.net>
19583
19584         * lib/error.c: Correct cpp indentation.
19585
19586 2003-09-27  Paul Eggert  <eggert@twinsun.com>
19587
19588         * modules/free: New file.
19589
19590 2003-09-27  Paul Eggert  <eggert@twinsun.com>
19591
19592         * m4/free.m4: New file.
19593
19594 2003-09-27  Paul Eggert  <eggert@twinsun.com>
19595
19596         * lib/minmax.h (MIN, MAX)
19597         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
19598         Omit the special code that used __typeof__, since we worry that
19599         it could be more trouble than it's worth.  See:
19600         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
19601         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
19602
19603         * lib/free.c: New file.
19604
19605 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
19606
19607         Trivial fixes to Makefile.am parts of module listings.
19608         * modules/strstr: Append strstr.h to lib_SOURCES.
19609         * modules/strcase: Likewise, for strcase.h.
19610
19611 2003-09-27  Karl Berry  <karl@gnu.org>
19612
19613         * config/mkinstalldirs: update from automake.
19614
19615 2003-09-26  Paul Eggert  <eggert@twinsun.com>
19616
19617         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
19618         (error_tail): Do not loop, reallocating temporary buffer, since
19619         the output cannot contain more wide characters than the input
19620         contains bytes, the size must be big enough already.  This avoids
19621         one potential size overflow calculation.  Check for size overflow
19622         when calculating temporary buffer size.  Free temporary buffer
19623         when done, if it was allocated with malloc; this plugs a memory
19624         leak.  Remove casts from void * to pointers, that are no longer
19625         needed now that we're assuming C89 or better.
19626
19627         Merge error changes from glibc.
19628
19629         * lib/error.c, error.h: Update copyright notice header to match glibc.
19630         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
19631         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
19632         Disable cancellation while printing error.
19633         * lib/error.h: Prepend __ to parameter names.
19634
19635 2003-09-26  Jim Meyering  <jim@meyering.net>
19636
19637         * lib/error.c (error_tail): Move some declarations
19638         into inner scope where the local variables are used.
19639
19640 2003-09-26  Bruno Haible  <bruno@clisp.org>
19641
19642         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
19643         stpncpy().
19644         Don't define stpncpy through config.h; it's now done through stpncpy.h.
19645
19646 2003-09-26  Bruno Haible  <bruno@clisp.org>
19647
19648         * lib/stpncpy.h (gnu_stpncpy): New declaration.
19649         (stpncpy): Define as alias for gnu_stpncpy.
19650         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
19651
19652 2003-09-25  Simon Josefsson  <jas@extundo.com>
19653
19654         * lib/xgetdomainname.h: New file.
19655         * lib/xgetdomainname.c: New file.
19656
19657 2003-09-25  Simon Josefsson  <jas@extundo.com>
19658             Bruno Haible  <bruno@clisp.org>
19659
19660         * modules/getdomainname: New file.
19661         * modules/xgetdomainname: New file.
19662         * MODULES.html.sh (func_all_modules): Add getdomainname,
19663         xgetdomainname.
19664
19665 2003-09-25  Simon Josefsson  <jas@extundo.com>
19666             Bruno Haible  <bruno@clisp.org>
19667
19668         * m4/getdomainname.m4: New file.
19669
19670 2003-09-25  Simon Josefsson  <jas@extundo.com>
19671             Bruno Haible  <bruno@clisp.org>
19672
19673         * lib/getdomainname.h: New file.
19674         * lib/getdomainname.c: New file.
19675
19676 2003-09-25  Karl Berry  <karl@gnu.org>
19677
19678         * lib/argp-fmtstream.c, argp-help.c: update from libc.
19679
19680 2003-09-25  Karl Berry  <karl@gnu.org>
19681
19682         * config/install-sh: update from automake.
19683
19684 2003-09-25  Bruno Haible  <bruno@clisp.org>
19685
19686         * modules/version-etc-2: New file, from modules/version-etc with
19687         modifications.
19688         * MODULES.html.sh (func_all_modules): Add version-etc-2.
19689
19690 2003-09-25  Bruno Haible  <bruno@clisp.org>
19691
19692         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
19693         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
19694
19695 2003-09-24  Simon Josefsson  <jas@extundo.com>
19696
19697         * modules/xgethostname: Add xgethostname.h.
19698
19699 2003-09-24  Paul Eggert  <eggert@twinsun.com>
19700
19701         * lib/linebuffer.c (freebuffer): Don't free the argument, just
19702         the buffer associated with the argument.  Bug reported by
19703         Simon Josefsson.
19704
19705 2003-09-24  Paul Eggert  <eggert@twinsun.com>
19706
19707         * README: Document assumptions that 'int' is at least 32 bits
19708         wide, that integer arithmetic is 2's complement without overflow,
19709         that there are no holes in integer values, that adding sizes of
19710         two nonoverlapping objects can't overflow, and that all-bits-zero
19711         yields scalar zero.  Fix spelling and capitalization typos.
19712
19713 2003-09-19  Karl Berry  <karl@gnu.org>
19714
19715         * lib/argp.h: update from libc.
19716
19717 2003-09-17  Paul Eggert  <eggert@twinsun.com>
19718
19719         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
19720         to avoid spurious warnings like "AC_RUN_IFELSE was called before
19721         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
19722
19723 2003-09-17  Paul Eggert  <eggert@twinsun.com>
19724
19725         * gnulib-tool: Use "test -h", not "test -L", for portability
19726         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
19727         (tags_regexp): Remove, since \| doesn't conform to POSIX.
19728         (sed_extract_prog): Issue s commands one-by-one, rather than
19729         using \| in one s command.
19730
19731 2003-09-16  Paul Eggert  <eggert@twinsun.com>
19732
19733         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
19734         input error, instead of returning NULL the next time we are called
19735         (and therefore losing track of errno).
19736
19737 2003-09-16  Bruno Haible  <bruno@clisp.org>
19738
19739         * gnulib-tool (func_create_testdir): Warn about duplicated
19740         dependencies.
19741
19742 2003-09-15  Paul Eggert  <eggert@twinsun.com>
19743
19744         * modules/argmatch, modules/fatal, modules/obstack,
19745         modules/xalloc, modules/xgethostname: Sort dependencies by
19746         importance, not alphabetically.
19747
19748 2003-09-15  Paul Eggert  <eggert@twinsun.com>
19749
19750         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
19751         fails, so that the caller gets the proper errno.
19752
19753         * lib/readutmp.c (read_utmp): Likewise.
19754         Check for fstat error.  Close stream and free storage
19755         when failing.
19756
19757 2003-09-14  Karl Berry  <karl@gnu.org>
19758
19759         * config/srclist.txt (strdup.c): disable for c89 changes.
19760
19761 2003-09-14  Jim Meyering  <jim@meyering.net>
19762
19763         * lib/getloadavg.c: Correct cpp indentation.
19764         * lib/strdup.c: Likewise.
19765         * lib/vasnprintf.c: Likewise.
19766
19767 2003-09-14  Bruno Haible  <bruno@clisp.org>
19768
19769         * modules/fwriteerror: New file.
19770         * MODULES.html.sh (func_all_modules): Add fwriteerror.
19771
19772 2003-09-14  Bruno Haible  <bruno@clisp.org>
19773
19774         * lib/fwriteerror.h: New file.
19775         * lib/fwriteerror.c: New file.
19776
19777 2003-09-12  Paul Eggert  <eggert@twinsun.com>
19778
19779         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
19780         modules/xgethostname, modules/xalloc: Depend on exit.
19781
19782 2003-09-12  Paul Eggert  <eggert@twinsun.com>
19783
19784         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
19785
19786         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
19787         and AC_MINIX, too, so that their extensions are available.
19788
19789         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
19790         This macro has been superseded by gl_BACKUPFILE.
19791
19792         More patches to assume C89 or better.
19793
19794         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
19795
19796         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
19797         unconditionally.
19798         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
19799         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
19800         Include <string.h>, <stdlib.h> unconditionally.
19801         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
19802         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
19803         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
19804         headers or for string.h.
19805         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
19806         or strtoul.
19807
19808         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
19809         headers.
19810         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
19811         * m4/userspec.m4 (gl_USERSPEC): Likewise.
19812         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
19813         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
19814         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
19815         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
19816         memcpy, memset.
19817         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
19818         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
19819         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
19820         strtol.
19821         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
19822         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
19823         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
19824         strtoul.
19825
19826 2003-09-12  Paul Eggert  <eggert@twinsun.com>
19827
19828         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
19829         * lib/obstack.c [!defined _LIBC]: Likewise.
19830         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
19831         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
19832         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
19833
19834         More changes to assume C89 or better.
19835
19836         * lib/error.c (error_tail): Assume vprintf.
19837
19838         * lib/argmatch.c (getenv): Remove decl.
19839         * lib/progreloc.c (get_full_program_name): Define via prototype.
19840         * lib/setenv.c (clearenv): Likewise.
19841         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
19842         needed.
19843         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
19844         (malloc, memcpy): Remove decls.
19845         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
19846         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
19847         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
19848         (memcpy): Remove macro.
19849         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
19850         (__P): Remove.  All uses removed.
19851         (PTR): Remove.  All uses changed to void *.
19852         (CHAR_BIT, NULL): Remove.
19853         (spaces, zeros, memset_space, memset_zero)
19854         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
19855         Remove.
19856         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
19857         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
19858         Define with prototype.
19859         Remove now-unnecessary prototype decl.
19860         (extra_args_spec): Assume ANSI C.  All uses changed.
19861         (extra_args_spec_iso): Remove.
19862         (my_strftime, emacs_strftimeu): Define via prototype.
19863         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
19864         unconditionally.
19865         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
19866         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
19867         (strtoul, strtol): Remove decls.
19868         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
19869         LONG_MAX): Remove.
19870         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
19871         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
19872         (LOCALE_PARAM_PROTO): New macro.
19873         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
19874         (INTERNAL (strtol), strtol): Define with a prototype.
19875         (PARAMS): Remove.  All uses removed.
19876         * lib/tempname.c: Include <string.h> unconditionally.
19877         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
19878         * lib/xgethostname.c (main): Define with a prototype.
19879         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
19880         Include <stdlib.h> unconditionally.
19881         (calloc, malloc, realloc, free): Remove decls.
19882         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
19883         Include <stdlib.h> unconditionally.  Sort include file names.
19884         (strtod): Remove.
19885         (xstrtod): Define with a prototype.
19886         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
19887         (strtol, strtoul): Remove decls.
19888
19889 2003-09-11  Paul Eggert  <eggert@twinsun.com>
19890
19891         More patches to assume C89 or better.
19892         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
19893         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
19894         string.h, memchr, STDC_HEADERS.
19895
19896 2003-09-11  Paul Eggert  <eggert@twinsun.com>
19897
19898         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
19899         Include <stdlib.h>, <string.h> unconditionally.
19900         Remove now-unnecessary cast to char *.
19901         * lib/strnlen.c: Include <string.h> unconditionally.
19902         * lib/yesno.c (yesno): Define with a prototype.
19903
19904 2003-09-11  Bruno Haible  <bruno@clisp.org>
19905
19906         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
19907
19908 2003-09-10  Jim Meyering  <jim@meyering.net>
19909
19910         * lib/error.c: Correct indentation of cpp directives.
19911
19912 2003-09-10  Bruno Haible  <bruno@clisp.org>
19913
19914         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
19915         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
19916         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
19917         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
19918         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
19919         <stdlib.h> and <string.h> checks.
19920         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
19921         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
19922
19923 2003-09-10  Bruno Haible  <bruno@clisp.org>
19924
19925         * lib/strcspn.c: Include <string.h> unconditionally.
19926         * lib/strpbrk.c: Include <string.h> unconditionally.
19927         * lib/strstr.c: Include <string.h> unconditionally.
19928         * lib/unicodeio.c: Include <string.h> unconditionally.
19929         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
19930         * lib/unsetenv.c: Likewise.
19931         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
19932         * lib/yesno.c: Include <stdlib.h> unconditionally.
19933         (rpmatch): Add prototype.
19934
19935 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19936
19937         More patches to assume C89 or better.
19938         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
19939         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
19940         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
19941         or for string.h.
19942         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
19943         stdlib.h.
19944         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
19945         C headers.
19946         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
19947         string.h.
19948         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
19949         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
19950         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
19951         or for string.h.
19952         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
19953         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
19954         C headers.
19955         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
19956         memcpy.
19957         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
19958         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
19959         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
19960         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
19961         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
19962         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
19963         string.h, free.
19964         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
19965         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
19966         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
19967         C headers, or for string.h.
19968         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
19969         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
19970         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
19971         headers, memory.h, stdlib.h, string.h, strings.h.
19972         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
19973         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
19974         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
19975         strchr.
19976         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
19977         headers, memory.h, string.h.
19978         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
19979         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
19980         free.
19981         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
19982         headers.
19983         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
19984         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
19985         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
19986         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
19987         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
19988
19989 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19990
19991         More K&R removal.
19992
19993         * lib/acosl.c (main): Use a prototype.
19994         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
19995         tanl.c: Likewise.
19996
19997         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
19998
19999         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
20000         (getopt, etopt_long, getopt_long_only, _getopt_internal)
20001         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
20002         with a prototype.
20003         * lib/getopt.c (const): Remove macro.
20004         Include <string.h> unconditionally.
20005         (my_index): Remove; all uses changed to strchr.
20006         (strlen): Remove decl.
20007         (exchange): Remove forward decl; no longer needed.
20008         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
20009         Define with prototype.
20010         * lib/getopt1.c (const): Remove macro.
20011         (getopt_long, getopt_long_only, main): Define with prototype.
20012
20013         * lib/getugroups.c: Include <string.h> unconditionally.
20014
20015         * lib/getusershell.c: Include <stdlib.h> unconditionally.
20016         (getusershell, setusershell, endusershell, readname, main):
20017         Define with prototypes.
20018
20019         * lib/group-member.c: Include group-member.h first.
20020         Include <stdlib.h> unconditionally.
20021
20022         * lib/hard-locale.c: Include hard-locale.h first.
20023         Include <stdlib.h>, <string.h> unconditionally.
20024
20025         * lib/hash.c (free, malloc): Remove decls.
20026         Include <stdlib.h> unconditionally.
20027
20028         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
20029         (getenv): Do not declare.
20030
20031         * lib/idcache.c: Include <string.h> unconditionally.
20032
20033         * lib/long-options.c: Include long-options.h first, to test interface.
20034         Include <stdlib.h> unconditionally.
20035
20036         * lib/makepath.c: Include makepath.h first, to test interface.
20037         Include <stdlib.h> and <string.h> unconditionally.
20038
20039         * lib/linebuffer.c: Include <stdlib.h>.
20040         (free): Remove decl.
20041
20042         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
20043         stddef.h. rpl_malloc returns void *, not char *.
20044         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
20045         prototype.
20046
20047         * lib/md5.h: Include <limits.h> unconditionally.
20048         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
20049         (__P): Remove; all uses removed.
20050         * lib/md5.c: Include "md5.h" first.
20051         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
20052         md5_buffer, md5_process_bytes, md5_process_block):
20053         Define with prototypes.
20054         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
20055         * lib/sha.c: Include "sha.h" first.
20056         Include <stdlib.h>, <string.h> unconditionally.
20057
20058         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
20059         * lib/memcmp.c (__ptr_t): Likewise.
20060         * lib/memrchr.c (__ptr_t): Likewise.
20061         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
20062         Include <string.h> unconditionally.
20063         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
20064         * lib/memchr.c: Include <stdlib.h> unconditionally.
20065         * lib/memchr.c (LONG_MAX): Remove.
20066         * lib/memrchr.c (LONG_MAX): Likewise.
20067         * lib/memchr.c (__memchr): Define via a prototype.
20068         * lib/memrchr.c (__memrchr): Likewise.
20069         * lib/memcmp.c (__P): Remove, and remove all uses.
20070         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
20071         Remove forward decls; no longer needed.
20072         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
20073         Use types required by C89 in prototype.
20074
20075         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
20076         * lib/savedir.c: Likewise.
20077         * lib/mkdir.c (free): Remove decl.
20078         * lib/rmdir.c (rmdir): Define with a prototype.
20079         * lib/savedir.c: Include savedir.h first, to test interface.
20080
20081         * lib/mktime.c (STDC_HEADERS): Remove.
20082         Include <stdlib.h>, <string.h> unconditionally.
20083
20084         * lib/modechange.c: Include <stdlib.h> unconditionally.
20085         (malloc): Remove decl.
20086
20087         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
20088         (free): Remove decl.
20089
20090         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
20091         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
20092         (This type really should be intptr_t, but that's a C99ism.)
20093         (_obstack_memcpy): Remove: all uses changed to memcpy.
20094         Include <string.h> unconditionally.
20095         (struct obstack): Assume __STDC__ for types of members
20096         chunkfun, freefun, extra_arg.
20097         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
20098         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
20099         obstack_begin, obstack_specify_allocation,
20100         obstack_specify_allocation_with_arg, obstack_chunkfun,
20101         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
20102         Remove unprototyped decls and the macros that use them.
20103         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
20104         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
20105         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
20106         (defined __STDC__ && __STDC__)]:
20107         Remove nonprototyped code.
20108         Include <stdlib.h> unconditionally.
20109         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
20110         _obstack_allocated_p, _obstack_free, obstack_free,
20111         _obstack_memory_used, print_and_abort):
20112         Define using prototypes.
20113         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
20114         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
20115         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
20116         obstack_next_free, obstack_object_size, obstack_room) [0]:
20117         Remove unused, unprototyped code.
20118
20119         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
20120
20121         * lib/physmem.c (physmem_total, physmem_available, main): Define
20122         with prototypes.
20123
20124         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
20125         (main): Define with a prototype.
20126
20127         * lib/posixver.c (getenv): Remove decl.
20128
20129         * lib/putenv.c (malloc): Returns void *, not char *.
20130         Include <string.h> unconditionally.
20131         (strchr, memcpy, NULL): Do not define.
20132
20133         * lib/readtokens.c: Include readtokens.h first, to test interface.
20134         Include <stdlib.h>, <string.h> unconditionally.
20135         (init_tokenbuffer): Define with a prototype.
20136
20137         * lib/regex.c (PARAMS): Remove.  All uses removed.
20138         All uses of _RE_ARGS removed, too.
20139         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
20140         unconditionally.
20141         (bzero): Assume memset exists.
20142         (memcmp, memcpy, NULL): Remove.
20143         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
20144         char, or assignments to local vars of type signed char.
20145         (init_syntax_once, PREFIX(extract_number_and_incr),
20146         PREFIX(print_partial_compiled_pattern),
20147         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
20148         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
20149         PREFIX(regex_grow_registers), PREFIX(regex_compile),
20150         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
20151         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
20152         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
20153         wcs_compile_range, byte_compile_range, truncate_wchar,
20154         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
20155         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
20156         count_mbs_length, wcs_re_match_2_internal,
20157         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
20158         PREFIX(alt_match_null_string_p),
20159         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
20160         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
20161         regfree, PREFIX(extract_number)): Define with prototype.  Remove
20162         now-unnecessary declaration, if any.
20163         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
20164         regcomp, regexec):
20165         Remove now-unnecessary casts among pointer types.
20166         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
20167
20168         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
20169         (free): Remove decl.
20170
20171         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
20172
20173         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
20174         (free): Remove decl.
20175
20176         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
20177         * lib/xgetcwd.c: Likewise.
20178
20179         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
20180         (free): Remove decl.
20181
20182         * lib/strchrnul.c (strchrnul): Define with a prototype.
20183         Fix bug: c_in was not converted to char before searching.
20184
20185         The following changes are not K&R related:
20186
20187         * lib/group-member.h: Include <sys/types.h>, so that this file is
20188         self-contained.
20189         * lib/makepath.h: Likewise.
20190
20191         * lib/getusershell.c (readname, default_index, line_size, readname):
20192         Use size_t, not int, for sizes.
20193         (readname): If the size overflows, report an error instead of
20194         looping forever.
20195
20196 2003-09-09  Paul Eggert  <eggert@twinsun.com>
20197
20198         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
20199         libc.
20200
20201 2003-09-09  Paul Eggert  <eggert@twinsun.com>
20202
20203         * README: New section: portability guidelines.
20204
20205 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
20206
20207         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
20208         C89 spec.
20209
20210 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
20211
20212         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
20213
20214 2003-09-08  Paul Eggert  <eggert@twinsun.com>
20215
20216         Assume C89 or better; remove K&R cruft.
20217         A few of these changes were first proposed by Derek Robert Price
20218         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
20219
20220         * lib/addext.c: Include <string.h> unconditionally.
20221         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
20222         Don't declare getenv or malloc.
20223
20224         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
20225         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
20226         (NULL): Remove.
20227         (find_stack_direction, alloca): Use prototypes.
20228
20229         * lib/atexit.c (atexit): Define using a prototype.
20230
20231         * lib/basename.c, dirname.c, stripslash.c:
20232         Include <string.h> unconditionally.
20233
20234         * lib/bcopy.c: Include <stddef.h>.
20235         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
20236
20237         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
20238
20239         * lib/error.h (error, error_at_line, error_print_progname)
20240         [! (defined (__STDC__) && __STDC__)]: Remove decls.
20241         * lib/error.c: Include error.h first, to check interface.
20242         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
20243         (VA_START): Remove; all uses changeed to va_start.
20244         (exit, strerror): Remove decls.
20245         (error_print_progname): Prototype uncondionally.
20246         Don't include <errno.h>; no longer needed.
20247         (private_strerror): Remove.
20248         (error_tail): Always define.
20249         (error, error_at_line): Assume C89 or better; always use prototypes.
20250         * lib/fatal.c: Include "fatal.h" first, to test interface.
20251         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
20252         (VA_START): Remove; all uses changed to va_start.
20253         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
20254         this case.
20255         (exit): Remove decl.
20256         (fatal): Prototype unconditionally.  Assume va_start works.
20257         Abort at end, to pacify gcc.
20258
20259         * lib/euidaccess.c (main): Define with a prototype.
20260
20261         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
20262
20263         * lib/exitfail.c: Include <stdlib.h> unconditionally.
20264
20265         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
20266         prototypes.
20267         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
20268         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
20269         (getenv): Remove decl.
20270         (fnmatch): Define using a prototype.
20271         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
20272         (FCT): Define using a prototype.
20273
20274         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
20275
20276         * lib/gethostname.c: Include <stddef.h>.
20277         (gethostname): Define with prototype.  Length is size_t, not int.
20278
20279 2003-09-08  Paul Eggert  <eggert@twinsun.com>
20280
20281         Assume C89 or better; remove K&R cruft.
20282         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
20283         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
20284         string.h, getenv, malloc.
20285         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
20286         headers.
20287         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
20288         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
20289         do not check for strerror.
20290         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
20291         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
20292         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
20293         do not check for doprnt or vprintf.
20294         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
20295         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
20296
20297 2003-09-08  Paul Eggert  <eggert@twinsun.com>
20298
20299         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
20300         getversion.c should have been removed then, but was accidentally
20301         preserved.
20302
20303         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
20304         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
20305
20306 2003-09-08  Karl Berry  <karl@gnu.org>
20307
20308         * config/config.sub, config.guess, srclistvars.sh: update from savannah
20309                 config, forget about prep.
20310
20311         * config/depcomp, missing: update from automake.
20312
20313 2003-09-07  Paul Eggert  <eggert@twinsun.com>
20314
20315         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
20316         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
20317
20318 2003-09-07  Paul Eggert  <eggert@twinsun.com>
20319
20320         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
20321         copy_tm_result.  Bug reported by Simon Josefsson in
20322         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
20323
20324 2003-09-06  Paul Eggert  <eggert@twinsun.com>
20325
20326         * m4/time_r.m4: New file.
20327         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
20328         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
20329         is. Check for timegm declaration.
20330         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
20331         Do not check for gmtime_r.
20332         Replace mktime if __mktime_internal does not exist and if mktime
20333         hasn't been replaced already.
20334
20335 2003-09-06  Paul Eggert  <eggert@twinsun.com>
20336
20337         * lib/time_r.c, lib/time_r.h: New files.
20338
20339         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
20340         __localtime_r.
20341         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
20342         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
20343
20344         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
20345         __gmtime_r.
20346         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
20347         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
20348         Include <time_r.h>.
20349
20350         * lib/timegm.c: Switch to glibc implementation, with the following
20351         changes:
20352         [defined HAVE_CONFIG_H]: Include <config.h>.
20353         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
20354         (__mktime_internal) [!defined _LIBC]: New decl.
20355         (__gmtime_r) [!defined _LIBC]: New macro and function.
20356         (timegm): Use a prototype, since gnulib assumes C89.
20357         Do not bother declaring tmp to be const, as it's not really usefu.
20358         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
20359         (timegm): Declare only if HAVE_DECL_TIMEGM.
20360
20361 2003-09-06  Paul Eggert  <eggert@twinsun.com>
20362
20363         * MODULES.html.sh (func_all_modules): Add time_r.
20364         * modules/time_r: New file.
20365         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
20366         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
20367
20368 2003-09-03  Paul Eggert  <eggert@twinsun.com>
20369
20370         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
20371         Bug reported by Lute Kamstra in
20372         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
20373
20374         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
20375         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
20376         course with correspondingly smaller numbers for tomorrow and
20377         yesterday.  From Tadayoshi Funaba.  Originally installed into
20378         sh-utils on 1999-08-07, but the patch got lost (I guess during the
20379         coreutils merge?).
20380
20381 2003-08-31  Simon Josefsson  <jas@extundo.com>
20382
20383         * modules/timegm: New file.
20384         * MODULES.html.sh (func_all_modules): Add timegm.
20385
20386 2003-08-31  Simon Josefsson  <jas@extundo.com>
20387
20388         * m4/timegm.m4: New file.
20389
20390 2003-08-31  Simon Josefsson  <jas@extundo.com>
20391
20392         * lib/timegm.h: New file.
20393         * lib/timegm.c: New file.  Based on
20394         wget-1.8.2/src/http.c:mktime_from_utc.
20395
20396 2003-08-31  Karl Berry  <karl@gnu.org>
20397
20398         * lib/argp.h: update from libc.
20399
20400 2003-08-28  Bruno Haible  <bruno@clisp.org>
20401
20402         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
20403         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
20404         followed by '#define fnmatch fnmatch_posix' gives an error.
20405
20406 2003-08-28  Bruno Haible  <bruno@clisp.org>
20407
20408         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
20409         warning on QNX, which defines O_BINARY to 000000.
20410
20411 2003-08-27  Jim Meyering  <jim@meyering.net>
20412
20413         * m4/mkstemp.m4: Require that the system mkstemp be able to create
20414         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
20415         would fail after 32.  Reported by Danny Levinson.  Details here:
20416         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
20417
20418 2003-08-24  Bruno Haible  <bruno@clisp.org>
20419
20420         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
20421         MSVC7 <stdio.h> is included later.
20422
20423 2003-08-22  Simon Josefsson  <jas@extundo.com>
20424
20425         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
20426
20427 2003-08-20  Karl Berry  <karl@gnu.org>
20428
20429         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
20430
20431 2003-08-20  Bruno Haible  <bruno@clisp.org>
20432
20433         * modules/progname: New file.
20434         * MODULES.html.sh (func_all_modules): Add progname.
20435
20436 2003-08-20  Bruno Haible  <bruno@clisp.org>
20437
20438         * lib/progname.h: New file, from GNU gettext.
20439         * lib/progname.c: New file, from GNU gettext.
20440         * lib/progreloc.c: New file, from GNU gettext.
20441
20442 2003-08-19  Jim Meyering  <jim@meyering.net>
20443
20444         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
20445         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
20446
20447 2003-08-19  Bruno Haible  <bruno@clisp.org>
20448
20449         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
20450         more.
20451
20452 2003-08-19  Bruno Haible  <bruno@clisp.org>
20453
20454         * lib/xstrdup.c: Assume <string.h> exists.
20455
20456 2003-08-18  Paul Eggert  <eggert@twinsun.com>
20457
20458         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
20459         in makefile rules.
20460
20461 2003-08-18  Jim Meyering  <jim@meyering.net>
20462
20463         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
20464         * m4/lib-ld.m4: Likewise.
20465
20466 2003-08-18  Jim Meyering  <jim@meyering.net>
20467
20468         * lib/setenv.h: Indent nested cpp directive.
20469         * lib/vasnprintf.c: Remove trailing blanks.
20470
20471 2003-08-17  Simon Josefsson  <jas@extundo.com>
20472
20473         * modules/xstrndup: New file.
20474         * MODULES.html.sh (func_all_modules): Add xstrndup.
20475
20476 2003-08-17  Simon Josefsson  <jas@extundo.com>
20477
20478         * modules/argp: Fix autoconf macro name. Add more dependencies.
20479
20480 2003-08-17  Simon Josefsson  <jas@extundo.com>
20481
20482         * m4/xstrndup.m4: New file.
20483
20484 2003-08-17  Simon Josefsson  <jas@extundo.com>
20485
20486         * m4/argp.m4: New file.
20487
20488 2003-08-17  Simon Josefsson  <jas@extundo.com>
20489             Bruno Haible  <bruno@clisp.org>
20490
20491         * lib/xstrndup.h: New file.
20492         * lib/xstrndup.c: New file.
20493
20494 2003-08-17  Bruno Haible  <bruno@clisp.org>
20495
20496         * modules/strndup (Files, Include): Add lib/strndup.h.
20497
20498 2003-08-17  Bruno Haible  <bruno@clisp.org>
20499
20500         * modules/euidaccess (Files): Add lib/euidaccess.h.
20501
20502 2003-08-17  Bruno Haible  <bruno@clisp.org>
20503
20504         * lib/strndup.h: New file.
20505
20506 2003-08-17  Bruno Haible  <bruno@clisp.org>
20507
20508         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
20509         like AC_GNU_SOURCE.
20510         * modules/extensions (configure.ac): Comment out the invocation of
20511         gl_USE_SYSTEM_EXTENSIONS.
20512
20513 2003-08-16  Paul Eggert  <eggert@twinsun.com>
20514
20515         Merges from coreutils, etc.
20516         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
20517         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
20518         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
20519         fixing a typo.
20520         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
20521         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
20522
20523 2003-08-16  Paul Eggert  <eggert@twinsun.com>
20524
20525         Document merge from coreutils.
20526         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
20527         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
20528         * modules/utime: Add m4/utimes-null.m4.
20529
20530 2003-08-16  Paul Eggert  <eggert@twinsun.com>
20531
20532         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
20533         space, undoing this 2003-08-12 change:
20534         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
20535
20536 2003-08-16  Paul Eggert  <eggert@twinsun.com>
20537
20538         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
20539         strtoul.c from libc, undoing this 2003-08-12 change:
20540         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
20541
20542 2003-08-16  Jim Meyering  <jim@meyering.net>
20543
20544         Merges from coreutils.
20545         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
20546         prefix.  Adjust cache variables similarly.  Create 500 rather than
20547         just 300 files, to exercise bug on Darwin6.5, too.
20548         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
20549         $missing_dir.
20550         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
20551         AM_SYS_POSIX_TERMIOS.
20552         Reported by mkc@mathdogs.com.
20553         Also change use of $am_cv_sys_posix_termios
20554         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
20555         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
20556         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
20557         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
20558         in /proc/mounts until it finds one with matching device number.  This
20559         is unnecessary when the FILE argument *is* a mount point.  No stat call
20560         is necessary in that case.  So, disable the statvfs-testing code on
20561         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
20562         as RedHat bug# 84846.
20563         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
20564         to 1MB, so as not to render systems with no stack size limit (e.g.,
20565         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
20566         Include <unistd.h>.  On some systems,
20567         it is required for the definition of _SC_PAGESIZE.
20568
20569 2003-08-16  Jim Meyering  <jim@meyering.net>
20570
20571         Merge from coreutils.
20572         * lib/xstrtoimax.c: #else #if -> #elif.
20573         * lib/xstrtoumax.c: Likewise.
20574
20575 2003-08-16  Jim Meyering  <jim@meyering.net>
20576
20577         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
20578         * m4/utimes.m4: Removed.
20579         * m4/utimes-null.m4: Renamed from utimes.m4.
20580
20581         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
20582         to 1MB, so as not to render systems with no stack size limit (e.g.,
20583         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
20584         Include <unistd.h>.  On some systems,
20585         it is required for the definition of _SC_PAGESIZE.
20586
20587 2003-08-16  Jim Meyering  <jim@meyering.net>
20588         and Paul Eggert  <eggert@cs.ucla.edu>
20589
20590         Merges from coreutils, etc.
20591
20592         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
20593         using the latest version from cvs.  This avoids problems with #line
20594         directives using a vendor (Sun) compiler.
20595         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
20596         Don't set GETGROUPS_LIB here; now it's
20597         done via getgroups.m4's wrapper function.
20598         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
20599         rather than just in sh-util/configure.in, so that the
20600         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
20601         same.
20602         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
20603         AC_FUNC_GETLOADAVG where to find getloadavg.c.
20604         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
20605         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
20606         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
20607         Remove code that is now done by the newly-required macros.
20608         Append $(EXEEXT) to DF_PROG.
20609         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
20610         Do not invoke or require the following here,
20611         since prereq.m4 or some gnulib .m4 now does this for us:
20612         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
20613         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
20614         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
20615         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
20616         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
20617         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
20618         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
20619         AC_FUNC_OBSTACK.
20620         Do not replace the following functions, as this is now the job
20621         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
20622         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
20623         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
20624         atexit getpass, strdup, getpagesize.
20625         Replace 'raise'.
20626         Do not check for the following functions, as this is now the job
20627         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
20628         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
20629         setregid.
20630         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
20631         Check for sys/sysctl.h.
20632         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
20633         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
20634         of checking for ssize_t ourselves.
20635
20636         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
20637         Require every macro that gnulib/modules/* suggests for us.
20638         (jm_PREREQ_ADDEXT): New macro.
20639         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
20640         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
20641
20642         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
20643         (gl_PHYSMEM): Use it.
20644         Also check for `table' function.
20645         Check for new headers and functions.
20646         Add check for sys/sysmp.h.
20647         With suggestions from Kaveh Ghazi.
20648         Ignore headers that are present but cannot be compiled.  This
20649         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
20650         C 5.4.
20651
20652 2003-08-15  Paul Eggert  <eggert@twinsun.com>
20653
20654         Document merge from coreutils.
20655         * modules/userspec: Depend on posixver.
20656         * modules/strftime: Depend on tzset.
20657
20658 2003-08-15  Paul Eggert  <eggert@twinsun.com>
20659
20660         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
20661         rather than tab, after '#' in shell-script copyright notices.
20662         Suggested by Bruno Haible.
20663
20664 2003-08-15  Paul Eggert  <eggert@twinsun.com>
20665
20666         * config/srclist-update: Use three spaces, rather than tab, after '#'
20667         in shell-script copyright notices.  Suggested by Bruno Haible.
20668         Remove unnecessary parenthesization in regular expression.
20669
20670 2003-08-15  Jim Meyering  <jim@meyering.net>
20671
20672         Merge from coreutils.
20673         * lib/xgethostname.c: Include <stdlib.h>.
20674         (xghostname): Don't exit for anything other than memory-related
20675         failure; just return NULL.
20676         * lib/userspec.c: Include "posixver.h".
20677         (parse_user_spec): Accept `.' as a separator only
20678         in pre-POSIX-200112 mode.
20679         * lib/strtoimax.c: Use #elif rather than #else #if.
20680         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
20681         Remove function, now that we can rely on a working tzset function.
20682         [!_LIBC]: Ensure that the required autoconf test has been run.
20683         [!defined _NL_CURRENT && HAVE_STRFTIME]:
20684         Use underlying_strftime for %r.
20685         * lib/sha.c: Merge in some clean-up and optimization changes from
20686         glibc.
20687         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
20688         Ensure that it is a multiple of 64.
20689         Rearrange loop exit tests so as to avoid performing an
20690         additional fread after encountering an error or EOF.
20691         * lib/realloc.c: Update copyright date.
20692
20693 2003-08-15  Jim Meyering  <jim@meyering.net>
20694         and Paul Eggert  <eggert@twinsun.com>
20695
20696         Merge from coreutils.
20697         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
20698         member but strut utmpx does not.  Needed for AIX 4.3.3.
20699         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
20700
20701 2003-08-15  Jim Meyering  <jim@meyering.net>
20702         and Paul Eggert  <eggert@cs.ucla.edu>
20703
20704         Merges from coreutils, etc.
20705         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
20706         Require gl_FUNC_TZSET_CLOBBER.
20707         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
20708         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
20709         members.
20710
20711 2003-08-14  Paul Eggert  <eggert@twinsun.com>
20712
20713         Help the merge from coreutils.
20714         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
20715         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
20716         * m4/tzset.m4: Use it too.
20717
20718 2003-08-14  Paul Eggert  <eggert@twinsun.com>
20719
20720         * modules/tzset: New file.
20721
20722 2003-08-14  Jim Meyering  <jim@meyering.net>
20723
20724         Merges from coreutils.
20725         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
20726         variable names, rather than @FNMATCH_H@.
20727         * modules/alloca: Likewise for $(ALLOCA_H).
20728
20729         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
20730         the three copies of the literal target, `fnmatch.h'.
20731         * modules/alloca (alloca.h): Likewise.
20732
20733 2003-08-14  Jim Meyering  <jim@meyering.net>
20734
20735         Merge from coreutils.
20736         * m4/tzset.m4: New file.
20737         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
20738         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
20739         otherwise, AIX 5.1 systems would end up using the latter.
20740         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
20741         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
20742         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
20743         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
20744
20745 2003-08-14  Jim Meyering  <jim@meyering.net>
20746
20747         Merge from coreutils.
20748         * lib/obstack.h: Whitespace changes.
20749         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
20750         and xcalloc return values.
20751         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
20752         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
20753         hang on OSF/1 5.1 for DIR on both local and remote file systems.
20754         Reported by (and fix confirmed by) Nelson H. F. Beebe.
20755         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
20756         error from mntctl.
20757         Use mntctl's return value to drive the entry-processing loop, since
20758         we can't rely on the value of the vmt_length member in the last
20759         entry.  On some systems doing so could result in exhausting
20760         virtual memory.  Based in part on a patch from Mike Jetzer.
20761
20762 2003-08-14  Jim Meyering  <jim@meyering.net>
20763         and Paul Eggert  <eggert@twinsun.com>
20764
20765         Merges from coreutils, plus other fixes.
20766         * lib/physmem.c: Merge in portability changes from gcc/libiberty
20767         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
20768         for credits and details.  Thanks to Kaveh Ghazi for helping
20769         to keep these files in sync.
20770         (ARRAY_SIZE): Define it.
20771         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
20772         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
20773         (memcasecmp): Don't assume size_t fits in unsigned int.
20774         Remove casts and duplicate code.
20775         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
20776         (memcpy): Remove definition.
20777         Merge in some clean-up and optimization changes from glibc.
20778         [BLOCKSIZE]: Move definition to top of file.
20779         Ensure that it is a multiple of 64.
20780         Rearrange loop exit tests so as to avoid performing an
20781         additional fread after encountering an error or EOF.
20782         * lib/md5.h (md5_uintptr): Define.
20783         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
20784         return to the initial working directory.  Preserve errno
20785         for caller.
20786         * lib/idcache.c: Include "xalloc.h".
20787         (xmalloc, xrealloc): Remove decls.
20788         (getuser): Remove casts no longer required in C89.
20789         * lib/human.c: Include stdio.h, for sprintf.
20790         * lib/group-member.c: Include "xalloc.h".
20791         (xmalloc, xrealloc): Remove decls.
20792         (get_group_info): Remove casts no longer required in C89.
20793         * lib/getusershell.c (readname): Remove casts no longer required in
20794         C89.
20795         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
20796         * lib/getline.c: Whitespace fix, from coreutils.
20797
20798 2003-08-13  Paul Eggert  <eggert@twinsun.com>
20799
20800         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
20801         Check for isascii.
20802
20803         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
20804         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
20805         Undo previous (whitespace-only) change.
20806
20807 2003-08-13  Paul Eggert  <eggert@twinsun.com>
20808
20809         * lib/exclude.c: Include <ctype.h>
20810         (IN_CTYPE_DOMAIN): New macro.
20811         (is_space): New fn.
20812         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
20813         and empty lines.
20814
20815         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
20816         Undo previous (whitespace-only) change.
20817
20818 2003-08-13  Paul Eggert  <eggert@twinsun.com>
20819
20820         * config/srclist-update: Change update back to the old behavior,
20821         leaving whitespace alone.  Use one 'sed' command rather than a
20822         pipeline.
20823         (fixlicense): Now a variable, not a function.
20824         (remove_trailing_blanks): Remove.
20825         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
20826         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
20827         Undo previous (whitespace-only) change.
20828
20829 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20830
20831         Merge from coreutils.
20832         * modules/euidaccess: Add lib_SOURCES, include for new
20833         file euidaccess.h
20834
20835 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20836
20837         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
20838         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
20839         Normalize leading white space and remove trailing white space.
20840
20841         Merge from coreutils
20842         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
20843
20844         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
20845         0.12.1.  These files are now being upgraded automatically by
20846         ../config/srclist-update.
20847
20848 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20849
20850         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
20851         Normalize leading white space and remove trailing white space.
20852         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
20853         notice, as per ../config/srclist-update.
20854
20855         Merge from coreutils.
20856         * lib/euidaccess.h: New file.
20857         * lib/euidaccess.c: Include it.
20858         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
20859         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
20860         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
20861
20862 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20863
20864         * config/srclist-update: Add copyright notice.
20865         (remove_id_lines, remove_trailing_blanks): New constants.
20866         (fixfile): Use them to normalize spacing a bit in copied files.
20867         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
20868         Normalize leading white space and remove trailing white space.
20869
20870         * config/texinfo.tex: Sync with texinfo.
20871
20872         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
20873         strtoul.c from libc, to merge coreutils whitespace changes.
20874
20875         * config/srclist.txt: Get the following m4 files from gettext:
20876         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
20877         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
20878         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
20879         wint_t.m4.
20880
20881 2003-08-12  Karl Berry  <karl@gnu.org>
20882
20883         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
20884         been made.
20885
20886 2003-08-11  Paul Eggert  <eggert@twinsun.com>
20887
20888         * modules/gnu-source, m4/gnu-source.m4:
20889         Remove; we're assuming Autoconf 2.54 or later now.
20890         Suggested by Bruno Haible.
20891         * MODULES.html.sh (func_all_modules): Remove gnu-source.
20892
20893 2003-08-11  Bruno Haible  <bruno@clisp.org>
20894
20895         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
20896
20897 2003-08-11  Bruno Haible  <bruno@clisp.org>
20898
20899         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
20900         (vasnprintf): Use it instead of wcslen.
20901
20902 2003-08-11  Bruno Haible  <bruno@clisp.org>
20903
20904         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
20905         value to ensure that _Bool promotes to int. Use #define for _Bool when
20906         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
20907
20908 2003-08-10  Karl Berry  <karl@gnu.org>
20909
20910         * lib/regex.h: update from libc (whitespace fix).
20911
20912 2003-08-09  Paul Eggert  <eggert@twinsun.com>
20913
20914         Merge some files from coreutils.  These changes were
20915         originally made by Jim Meyering.
20916         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
20917         many older Unixes require this.
20918         * lib/alloca.c (alloca): Remove cast to argument of free;
20919         no longer needed in C89.
20920         * lib/alloca_.h, regex.h: Fix white space to match
20921         what GNU indent does.
20922
20923 2003-08-09  Paul Eggert  <eggert@twinsun.com>
20924
20925         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
20926         apparently Emacs's Unicode mode got confused before my 2003-08-05
20927         checkin.
20928
20929 2003-08-08  Paul Eggert  <eggert@twinsun.com>
20930
20931         * m4/extensions.m4: New file.
20932         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
20933         Require gl_USE_SYSTEM_EXTENSIONS.
20934         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
20935         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
20936
20937 2003-08-08  Paul Eggert  <eggert@twinsun.com>
20938
20939         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
20940         * modules/extensions, modules/gnu-source: New files.
20941         * modules/timespec, modules/unlocked-io: Depend on extensions.
20942
20943 2003-08-07  Paul Eggert  <eggert@twinsun.com>
20944
20945         * modules/restrict: New file.
20946         * MODULES.html.sh (func_all_modules): Add restrict.
20947         * modules/regex: Depend on restrict.
20948
20949 2003-08-07  Paul Eggert  <eggert@twinsun.com>
20950
20951         * m4/restrict.m4: New file.
20952         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
20953
20954 2003-08-07  Bruno Haible  <bruno@clisp.org>
20955
20956         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
20957         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
20958
20959 2003-08-07  Bruno Haible  <bruno@clisp.org>
20960
20961         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
20962         makes the module 'getndelim2' compatible with the module 'getline'.
20963
20964 2003-08-05  Paul Eggert  <eggert@twinsun.com>
20965
20966         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
20967         byte with "\201" to avoid glitches when editing that source file
20968         with multi-gnome-terminal.
20969
20970 2003-08-05  Paul Eggert  <eggert@twinsun.com>
20971
20972         * lib/bumpalloc.h: Remove.
20973
20974 2003-08-05  Paul Eggert  <eggert@twinsun.com>
20975
20976         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
20977         * modules/bumpalloc: Remove.
20978
20979 2003-08-04  Paul Eggert  <eggert@twinsun.com>
20980
20981         * lib/getloadavg.c: Change copyright notice and spacing to conform to
20982         GNU coding style.
20983
20984         Merge from coreutils.
20985         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
20986         1. From glibc.
20987         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
20988         from Karl Berry, implemented by Jim Meyering.
20989         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
20990         from Dmitry V. Levin.
20991         Remove anachronistic cast of xrealloc.
20992         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
20993         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
20994         type. Otherwise, it wouldn't compile with at least /bin/cc on
20995         ymp-cray-unicos9.0.2.X.
20996         Combine two mostly-identical uses of alloca into one.
20997         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
20998
20999 2003-08-04  Dave Love  <d.love@dl.ac.uk>
21000
21001         [From Emacs.]
21002
21003         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
21004         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
21005         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
21006         obsolete NLIST_NAME_UNION.
21007         [__GNU__]: Undef BSD and FSCALE.
21008         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
21009
21010 2003-08-03  Paul Eggert  <eggert@twinsun.com>
21011
21012         * lib/stdbool_.h (_Bool): Make it signed char, instead of
21013         an enum type, so that it's guaranteed to promote to int.  See:
21014         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
21015
21016 2003-08-03  Karl Berry  <karl@gnu.org>
21017
21018         * config/depcomp: update from automake.
21019
21020 2003-07-31  Paul Eggert  <eggert@twinsun.com>
21021
21022         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
21023         (strerror): Don't assume that a printable int fits in 14 bytes.
21024
21025 2003-07-31  Bruno Haible  <bruno@clisp.org>
21026
21027         * modules/getpass-gnu: New file.
21028         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
21029
21030 2003-07-31  Bruno Haible  <bruno@clisp.org>
21031
21032         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
21033
21034 2003-07-24  Karl Berry  <karl@gnu.org>
21035
21036         * config/missing: update from automake.
21037
21038 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
21039             Bruno Haible  <bruno@clisp.org>
21040
21041         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
21042         * lib/getline.c (getline, getdelim): Likewise.
21043         Remove _GNU_SOURCE define; now it's defined in config.h through
21044         m4/getline.m4.
21045
21046 2003-07-23  Karl Berry  <karl@gnu.org>
21047
21048         * config/config.sub: update from prep.
21049
21050 2003-07-22  Paul Eggert  <eggert@twinsun.com>
21051
21052         * modules/xalloc (Depends-on): Add exitfail.
21053         * modules/xmemcoll: Likewise.
21054
21055 2003-07-22  Paul Eggert  <eggert@twinsun.com>
21056
21057         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
21058         over-parenthesization in macros.
21059
21060         Sync with coreutils.
21061
21062         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
21063         required by C99.
21064
21065         Use `exit_failure' for xalloc and xmemcoll instead of their own
21066         private exit-failure variables.
21067         * lib/xalloc.h (xalloc_exit_failure): Remove.
21068         * lib/xmalloc.c: Likewise.  Include exitfail.h.
21069         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
21070         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
21071         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
21072         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
21073
21074 2003-07-20  Jim Meyering  <jim@meyering.net>
21075
21076         * modules/closeout (Depends-on): Add exitfail.
21077         Suggestion from Bruno Haible.
21078
21079 2003-07-19  Karl Berry  <karl@gnu.org>
21080
21081         * config/config.sub: update from prep.
21082
21083 2003-07-18  Paul Eggert  <eggert@twinsun.com>
21084
21085         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
21086         Remove.
21087         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
21088         to test that it can stand by itself.  Include "exitfail.h".
21089         Clients should set exit_failure instead.
21090         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
21091
21092 2003-07-18  Bruno Haible  <bruno@clisp.org>
21093
21094         * modules/getndelim2: New file.
21095         * modules/getline: Share files with module getndelim2.
21096         * modules/getnline: Depend on getndelim2 instead of sharing files with
21097         it. Add getnline.c to lib_SOURCES.
21098         * MODULES.html.sh (func_all_modules): Add getndelim2.
21099
21100 2003-07-18  Bruno Haible  <bruno@clisp.org>
21101
21102         * m4/getndelim2.m4: New file.
21103         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
21104         invoke gl_PREREQ_GETNDELIM2.
21105         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
21106         gl_PREREQ_GETNDELIM2.
21107         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
21108         gl_GETNDELIM2.
21109
21110 2003-07-18  Bruno Haible  <bruno@clisp.org>
21111
21112         * lib/getndelim2.h: New file.
21113         * lib/getndelim2.c: Make into a module of its own. Include config.h,
21114         getndelim2.h.
21115         (getndelim2): Make non-static. Change return type to ssize_t.
21116         * lib/getline.h: Change argument names.
21117         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
21118         * lib/getnline.c: Include getndelim2.h.
21119
21120 2003-07-18  Andreas Schwab  <schwab@suse.de>
21121
21122         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
21123
21124 2003-07-17  Karl Berry  <karl@gnu.org>
21125
21126         * config/config.sub: update from prep.
21127
21128 2003-07-17  Bruno Haible  <bruno@clisp.org>
21129
21130         * modules/getnline: New file.
21131         * modules/getline: Add lib/getndelim2.c to source file list.
21132         * MODULES.html.sh (func_all_modules): Add getnline.
21133
21134 2003-07-17  Bruno Haible  <bruno@clisp.org>
21135
21136         * m4/getnline.m4: New file.
21137
21138 2003-07-17  Bruno Haible  <bruno@clisp.org>
21139
21140         * m4/Makefile.am.in: Remove file.
21141         * m4/Makefile.am: Remove file.
21142         * m4/Makefile.in: Remove file.
21143
21144 2003-07-17  Bruno Haible  <bruno@clisp.org>
21145
21146         * lib/getnline.h: New file.
21147         * lib/getnline.c: New file.
21148         * lib/getndelim2.c: New file, extracted from getline.c.
21149         (getndelim2): Renamed from getdelim2, with added nmax argument.
21150         * lib/getline.c: Include getndelim2.c.
21151         (getdelim2): Moved out to getndelim2.c.
21152         (getline, getdelim): Update.
21153
21154 2003-07-17  Bruno Haible  <bruno@clisp.org>
21155
21156         * lib/Makefile.am: Remove file.
21157         * lib/Makefile.in: Remove file.
21158
21159 2003-07-17  Bruno Haible  <bruno@clisp.org>
21160
21161         * configure.in: Remove file.
21162         * Makefile.in: Remove file.
21163
21164 2003-07-17  Bruno Haible  <bruno@clisp.org>
21165
21166         * MODULES.html.sh: Put the </BODY> right before </HTML>.
21167
21168 2003-07-16  Karl Berry  <karl@gnu.org>
21169
21170         * config/srclist-update: was running fixlicense twice, which caused
21171                 texinfo.tex to be nullified for some reason.  Simplify,
21172                 $gplsrc is no longer needed as far as I can see?
21173
21174 2003-07-16  Jim Meyering  <jim@meyering.net>
21175
21176         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
21177
21178 2003-07-15  Paul Eggert  <eggert@twinsun.com>
21179
21180         * config/srclist.txt: Get the following files from gettext-runtime/intl
21181         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
21182         ref-del.sin.  From Bruno Haible.
21183         * config/srclist-update (fixfile): Change grep pattern again, since the
21184         previous fix didn't work (there was another trailing $).  Use
21185         '[$]' to escape the $s.
21186
21187 2003-07-15  Karl Berry  <karl@gnu.org>
21188
21189         * lib/vasnprintf.c: update from gettext.
21190
21191 2003-07-15  Karl Berry  <karl@gnu.org>
21192
21193         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
21194         gets expanded when surrounded by '$'.
21195
21196 2003-07-15  Jim Meyering  <jim@meyering.net>
21197
21198         * modules/save-cwd: Don't depend on error.  From Derek Price.
21199
21200 2003-07-15  Jim Meyering  <jim@meyering.net>
21201
21202         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
21203
21204 2003-07-14  Simon Josefsson  <jas@extundo.com>
21205
21206         * modules/mempcpy: New file.
21207         * MODULES.html.sh (func_all_modules): Add mempcpy.
21208
21209 2003-07-14  Simon Josefsson  <jas@extundo.com>
21210
21211         * m4/mempcpy.m4: New file.
21212
21213 2003-07-14  Simon Josefsson  <jas@extundo.com>
21214
21215         * lib/mempcpy.h: New file.
21216         * lib/mempcpy.c: New file.
21217
21218 2003-07-14  Paul Eggert  <eggert@twinsun.com>
21219
21220         * modules/getdate, modules/posixtm: Depend on mktime.
21221
21222 2003-07-14  Paul Eggert  <eggert@twinsun.com>
21223
21224         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
21225         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
21226         unicodeio.c, unicodeio.h, unlocked-io.h:
21227         Switch from LGPL to GPL.
21228
21229 2003-07-14  Paul Eggert  <eggert@twinsun.com>
21230
21231         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
21232         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
21233         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
21234         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
21235         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
21236         updated automatically by ../config/srclist-update.  This changes
21237         their license from LPGL to GPL.
21238
21239 2003-07-14  Paul Eggert  <eggert@twinsun.com>
21240
21241         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
21242         assumed to refer to the root of the most recent stable gettext version.
21243         * config/srclistvars.sh: Add defaults for eggert.
21244         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
21245         Match "This program" as well as "The program".  This is needed
21246         for gettext.
21247
21248 2003-07-14  Jim Meyering  <jim@meyering.net>
21249
21250         Don't emit diagnostics.  Let callers do that.
21251         * lib/save-cwd.c: Don't include "error.h".
21252         (save_cwd): Don't call error.  Ensure that errno is valid
21253         when returning nonzero.
21254
21255         * lib/save-cwd.h (restore_cwd): Update prototype.
21256         * lib/save-cwd.c (restore_cwd): Remove two parameters.
21257         Simplify.  Don't call error upon failure.  Let callers do that.
21258         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
21259         when auditing is enabled.  But don't bother updating the #if.
21260
21261 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
21262
21263         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
21264         it breaks C++ compilation.
21265         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
21266
21267 2003-07-10  Simon Josefsson  <jas@extundo.com>
21268
21269         * modules/strchrnul (Makefile.am): Add strchrnul.h.
21270
21271 2003-07-10  Jim Meyering  <jim@meyering.net>
21272
21273         * m4/clock_time.m4: Remove trailing blank.
21274         * m4/intmax_t.m4: Likewise.
21275
21276 2003-07-10  Jim Meyering  <jim@meyering.net>
21277
21278         * lib/vasnprintf.c: Remove trailing blanks.
21279         Make cpp indentation consistent.
21280
21281 2003-07-09  Paul Eggert  <eggert@twinsun.com>
21282
21283         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
21284         posixver.c, strftime.c, strnlen.c, strverscmp.c:
21285         Switch from LGPL to GPL.
21286
21287 2003-07-09  Paul Eggert  <eggert@twinsun.com>
21288
21289         * config/srclist.txt: Sort sublists.  Add
21290         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
21291         that differ from gnulib for one reason or another; we'd like this list
21292         to be smaller but for now let's document what we have.
21293
21294 2003-07-08  Paul Eggert  <eggert@twinsun.com>
21295
21296         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
21297         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
21298         and sweeter "eval x=$x".
21299         * config/srclist.txt: Get lib/argp* from glibc.
21300
21301 2003-07-07  Paul Eggert  <eggert@twinsun.com>
21302
21303         * lib/mktime.c: Fix some boundary cases and remove need for floating
21304         point.
21305
21306         Issue a compile-time diagnostic if time_t is floating point, or if
21307         two's complement arithmetic is not in effect, or if arithmetic
21308         right shift does not propagate the sign.  These assumptions were
21309         all in the original code but they weren't checked.
21310
21311         (TIME_T_MIDPOINT, verify): New macros.
21312         (__isleap): Remove; it has integer overflow problems.
21313         (leapyear): New function, without those problems.
21314         (ydhms_tm_diff): Remove; splitting into two parts.
21315         (ydhms_diff): New function, containing the arithmetic part of
21316         the old ydhms_tm_diff function.  Issue a compile-time
21317         diagnostic if we are not using C99 integer division.
21318         Avoid casts when possible.
21319         (guess_time_tm): New function, containing the checking part of
21320         the old ydhms_tm_diff function.  Return the new value, rather than
21321         the difference between it and the old.  Accept a new argument T
21322         so that *T specifies the old value.  Check for overflow in the result.
21323
21324         (__mktime_internal): Use a time_t offset, not a long int offset.
21325         This undoes the 2003-06-04 change, which is no longer needed now
21326         that we have better overflow checking.
21327         (localtime_offset): Likewise.
21328
21329         (__mktime_internal): Avoid harmful overflow on hosts where time_t
21330         and long are 64-bit but int is only 32-bit.
21331         (ydhms_diff): Use long int to store year1 and yday1.
21332         Issue a compile-time diagnostic if long int is not wide enough.
21333
21334         (__mktime_internal): Use long int to store adjusted year and yday.
21335         Use plain C rather than preprocessor commands, if that doesn't
21336         affect efficiency.
21337         Check for overflow (and try to repair) after each probe
21338         rather than checking only at the very end.  This avoids some bugs
21339         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
21340         does not equal GMT offset at maximum time).
21341         Use integer to check for overflow rather than floating point; this
21342         is more portable to non-IEEE hosts, and is a tad faster.
21343         When we detect that we are oscillating between two values,
21344         don't check whether tm_isdst has the requested value, since
21345         we already know the answer.  When tm_isdst has the wrong value,
21346         use a different heuristic to find the right one, based on the
21347         extreme values actually observed in practice in tz2003a,
21348         rather than the (overly optimistic) "previous 3 calendar quarters".
21349
21350         (not_equal_tm, print_tm, check_result): Use "const T" rather than
21351         "T const" to accommodate glibc style.
21352         (check_result): Use less-confusing report format.  "long" -> "long int.
21353         (main): Likewise.
21354         Don't loop if the iteration overflows time_t.
21355         Allow a negative step in the iteration.
21356
21357 2003-07-06  Karl Berry  <karl@gnu.org>
21358
21359         * config/depcomp: update from automake.
21360         * config/config.sub: update from prep.
21361
21362 2003-07-03  Karl Berry  <karl@gnu.org>
21363
21364         * config/config.guess: update from prep.
21365
21366 2003-07-01  Paul Eggert  <eggert@twinsun.com>
21367
21368         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
21369         xreadlink.c now includes it unconditionally.
21370
21371 2003-07-01  Paul Eggert  <eggert@twinsun.com>
21372
21373         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
21374         having it depend on HAVE_SYS_TYPES_H.
21375
21376 2003-07-01  Bruno Haible  <bruno@clisp.org>
21377
21378         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
21379         <sys/types.h> should be sufficient.
21380         Reported by Paul Eggert.
21381
21382 2003-06-26  Karl Berry  <karl@gnu.org>
21383
21384         * config/depcomp: update from automake.
21385
21386 2003-06-26  Bruno Haible  <bruno@clisp.org>
21387
21388         * modules/human: Depend on module stdbool.
21389
21390 2003-06-25  Bruno Haible  <bruno@clisp.org>
21391
21392         * modules/readlink: New file.
21393         * modules/xreadlink: Depend on it.
21394         * MODULES.html.sh (func_all_modules): Add readlink.
21395
21396 2003-06-25  Bruno Haible  <bruno@clisp.org>
21397
21398         * m4/readlink.m4: New file.
21399
21400 2003-06-25  Bruno Haible  <bruno@clisp.org>
21401
21402         * lib/readlink.c: New file.
21403
21404 2003-06-22  Karl Berry  <karl@gnu.org>
21405
21406         * config/srclist.txt: update mkinstalldirs from automake.
21407         * config/mkinstalldirs: update.
21408
21409 2003-06-22  Bruno Haible  <bruno@clisp.org>
21410
21411         Portability to mingw32.
21412         * m4/ssize_t.m4: New file, from GNU gettext.
21413         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
21414         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
21415
21416 2003-06-22  Bruno Haible  <bruno@clisp.org>
21417
21418         * modules/safe-read: Add m4/ssize_t.m4.
21419         * modules/xreadlink: Add m4/ssize_t.m4.
21420
21421 2003-06-20  Bruno Haible  <bruno@clisp.org>
21422
21423         Assume C89, so PARAMS isn't needed.
21424         * lib/unicodeio.h (PARAMS): Remove.
21425         * lib/unicodeio.c: Don't use PARAMS.
21426
21427 2003-06-18  Karl Berry  <karl@gnu.org>
21428
21429         * config/config.{guess,sub}: update from prep.
21430
21431 2003-06-18  Jim Meyering  <jim@meyering.net>
21432
21433         Merge changes from coreutils.
21434         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
21435         Remove explicit declarations of xmalloc and realloc.
21436         Include xalloc.h.
21437         (read_utmp): Remove anachronistic cast of xmalloc.
21438
21439 2003-06-17  Paul Eggert  <eggert@twinsun.com>
21440
21441         Assume C89, so PARAMS isn't needed.
21442         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
21443         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
21444         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
21445         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
21446         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
21447         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
21448         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
21449         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
21450         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
21451         lib/xstrtod.h, lib/xstrtol.h: Likewise.
21452         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
21453         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
21454         no longer needed. Anyway, config.h should always be included before any
21455         other file.
21456
21457 2003-06-11  Simon Josefsson  <jas@extundo.com>
21458
21459         * modules/sysexits: New file.
21460         * MODULES.html.sh (func_all_modules): Add sysexits.
21461
21462 2003-06-11  Simon Josefsson  <jas@extundo.com>
21463
21464         * lib/sysexit_.h: New file.
21465
21466 2003-06-11  Derek Price  <derek@ximbiot.com>
21467
21468         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
21469         necessary.
21470
21471 2003-06-11  Bruno Haible  <bruno@clisp.org>
21472
21473         * m4/sysexits.m4: New file.
21474
21475 2003-06-10  Simon Josefsson  <jas@extundo.com>
21476
21477         * lib/argp.h: New file, from glibc.
21478         * lib/argp-ba.c: New file, from glibc.
21479         * lib/argp-eexst.c: New file, from glibc.
21480         * lib/argp-fmtstream.c: New file, from glibc.
21481         * lib/argp-fmtstream.h: New file, from glibc.
21482         * lib/argp-fs-xinl.c: New file, from glibc.
21483         * lib/argp-help.c: New file, from glibc.
21484         * lib/argp-namefrob.h: New file, from glibc.
21485         * lib/argp-parse.c: New file, from glibc.
21486         * lib/argp-pv.c: New file, from glibc.
21487         * lib/argp-pvh.c: New file, from glibc.
21488         * lib/argp-xinl.c: New file, from glibc.
21489
21490 2003-06-10  Simon Josefsson  <jas@extundo.com>
21491
21492         * modules/strchrnul: New file.
21493
21494 2003-06-10  Simon Josefsson  <jas@extundo.com>
21495
21496         * modules/argp: New file.
21497
21498 2003-06-10  Simon Josefsson  <jas@extundo.com>
21499
21500         * m4/strchrnul.m4: New file.
21501
21502 2003-06-10  Simon Josefsson  <jas@extundo.com>
21503
21504         * lib/strchrnul.h: New file.
21505         * lib/strchrnul.c: New file.
21506
21507 2003-06-10  Bruno Haible  <bruno@clisp.org>
21508
21509         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
21510
21511 2003-06-07  Karl Berry  <karl@gnu.org>
21512
21513         * config/config.{guess,sub}: update from prep.
21514
21515 2003-06-07  Jim Meyering  <jim@meyering.net>
21516
21517         * modules/strtod: Use $(...) notation, not @...@ for
21518         AC_REPLACE'd variables.
21519         * modules/localcharset: Likewise.
21520
21521 2003-06-07  Jim Meyering  <jim@meyering.net>
21522
21523         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
21524         in place of my name in the copyright comment.
21525         Remove definition and uses of __P.
21526
21527         From coreutils.
21528         * lib/stat.c: Don't declare xmalloc explicitly.
21529         Instead, include "xalloc.h".
21530         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
21531         xrealloc, and xcalloc return values.
21532         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
21533         Improve comment.
21534         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
21535
21536 2003-06-07  Bruno Haible  <bruno@clisp.org>
21537
21538         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
21539         avoid AC_CONFIG_LINKS.
21540         * modules/fnmatch (Makefile.am): Use explicit creation rule for
21541         fnmatch.h, to avoid AC_CONFIG_LINKS.
21542         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
21543
21544 2003-06-07  Bruno Haible  <bruno@clisp.org>
21545
21546         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
21547         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
21548         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
21549         directory.
21550         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
21551         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
21552         directory.
21553
21554 2003-06-06  Jim Meyering  <jim@meyering.net>
21555
21556         Merge from coreutils.
21557         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
21558         Consolidate declarations and initializations of *_base* locals.
21559
21560         Merge from coreutils.
21561         This avoids a core dump on systems without GNU putenv,
21562         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
21563         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
21564         (unsetenv): New static function, from GNU libc.
21565         (rpl_putenv): Use it.
21566
21567         * lib/modechange.c: Remove trailing blanks.
21568
21569         Merge from coreutils.
21570         * lib/fsusage.c: Remove declaration of statfs.
21571         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
21572
21573         * lib/posixtm.c: Include <stdbool.h> unconditionally.
21574
21575 2003-06-06  Jim Meyering  <jim@meyering.net>
21576
21577         * lib/stdbool_.h: Renamed from stdbool.h.in.
21578
21579 2003-06-06  Jim Meyering  <jim@meyering.net>
21580             Bruno Haible  <bruno@clisp.org>
21581
21582         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
21583         Adjust Makefile.am snippet not to redirect directly to target.
21584         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
21585
21586 2003-06-05  Paul Eggert  <eggert@twinsun.com>
21587
21588         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
21589         mismatch, look in future quarters as well as past.  This fixes a
21590         bug when processing fall-backwards gaps immediately after a long
21591         period of daylight-saving time.
21592
21593         * lib/mktime.c: Assume freestanding C89 or better.
21594         (HAVE_LIMITS_H): Remove.  Assume it's 1.
21595         (__P): Remove; not used.
21596         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
21597         (mktime, not_equal_tm, print_tm, check_result,
21598         main): Use prototypes.  Use const * where appropriate.
21599         (main): Fix typo in testing code that uncovered by above changes.
21600         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
21601
21602 2003-06-04  Paul Eggert  <eggert@twinsun.com>
21603
21604         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
21605         locale.h, localeconv.  This merges changes from coreutils.
21606
21607         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
21608         It can be removed after the next Autoconf is released.
21609         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
21610         needed.
21611
21612 2003-06-04  Paul Eggert  <eggert@twinsun.com>
21613
21614         * lib/mktime.c: Fix Debian bug 177940
21615         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
21616         (localtime_offset): Now long int, not time_t, because we want it
21617         to be guaranteed to be signed.  All uses changed.
21618         (__mktime_internal): If overflow would occur when adding offset,
21619         don't add it.
21620
21621         Merge 'human' changes from coreutils.  Rewrite to support
21622         locale-specific notations like thousands separators.
21623         * lib/human.c: Simplify authorship notice.
21624         Include human.h immediately after config.h.
21625         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
21626         <limits.h>: Do not include, since human.h does.
21627         (SIZE_MAX, UINTMAX_MAX): New macros.
21628         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
21629         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
21630         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
21631         (power_letter): Renamed from suffixes.
21632         (generate_suffix_backwards): Remove.
21633         (adjust_value): Now takes int style (because of human.h changes)
21634         and long double value (for greater precision on some platforms).
21635         (group_number): New function.
21636         (human_readable): Use it.  Use integer options, not enum.
21637         Put the options before the sizes in the arg list.
21638         Support all the new options.
21639         The old human_readable function has been removed;
21640         use inttostr.h instead.
21641         (human_readable, default_block_size, humblock):
21642         Use uintmax_t, not int, for block sizes.
21643         (human_readable_inexact, block_size_types): Remove.
21644         (block_size_opts): New constant.
21645         (human_options): Renamed from human_block_size, with new signature
21646         that allows block sizes up to UINTMAX_MAX.  All callers changed.
21647         * lib/human.h: Add copyright and authorship notice.
21648         Include <limits.h> and <stdbool.h> unconditionally.
21649         (PARAMS): Remove.  All uses removed.
21650         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
21651         (enum human_inexact_style): Remove tag; now a nameless enum.
21652         (human_floor, human_ceiling, human_round_to_even): Now have
21653         values 2, 0, 1 rather than -1, 1, 0.
21654         (human_group_digits, human_suppress_point_zero, human_autoscale,
21655         human_base_1024, human_SI, human_B): New constants.
21656         (human_readable_inexact, human_block_size): Remove.
21657         (human_readable): Size args are now uintmax_t, not int.
21658         (human_options): New decl.
21659
21660         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
21661         unnecessary now that we assume C89 or better.  This change
21662         imported from coreutils.
21663
21664         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
21665         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
21666         in the 2003-05-30 sync from glibc.
21667
21668         .h files should stand alone, but we shouldn't include <sys/types.h>
21669         if we can get away with just <stddef.h>.
21670
21671         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
21672         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
21673         rather than <sys/types.h>, as we merely need size_t.
21674         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
21675         to get size_t.
21676         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
21677         Include <stdio.h>, to get FILE.
21678         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
21679         memcasecmp.h has included <stddef.h> and all we need is size_t.
21680         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
21681         our interface, instead of including <sys/types.h>
21682
21683 2003-06-04  Paul Eggert  <eggert@twinsun.com>
21684
21685         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
21686         now, as glibc mktime is buggy on non-glibc systems.
21687
21688 2003-06-03  Karl Berry  <karl@gnu.org>
21689
21690         * config/config.sub: update from prep.
21691
21692 2003-06-02  Paul Eggert  <eggert@twinsun.com>
21693
21694         [from coreutils]
21695         Fix some minor time-related bugs with POSIX time arguments.
21696         Some valid time stamps were being rejected (notably -1, and
21697         time stamps before 1900 on 64-bit hosts).  And some invalid
21698         time stamps were being accepted, e.g. September 31.
21699
21700         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
21701         that we can return (time_t) -1 successfully.
21702         * lib/posixtm.c: Likewise.
21703         [HAVE_STDBOOL_H]: Include <stdbool.h>.
21704         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
21705         (t): Remove static var.
21706         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
21707         of static var.  All uses changed.
21708         (year): Do not reject years before 1900; they can occur with
21709         64-bit time_t.
21710         (posix_time_parse): Do not check for out-of-range components;
21711         that is now the caller's responsibility, since our checks were
21712         only approximations.
21713         (posixtime): Use mktime to check for out-of-range components,
21714         since it knows them exactly.
21715         If mktime returns (time_t) -1, check whether an error actually occurred
21716         by invoking localtime on -1.
21717         (main) [TEST_POSIXTIME]: Check for input data errors, and report
21718         posixtime failures better.
21719         Improve the test data (in comments only).
21720
21721 2003-06-02  Karl Berry  <karl@gnu.org>
21722
21723         * config/mkinstalldirs (version): new variable.
21724         (--version): new option.
21725         (usage): improve message.
21726
21727 2003-05-30  Karl Berry  <karl@gnu.org>
21728
21729         * lib/mktime.c: update from libc.
21730
21731 2003-05-30  Bruno Haible  <bruno@clisp.org>
21732
21733         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
21734         * config/config.rpath: Upgrade to gettext-0.12.1.
21735
21736 2003-05-30  Bruno Haible  <bruno@clisp.org>
21737
21738         * m4/gettext.m4: Upgrade to gettext-0.12.1.
21739         * m4/nls.m4: New file, from gettext-0.12.1.
21740         * m4/po.m4: New file, from gettext-0.12.1.
21741         * m4/progtest.m4: Upgrade to gettext-0.12.1.
21742
21743 2003-05-30  Bruno Haible  <bruno@clisp.org>
21744
21745         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
21746         * lib/localcharset.h: Likewise.
21747         * lib/localcharset.c: Likewise.
21748
21749 2003-05-29  Karl Berry  <karl@gnu.org>
21750
21751         * config/config.rpath: update from gettext.
21752
21753 2003-05-28  Paul Eggert  <eggert@twinsun.com>
21754
21755         Assume the headers required for C89 freestanding compilers.
21756         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
21757         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
21758         * m4/human.m4 (gl_HUMAN): Likewise.
21759         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
21760         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
21761         * m4/userspec.m4 (gl_USERSPEC): Likewise.
21762         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
21763         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
21764         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
21765
21766 2003-05-28  Paul Eggert  <eggert@twinsun.com>
21767
21768         Assume the headers required for C89 freestanding compilers.
21769         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
21770         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
21771         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
21772         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
21773         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
21774         define, since <limits.h> is guaranteed to do that.
21775         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
21776         * lib/exclude.c: Include <stdbool.h> unconditionally.
21777         * lib/tempname.c: Include <stddef.h> unconditionally.
21778         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
21779         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
21780         <stddef.h> does that.
21781         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
21782         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
21783         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
21784         needed.
21785         * lib/xstrtol.c: Likewise.
21786         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
21787         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
21788
21789         * lib/addext.c (addext): Use assignment rather than cast, to avoid
21790         warnings on some platforms.
21791
21792         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
21793         arbitrarily.
21794
21795 2003-05-26  Jim Meyering  <jim@meyering.net>
21796
21797         Merge in a change from coreutils:
21798         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
21799         that is guaranteed to be `no'.  Use `no_such_member' to indicate
21800         that condition, rather than `-1' which is slightly misleading.
21801         Change the name of the cache variable to have the gl_ prefix.
21802         Prompted by a patch from Richard Dawe for DJGPP.
21803
21804 2003-05-24  Karl Berry  <karl@gnu.org>
21805
21806         * config/config.guess: update from prep.
21807
21808 2003-05-22  Karl Berry  <karl@gnu.org>
21809
21810         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
21811
21812 2003-05-20  Karl Berry  <karl@gnu.org>
21813
21814         * config/config.guess: update from prep.
21815
21816 2003-05-18  Karl Berry  <karl@gnu.org>
21817
21818         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
21819         might actually be set by the user.
21820
21821         * config/depcomp, install-sh, mdate-sh: update from automake.
21822
21823 2003-05-17  Bruno Haible  <bruno@clisp.org>
21824
21825         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
21826         invalid expansion for AC_EGREP_CPP.
21827         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
21828         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
21829         Suggested by Akim Demaille <akim@epita.fr> in
21830         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
21831
21832 2003-05-12  Jim Meyering  <jim@meyering.net>
21833
21834         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
21835         the space-padded-by-default conversion specifiers, %e, %k, %l.
21836
21837 2003-05-12  Bruno Haible  <bruno@clisp.org>
21838
21839         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
21840         the string is longer than 4 KB.
21841
21842 2003-05-11  Karl Berry  <karl@gnu.org>
21843
21844         * config/config.{guess,sub}: update from prep.
21845
21846 2003-05-09  Bruno Haible  <bruno@clisp.org>
21847
21848         * modules/error: Add m4/strerror_r.m4 to file list.
21849
21850 2003-05-03  Bruno Haible  <bruno@clisp.org>
21851
21852         Upgrade to Unicode-4.0.
21853         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
21854         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
21855         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
21856         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
21857         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
21858         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
21859         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
21860         Change width of U+E0100..U+E01EF from 1 to 0.
21861
21862 2003-04-25  Jim Meyering  <jim@meyering.net>
21863
21864         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
21865         of type size_t, not int.
21866
21867 2003-04-25  Bruno Haible  <bruno@clisp.org>
21868
21869         * lib/copy-file.c: Include <stddef.h>, for size_t.
21870
21871 2003-04-21  Paul Eggert  <eggert@twinsun.com>
21872
21873         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
21874         code which expansion is under static control.  Patch imported from
21875         Akim Demaille's patch to Bison; see
21876         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
21877
21878 2003-04-14  Bruno Haible  <bruno@clisp.org>
21879
21880         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
21881
21882 2003-04-11  Jim Meyering  <jim@meyering.net>
21883
21884         Merge changes from Coreutils.
21885
21886         2003-03-22  Jim Meyering  <jim@meyering.net>
21887
21888         * lib/strftime.c (widen): Cast alloca return value to proper type.
21889
21890         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
21891
21892         From GNU libc.
21893         * lib/strftime.c (my_strftime): Handle very large width
21894         specifications for numeric values correctly.  Improve checks for
21895         overflow.
21896
21897         2003-01-19  Jim Meyering  <jim@meyering.net>
21898
21899         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
21900         definitions.
21901         (nl_get_alt_digit) [! defined my_strftime]: Define.
21902         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
21903         _nl_get_alt_digit and _nl_get_walt_digit.
21904
21905         * lib/strftime.c (my_strftime): Merge in locale-related changes from
21906         libc. These changes have no effect outside of _LIBC.
21907
21908 2003-04-10  Bruno Haible  <bruno@clisp.org>
21909
21910         * modules/findprog: New file.
21911         * MODULES.html.sh (func_all_modules): Add it.
21912
21913 2003-04-10  Bruno Haible  <bruno@clisp.org>
21914
21915         * m4/findprog.m4: New file.
21916         * m4/eaccess.m4: New file.
21917
21918 2003-04-10  Bruno Haible  <bruno@clisp.org>
21919
21920         * lib/findprog.h: New file, from GNU gettext.
21921         * lib/findprog.c: New file, from GNU gettext.
21922
21923 2003-04-05  Jim Meyering  <jim@meyering.net>
21924
21925         Merge changes from Coreutils.
21926
21927         * lib/exclude.h (PARAMS): Remove definition and uses.
21928         * lib/exclude.c: Remove uses of `PARAMS'.
21929
21930         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
21931         Add test-cases for DOS filenames. Declare program_name.
21932         (main): Set up program_name.  Patch by Rich Dawe.
21933
21934         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
21935         error from mntctl.
21936         Use mntctl's return value to drive the entry-processing loop, since
21937         we can't rely on the value of the vmt_length member in the last
21938         entry.  On some systems doing so could result in exhausting
21939         virtual memory.  Based in part on a patch from Mike Jetzer.
21940
21941 2003-04-04  Bruno Haible  <bruno@clisp.org>
21942
21943         * modules/linebreak: New file.
21944         * MODULES.html.sh (func_all_modules): Add it.
21945
21946 2003-04-04  Bruno Haible  <bruno@clisp.org>
21947
21948         * m4/linebreak.m4: New file.
21949
21950 2003-04-04  Bruno Haible  <bruno@clisp.org>
21951
21952         * lib/linebreak.h: New file, from GNU gettext.
21953         * lib/linebreak.c: New file, from GNU gettext with slight
21954         modifications.
21955         * lib/lbrkprop.h: New file, from GNU gettext.
21956
21957 2003-04-03  Bruno Haible  <bruno@clisp.org>
21958
21959         * modules/utf8-ucs4: New file.
21960         * modules/utf16-ucs4: New file.
21961         * modules/ucs4-utf8: New file.
21962         * modules/ucs4-utf16: New file.
21963         * MODULES.html.sh (func_all_modules): Add them.
21964
21965 2003-04-03  Bruno Haible  <bruno@clisp.org>
21966
21967         * m4/utf-ucs4.m4: New file.
21968         * m4/ucs4-utf.m4: New file.
21969
21970 2003-04-03  Bruno Haible  <bruno@clisp.org>
21971
21972         * lib/utf8-ucs4.h: New file, from GNU gettext.
21973         * lib/utf16-ucs4.h: New file, from GNU gettext.
21974         * lib/ucs4-utf8.h: New file, from GNU gettext.
21975         * lib/ucs4-utf16.h: New file, from GNU gettext.
21976
21977 2003-04-02  Bruno Haible  <bruno@clisp.org>
21978
21979         * modules/binary-io: New file.
21980         * MODULES.html.sh (func_all_modules): Add it.
21981
21982 2003-04-02  Bruno Haible  <bruno@clisp.org>
21983
21984         * lib/binary-io.h: New file, from GNU gettext.
21985
21986 2003-04-01  Bruno Haible  <bruno@clisp.org>
21987
21988         * modules/pathname: New file.
21989         * MODULES.html.sh (func_all_modules): Add it.
21990
21991 2003-04-01  Bruno Haible  <bruno@clisp.org>
21992
21993         * lib/pathname.h: New file, from GNU gettext.
21994         * lib/concatpath.c: New file, from GNU gettext.
21995
21996 2003-03-30  Bruno Haible  <bruno@clisp.org>
21997
21998         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
21999
22000 2003-03-30  Bruno Haible  <bruno@clisp.org>
22001
22002         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
22003         function chown() doesn't exist.
22004
22005 2003-03-28  Bruno Haible  <bruno@clisp.org>
22006
22007         * modules/copy-file: New file.
22008         * MODULES.html.sh (func_all_modules): Add it.
22009
22010 2003-03-28  Bruno Haible  <bruno@clisp.org>
22011
22012         * m4/copy-file.m4: New file.
22013
22014 2003-03-28  Bruno Haible  <bruno@clisp.org>
22015
22016         * lib/copy-file.h: New file, from GNU gettext.
22017         * lib/copy-file.c: New file, from GNU gettext.
22018
22019 2003-03-18  Jim Meyering  <jim@meyering.net>
22020
22021         * lib/quote.c (quote_n): Fix typo in comment.
22022
22023 2003-03-18  Bruno Haible  <bruno@clisp.org>
22024
22025         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
22026         checking.
22027         * m4/onceonly_2_57.m4: Likewise.
22028
22029 2003-03-17  Bruno Haible  <bruno@clisp.org>
22030
22031         * m4/onceonly.m4: Require autoconf 2.54 or newer.
22032         (m4_quote): Remove macro.
22033         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
22034
22035 2003-03-14  Jim Meyering  <jim@meyering.net>
22036
22037         Merge changes from Coreutils.
22038         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
22039         to be const, in order to avoid warnings.
22040         (obstack_room): Likewise.
22041         (obstack_empty_p): Likewise.
22042
22043 2003-03-14  Bruno Haible  <bruno@clisp.org>
22044
22045         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
22046         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
22047
22048 2003-03-13  Paul Eggert  <eggert@twinsun.com>
22049
22050         Merge changes from Bison.
22051         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
22052         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
22053         when compiling Bison 1.875's `bitset bset = obstack_alloc
22054         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
22055         * lib/hash.c: Include <stdbool.h> unconditionally.
22056
22057 2003-03-13  Paul Eggert  <eggert@twinsun.com>
22058
22059         * m4/onceonly.m4 (m4_quote): New macro.
22060         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
22061         Quote AC_FOREACH variable-expansions properly.
22062
22063 2003-03-13  Paul Eggert  <eggert@twinsun.com>
22064
22065         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
22066
22067 2003-03-09  Paul Eggert  <eggert@twinsun.com>
22068
22069         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
22070         Reported by Bruce Becker; see:
22071         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
22072
22073 2003-03-03  Paul Eggert  <eggert@twinsun.com>
22074             Bruno Haible  <bruno@clisp.org>
22075
22076         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
22077         Reported by John Hughes, see
22078         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
22079
22080 2003-02-20  Bruno Haible  <bruno@clisp.org>
22081
22082         * MODULES.html.sh (func_all_modules): Add poll.
22083
22084 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
22085
22086         * modules/poll: New file.
22087
22088 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
22089
22090         * lib/poll_.h: New file.
22091         * lib/poll.c: New file.
22092
22093 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
22094
22095         * m4/poll.m4: New file.
22096
22097 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
22098
22099         * modules/mathl: New file.
22100
22101 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
22102
22103         * lib/mathl.h: New file.
22104         * lib/acosl.c: New file.
22105         * lib/asinl.c: New file.
22106         * lib/atanl.c: New file.
22107         * lib/ceill.c: New file.
22108         * lib/cosl.c: New file.
22109         * lib/expl.c: New file.
22110         * lib/floorl.c: New file.
22111         * lib/frexpl.c: New file.
22112         * lib/ldexpl.c: New file.
22113         * lib/logl.c: New file.
22114         * lib/sincosl.c: New file.
22115         * lib/sinl.c: New file.
22116         * lib/sqrtl.c: New file.
22117         * lib/tanl.c: New file.
22118         * lib/trigl.c: New file.
22119         * lib/trigl.h: New file.
22120
22121 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
22122
22123         * m4/mathl.m4: New file.
22124
22125 2003-02-18  Bruno Haible  <bruno@clisp.org>
22126
22127         * MODULES.html.sh (func_all_modules): Add mathl.
22128
22129 2003-02-17  Bruno Haible  <bruno@clisp.org>
22130
22131         * modules/mkdtemp: New module.
22132         * MODULES.html.sh (func_all_modules): Add it.
22133
22134 2003-02-17  Bruno Haible  <bruno@clisp.org>
22135
22136         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
22137
22138 2003-02-17  Bruno Haible  <bruno@clisp.org>
22139
22140         * lib/mkdtemp.h: New file, from GNU gettext.
22141         * lib/mkdtemp.c: New file, from GNU gettext.
22142
22143 2003-02-02  Jim Meyering  <jim@meyering.net>
22144
22145         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
22146         e.g. glibc-2.2.93.
22147
22148 2003-01-31  Bruno Haible  <bruno@clisp.org>
22149
22150         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
22151         'rpl_rename'.
22152         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
22153         'rpl_strnlen'.
22154         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
22155         'rpl_strtod'.
22156         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
22157         'rpl_utime'.
22158
22159 2003-01-31  Bruno Haible  <bruno@clisp.org>
22160
22161         * lib/rename.c: #undef rename before defining rpl_rename.
22162         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
22163
22164 2003-01-30  Bruno Haible  <bruno@clisp.org>
22165
22166         * modules/vasnprintf, modules/vasprintf: New modules.
22167         * MODULES.html.sh (func_all_modules): Add them.
22168
22169 2003-01-30  Bruno Haible  <bruno@clisp.org>
22170
22171         * m4/signed.m4: New file, from GNU gettext.
22172         * m4/longdouble.m4: New file, from GNU gettext.
22173         * m4/wchar_t.m4: New file, from GNU gettext.
22174         * m4/wint_t.m4: New file, from GNU gettext.
22175         * m4/vasnprintf.m4: New file.
22176         * m4/vasprintf.m4: New file.
22177
22178 2003-01-30  Bruno Haible  <bruno@clisp.org>
22179
22180         * lib/printf-args.h: New file, from GNU gettext.
22181         * lib/printf-args.c: New file, from GNU gettext.
22182         * lib/printf-parse.h: New file, from GNU gettext.
22183         * lib/printf-parse.c: New file, from GNU gettext.
22184         * lib/vasnprintf.h: New file, from GNU gettext.
22185         * lib/vasnprintf.c: New file, from GNU gettext.
22186         * lib/asnprintf.c: New file, from GNU gettext.
22187         * lib/vasprintf.h: New file, from GNU gettext with modifications.
22188         * lib/vasprintf.c: New file, from GNU gettext.
22189         * lib/asprintf.c: New file, from GNU gettext.
22190
22191 2003-01-29  Bruno Haible  <bruno@clisp.org>
22192
22193         * modules/stpncpy: New module.
22194         * MODULES.html.sh (func_all_modules): Add it.
22195
22196 2003-01-29  Bruno Haible  <bruno@clisp.org>
22197
22198         * m4/stpncpy.m4: New file.
22199
22200 2003-01-29  Bruno Haible  <bruno@clisp.org>
22201
22202         * lib/stpncpy.h: New file, from GNU gettext with modifications.
22203         * lib/stpncpy.c: New file, from GNU gettext with modifications.
22204
22205 2003-01-28  Bruno Haible  <bruno@clisp.org>
22206
22207         * modules/c-ctype: New module.
22208         * MODULES.html.sh (func_all_modules): Add it.
22209
22210 2003-01-28  Bruno Haible  <bruno@clisp.org>
22211
22212         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
22213         Paul Eggert.
22214         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
22215         Paul Eggert.
22216
22217 2003-01-27  Bruno Haible  <bruno@clisp.org>
22218
22219         * modules/xsetenv: New module.
22220         * MODULES.html.sh (func_all_modules): Add it.
22221
22222 2003-01-27  Bruno Haible  <bruno@clisp.org>
22223
22224         * lib/xsetenv.h: New file, from GNU gettext.
22225         * lib/xsetenv.c: New file, from GNU gettext.
22226
22227 2003-01-23  Jim Meyering  <jim@meyering.net>
22228
22229         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
22230         from working on systems without dirfd (at least Irix and OSF1/Tru64).
22231
22232 2003-01-23  Bruno Haible  <bruno@clisp.org>
22233
22234         * modules/minmax: New module.
22235         * MODULES.html.sh (func_all_modules): Add it.
22236
22237 2003-01-23  Bruno Haible  <bruno@clisp.org>
22238
22239         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
22240         Eggert.
22241
22242 2003-01-22  Bruno Haible  <bruno@clisp.org>
22243
22244         * modules/exit: New module.
22245         * MODULES.html.sh (func_all_modules): Add it.
22246
22247 2003-01-22  Bruno Haible  <bruno@clisp.org>
22248
22249         * lib/exit.h: New file, from GNU gettext.
22250
22251 2003-01-19  Bruno Haible  <bruno@clisp.org>
22252
22253         * gnulib-tool: Recognize option --extract-maintainer.
22254         (func_get_maintainer): New function.
22255         * modules/*: Add Maintainer entry.
22256
22257 2003-01-16  Jim Meyering  <jim@meyering.net>
22258
22259         * m4/regex.m4: The `regex' struct is both input and output.
22260         Initialize it before each use.  Patch by Tim Waugh.
22261
22262 2003-01-16  Bruno Haible  <bruno@clisp.org>
22263
22264         * MODULES.html.sh: Add a table of contents. Add the module name as
22265         leftmost column. Add hyperlinks.
22266
22267 2003-01-15  Bruno Haible  <bruno@clisp.org>
22268
22269         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
22270
22271 2003-01-15  Bruno Haible  <bruno@clisp.org>
22272
22273         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
22274         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
22275         suffix.
22276
22277 2003-01-15  Bruno Haible  <bruno@clisp.org>
22278
22279         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
22280
22281 2003-01-15  Bruno Haible  <bruno@clisp.org>
22282
22283         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
22284         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
22285
22286 2003-01-14  Jim Meyering  <jim@meyering.net>
22287
22288         * lib/same.c (same_name): Tweak a comment.
22289
22290 2003-01-14  Bruno Haible  <bruno@clisp.org>
22291
22292         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
22293         when a string comparison is sufficient.
22294
22295 2003-01-14  Bruno Haible  <bruno@clisp.org>
22296
22297         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
22298         'unsigned int'.
22299
22300 2003-01-14  Bruno Haible  <bruno@clisp.org>
22301
22302         * lib/hash-pjw.c: Add comment about low quality of this function.
22303
22304 2003-01-13  Bruno Haible  <bruno@clisp.org>
22305
22306         * modules/stpcpy: Distribute lib/stpcpy.h.
22307         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
22308
22309 2003-01-13  Bruno Haible  <bruno@clisp.org>
22310
22311         * modules/*: Add a description.
22312         * modules/strpbrk: Fix Makefile.am snippet.
22313         * modules/strtoimax: Fix dependencies.
22314         * modules/strtoumax: Likewise.
22315
22316 2003-01-13  Bruno Haible  <bruno@clisp.org>
22317
22318         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
22319         * modules/alloca (Makefile.am): All object files depend on alloca.h.
22320         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
22321
22322 2003-01-13  Bruno Haible  <bruno@clisp.org>
22323
22324         * gnulib-tool (func_create_testdir): Store config/* files in the main
22325         directory.
22326         * config.rpath: Move to ...
22327         * config/config.rpath: ... here.
22328         * modules/gettext: Contains config/config.rpath, not config.rpath.
22329         * modules/iconv: Likewise.
22330
22331 2003-01-12  Paul Eggert  <eggert@twinsun.com>
22332
22333         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
22334         to avoid collisions with libcurses and libreadline.
22335
22336         * m4/getstr.m4: Remove.
22337         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
22338
22339 2003-01-12  Paul Eggert  <eggert@twinsun.com>
22340
22341         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
22342         to avoid collisions with libcurses and libreadline.
22343
22344         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
22345         * lib/getstr.h, getstr.c: Remove.
22346         * lib/getline.c: Include "getline.h", to check interface.
22347         Move body of old getstr.c here: this defines MIN_CHUNK and
22348         declares getdelim2, which is renamed from getstr.
22349         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
22350
22351         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
22352         All uses changed.
22353         * lib/linebuffer.h: Likewise.
22354         (readline): Remove backward-compatibility macro.
22355
22356 2003-01-12  Paul Eggert  <eggert@twinsun.com>
22357
22358         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
22359         to avoid collisions with libcurses and libreadline.
22360         * getstr: Remove.
22361         * MODULES.html.sh: Remove getstr.
22362         * modules/getline: Depend on unlocked-io, not getstr.
22363
22364 2003-01-12  Jim Meyering  <jim@meyering.net>
22365
22366         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
22367
22368 2003-01-10  Bruno Haible  <bruno@clisp.org>
22369
22370         * modules/alloca: Change Makefile.am requirements. Simplify Include
22371         requirements. Add lib/alloca_.h to file list.
22372
22373 2003-01-10  Bruno Haible  <bruno@clisp.org>
22374
22375         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
22376
22377 2003-01-10  Bruno Haible  <bruno@clisp.org>
22378
22379         * lib/alloca_.h: New file.
22380         * lib/getdate.y: Unconditionally include alloca.h.
22381         * lib/makepath.c: Likewise.
22382         * lib/setenv.c: Likewise.
22383         * lib/userspec.c: Likewise.
22384
22385 2003-01-09  Karl Berry  <karl@gnu.org>
22386
22387         * MODULES.html.sh: include `dirname $0` in PATH, to find
22388         gnulib-tool.
22389
22390 2003-01-09  Bruno Haible  <bruno@clisp.org>
22391
22392         * modules/stdbool: Change configure.ac, Makefile.am requirements.
22393         Simplify Include requirements. Add lib/stdbool.h.in to file list.
22394
22395 2003-01-09  Bruno Haible  <bruno@clisp.org>
22396
22397         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
22398
22399 2003-01-09  Bruno Haible  <bruno@clisp.org>
22400
22401         * lib/stdbool.h.in: New file.
22402
22403 2003-01-09  Bruno Haible  <bruno@clisp.org>
22404
22405         * gnulib-tool (func_all_modules): Ignore files ending in ~.
22406         * MODULES.html.sh: Likewise.
22407
22408 2003-01-08  Jim Meyering  <jim@meyering.net>
22409
22410         * lib/full-write.c: Undefine and define-away `const' after inclusion
22411         of errno.h, not before.  Suggestion from Bruno Haible.
22412
22413 2003-01-08  Bruno Haible  <bruno@clisp.org>
22414
22415         * modules/full-read: Depend on full-write.
22416
22417 2003-01-08  Bruno Haible  <bruno@clisp.org>
22418
22419         * lib/safe-read.c: Include specification header first, to ensure its
22420         selfcontainedness.
22421         * lib/full-write.c: Likewise.
22422
22423 2003-01-07  Jim Meyering  <jim@meyering.net>
22424
22425         * lib/full-write.c: Rework so that it may serve to define full_read,
22426         too.
22427         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
22428
22429 2003-01-07  Bruno Haible  <bruno@clisp.org>
22430
22431         * lib/strtoimax.c: Include <stdint.h> as an alternative to
22432         <inttypes.h>.
22433         * lib/xstrtol.h: Likewise.
22434         * lib/xstrtoimax.c: Likewise.
22435         * lib/xstrtoumax.c: Likewise.
22436         * lib/human.h: Likewise.
22437
22438         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
22439         on systems that have <inttypes.h> but not <stdint.h>.
22440
22441 2003-01-07  Bruno Haible  <bruno@clisp.org>
22442
22443         * MODULES.html.sh: Add copyright notice.
22444         (missed_files): Omit CVS directory entries.
22445         (func_module): Make it work with sed-3.02.
22446         * MODULES.txt: Remove file.
22447
22448 2003-01-06  Jim Meyering  <jim@meyering.net>
22449
22450         * lib/version-etc.c: Update year in translatable copyright string.
22451
22452 2003-01-03  Karl Berry  <karl@gnu.org>
22453
22454         * config/config.{guess,sub}: update from prep.
22455
22456 2003-01-02  Karl Berry  <karl@gnu.org>
22457
22458         * doc/COPYING.DOC: belatedly updated to 1.2.
22459
22460 2003-01-01  Karl Berry  <karl@gnu.org>
22461
22462         * gnulib-tool (func_verify_module): report module name $module in
22463         error message, not $1.
22464         * gnulib-tool (create-testdir): don't complain if destdir couldn't
22465         be created, only if it doesn't exist.
22466         * gnulib-tool (last_checkin_date): don't expand the $Date here.
22467
22468 2002-12-31  Paul Eggert  <eggert@twinsun.com>
22469
22470         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
22471
22472 2002-12-31  Paul Eggert  <eggert@twinsun.com>
22473
22474         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
22475         memcmp if strcoll doesn't work.
22476
22477 2002-12-31  Bruno Haible  <bruno@clisp.org>
22478
22479         * lib/utime.c (utime_null): No need to call ftruncate if the file was
22480         nonempty.
22481
22482 2002-12-31  Bruno Haible  <bruno@clisp.org>
22483
22484         * lib/memcoll.c (STRCOLL): New macro.
22485         (memcoll): Use it.
22486
22487 2002-12-31  Bruno Haible  <bruno@clisp.org>
22488
22489         * lib/localcharset.h: New file.
22490         * lib/localcharset.c: Include it.
22491         * lib/unicodeio.c: Likewise.
22492
22493 2002-12-31  Bruno Haible  <bruno@clisp.org>
22494
22495         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
22496         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
22497
22498 2002-12-31  Bruno Haible  <bruno@clisp.org>
22499
22500         * lib/getline.h: Include <stddef.h>, for size_t.
22501
22502         * lib/unicodeio.h: Include <stddef.h>, for size_t.
22503         * lib/unicodeio.c: Don't include <stddef.h>.
22504
22505 2002-12-31  Bruno Haible  <bruno@clisp.org>
22506
22507         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
22508         HAVE_TM_ZONE.
22509
22510 2002-12-24  Karl Berry  <karl@gnu.org>
22511
22512         * config/config.guess: update from prep.
22513
22514 2002-12-24  Bruno Haible  <bruno@clisp.org>
22515
22516         General infrasructure.
22517         * m4/README: Rewritten.
22518         * m4/onceonly.m4: New file.
22519         * m4/onceonly_2_57.m4: New file.
22520
22521         Module atexit.
22522         * m4/atexit.m4: New file.
22523
22524         Module strtod.
22525         * m4/strtod.m4: New file.
22526
22527         Module strtol.
22528         * m4/strtol.m4: New file.
22529
22530         Module strtoul.
22531         * m4/strtoul.m4: New file.
22532
22533         Module memchr.
22534         * m4/memchr.m4: New file.
22535
22536         Module memcmp.
22537         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
22538         (jm_FUNC_MEMCMP): Invoke it.
22539
22540         Module memcpy.
22541         * m4/memcpy.m4: New file.
22542
22543         Module memmove.
22544         * m4/memmove.m4: New file.
22545
22546         Module memset.
22547         * m4/memset.m4: New file.
22548
22549         Module strcspn.
22550         * m4/strcspn.m4: New file.
22551
22552         Module strpbrk.
22553         * m4/strpbrk.m4: New file.
22554
22555         Module strstr.
22556         * m4/strstr.m4: New file.
22557
22558         Module strerror.
22559         * m4/strerror.m4: New file.
22560
22561         Module mktime.
22562         * m4/mktime.m4: Renamed from jm-mktime.m4.
22563         (gl_PREREQ_MKTIME): New macro.
22564         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
22565
22566         Module malloc.
22567         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
22568         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
22569         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
22570
22571         Module realloc.
22572         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
22573         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
22574         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
22575
22576         Module strftime.
22577         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
22578         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
22579         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
22580         gl_TM_GMTOFF.
22581         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
22582
22583         Module xalloc.
22584         * m4/xalloc.m4: New file.
22585
22586         Module alloca.
22587         * m4/alloca.m4: New file.
22588
22589         Module putenv.
22590         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
22591         (jm_FUNC_PUTENV): Invoke it.
22592
22593         Module setenv.
22594         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
22595         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
22596         when invoked twice.
22597         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
22598         gt_FUNC_SETENV.
22599
22600         Module memrchr.
22601         * m4/memrchr.m4: New file.
22602
22603         Module stpcpy.
22604         * m4/stpcpy.m4: New file.
22605
22606         Module strcase.
22607         * m4/strcase.m4: New file.
22608
22609         Module strdup.
22610         * m4/strdup.m4: New file.
22611
22612         Module strnlen.
22613         * m4/strnlen.m4: New file.
22614
22615         Module strndup.
22616         * m4/strndup.m4: New file.
22617
22618         Module xstrtod.
22619         * m4/xstrtod.m4: New file.
22620
22621         Module xstrtol.
22622         * m4/xstrtol.m4: New file.
22623
22624         Module getdate.
22625         * m4/getdate.m4: New file.
22626
22627         Module unlocked-io.
22628         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
22629         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
22630         * m4/jm-glibc-io.m4n: Remove file.
22631
22632         Module long-options.
22633         * m4/long-options.m4: New file.
22634
22635         Module md5.
22636         * m4/md5.m4: New file.
22637
22638         Module sha.
22639         * m4/sha.m4: New file.
22640
22641         Module getstr.
22642         * m4/getstr.m4: New file.
22643
22644         Module getline.
22645         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
22646         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
22647         <sys/types.h>, for size_t. Use the function name gnu_getline, not
22648         simply getline. Infoke gl_PREREQ_GETLINE.
22649
22650         Module obstack.
22651         * m4/obstack.m4: New file.
22652
22653         Module hash.
22654         * m4/hash.m4: New file.
22655
22656         Module readtokens.
22657         * m4/readtokens.m4: New file.
22658
22659         Module strverscmp.
22660         * m4/strverscmp.m4: New file.
22661
22662         Module stdbool.
22663         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
22664         OSF/1.
22665
22666         Module strtoll.
22667         * m4/strtoll.m4: New file.
22668
22669         Module strtoull.
22670         * m4/strtoull.m4: New file.
22671
22672         Module strtoimax.
22673         * m4/strtoimax.m4: New file.
22674
22675         Module strtoumax.
22676         * m4/strtoumax.m4: New file.
22677
22678         Module xstrtoimax.
22679         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
22680         jm_AC_PREREQ_XSTRTOIMAX.
22681         Moved the strtol prerequisites to strtol.m4.
22682         Moved the strtoll prerequisites to strtoll.m4.
22683         Moved the strtoimax prerequisites to strtoimax.m4.
22684
22685         Module xstrtoumax.
22686         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
22687         jm_AC_PREREQ_XSTRTOUMAX.
22688         Moved the strtoul prerequisites to strtoul.m4.
22689         Moved the strtoull prerequisites to strtoull.m4.
22690         Moved the strtoumax prerequisites to strtoumax.m4.
22691
22692         Module chown.
22693         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
22694         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
22695
22696         Module dup2.
22697         * m4/dup2.m4: New file.
22698
22699         Module ftruncate.
22700         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
22701         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
22702
22703         Module getgroups.
22704         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
22705         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
22706
22707         Module gettimeofday.
22708         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
22709         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
22710         gl_PREREQ_GETTIMEOFDAY.
22711
22712         Module mkdir.
22713         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
22714         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
22715
22716         Module mkstemp.
22717         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
22718         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
22719         jm_AC_TYPE_UINTMAX_T.
22720         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
22721
22722         Module stat.
22723         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
22724         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
22725
22726         Module lstat.
22727         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
22728         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
22729
22730         Module timespec.
22731         * m4/timespec.m4 (gl_TIMESPEC): New macro.
22732         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
22733         * m4/st_mtim.m4: Indentation.
22734
22735         Module nanosleep.
22736         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
22737         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
22738         gl_PREREQ_NANOSLEEP.
22739
22740         Module regex.
22741         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
22742         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
22743         (gl_REGEX): New macro.
22744
22745         Module rename.
22746         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
22747         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
22748
22749         Module rmdir.
22750         * m4/rmdir.m4: New file.
22751
22752         Module utime.
22753         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
22754         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
22755         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
22756
22757         Module dirname.
22758         * m4/dirname.m4: New file.
22759
22760         Module getopt.
22761         * m4/getopt.m4: New file.
22762
22763         Module unistd-safer.
22764         * m4/unistd-safer.m4: New file.
22765
22766         Module fnmatch.
22767         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
22768         declaration.
22769         (gl_PREREQ_FNMATCH_EXTRA): New macro.
22770         (gl_FUNC_FNMATCH_POSIX): New macro.
22771         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
22772         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
22773         simply fnmatch.
22774
22775         Module exclude.
22776         * m4/exclude.m4: New file.
22777
22778         Module human.
22779         * m4/human.m4: New file.
22780
22781         Module acl.
22782         * m4/acl.m4: Nop.
22783
22784         Module backupfile.
22785         * m4/backupfile.m4: New file.
22786         * m4/d-ino.m4: Indentation.
22787
22788         Module fsusage.
22789         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
22790         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
22791         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
22792
22793         Module dirfd.
22794         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
22795         requirements.
22796
22797         Module euidaccess.
22798         * m4/euidaccess.m4: New file.
22799
22800         Module file-type.
22801         * m4/file-type.m4: New file.
22802
22803         Module fileblocks.
22804         * m4/fileblocks.m4: New file.
22805
22806         Module filemode.
22807         * m4/filemode.m4: New file.
22808
22809         Module isdir.
22810         * m4/isdir.m4: New file.
22811
22812         Module lchown.
22813         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
22814         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
22815
22816         Module makepath.
22817         * m4/makepath.m4: New file.
22818
22819         Module modechange.
22820         * m4/modechange.m4: New file.
22821
22822         Module mountlist.
22823         * m4/mountlist.m4: New file.
22824         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
22825         Indentation.
22826
22827         Module path-concat.
22828         * m4/path-concat.m4: New file.
22829
22830         Module pathmax.
22831         * m4/pathmax.m4: New file.
22832
22833         Module same.
22834         * m4/same.m4: New file.
22835
22836         Module save-cwd.
22837         * m4/save-cwd.m4: New file.
22838
22839         Module savedir.
22840         * m4/savedir.m4: New file.
22841
22842         Module xgetcwd.
22843         * m4/xgetcwd.m4: New file.
22844         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
22845
22846         Module xreadlink.
22847         * m4/xreadlink.m4: New file.
22848
22849         Module safe-read.
22850         * m4/safe-read.m4: New file.
22851
22852         Module safe-write.
22853         * m4/safe-write.m4: New file.
22854
22855         Module closeout.
22856         * m4/closeout.m4: New file.
22857
22858         Module stdio-safer.
22859         * m4/stdio-safer.m4: New file.
22860
22861         Module getpass.
22862         * m4/getpass.m4: New file.
22863
22864         Module getugroups.
22865         * m4/getugroups.m4: New file.
22866
22867         Module group-member.
22868         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
22869         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
22870
22871         Module idcache.
22872         * m4/idcache.m4: New file.
22873
22874         Module userspec.
22875         * m4/userspec.m4: New file.
22876
22877         Module gettime.
22878         * m4/clock_time.m4: New file.
22879         * m4/gettime.m4: New file.
22880
22881         Module settime.
22882         * m4/settime.m4: New file.
22883
22884         Module posixtm.
22885         * m4/posixtm.m4: New file.
22886
22887         Module gethostname.
22888         * m4/gethostname.m4: New file.
22889
22890         Module canon-host.
22891         * m4/canon-host.m4: New file.
22892
22893         Module gettext.
22894         * m4/codeset.m4: New file, from gettext-0.11.5.
22895         * m4/gettext.m4: New file, from gettext-0.11.5.
22896         * m4/glibc21.m4: New file, from gettext-0.11.5.
22897         * m4/iconv.m4: New file, from gettext-0.11.5.
22898         * m4/intdiv0.m4: New file, from gettext-0.11.5.
22899         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
22900         * m4/inttypes.m4: New file, from gettext-0.11.5.
22901         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
22902         * m4/isc-posix.m4: New file, from gettext-0.11.5.
22903         * m4/lcmessage.m4: New file, from gettext-0.11.5.
22904         * m4/lib-ld.m4: New file, from gettext-0.11.5.
22905         * m4/lib-link.m4: New file, from gettext-0.11.5.
22906         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
22907         * m4/progtest.m4: New file, from gettext-0.11.5.
22908         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
22909         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
22910         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
22911
22912         Module localcharset.
22913         * m4/localcharset.m4: New file.
22914
22915         Module hard-locale.
22916         * m4/hard-locale.m4: New file.
22917
22918         Module mbswidth.
22919         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
22920         onceonly macros.
22921         * m4/mbrtowc.m4: Add comment.
22922
22923         Module memcasecmp.
22924         * m4/memcasecmp.m4: New file.
22925
22926         Module memcoll.
22927         * m4/memcoll.m4: New file.
22928
22929         Module unicodeio.
22930         * m4/unicodeio.m4: New file.
22931
22932         Module rpmatch.
22933         * m4/rpmatch.m4: New file.
22934
22935         Module yesno.
22936         * m4/yesno.m4: New file.
22937
22938         Module exitfail.
22939         * m4/exitfail.m4: New file.
22940
22941         Module c-stack.
22942         * m4/c-stack.m4 (gl_C_STACK): New macro.
22943         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
22944
22945         Module error.
22946         * m4/error.m4 (gl_ERROR): New macro.
22947         (jm_PREREQ_ERROR): Use onceonly macros.
22948
22949         Module fatal.
22950         * m4/fatal.m4: New file.
22951
22952         Module getloadavg.
22953         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
22954         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
22955
22956         Module getpagesize.
22957         * m4/getpagesize.m4: New file.
22958
22959         Module getusershell.
22960         * m4/getusershell.m4: New file.
22961
22962         Module physmem.
22963         * m4/physmem.m4: New file.
22964
22965         Module posixver.
22966         * m4/posixver.m4: New file.
22967
22968         Module quotearg.
22969         * m4/quotearg.m4: New file.
22970
22971         Module quote.
22972         * m4/quote.m4: New file.
22973
22974         Module readutmp.
22975         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
22976
22977         Module sig2str.
22978         * m4/sig2str.m4: New file.
22979
22980         Other.
22981         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
22982         ulonglong.m4.
22983         * m4/intmax_t.m4: New file.
22984         * m4/d-type.m4: Indentation.
22985         * m4/jm-macros.m4: Update.
22986         * m4/prereq.m4 (jm_PREREQ): Update.
22987         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
22988         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
22989         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
22990         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
22991         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
22992         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
22993         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
22994         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
22995         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
22996         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
22997         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
22998         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
22999         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
23000         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
23001         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
23002         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
23003         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
23004         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
23005         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
23006
23007 2002-12-24  Bruno Haible  <bruno@clisp.org>
23008
23009         * MODULES.txt: Update according to m4/ changes.
23010
23011         Module gettext.
23012         * config.rpath: New file, from gettext-0.11.5.
23013
23014         * modules/*: New module descriptions.
23015         * gnulib-tool: New file.
23016         * MODULES.html.sh: New file.
23017
23018 2002-12-21  Karl Berry  <karl@gnu.org>
23019
23020         * doc/fdl.texi: update to version 1.2.
23021
23022 2002-12-19  Karl Berry  <karl@gnu.org>
23023
23024         * config/config.guess: update from prep.
23025
23026 2002-12-18  Bruno Haible  <bruno@clisp.org>
23027
23028         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
23029         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
23030
23031 2002-12-17  Bruno Haible  <bruno@clisp.org>
23032
23033         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
23034         stdlib.h, string.h.
23035
23036 2002-12-17  Bruno Haible  <bruno@clisp.org>
23037
23038         * lib/canon-host.c (strdup): Remove unused declaration.
23039
23040         * lib/fsusage.c: Include full_read.h.
23041         (get_fs_usage): Use full_read instead of safe_read.
23042
23043         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
23044
23045 2002-12-12  Karl Berry  <karl@gnu.org>
23046
23047         * config/config.guess: update from prep.
23048
23049 2002-12-11  Bruno Haible  <bruno@clisp.org>
23050
23051         * m4/setenv.m4: New file, from gettext-0.11.5.
23052
23053 2002-12-11  Bruno Haible  <bruno@clisp.org>
23054
23055         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
23056         not unsetenv().
23057         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
23058         modifications:
23059
23060         2002-12-11  Bruno Haible  <bruno@clisp.org>
23061
23062                 * setenv.c (alloca): Fall back to malloc.
23063                 (freea): New macro.
23064                 (setenv): Use freea() to free memory allocated with alloca().
23065
23066         2002-11-13  Bruno Haible  <bruno@clisp.org>
23067
23068                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
23069                 function declarations.
23070                 * unsetenv.c (unsetenv): Likewise.
23071
23072         2002-03-04  Bruno Haible  <bruno@clisp.org>
23073
23074                 Portability to AIX 4.3.3.
23075                 * unsetenv.c: New file, extracted from setenv.c.
23076                 * setenv.c: Move the unsetenv() function to unsetenv.c.
23077
23078         2001-12-20  Bruno Haible  <bruno@clisp.org>
23079
23080                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
23081                 use malloc instead. For SunOS 4.
23082
23083         2001-12-11  Bruno Haible  <bruno@clisp.org>
23084
23085                 * setenv.c: Declare alloca.
23086                 (compar_fn_t): New typedef.
23087                 (KNOWN_VALUE, STORE_VALUE): Use it.
23088
23089         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
23090         setenv.h.
23091
23092 2002-12-10  Paul Eggert  <eggert@twinsun.com>
23093
23094         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
23095         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
23096         Choose values that are less likely to collide with system fnmatch
23097         options.
23098         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
23099         defined (e.g., a pure POSIX system).
23100         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
23101         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
23102
23103 2002-12-06  Paul Eggert  <eggert@twinsun.com>
23104
23105         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
23106         a pain in practice to deal with generated m4 files.  This change
23107         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
23108
23109         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
23110         and jm-glibc-io.m4, as they are no longer a special case.
23111         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
23112         kludge and the auto-generation stuff.  Check only whether the
23113         functions are declared, not whether they exist, since older hosts
23114         that don't declare the functions can't use the optimization anyway.
23115
23116 2002-12-06  Jim Meyering  <jim@meyering.net>
23117
23118         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
23119
23120         Merge in changes from libc's misc/error.c, in preparation
23121         for the merge of gnulib's changes back into libc.
23122
23123         * lib/error.c (_): Define only if not already defined.
23124         Move definition to follow all #include directives.
23125         Include unlocked-io.h only if !_LIBC.
23126         [_LIBC]: Include <libio/libioP.h>.
23127         [USE_IN_LIBIO]: Include <libio/iolibio.h>
23128         (fflush): Tweak definition to use INTUSE.
23129         (putc): Define.
23130
23131 2002-12-05  Paul Eggert  <eggert@twinsun.com>
23132
23133         * lib/alloca.c [defined emacs]: Include "lisp.h".
23134         (xalloc_die) [defined emacs]: New macro.
23135         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
23136         [! defined emacs]: Include <xalloc.h>.
23137         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
23138         (pointer): Typedef to POINTER_TYPE *.
23139         (malloc): Remove decl; we now always use xmalloc.
23140         (alloca): Use old-style definition, since Emacs needs this.
23141         Check for arithmetic overflow when computing combined size.
23142
23143 2002-12-04  Paul Eggert  <eggert@twinsun.com>
23144
23145         Do not generate unlocked-io.h automatically, since it's easier to
23146         maintain it by hand.
23147
23148         * lib/unlocked-io.h: New file, from GNU diffutils,
23149         but with proper copyright notice and attribution.
23150         * lib/gen-uio: Remove.
23151         * lib/Makefile.am: Add copyright notice.
23152         (libfetish_a_SOURCES): Add unlocked-io.h.
23153         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
23154         (DISTCLEANFILES, io_functions): Remove macros.
23155         (EXTRA_DIST): Remove gen_uio.
23156         (unlocked-io.h): Remove rule.
23157
23158 2002-12-04  Jim Meyering  <jim@meyering.net>
23159
23160         Reflect the fact that stat.c and lstat.c are no longer generated.
23161         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
23162         (DISTCLEANFILES): Likewise.
23163         (EXTRA_DIST): Likewise.
23164         (all_local): Don't depend on stat.c or lstat.c.
23165         (stat.c, lstat.c): Remove rules.
23166         (EXTRA_DIST): Remove xstat.in.
23167
23168         * lib/xstat.in: Remove file.  Contents moved into stat.c.
23169         * lib/stat.c: New file.  Contents mostly from xstat.in.
23170         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
23171         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
23172
23173         * lib/safe-read.c: Rework so that it may serve to define safe_write,
23174         too.
23175         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
23176
23177 2002-12-03  Jim Meyering  <jim@meyering.net>
23178
23179         * lib/safe-read.c, safe-write.c: Change variable names and comments,
23180         but not semantics, to minimize the differences between these two files.
23181         (safe_read): Change comment to mention SAFE_READ_ERROR.
23182
23183         * lib/safe-read.c (IS_EINTR): Define.
23184         (safe_read): Use IS_EINTR in place of in-function cpp directives.
23185
23186 2002-12-02  Jim Meyering  <jim@meyering.net>
23187
23188         * lib/safe-read.c (EINTR): Define.
23189         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
23190         (INT_MAX): Provide fallback.
23191         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
23192
23193         * lib/safe-read.h (SAFE_READ_ERROR): Define.
23194
23195 2002-12-02  Bruno Haible  <bruno@clisp.org>
23196
23197         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
23198         Define, taken from safe-read.c.
23199         (INT_MAX): Provide fallback.
23200         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
23201         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
23202
23203         * lib/safe-read.c (EINTR): Remove definition.
23204         (safe_read): Don't use EINTR if it is absent.
23205
23206 2002-12-01  Jim Meyering  <jim@meyering.net>
23207
23208         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
23209         zero.
23210         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
23211
23212 2002-11-27  Paul Eggert  <eggert@twinsun.com>
23213
23214         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
23215         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
23216         with `if (! (value < limit)) abort ();', for readability.
23217
23218 2002-11-26  Karl Berry  <karl@gnu.org>
23219
23220         * lib/strdup.c: copy from libc again, with jim's ok.
23221         * lib/.cppi-disable: re-add strdup.c
23222
23223 2002-11-25  Karl Berry  <karl@gnu.org>
23224
23225         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
23226         instead of "strtol.c".
23227
23228 2002-11-25  Karl Berry  <karl@gnu.org>
23229
23230         * config/install-sh: update from automake for variable quoting, $0 in
23231         error msgs, etc.
23232
23233         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
23234         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
23235         entry.
23236
23237 2002-11-25  Jim Meyering  <jim@meyering.net>
23238
23239         * lib/mktime.c: Sync from libc, now that it has the latest fix.
23240
23241 2002-11-24  Karl Berry  <karl@gnu.org>
23242
23243         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
23244         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
23245
23246 2002-11-24  Jim Meyering  <jim@meyering.net>
23247
23248         Update from coreutils:
23249
23250         * lib/mktime.c: Merge in changes from libc.
23251
23252         Avoid a link-time failure on some Linux systems.
23253         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
23254         (otherwise).
23255         (__mon_yday): Declare with the STATIC attribute.
23256         (__mktime_internal): Likewise.
23257         Based on a report from Greg Schafer.
23258
23259 2002-11-23  Jim Meyering  <jim@meyering.net>
23260
23261         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
23262         Use `unsigned', not `int', as type of index.
23263
23264         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
23265
23266         * lib/fsusage.c: Remove unneeded parentheses around operands of
23267         `defined'.
23268
23269 2002-11-22  Paul Eggert  <eggert@twinsun.com>
23270
23271         * lib/quotearg.h: Allow multiple inclusion by surrounding with
23272         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
23273         so that we can be included first.
23274         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
23275         * lib/quotearg.c: Include quotearg.h immediately after config.h.
23276         No need to include stddef.h or sys/types.h any more.
23277         Surround local include files with "", not "<>".
23278         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
23279         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
23280         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
23281         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
23282         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
23283         (ISPRINT): Remove; no longer needed now that we assume C89.
23284
23285         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
23286         Preserve errno.
23287
23288         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
23289         quotearg_char): Use SIZE_MAX rather than
23290         (size_t) -1 when we are talking about "infinity".
23291
23292         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
23293
23294 2002-11-22  Paul Eggert  <eggert@twinsun.com>
23295
23296         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
23297         hint that one should use `if (! x) abort ();' rather than `assert
23298         (x);', and anyway it's one less thing to worry about configuring.
23299         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
23300         hash_rehash, hash_insert): Use abort rather than assert.
23301
23302 2002-11-22  Bruno Haible  <bruno@clisp.org>
23303
23304         * lib/safe-read.h: Assume C89. Add comments.
23305         (safe_read): Change return type to size_t.
23306         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
23307         byte counts > SSIZE_MAX correctly.
23308         * lib/safe-write.h: New file.
23309         * lib/safe-write.c: New file.
23310         * lib/full-read.h: New file.
23311         * lib/full-read.c: New file.
23312         * lib/full-write.h: Assume C89. Add comments.
23313         * lib/full-write.c: Include safe-write.h.
23314         (full_write): Rewritten to use safe_write.
23315         Suggested by Jim Meyering and Paul Eggert.
23316
23317 2002-11-21  Jim Meyering  <jim@meyering.net>
23318
23319         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
23320
23321         Merge in changes from the coreutils.
23322
23323         2002-09-25  Paul Eggert  <eggert@twinsun.com>
23324         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
23325         <stdint.h>.
23326         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
23327         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
23328         int.  Work more efficiently if X is the same width as uintmax_t.
23329         Do not compare X to -1, to avoid bogus compiler warning.
23330         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
23331         Don't assume that f_frsize and f_bsize are the same type.
23332
23333         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
23334         warning on FreeBSD.
23335
23336         * lib/makepath.c (make_path): Restore umask *before* creating the final
23337         component.
23338         (make_path): Minor reformatting.
23339
23340         * lib/xmalloc.c: Adjust to work with new autoconf macros,
23341         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
23342         HAVE_MALLOC/HAVE_REALLOC.
23343
23344         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
23345         dummy ones.  At least on GNU/Linux systems, `auto' means something
23346         else.
23347         From Michael Stone.
23348
23349 2002-11-21  Bruno Haible  <bruno@clisp.org>
23350
23351         Remove case insensitive option matching.
23352         * lib/argmatch.h (argcasematch): Remove declaration.
23353         (ARGCASEMATCH): Remove macro.
23354         (__xargmatch_internal): Remove case_sensitive argument.
23355         (XARGMATCH): Update.
23356         (XARGCASEMATCH): Remove macro.
23357         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
23358         case_sensitive argument.
23359         (argcasematch): Remove function.
23360         (__xargmatch_internal): Remove case_sensitive argument.
23361         (main): Use XARGMATCH instead of XARGCASEMATCH.
23362
23363         * lib/xmalloc.c: Change compile-time error message. Add comment about
23364         required autoconf version.
23365
23366 2002-11-20  Paul Eggert  <eggert@twinsun.com>
23367
23368         Merge argmatch cleanups from Bison.  Assume C89.
23369
23370         * lib/argmatch.c: Include config.h here, not in argmatch.h.
23371         Include stdlib.h, for EXIT_FAILURE.
23372         Always include <string.h>, since we assume C89.
23373         (EXIT_FAILURE): Remove pre-C89 bug workaround.
23374         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
23375         Include <stddef.h> instead, since it's all we need for size_t.
23376         (PARAMS): Remove.  All uses removed.
23377         (ARRAY_CARDINALITY): Do not bother to #undef.
23378         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
23379         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
23380         Remove unnecessary parentheses.
23381         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
23382         Insert necessary parentheses.
23383         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
23384         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
23385
23386 2002-11-19  Bruno Haible  <bruno@clisp.org>
23387
23388         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
23389         * lib/mbswidth.h: Include <stddef.h>, for size_t.
23390
23391         * lib/mbswidth.h (PARAMS): Remove macro.
23392         (mbswidth, mbsnwidth): Use ANSI C function declarations.
23393         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
23394
23395         * lib/gcd.h (PARAMS): Remove macro.
23396         (gcd): Use ANSI C function declarations.
23397         * lib/gcd.c (gcd): Likewise.
23398
23399 2002-11-15  Bruno Haible  <bruno@clisp.org>
23400
23401         * lib/strcspn.c: Include <stddef.h>.
23402         (strcspn): Use ANSI C function declaration. Change return type to
23403         size_t. Use NULL.
23404         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
23405         (strpbrk): Use NULL.
23406         * lib/strpbrk.h (PARAMS): Remove macro.
23407         (strpbrk): Use ANSI C function declaration.
23408         * lib/strstr.c: Don't include <sys/types.h>.
23409         * lib/strstr.h (PARAMS): Remove macro.
23410         (strstr): Use ANSI C function declarations.
23411
23412 2002-11-14  Karl Berry  <karl@gnu.org>
23413
23414         * config/mkinstalldirs: `do' on separate line, instead of
23415         `for var; do'.
23416
23417 2002-11-06  Bruno Haible  <bruno@clisp.org>
23418
23419         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
23420         * lib/gcd.c (gcd): Likewise.
23421
23422 2002-11-05  Bruno Haible  <bruno@clisp.org>
23423
23424         * lib/gcd.h: New file, from gettext-0.11.5.
23425         * lib/gcd.c: New file, from gettext-0.11.5.
23426
23427 2002-11-05  Bruno Haible  <bruno@clisp.org>
23428
23429         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
23430         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
23431         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
23432         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
23433
23434         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
23435         <libintl.h>.
23436         * lib/makepath.c: Include gettext.h instead of <locale.h> and
23437         <libintl.h>.
23438
23439         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
23440         * lib/human.c: Include gettext.h instead of <libintl.h>.
23441         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
23442         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
23443         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
23444         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
23445         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
23446         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
23447         (textdomain): Remove definition.
23448         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
23449
23450         * lib/long-options.c: Remove include of <libintl.h> and definition of
23451         _.
23452         * lib/same.c: Remove include of <libintl.h> and definition of _.
23453
23454 2002-11-04  Owen Taylor  <otaylor@redhat.com>
23455
23456         * lib/config.charset: A few additions for Solaris.
23457
23458 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
23459
23460         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
23461         * lib/localcharset.c (locale_charset): Declare as extern "C".
23462
23463 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
23464
23465         * lib/config.charset: msdos in uk_UA uses CP1125.
23466
23467 2002-11-04  Bruno Haible  <bruno@clisp.org>
23468
23469         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
23470         * lib/strcase.h: New file, from GNU gettext-0.11.5.
23471         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
23472         * lib/strstr.h: New file, from GNU gettext-0.11.5.
23473         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
23474
23475 2002-11-04  Bruno Haible  <bruno@clisp.org>
23476
23477         * lib/localcharset.c (locale_charset): Don't return an empty string.
23478
23479 2002-11-04  Bruno Haible  <bruno@clisp.org>
23480
23481         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
23482         aliases.
23483
23484 2002-11-04  Bruno Haible  <bruno@clisp.org>
23485
23486         * lib/config.charset: Update for newest glibc. Add canonical names
23487         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
23488
23489 2002-11-04  Bruno Haible  <bruno@clisp.org>
23490
23491         * lib/config.charset: Add support for NetBSD.
23492
23493 2002-11-04  Bruno Haible  <bruno@clisp.org>
23494
23495         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
23496
23497 2002-11-01  Bruno Haible  <bruno@clisp.org>
23498
23499         * configure.in: Add AC_CONFIG_AUX_DIR call.
23500         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
23501         test/Makefile.
23502         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
23503
23504 2002-09-28  Karl Berry  <karl@gnu.org>
23505
23506         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
23507         installed automake until the next release, since changes have been
23508         made.
23509
23510 2002-09-25  Karl Berry  <karl@gnu.org>
23511
23512         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
23513         * lib/getopt*: copy from libc/posix.
23514         * lib/gettext.h: copy from gettext.
23515         * lib/.cppi-disable: add strdup.c, gettext.h.
23516
23517 2002-09-25  Karl Berry  <karl@gnu.org>
23518
23519         * config/srclist.txt: enable gettext.h check.
23520         * config/config.{guess,sub}: update from prep.
23521         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
23522                 from automake 1.6.3.
23523         See srclist*.
23524
23525 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
23526
23527         * regex.c (PATFETCH): Remove the translating fetch.
23528         (PATFETCH_RAW): Rename to PATFETCH.
23529         (set_image_of_range): New fun.
23530         (SET_RANGE_TABLE_WORK_AREA): Use it.
23531         (regex_compile): Don't translate the pattern chars so eagerly.
23532         Only do it when inserting an `exactn' bytecode or when handling
23533         a char-range.
23534         (mutually_exclusive_p): Avoid empty statement.
23535
23536 2002-07-06  Jim Meyering  <meyering@lucent.com>
23537
23538         * m4/README: Don't mention Makefile.am.in.
23539         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
23540
23541 2002-07-01  Jim Meyering  <meyering@lucent.com>
23542
23543         * lib/c-stack.c: Include sys/time.h.
23544         From Volker Borchert.
23545
23546 2002-06-26  Paul Eggert  <eggert@twinsun.com>
23547
23548         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
23549
23550 2002-06-26  Paul Eggert  <eggert@twinsun.com>
23551
23552         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
23553         New macro.  Use it uniformly instead of
23554         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
23555         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
23556         reported by Vin Shelton.
23557
23558 2002-06-22  Paul Eggert  <eggert@twinsun.com>
23559
23560         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
23561         Do not assume SA_SIGINFO behavior.
23562         Bug reported by Jim Meyering on NetBSD 1.5.2.
23563
23564 2002-06-22  Jim Meyering  <meyering@lucent.com>
23565
23566         * m4/c-stack.m4: New file, from diffutils-2.8.2.
23567         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
23568
23569         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
23570         now that configure.ac uses AC_GNU_SOURCE.
23571         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
23572         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
23573
23574         Update to latest tools.  Suggestions from Paul Eggert.
23575         * m4/stdbool.m4: New file, from diffutils-2.8.2.
23576         * m4/gnu-source.m4: Update from diffutils-2.8.2.
23577         * m4/fnmatch.m4: Likewise.
23578         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
23579         to AC_HEADER_STDBOOL
23580
23581 2002-06-22  Jim Meyering  <meyering@lucent.com>
23582
23583         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
23584         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
23585
23586 2002-06-22  Jim Meyering  <meyering@lucent.com>
23587
23588         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
23589
23590         * lib/exitfail.c, exitfail.h: Likewise.
23591         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
23592
23593         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
23594         of fnmatch.h.
23595         (EXTRA_DIST): Add fnmatch_loop.c.
23596         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
23597
23598         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
23599         * lib/fnmatch.c: Update from diffutils-2.8.2.
23600         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
23601         * lib/fnmatch.h: Remove file.
23602
23603 2002-06-21  Jim Meyering  <meyering@lucent.com>
23604
23605         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
23606         * m4/mbrtowc.m4: Likewise.
23607
23608         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
23609         * m4/mbswidth.m4: Reflect name change:
23610         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
23611         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
23612
23613         * m4/lib-link.m4: Update from gettext-0.11.2.
23614         * m4/gettext.m4: Likewise.
23615
23616         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
23617         From Alfred M. Szmidt.
23618
23619 2002-06-18  Paul Eggert  <eggert@twinsun.com>
23620
23621         * lib/file-type.h: Report an error if neither S_ISREG nor
23622         S_IFREG is defined, instead of using a test specific to glibc
23623         2.2.  This should be safe, since POSIX requires S_ISREG and
23624         Unix Version 7 had S_IFREG.  We don't need to check for
23625         <sys/types.h> since we don't use any symbols that it defines.
23626
23627 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
23628
23629         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
23630         $@-t, so that each temporary file name is unique and valid in the first
23631         8 characters, for operation under DOS.
23632
23633 2002-06-15  Paul Eggert  <eggert@twinsun.com>
23634
23635         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
23636
23637 2002-06-15  Jim Meyering  <meyering@lucent.com>
23638
23639         Work even with DJGPP 2.03, which lacks support for symlinks.
23640         From Richard Dawe.
23641         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
23642         is defined.
23643         * lib/lchown.c (S_ISLNK): Likewise.
23644
23645 2002-06-15  Jim Meyering  <meyering@lucent.com>
23646
23647         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
23648         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
23649         have been included before this file.
23650
23651 2002-06-14  Jim Meyering  <meyering@lucent.com>
23652
23653         * lib/file-type.h: Use the version from diffutils-2.8.2.
23654         * lib/file-type.c: Likewise.
23655
23656 2002-06-07  Jim Meyering  <meyering@lucent.com>
23657
23658         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
23659         They're needed at least for NetBSD 1.5.2.
23660         ($statxfs_includes): Include those same headers.
23661         ($statxfs_includes): Include sys/vfs.h if available.
23662         ($statxfs_includes): Likewise for sys/statvfs.h.
23663         Check for the following members in both structs statfs and statvfs:
23664         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
23665
23666 2002-06-01  Jim Meyering  <meyering@lucent.com>
23667
23668         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
23669         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
23670
23671 2002-05-28  Jim Meyering  <meyering@lucent.com>
23672
23673         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
23674         Reported by Volker Borchert.
23675
23676 2002-05-27  Jim Meyering  <meyering@lucent.com>
23677
23678         Fix a problem seen only on nonconforming systems whereby ls.c's
23679         use of localtime, and then of gettimeofday would cause trouble:
23680         the localtime call used to initialize rpl_gettimeofday's save
23681         mechanism would clobber ls's current local time information so
23682         that in any long listing the first file would always be listed
23683         with date 1970-01-01.  Analysis by Volker Borchert.
23684
23685         * lib/gettimeofday.c (localtime): Undefine.
23686         (rpl_localtime): New function.
23687
23688 2002-05-27  Jim Meyering  <meyering@lucent.com>
23689
23690         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
23691         localtime.
23692
23693         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
23694         use the replacement function; it wouldn't resolve at link time.
23695         Reported by Volker Borchert.
23696
23697 2002-05-22  Jim Meyering  <meyering@lucent.com>
23698
23699         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
23700         file-type.h.
23701         * lib/file-type.h: New file.
23702         * lib/file-type.c (file_type): New file/function.  Extracted from
23703         diffutils.
23704
23705 2002-04-30  Jim Meyering  <meyering@lucent.com>
23706
23707         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
23708
23709 2002-04-29  Paul Eggert  <eggert@twinsun.com>
23710
23711         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
23712
23713 2002-04-29  Paul Eggert  <eggert@twinsun.com>
23714
23715         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
23716         Do not check for alloca.h (no longer used) or stdbool.h (was never
23717         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
23718
23719 2002-04-29  Paul Eggert  <eggert@twinsun.com>
23720
23721         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
23722
23723 2002-04-29  Jim Meyering  <meyering@lucent.com>
23724
23725         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
23726         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
23727         Use AC_FUNC_STRNLEN here instead.
23728
23729         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
23730         With autoconf-2.53a, it's part of AC_PROG_CC.
23731
23732 2002-04-28  Paul Eggert  <eggert@twinsun.com>
23733
23734         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
23735         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
23736
23737 2002-04-28  Paul Eggert  <eggert@twinsun.com>
23738
23739         * lib/sig2str.h, lib/sig2str.c: New files.
23740         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
23741
23742 2002-04-28  Paul Eggert  <eggert@twinsun.com>
23743
23744         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
23745         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
23746         of 127, since 64 is the largest conceivable number for ancient
23747         nonstandard hosts.
23748         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
23749
23750 2002-04-28  Jim Meyering  <meyering@lucent.com>
23751
23752         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
23753
23754 2002-04-24  Jim Meyering  <meyering@lucent.com>
23755
23756         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
23757         (jm_PREREQ): Use it.
23758
23759         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
23760         mach/mach.h fcntl.h.
23761         Check for this function: setlocale.
23762
23763 2002-04-24  Jim Meyering  <meyering@lucent.com>
23764
23765         * lib/gettext.h: New file, from Gettext.
23766         * lib/Makefile.am (INCLUDES): Remove -I../intl.
23767         (libfetish_a_SOURCES): Add gettext.h.
23768
23769 2002-04-16  Jim Meyering  <meyering@lucent.com>
23770
23771         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
23772         ut_pid, ut_id, ut_exit.
23773
23774 2002-04-16  Jim Meyering  <meyering@lucent.com>
23775
23776         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
23777         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
23778         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
23779
23780 2002-04-12  Jim Meyering  <meyering@lucent.com>
23781
23782         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
23783         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
23784         existence of the getmntinfo function.  Needed for Darwin 5.3.
23785
23786         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
23787         This is necessary at least on Darwin 5.3.
23788
23789         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
23790         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
23791         strnlen.o in the library, and that makes some versions of ranlib
23792         object.
23793
23794 2002-04-12  Jim Meyering  <meyering@lucent.com>
23795
23796         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
23797
23798 2002-04-09  Jim Meyering  <meyering@lucent.com>
23799
23800         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
23801         to be more precise.  Rather than saying we're checking whether the
23802         function `works', say what we're testing.
23803         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
23804         Reported by Bruno Haible.
23805
23806 2002-03-10  Jim Meyering  <meyering@lucent.com>
23807
23808         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
23809         Suggestion from Santiago Vila.
23810
23811 2002-03-08  Jim Meyering  <meyering@lucent.com>
23812
23813         * lib/rename.c: Mention that this wrapper is needed also on
23814         mips-dec-ultrix4.4 systems.
23815
23816 2002-03-02  Jim Meyering  <meyering@lucent.com>
23817
23818         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
23819         not HAVE_CLOCK_SETTIME.
23820
23821 2002-02-27  Paul Eggert  <eggert@twinsun.com>
23822
23823         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
23824         Check for clock_settime.
23825
23826 2002-02-27  Paul Eggert  <eggert@twinsun.com>
23827
23828         * lib/nanosleep.h: Rename to....
23829         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
23830
23831         * lib/gettime.c: New file.
23832         * lib/settime.c: New file.
23833         * lib/stime.c: Remove.
23834
23835         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
23836         timespec.h.  Remove nanosleep.h.
23837
23838 2002-02-25  Paul Eggert  <eggert@twinsun.com>
23839
23840         * m4/acl.m4: New file.
23841         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
23842         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
23843
23844 2002-02-25  Paul Eggert  <eggert@twinsun.com>
23845
23846         * lib/acl.c, lib/acl.h: New files.
23847         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
23848
23849 2002-02-24  Jim Meyering  <meyering@lucent.com>
23850
23851         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
23852         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
23853         cause trouble.  Reported by Nelson Beebe.
23854
23855 2002-02-23  Paul Eggert  <eggert@twinsun.com>
23856
23857         * lib/path-concat.c (xpath_concat): Reorder code to pacify
23858         compilers that don't know that xalloc_die never returns.
23859
23860 2002-02-20  Jim Meyering  <meyering@lucent.com>
23861
23862         * lib/getdate.c: Regenerate using bison-1.33.
23863
23864 2002-02-17  Jim Meyering  <meyering@lucent.com>
23865
23866         * config/config.guess (main): Don't use `head -1'; it's no longer
23867         portable. Use `sed 1q' instead.
23868
23869 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
23870
23871         * m4/codeset.m4: Upgrade to gettext-0.11.
23872         * m4/gettext.m4: Upgrade to gettext-0.11.
23873         * m4/glibc21.m4: Upgrade to gettext-0.11.
23874         * m4/iconv.m4: Upgrade to gettext-0.11.
23875         * m4/isc-posix.m4: Upgrade to gettext-0.11.
23876         * m4/lcmessage.m4: Upgrade to gettext-0.11.
23877         * m4/lib-ld.m4: New file, from gettext-0.11.
23878         * m4/lib-link.m4: New file, from gettext-0.11.
23879         * m4/lib-prefix.m4: New file, from gettext-0.11.
23880         * m4/progtest.m4: Upgrade to gettext-0.11.
23881
23882 2002-02-15  Paul Eggert  <eggert@twinsun.com>
23883
23884         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
23885         (jm_PREREQ): Use it.
23886
23887 2002-02-15  Paul Eggert  <eggert@twinsun.com>
23888
23889         * lib/posixver.c, lib/posixver.h: New files.
23890         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
23891
23892 2002-02-02  Paul Eggert  <eggert@twinsun.com>
23893             Bruno Haible  <bruno@clisp.org>
23894
23895         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
23896         (fwrite_success_callback): New declaration.
23897         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
23898         print_unicode_char. Call failure callback instead of error.
23899         (fwrite_success_callback): New function.
23900         (exit_failure_callback): New function.
23901         (fallback_failure_callback): New function.
23902         (print_unicode_char): Call unicode_to_mb.
23903
23904 2002-01-26  Jim Meyering  <meyering@lucent.com>
23905
23906         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
23907         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
23908
23909 2002-01-26  Jim Meyering  <meyering@lucent.com>
23910
23911         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
23912
23913 2002-01-22  Paul Eggert  <eggert@twinsun.com>
23914
23915         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
23916
23917 2002-01-22  Jim Meyering  <meyering@lucent.com>
23918
23919         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
23920         Otherwise, some versions of automake would omit the rule that makes
23921         Makefile from Makefile.in.
23922
23923 2002-01-21  Paul Eggert  <eggert@twinsun.com>
23924
23925         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
23926         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
23927         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
23928         (memcoll): Set errno to zero if there is no error.
23929
23930         * lib/quotearg.c (quotearg_buffer_restyled):
23931         Fix bug with quoting buffers containing NUL when backslashing escapes.
23932         This bug was exposed by the other changes in this patch.
23933         (quotearg_n_options): New arg ARGSIZE.
23934         All callers changed.
23935         (quoting_options_from_style): New function.
23936         (quotearg_n_style): Use it.
23937         (quotearg_n_style_mem): New function.
23938
23939         * lib/quotearg.h (quotearg_n_style_mem): New function.
23940
23941 2002-01-19  Jim Meyering  <meyering@lucent.com>
23942
23943         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
23944         Remove useless quotes: DF_PROG="df".
23945         * m4/strnlen.m4: New file.
23946
23947 2002-01-16  Paul Eggert  <eggert@twinsun.com>
23948
23949         * lib/backupfile.c (ISDIGIT): Comment fix.
23950         * lib/getdate.y (ISDIGIT): Likewise.
23951         * lib/posixtm.c (ISDIGIT, year): Likewise.
23952         * lib/strverscmp.c (ISDIGIT): Likewise.
23953         * lib/userspec.c (ISDIGIT): Likewise.
23954
23955 2002-01-16  Jim Meyering  <meyering@lucent.com>
23956
23957         * lib/getdate.y: Add three semicolons, each just before a closing
23958         brace. Bison (as of version 1.31) no longer papers over that mistake.
23959
23960 2002-01-05  Jim Meyering  <meyering@lucent.com>
23961
23962         * lib/version-etc.c (version_etc_copyright): Update copyright year.
23963
23964 2001-12-19  Paul Eggert  <eggert@twinsun.com>
23965
23966         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
23967         not silently exit merely because the output buffer happens to
23968         have nothing pending.
23969
23970 2001-12-18  Paul Eggert  <eggert@twinsun.com>
23971
23972         See the big note in ../ChangeLog.
23973         * lib/human.c (suffixes): Prefer K to k for 1024.
23974         (generate_suffix_backwards): New function.
23975         (human_readable_inexact): Use it.
23976         * lib/xstrtol.c (__xstrtol): If there is no number but there
23977         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
23978         Accept 'K' as well as 'k'.
23979
23980 2001-12-15  Jim Meyering  <meyering@lucent.com>
23981
23982         * lib/regex.h (__restrict_arr): Update from libc.
23983
23984         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
23985         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
23986         (STREQ): Define.
23987
23988 2001-12-14  Jim Meyering  <meyering@lucent.com>
23989
23990         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
23991         Suggestion from Bruno Haible.
23992
23993 2001-12-10  Jim Meyering  <meyering@lucent.com>
23994
23995         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
23996         xrealloc, Instead, include "xalloc.h".
23997         (initbuffer): Don't cast xmalloc return value to char*.
23998         (readline): Reword comment.
23999         Don't cast xrealloc return value to char*
24000         Return NULL, not 0.
24001
24002 2001-12-09  Jim Meyering  <meyering@lucent.com>
24003
24004         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
24005         about `signed and unsigned type in conditional expression'.
24006         * lib/posixtm.c (posix_time_parse): Likewise.
24007
24008         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
24009
24010         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
24011         to avoid a pedantic warning.
24012
24013         * lib/getstr.c: Don't include assert.h.
24014         (getstr): Remove warning-evoking assertions.
24015         Return -1 if offset parameter is out of bounds.
24016         Change the type of a local from int to size_t.
24017
24018         * lib/strftime.c (my_strftime_localtime_r): Include this function
24019         definition in the `#if ! HAVE_TM_GMTOFF' block.
24020
24021         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
24022         Include xalloc.h instead.
24023
24024 2001-12-02  Jim Meyering  <meyering@lucent.com>
24025
24026         * lib/tempname.c: Don't declare getenv, thus reverting the change of
24027         2001-11-18.  It's no longer necessary, now that stdlib.h is always
24028         included.
24029
24030         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
24031         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
24032
24033 2001-11-30  Akim Demaille  <akim@epita.fr>
24034
24035         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
24036         before being defined.
24037
24038 2001-11-27  Paul Eggert  <eggert@twinsun.com>
24039
24040         * lib/quotearg.h (quotearg_n, quotearg_n_style):
24041         First arg is int, not unsigned.
24042         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
24043         (SIZE_MAX, UINT_MAX): New macros.
24044         (quotearg_n_options): Abort if N is negative.
24045         Avoid overflow check on hosts where size_t is 64 bits and int
24046         is 32 bits, as overflow is impossible there.
24047         Fix off-by-one typo that caused unnecessary reallocation.
24048
24049 2001-11-27  Jim Meyering  <meyering@lucent.com>
24050
24051         * lib/tempname.c: Merge with version from libc.
24052         * lib/regex.c: Likewise.
24053
24054         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
24055         systems for which STDC_HEADERS is 0, it was not included, resulting in
24056         a warning about an integer-to-pointer conversion problem with getenv.
24057         Reported by Volker Borchert.
24058
24059 2001-11-26  Jim Meyering  <meyering@lucent.com>
24060
24061         * lib/gtod.h: Remove file.
24062         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
24063         * lib/gettimeofday.c: Don't include gtod.h.
24064         (GTOD_init): Remove function.
24065         (rpl_gettimeofday): Do its job here instead, rather than aborting.
24066         Suggestion from Volker Borchert.
24067
24068 2001-11-23  Jim Meyering  <meyering@lucent.com>
24069
24070         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
24071         it.
24072         * lib/hash.c (struct hash_table): Define it here instead.
24073
24074 2001-11-22  Jim Meyering  <meyering@lucent.com>
24075
24076         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
24077
24078 2001-11-20  Jim Meyering  <meyering@lucent.com>
24079
24080         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
24081         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
24082
24083 2001-11-19  Jim Meyering  <meyering@lucent.com>
24084
24085         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
24086         directory.  Use "conftestXXXXXX" as the template.
24087         Suggestion from Paul Eggert.
24088
24089         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
24090         immediately, so the test doesn't mistakenly hit the max-open-files
24091         limit.
24092
24093 2001-11-18  Paul Eggert  <eggert@twinsun.com>
24094
24095         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
24096         (TEMPORARIES): New macro.
24097         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
24098         removes an artificial limitation (e.g. HP-UX 10.20, where
24099         TMP_MAX is 17576).
24100
24101 2001-11-18  Jim Meyering  <meyering@lucent.com>
24102
24103         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
24104
24105 2001-11-18  Jim Meyering  <meyering@lucent.com>
24106
24107         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
24108         on SunOS 4.
24109
24110         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
24111         files will be created before anything else.
24112
24113 2001-11-17  Paul Eggert  <eggert@twinsun.com>
24114
24115         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
24116         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
24117
24118 2001-11-17  Jim Meyering  <meyering@lucent.com>
24119
24120         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
24121         Prompted by a report from Bob Proulx.
24122
24123         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
24124         Instead, require UTILS_FUNC_MKSTEMP.
24125
24126 2001-11-17  Jim Meyering  <meyering@lucent.com>
24127
24128         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
24129         Now, that's done as part of AC_FUNC_STRTOD.
24130
24131 2001-11-17  Jim Meyering  <meyering@lucent.com>
24132
24133         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
24134         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
24135         rather than group writable.  Patch by Juan F. Codagnone.
24136
24137         * lib/readtokens.c: Remove explicit declarations of xmalloc and
24138         xrealloc, Instead, include "xalloc.h".
24139
24140         * lib/mountlist.c: Include unlocked-io.h after all system headers.
24141         Remove explicit declarations of xmalloc, xrealloc,
24142         and xstrdup.  Instead, include "xalloc.h".
24143
24144         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
24145         unlocked-io.h.
24146         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
24147         Likewise.
24148         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
24149
24150         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
24151         Reported by Padraig Brady.
24152
24153         * lib/mkstemp.c: #undef mkstemp.
24154         Include config.h.
24155         (rpl_mkstemp): Rename from mkstemp.
24156         Protoize.
24157
24158 2001-11-16  Jim Meyering  <meyering@lucent.com>
24159
24160         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
24161         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
24162         determine the amount of total physical memory, use pstat_getstatic.
24163         HPUX-11 doesn't define _SC_PHYS_PAGES.
24164         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
24165         If sysconf couldn't be used to determine the amount of available
24166         physical memory, use both pstat_getstatic and pstat_getdynamic.
24167         Based on a patch from Bob Proulx.
24168
24169 2001-11-10  Jim Meyering  <meyering@lucent.com>
24170
24171         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
24172         (jm_PREREQ): Use it.
24173
24174 2001-11-09  Jim Meyering  <meyering@lucent.com>
24175
24176         * m4/jm-macros.m4: Require autoconf-2.52f.
24177         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
24178         Use these AC_-prefixed names, not the AM_-prefixed ones.
24179
24180         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
24181
24182 2001-11-05  Jim Meyering  <meyering@lucent.com>
24183
24184         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
24185
24186 2001-11-04  Jim Meyering  <meyering@lucent.com>
24187
24188         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
24189         $DEFS.
24190
24191 2001-11-03  Jim Meyering  <meyering@lucent.com>
24192
24193         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
24194         of AC_DEFUN.
24195
24196         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
24197         know the name of the variable in the macro definition.
24198
24199 2001-11-03  Jim Meyering  <meyering@lucent.com>
24200
24201         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
24202         in argmatch_to_argument call.
24203
24204         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
24205         argument.
24206
24207         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
24208         e.g., a fault due to an attempt to free a NULL pointer.
24209
24210 2001-11-01  Jim Meyering  <meyering@lucent.com>
24211
24212         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
24213         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
24214
24215 2001-11-01  Jim Meyering  <meyering@lucent.com>
24216
24217         * lib/dirfd.c, lib/dirfd.h: New files.
24218         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
24219
24220         * lib/hash.c (hash_print) [TESTING]: Clean up.
24221
24222 2001-10-22  Paul Eggert  <eggert@twinsun.com>
24223
24224         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
24225         to avoid a warning if -Wall.
24226
24227 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
24228
24229         * README: New file
24230         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
24231         (per RMS's instructions, this is now the canonical source)
24232         * lgpl/, gpl/: New directories.
24233
24234 2001-10-21  Paul Eggert  <eggert@twinsun.com>
24235
24236         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
24237
24238 2001-10-21  Jim Meyering  <meyering@lucent.com>
24239
24240         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
24241         this code would end up calling gettext even in packages built
24242         with --disable-nls.
24243         * lib/getopt.c (_): Likewise.
24244         * lib/regex.c (_): Likewise.
24245
24246 2001-10-20  Paul Eggert  <eggert@twinsun.com>
24247
24248         * m4/error.m4 (jm_PREREQ_ERROR):
24249         Do not invoke AC_CHECK_FUNCS with strerror_r, as
24250         AC_FUNC_STRERROR_R does that.
24251         Check for strerror declaration.
24252
24253         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
24254         are supposed to have them these days.
24255         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
24256         Merge changes from latest Autoconf CVS.
24257         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
24258         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
24259         POSIX decided to standardize on the int flavor of strerror_r.
24260
24261 2001-10-20  Paul Eggert  <eggert@twinsun.com>
24262
24263         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
24264         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
24265         Use strerror_r that is only a macro, even if it is not a function.
24266         (strerror): Check for HAVE_DECL_STRERROR before declaring.
24267         (private_strerror): Use prototypes, not old-style function definition.
24268         (print_errno_message): New function.
24269         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
24270         char*-flavored one.
24271         (error_tail, error, error_at_line): Use it.
24272
24273 2001-10-11  Jim Meyering  <meyering@lucent.com>
24274
24275         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
24276         and quote_n (1, ... to avoid clobbering a buffer.
24277
24278 2001-10-05  Jim Meyering  <meyering@lucent.com>
24279
24280         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
24281         hash-pjw.h.
24282         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
24283         * lib/hash-pjw.h: New file.
24284
24285 2001-09-30  Jim Meyering  <meyering@lucent.com>
24286
24287         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
24288         `struct fsstat' has the `f_fstypename' member.
24289         Use that to define FS_TYPE, which is now used to make
24290         the getfsstat link test tighter.
24291
24292 2001-09-30  Jim Meyering  <meyering@lucent.com>
24293
24294         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
24295         Include <sys/ucred.h>, for Apple Darwin.
24296         Include sys/mount.h and sys/fs_types.h only if available.
24297         (FS_TYPE): Define.
24298         (read_filesystem_list): Use FS_TYPE.
24299
24300 2001-09-29  Paul Eggert  <eggert@twinsun.com>
24301
24302         * lib/exclude.c (excluded_filename): 0 -> false, since it's
24303         a boolean context.
24304
24305 2001-09-29  Jim Meyering  <meyering@lucent.com>
24306
24307         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
24308         [one-argument getmntent function]): Include stdio.h before mntent.h.
24309         SunOS 4.1.x needs it for the declaration of `FILE'.
24310         Patch by Volker Borchert.
24311
24312         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
24313         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
24314         sys/fs_types.h, and make the link-test for getfsstat guard #include
24315         directives with appropriate #if HAVE_*_H tests so that we can
24316         detect getfsstat on Apple Darwin1.3.7 systems.
24317         Reported by Nelson Beebe.
24318         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
24319
24320 2001-09-28  Paul Eggert  <eggert@twinsun.com>
24321
24322         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
24323         #defines strtoimax.  Also treat the other strto* functions
24324         like strtoimax.
24325
24326         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
24327         Check for strtoul and strtoumax,
24328         as those declarations are made even in the signed case.
24329         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
24330         Likewise, for strtol and strtoimax.
24331
24332 2001-09-28  Paul Eggert  <eggert@twinsun.com>
24333
24334         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
24335         #defines strtoimax.  Also treat the other strto* functions
24336         like strtoimax.
24337
24338         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
24339         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
24340         (strtoimax, strtoumax): Do not declare if already defined as a macro.
24341
24342 2001-09-26  Jim Meyering  <meyering@lucent.com>
24343
24344         Most macros in unlocked-io.h had the wrong number of arguments.
24345         * lib/gen-uio: New script.
24346         (USE_UNLOCKED_IO): Define to 1 if not already defined.
24347         * lib/unlocked-io.hin: Remove file.
24348         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
24349         rather than trying to embed it here.
24350         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
24351         Reported by Padraig Brady.
24352
24353 2001-09-25  Volker Borchert  <bt@teknon.de>
24354
24355         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
24356         `result'.
24357
24358 2001-09-24  Jim Meyering  <meyering@lucent.com>
24359
24360         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
24361
24362 2001-09-23  Jim Meyering  <meyering@lucent.com>
24363
24364         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
24365         instead of the mere test for existence of mntent.h.  The latter
24366         would get a false-positive on AIX 3.4 systems.
24367         In the outer getmntent if-block, don't die if neither of the getmntent
24368         tests succeeds.  Instead, just fall through and continue with the
24369         remaining tests.
24370
24371 2001-09-23  Jim Meyering  <meyering@lucent.com>
24372
24373         * lib/mountlist.c: Remove useless parentheses in #if directives.
24374         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
24375         the deprecated MOUNTED symbol is no longer defined in mntent.h.
24376
24377 2001-09-22  Jim Meyering  <meyering@lucent.com>
24378
24379         * m4/gettext.m4: New file.  From gettext.
24380         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
24381         * m4/progtest.m4: Likewise
24382         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
24383         * m4/glibc21.m4: Likewise.
24384
24385         * m4/libintl.m4: Remove.  No longer used.
24386
24387 2001-09-22  Jim Meyering  <meyering@lucent.com>
24388
24389         * lib/localcharset.c: Update from latest gettext.
24390         * lib/config.charset: Likewise.
24391
24392 2001-09-20  Jim Meyering  <meyering@lucent.com>
24393
24394         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
24395         strtoimax.
24396         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
24397         strtoumax.
24398
24399 2001-09-20  Jim Meyering  <meyering@lucent.com>
24400
24401         * lib/xstrtol.c (strtoimax): Guard declaration with
24402         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
24403         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
24404         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
24405         (strtoumax): Likewise, for completeness (it wasn't necessary).
24406
24407 2001-09-17  Paul Eggert  <eggert@twinsun.com>
24408
24409         * lib/strtoimax.c (HAVE_LONG_LONG):
24410         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
24411         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
24412         to work around bug in IBM C compiler.
24413
24414 2001-09-17  Jim Meyering  <meyering@lucent.com>
24415
24416         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
24417         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
24418         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
24419         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
24420         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
24421         whenever the right hand side need not be expanded by the shell.
24422
24423 2001-09-16  Paul Eggert  <eggert@twinsun.com>
24424
24425         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
24426         library.  It's not correct, as some older glibcs are buggy.
24427         fnmatch wasn't fixed until glibc 2.2.
24428
24429         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
24430         special shell magic here.
24431
24432 2001-09-16  Jim Meyering  <meyering@lucent.com>
24433
24434         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
24435         * m4/jm-macros.m4: Require it.
24436
24437 2001-09-16  Jim Meyering  <meyering@lucent.com>
24438
24439         * lib/mkdir.c: New file.
24440
24441 2001-09-15  Jim Meyering  <meyering@lucent.com>
24442
24443         * m4/jm-macros.m4: Check for help2man.
24444
24445 2001-09-11  Jim Meyering  <meyering@lucent.com>
24446
24447         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
24448         The body, by Paul Eggert, was moved here from configure.in.
24449         * m4/jm-macros.m4: Require UTILS_HOST_OS.
24450
24451 2001-09-04  Paul Eggert  <eggert@twinsun.com>
24452
24453         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
24454         (jm_PREREQ): Use it.
24455
24456 2001-09-04  Paul Eggert  <eggert@twinsun.com>
24457
24458         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
24459         Use ssize_t, not int, to store result of readlink.
24460         Check for ssize_t overflow as well as size_t overflow,
24461         as POSIX says the result of readlink is implementation-defined
24462         when ssize_t overflows.
24463         Remove unnecessary cast to char*.
24464         Use free+malloc instead of realloc, as the storage doesn't need
24465         to be preserved and it's clearer and can be more efficient that way.
24466         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
24467         * lib/xreadlink.h (xreadlink): Update prototype.
24468
24469 2001-09-04  Paul Eggert  <eggert@twinsun.com>
24470
24471         * lib/xgetcwd.c: Revert some of the previous change; intead,
24472         fix the HAVE_GETCWD_NULL code to behave more like the
24473         !HAVE_GETCWD_NULL code used to.
24474
24475         Include "xalloc.h".
24476         (xgetcwd): Do not return NULL when memory is exhausted; instead,
24477         invoke xalloc_die.
24478
24479 2001-09-03  Paul Eggert  <eggert@twinsun.com>
24480
24481         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
24482         sys/param.h, as pathmax.h includes them.
24483
24484 2001-09-03  Paul Eggert  <eggert@twinsun.com>
24485
24486         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
24487         (jm_PREREQ_XGETCWD): New macro.
24488
24489         * m4/getcwd.m4: New file.
24490
24491 2001-09-03  Paul Eggert  <eggert@twinsun.com>
24492
24493         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
24494         like the HAVE_GETCWD_NULL code.
24495         Include pathmax.h if not HAVE_GETCWD.
24496         Do not include xalloc.h.
24497         (INITIAL_BUFFER_SIZE): New symbol.
24498         Do not use xmalloc / xrealloc, since the caller is responsible for
24499         handling errors.  Preserve errno around `free' during failure.
24500         Do not overrun buffer when using getwd.
24501
24502 2001-09-03  Paul Eggert  <eggert@twinsun.com>
24503
24504         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
24505         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
24506         getcwd (NULL, 0).
24507
24508 2001-09-03  Paul Eggert  <eggert@twinsun.com>
24509
24510         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
24511         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
24512         spotted by Jim Meyering.
24513
24514 2001-09-03  Jim Meyering  <meyering@lucent.com>
24515
24516         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
24517         failure.
24518
24519 2001-09-02  Jim Meyering  <meyering@lucent.com>
24520
24521         * lib/error.c: Update from GNU libc.
24522
24523 2001-09-01  Jim Meyering  <meyering@lucent.com>
24524
24525         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
24526         Used by df.
24527
24528 2001-09-01  Jim Meyering  <meyering@lucent.com>
24529
24530         * lib/xreadlink.c: New file.
24531         * lib/xreadlink.h: New file.
24532         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
24533         xreadlink.h.
24534
24535         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
24536         doesn't conflict with sparc Solaris 7's definition in
24537         /usr/include/sys/int_types.h.
24538
24539         * lib/exclude.c: Use `""', not `<>' to #include non-system header
24540         files.
24541         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
24542         and strncasecmp as r-values.  Unixware didn't have declarations.
24543
24544 2001-08-31  Paul Eggert  <eggert@twinsun.com>
24545
24546         * lib/xstrtol.h: Add copyright notice.
24547         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
24548         LONGINT_INVALID_SUFFIX_CHAR.
24549
24550 2001-08-31  Paul Eggert  <eggert@twinsun.com>
24551
24552         * lib/xstrtol.c (strtoimax): New decl.
24553
24554 2001-08-31  Paul Eggert  <eggert@twinsun.com>
24555
24556         * lib/xgetcwd.c: Don't include pathmax.h.
24557         Include stdlib.h and unistd.h if available.
24558         Include xalloc.h.
24559         (xmalloc, xstrdup, free): Remove decls.
24560         (xgetcwd): Don't assume sizes fit in unsigned.
24561         Check for overflow when computing sizes.
24562         Simplify reallocation code.
24563
24564 2001-08-31  Paul Eggert  <eggert@twinsun.com>
24565
24566         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
24567         a directory's st_size can have an arbitrary value, so the old
24568         usage could waste an arbitrary amount of memory.  All uses
24569         changed.
24570         * lib/savedir.h: Update prototype.
24571
24572 2001-08-31  Paul Eggert  <eggert@twinsun.com>
24573
24574         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
24575
24576         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
24577         old strtoimax.c.
24578
24579         Also, make the following further changes to make this file's
24580         configuration more similar to that of strtol.c:
24581         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
24582         (strtoumax, uintmax_t, strtoull, strtol): Remove.
24583         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
24584         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
24585         changed to signed values.
24586
24587         And make the following changes as well:
24588         Fix copyright notice, as 1999 was missing.
24589         (verify): New macro.
24590         (strtoimax): Check sizes at compile-time, not run-time.
24591         Prefer strtol to strtoll if both work.
24592         (main): Remove; it was not that useful and was a pain to maintain.
24593
24594         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
24595
24596 2001-08-31  Jim Meyering  <meyering@lucent.com>
24597
24598         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
24599         Use an initial, malloc'd, buffer of length 128 rather than
24600         a statically allocated one of length 1024.
24601
24602 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24603
24604         Simplify code, partly by assuming autoconf 2.52 semantics.
24605
24606         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
24607
24608         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
24609         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
24610         All uses removed.
24611         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
24612         Move AC_REQUIRE to next-to-top level, to avoid confusion.
24613         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
24614         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
24615         jm_AC_HEADER_INTTYPES_H.
24616         * m4/jm-macros.m4 (jm_MACROS): Likewise.
24617
24618         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
24619
24620         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
24621         Quote first arg of AC_DEFUN.
24622         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
24623         since they are needed to parse the include file even if we need
24624         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
24625         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
24626         but with opposite signedness.
24627
24628 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24629
24630         Merge 'exclude' changes from tar 1.13.22.
24631         This fixes one or two unlikely storage allocation overflow bugs,
24632         but doesn't change user-visible behavior otherwise.
24633
24634 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24635
24636         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
24637         (jm_PREREQ_EXCLUDE): New macro.
24638
24639 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24640
24641         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
24642         tm to be declared.
24643
24644 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24645
24646         * lib/hash.c: Remove '2001' from copyright notice.
24647
24648 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24649
24650         * lib/full-write.h: New file.
24651         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
24652         * lib/full-write.c: Correct credits, as cccp.c no longer
24653         exists and anyway it was so heavily changed from the old cccp
24654         code as to be unrecognizable.  Include full-write.h.
24655         (full_write) Return size_t, with short writes meaning failure.
24656         All callers changed.  This fixes a bug with large buffers
24657         on 64-bit hosts.
24658         * lib/utime.c: Include full-write.h.
24659
24660 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24661
24662         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
24663         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
24664         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
24665         Include if available.
24666         (<xalloc.h>): Include
24667         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
24668         (verify): New macro.  Use it to verify that EXCLUDE macros do not
24669         collide with FNM macros.
24670         (struct patopts): New struct.
24671         (struct exclude): Use it, as exclude patterns now come with options.
24672         (new_exclude): Support above changes.
24673         (new_exclude, add_exclude_file):
24674         Initial size must now be a power of two to simplify overflow checking.
24675         (free_exclude, fnmatch_no_wildcards): New function.
24676         (excluded_filename): No longer requires options arg, as the options
24677         are determined by add_exclude.  Now returns bool, not int.
24678         (excluded_filename, add_exclude):
24679         Add support for the fancy new exclusion options.
24680         (add_exclude, add_exclude_file): Now takes int options arg.
24681         Check for arithmetic overflow when computing sizes.
24682         (add_exclude_file): xrealloc might modify errno, so don't
24683         realloc until after errno might be used.
24684
24685         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
24686         New macros.
24687         (free_exclude): New decl.
24688         (add_exclude, add_exclude_file): Now takes int options arg.
24689         (excluded_filename): No longer requires options arg, as the options
24690         are determined by add_exclude.  Now returns bool, not int.
24691
24692 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24693
24694         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
24695
24696 2001-08-27  Jim Meyering  <meyering@lucent.com>
24697
24698         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
24699
24700         * lib/version-etc.c (N_): Remove definition.
24701         Revert most of last change.
24702         Instead, simply don't mark the `Copyright...' string for translation.
24703         Based on advice from Paul Eggert.
24704
24705         * lib/strtoxmax.c: Tweak comment.
24706
24707 2001-08-26  Jim Meyering  <meyering@lucent.com>
24708
24709         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
24710
24711         * m4/xstrtoimax.m4: New file.
24712         * m4/xstrtoumax.m4: Add comments explaining why we
24713         AC_REPLACE_FUNCS(strtol).
24714
24715 2001-08-26  Jim Meyering  <meyering@lucent.com>
24716
24717         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
24718         of copyright with `%s' so translators don't get an untranslated
24719         message in 2002.
24720         (COPYRIGHT_YEAR): Define.
24721         (version_etc): Use fprintf rather than fputs.
24722         Suggestion from Ulrich Drepper.
24723
24724         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
24725
24726         * lib/strtoll.c: New file, from GNU libc.
24727         * lib/xstrtoimax.c: New file.
24728
24729         * lib/xstrtol.h: Add xstrtoimax.
24730         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
24731         * lib/strtoimax.c: New file.  Likewise, but first define
24732         STRTOUXMAX_SIGNED.
24733
24734         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
24735         ...
24736         * lib/strtoxmax.c: ... then renamed to this.
24737
24738 2001-08-18  Paul Eggert  <eggert@twinsun.com>
24739
24740         * m4/inttypes.m4: Add AC_PREREQ(2.13).
24741         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
24742         (jm_AC_TYPE_INTMAX_T): New macro.
24743         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
24744
24745         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
24746
24747         * m4/longlong.m4: Renamed from ulonglong.m4.
24748         * m4/inttypes.m4: Renamed from inttypes_h.m4.
24749         * m4/uintmax_t.m4: Removed.
24750
24751 2001-08-13  Paul Eggert  <eggert@twinsun.com>
24752
24753         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
24754         Port to Solaris 8, where 'sed' requires a space after the 'r'
24755         command, and where sh dislikes "$/".  Clean up the spacing a bit.
24756         Redirect output to $tmp just once.
24757
24758 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
24759
24760         * lib/addext.c (<errno.h>): Include.
24761         (errno): Declare if not defined.
24762         (addext): Work correctly when pathconf returns -1 and leaves
24763         errno alone because there is no limit.  Also, work even if
24764         pathconf returns a value greater than SIZE_MAX.
24765
24766 2001-08-12  Jim Meyering  <meyering@lucent.com>
24767
24768         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
24769         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
24770         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
24771         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
24772         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
24773         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
24774         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
24775         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
24776         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
24777         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
24778         utime.m4, utimes.m4, xstrtoumax.m4:
24779         Quote the first argument in each use of AC_DEFUN.
24780
24781 2001-08-12  Jim Meyering  <meyering@lucent.com>
24782
24783         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
24784         Simply `return getcwd (NULL, 0);'.
24785         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
24786         Use 1300 as initial value for length, not PATH_MAX.
24787
24788         * lib/pathmax.h: Clean up cpp syntax.
24789
24790 2001-08-12  Jim Meyering  <meyering@lucent.com>
24791
24792         * lib/gettimeofday.c: New file.
24793         * lib/gtod.h: New file.
24794         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
24795
24796 2001-08-05  Jim Meyering  <meyering@lucent.com>
24797
24798         * m4/jm-macros.m4: Require autoconf-2.52.
24799
24800 2001-08-04  Jim Meyering  <meyering@lucent.com>
24801
24802         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
24803         stmt, to get in sync with glibc.
24804
24805 2001-08-03  Paul Eggert  <eggert@twinsun.com>
24806
24807         The following changes are from gettext 0.10.39 as maintained by
24808         Bruno Haible.
24809
24810         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
24811         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
24812         with inverted sense.  All uses changed.
24813
24814         * lib/mbswidth.c: Don't include <limits.h>.
24815         Include <stdlib.h> and <string.h> unconditionally.
24816         (iswcntrl, mbsinit, ISCNTRL): New macros.
24817         (mbsnwidth): Use K&R style function declarations.
24818         Don't bother checking for MB_LEN_MAX == 1, since the compiler
24819         can optimize it when MB_CUR_MAX == 1.
24820         The width of control characters is zero, not 1.
24821
24822 2001-08-03  Paul Eggert  <eggert@twinsun.com>
24823
24824         The following changes are from gettext 0.10.39 as maintained by
24825         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
24826
24827         * m4/codeset.m4: Upgrade to serial AM1.
24828         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
24829         all uses changed.  Quote first arg of AC_DEFUN.
24830         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
24831
24832         * m4/iconv.m4: Upgrade to serial AM2.
24833         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
24834         Add --with-libconv-prefix.
24835         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
24836         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
24837         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
24838         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
24839         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
24840
24841         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
24842         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
24843         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
24844         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
24845         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
24846         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
24847         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
24848         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
24849         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
24850
24851         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
24852         string.h any more.
24853
24854         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
24855         not the default value.
24856
24857         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
24858         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
24859         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
24860         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
24861         Also check for iswcntrl, used for wcwidth fallback.
24862         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
24863         to Autoconf 2.13.
24864
24865 2001-08-03  Jim Meyering  <meyering@lucent.com>
24866
24867         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
24868         as it was in the original.  Reported by Paul Eggert.
24869
24870 2001-07-16  Jim Meyering  <meyering@lucent.com>
24871
24872         * m4/gettimeofday.m4: New file.
24873         Prompted by a report from Bernhard Baehr.
24874
24875 2001-07-15  Jim Meyering  <meyering@lucent.com>
24876
24877         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
24878         stuff. Now it's in ../Makefile.cfg.
24879
24880 2001-07-15  Jim Meyering  <meyering@lucent.com>
24881
24882         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
24883         (BUILT_SOURCES): Add unlocked-io.h.
24884         (io_functions): Define.
24885         (unlocked-io.h): New rule.
24886         (DISTCLEANFILES): Add unlocked-io.h.
24887         (all-local): Depend on unlocked-io.h, to ensure it is created.
24888
24889         * lib/unlocked-io.hin: New file
24890
24891         * lib/regex.c: Update from glibc.
24892
24893 2001-07-05  Jim Meyering  <meyering@lucent.com>
24894
24895         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
24896         recommendation.
24897         (libfetish_a_SOURCES): Put all .h files here instead.
24898         Remove a thus-exposed (better checks in automake) duplicate and
24899         two unnecessary .h files.
24900
24901 2001-07-04  Jim Meyering  <meyering@lucent.com>
24902
24903         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
24904         that generates jm-glibc-io.m4 so that it doesn't trigger any make
24905         distcheck failure.
24906
24907 2001-07-02  Jim Meyering  <meyering@lucent.com>
24908
24909         The following changes were prompted by suggestions from Bruno Haible.
24910
24911         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
24912         is now generated.
24913         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
24914         definition of EXTRA_DIST.
24915         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
24916         ensure that the generated file is created/updated whenever the list
24917         of $(unlocked_functions) is changed.
24918         (jm-glibc-io.m4): New rule.
24919         (unlocked-io.h): New rule -- currently unused.
24920
24921 2001-06-24  Jim Meyering  <meyering@lucent.com>
24922
24923         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
24924         unmatched right bracket, rather than kludging it with an extra,
24925         falsely-matching quote in a comment.  Patch by Akim Demaille.
24926
24927 2001-06-11  Jim Meyering  <meyering@lucent.com>
24928
24929         * lib/regex.c: Update from GNU libc.
24930
24931 2001-05-27  Jim Meyering  <meyering@lucent.com>
24932
24933         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
24934         Check for ut_type in struct utmp.
24935
24936 2001-05-27  Jim Meyering  <meyering@lucent.com>
24937
24938         * lib/readutmp.h (UT_TYPE): Define.
24939
24940 2001-05-24  Jim Meyering  <meyering@lucent.com>
24941
24942         * lib/argmatch.c: Include "quote.h".
24943         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
24944         quote function.  Reported by Göran Uddeborg.
24945
24946 2001-05-22  Jim Meyering  <meyering@lucent.com>
24947
24948         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
24949         now that we use the package-supplied version unconditionally.
24950         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
24951
24952 2001-05-21  Jim Meyering  <meyering@lucent.com>
24953
24954         * m4/regex.m4: Change a couple backticks to single quotes to avoid
24955         shell syntax errors.
24956
24957 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
24958
24959         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
24960
24961 2001-05-20  Paul Eggert  <eggert@twinsun.com>
24962
24963         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
24964         Don't bother to check library strftime, since
24965         we'll be using our own my_strftime function anyway.
24966         Define my_strftime instead of strftime.
24967
24968 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
24969
24970         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
24971         which is not yet declared.
24972
24973 2001-05-15  Jim Meyering  <meyering@lucent.com>
24974
24975         * m4/regex.m4: Use proper quoting so brackets appear in the test
24976         program.
24977         Reported by, and with help from, Bruno Haible.
24978
24979 2001-05-13  Jim Meyering  <meyering@lucent.com>
24980
24981         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
24982         undefined.
24983
24984 2001-05-11  Paul Eggert  <eggert@twinsun.com>
24985
24986         dirname code cleanup.  base_name now behaves more compatibly
24987         with POSIX basename when given file names that have trailing
24988         slashes, and similarly for dir_name.  Add new primitives
24989         base_len and dir_len.  Put the directory-name-related decls
24990         into dirname.h.
24991
24992         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
24993         * lib/backupfile.c (base_name): Likewise.
24994         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
24995         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
24996         * lib/makepath.c (strip_trailing_slashes): Likewise.
24997         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
24998         ISSLASH): Likewise.
24999         * lib/rename.c (strip_trailing_slashes): Likewise.
25000         * lib/same.c (base_name): Likewise.
25001         * lib/stripslash.c (ISSLASH): Likewise.
25002
25003         * lib/addext.c: Include <dirname.h> after size_t is defined.
25004         * lib/backupfile.c: Likewise.
25005
25006         * lib/addext.c (addext): Use base_len to trim redundant
25007         trailing slashes instead of doing it ourselves.
25008         But do not trim the last slash if it is not redundant.
25009
25010         * lib/backupfile.c (find_backup_file_name,
25011         max_backup_version): Use base_len instead of rolling it ourselves.
25012         Handle the case of "" and (on DOS) "C:" correctly.
25013
25014         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
25015         needed. Include <string.h>, <dirname.h>.
25016         (base_name): Allow file names ending in slashes, other than names
25017         that are all slashes.  In this case, return the basename followed
25018         by the slashes.  This is more general, and can be used in places
25019         where the original base_name purposely had an assertion failure.
25020         (base_len): New function.
25021
25022         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
25023         Do not include <assert.h>; no longer needed.
25024         Include xalloc.h.
25025         (memrchr): Remove decl.
25026         (dir_name_r): Remove.
25027         (dir_len): Renamed from dirlen.  All callers changed.
25028         Rewrite in terms of base_name, for simplicity and consistency.
25029         (dir_name): Never return NULL.  All callers changed.
25030         Do not include <stdlib.h> in test program; no longer needed.
25031         return 0; is fine for test program.
25032
25033         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
25034         New macros.
25035         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
25036
25037         * lib/path-concat.c (path_concat): Use base_len to compute
25038         base length, not strlen; this means we cannot rely on memcpy
25039         to null-terminate.
25040
25041         * lib/same.c (STREQ): Remove.
25042         (same_name): Handle the case where the basename ends in trailing '/'.
25043
25044         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
25045         a slash was stripped.  Do not strip the last slash after a
25046         file system prefix.
25047
25048 2001-05-11  Paul Eggert  <eggert@twinsun.com>
25049
25050         * lib/Makefile.am (libfetish_a_SOURCES):
25051         Add strftime.c, since we now compile it on all hosts.
25052
25053         * lib/strftime.c (my_strftime):
25054         Define to nstrftime if emacs, but only if my_strftime is not defined.
25055         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
25056         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
25057         Add one more extra argument: a nanoseconds value.
25058         All uses changed.
25059         (ns): New macro.
25060         (my_strftime function): Add %N format.
25061         (emacs_strftimeu): Renamed from emacs_strftime,
25062         with extra ut argument.
25063
25064 2001-05-09  Paul Eggert  <eggert@twinsun.com>
25065
25066         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
25067
25068 2001-04-21  Jim Meyering  <meyering@lucent.com>
25069
25070         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
25071         doesn't interfere.
25072
25073 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
25074
25075         * m4/ftruncate.m4: Check for chsize.
25076         Link with ftruncate.o unconditionally if ftruncate is missing.
25077         This was required when cross-compiling to i586-mingw32msvc.
25078
25079 2001-04-08  Jim Meyering  <meyering@lucent.com>
25080
25081         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
25082         recomputed; that's necessary when the offset spans a DST transition.
25083         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
25084
25085 2001-04-02  Jim Meyering  <meyering@lucent.com>
25086
25087         * lib/regex.h, regex.c: Update from GNU libc.
25088
25089 2001-03-24  Jim Meyering  <meyering@lucent.com>
25090
25091         * m4/jm-macros.m4: Require autoconf-2.49d.
25092
25093 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
25094
25095         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
25096
25097 2001-03-19  Paul Eggert  <eggert@twinsun.com>
25098
25099         * lib/version-etc.c (version_etc_copyright): Update to 2001.
25100
25101 2001-03-17  Jim Meyering  <meyering@lucent.com>
25102
25103         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
25104         now that the version in autoconf is equivalent.
25105         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
25106
25107         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
25108         Suggestion from Akim Demaille.
25109
25110         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
25111         (jm_PREREQ_TEMPNAME): New function.
25112
25113 2001-03-16  Paul Eggert  <eggert@twinsun.com>
25114
25115         * lib/tempname.c (uint64_t): Define to uintmax_t if
25116         not defined, and if UINT64_MAX is not defined.
25117         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
25118         Reported by John David Anglin.
25119
25120 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
25121
25122         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
25123         resolve alias if codeset is empty.
25124         * lib/config.charset (BeOS): Use wildcard syntax.
25125
25126 2001-03-13  Jim Meyering  <meyering@lucent.com>
25127
25128         * lib/path-concat.c (path_concat)
25129         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
25130         concatenating e.g., `C:' and `foo'.
25131         From Bruno Haible.
25132
25133 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
25134
25135         * lib/localcharset.c (locale_charset): Don't use
25136         setlocale(LC_CTYPE,NULL). Don't return NULL.
25137         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
25138
25139 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
25140
25141         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
25142         support for DOS/DJGPP.
25143
25144 2001-03-01  Paul Eggert  <eggert@twinsun.com>
25145
25146         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
25147         lacks mkstemp.  Compile our own tempname.c if we compile our own
25148         mkstemp.c, as mkstemp relies on tempname.
25149
25150 2001-03-01  Jim Meyering  <meyering@lucent.com>
25151
25152         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
25153         AH_VERBATIM really does output its argument verbatim.
25154
25155 2001-02-28  Paul Eggert  <eggert@twinsun.com>
25156
25157         * lib/Makefile.am (libfetish_a_SOURCES):
25158         Add dup-safer.c, fopen-safer.c.
25159         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
25160
25161         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
25162         * lib/unistd-safer.h: New files.
25163
25164 2001-02-25  Paul Eggert  <eggert@twinsun.com>
25165
25166         The mkstemp replacement is taken from glibc 2.2.2, with some
25167         portability fixes for use outside glibc, as follows:
25168
25169         * lib/tempname.c (struct_stat64): New macro.
25170         (direxists, __gen_tempname): Use it.
25171         This avoids a portability problem with Solaris 8.
25172
25173         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
25174         (<stddef.h>, <stdint.h>, <string.h>):
25175         Include only if STDC_HEADERS || _LIBC.
25176         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
25177         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
25178         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
25179         (__set_errno): Define this macro if <errno.h> doesn't.
25180         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
25181         Define these macros if <stdio.h> doesn't.
25182         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
25183         Define these macros if <sys/stat.h>
25184         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
25185         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
25186         __xstat64): Define if not _LIBC.
25187         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
25188         (__gen_tempname): Invoke gettimeofday only if
25189         HAVE_GETTIMEOFDAY || _LIBC;
25190         otherwise, fall back on plain "time".
25191         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
25192
25193         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
25194
25195         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
25196
25197 2001-02-18  Paul Eggert  <eggert@twinsun.com>
25198
25199         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
25200
25201 2001-02-17  Paul Eggert  <eggert@twinsun.com>
25202
25203         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
25204         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
25205         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
25206         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
25207
25208 2001-02-17  Paul Eggert  <eggert@twinsun.com>
25209
25210         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
25211         Remove workaround macros for hosts that have mbrtowc but not
25212         mbstate_t, as we now insist on proper declarations for both
25213         before using mbrtowc.
25214
25215 2001-02-17  Jim Meyering  <meyering@lucent.com>
25216
25217         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
25218         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
25219         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
25220         UnixWare 7.1.1.
25221
25222         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
25223         rather than AC_CACHE_VAL.
25224
25225 2001-02-17  Jim Meyering  <meyering@lucent.com>
25226
25227         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
25228         around included file name.
25229
25230         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
25231
25232         * lib/strftime.c: Update from GNU libc (the only changes were to
25233         comments).
25234
25235 2001-02-17  Jim Meyering  <meyering@lucent.com>
25236
25237         * lib/regex.c: Update from libc.
25238
25239 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
25240
25241         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
25242         clash.
25243
25244 2001-02-16  Paul Eggert  <eggert@twinsun.com>
25245
25246         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
25247         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
25248         Reported by Mark Hounschell via Paul Eggert.
25249
25250 2001-02-07  Jim Meyering  <meyering@lucent.com>
25251
25252         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
25253
25254 2001-02-05  Jim Meyering  <meyering@lucent.com>
25255
25256         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
25257         it includes the patch required for `large file' support with at least
25258         HP-UX's 10.20 /bin/cc.
25259
25260 2001-02-03  Jim Meyering  <meyering@lucent.com>
25261
25262         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
25263         AS_IF, now that it works once again (mysteriously).
25264         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
25265
25266 2001-01-30  Jim Meyering  <meyering@lucent.com>
25267
25268         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
25269         * m4/chown.m4: Rename conftestchown to conftest.chown.
25270         * m4/rename.m4: s/conftestdir/conftest.d1/ and
25271         s/conftestdir2/conftest.d2/.
25272         * m4/utimes.m4: s/conftestdata/conftest.data/
25273         Inspired by Pavel Roskin's change in autoconf.
25274
25275 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
25276
25277         * lib/config.charset: Update for FreeBSD 4.2.
25278
25279 2001-01-27  Jim Meyering  <meyering@lucent.com>
25280
25281         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
25282         a use of AS_IF.
25283         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
25284
25285 2001-01-26  Jim Meyering  <meyering@lucent.com>
25286
25287         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
25288         quotearg.c includes it.
25289
25290 2001-01-26  Jim Meyering  <meyering@lucent.com>
25291
25292         * lib/quotearg.c: Include stddef.h.
25293         * lib/quote.c: Include stddef.h.
25294         Reported by Axel Kittenberger.
25295
25296         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
25297         line in double quotes so that it evokes a better diagnostic.
25298         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
25299         Reported by Axel Kittenberger.
25300
25301 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
25302
25303         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
25304         as if it was a `charset'.
25305
25306 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
25307
25308         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
25309         has const.
25310
25311 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
25312
25313         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
25314         to avoid a warning.  Add back 'const' to inptr.
25315
25316 2001-01-20  Jim Meyering  <meyering@lucent.com>
25317
25318         Be sure that headers are checked before used in code compiled
25319         for the type checks.
25320         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
25321         In place of that, invoke jm_CHECK_ALL_TYPES.
25322         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
25323         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
25324         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
25325         The check for ssize_t was mistakenly run before the test for unistd.h.
25326
25327         The configure-time check for stdbool.h was missing.
25328         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
25329         (jm_PREREQ_HASH): New function.
25330
25331 2001-01-17  Jim Meyering  <meyering@lucent.com>
25332
25333         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
25334         for autoconf-2.49c.
25335         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
25336
25337 2001-01-16  Jim Meyering  <meyering@lucent.com>
25338
25339         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
25340         From Bruno Haible.
25341
25342 2001-01-14  Jim Meyering  <meyering@lucent.com>
25343
25344         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
25345         foo and bar.  Create conftestdir/ in the script, not in the C code.
25346         Remove directories in the script, not in the C code.
25347         Remove conftestdir{,2} before trying to create the directory.
25348         Make the entire configure script fail if the mkdir fails.
25349
25350 2001-01-14  Jim Meyering  <meyering@lucent.com>
25351
25352         * lib/rename.c: New file.  From Volker Borchert.
25353         Include stdlib.h, string.h or strings.h, and xalloc.h.
25354         Use strip_trailing_slashes rather than open-coding it.
25355
25356 2001-01-03  Paul Eggert  <eggert@twinsun.com>
25357
25358         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
25359
25360 2001-01-03  Jim Meyering  <meyering@lucent.com>
25361
25362         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
25363         of local `inptr' to avoid warning with some system declarations of
25364         iconv.
25365
25366 2001-01-02  Volker Borchert  <bt@teknon.de>
25367
25368         * m4/rename.m4: New file.
25369         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
25370
25371 2001-01-01  Jim Meyering  <meyering@lucent.com>
25372
25373         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
25374         even on systems with utmpx.h.  It's necessary for the declaration of
25375         utmp's ut_user member.  Reported by Andreas Jaeger.
25376
25377         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
25378         available. They are required for the declarations of getgrgid and
25379         getpwuid resp.
25380         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
25381         Reported by Andreas Jaeger.
25382
25383 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
25384
25385         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
25386         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
25387         so `make install' also works in VPATH builds.
25388
25389 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
25390
25391         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
25392         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
25393         can be used in subdirectories.
25394
25395 2000-12-29  Paul Eggert  <eggert@twinsun.com>
25396
25397         * lib/modechange.c: Do not assume that mode_t uses the
25398         traditional octal encoding.  E.g. "chmod 1 FOO" should set
25399         the other-execute bit of FOO even if S_IXOTH != 1.
25400
25401         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
25402         WOTH, XOTH, ALLM): New macros.
25403         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
25404          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
25405         Use them.
25406         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
25407         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
25408         (mode_compile):
25409         No need to use uintmax_t; unsigned long is long enough.
25410         Don't bother to get suffix since we don't use it.
25411
25412 2000-12-26  Jim Meyering  <meyering@lucent.com>
25413
25414         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
25415         better with autoheader.
25416
25417 2000-12-24  Jim Meyering  <meyering@lucent.com>
25418
25419         * lib/hash.c (is_prime): Return explicit boolean values.
25420         (hash_get_first): Return NULL to appease Irix5.6's 89.
25421         Reported by Nelson Beebe.
25422
25423 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
25424
25425         * lib/localcharset.c (locale_charset): Add support for Win32.
25426
25427 2000-12-18  Paul Eggert  <eggert@twinsun.com>
25428
25429         * lib/physmem.h, lib/physmem.c: New files.
25430
25431         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
25432         (noinst_HEADERS): Add physmem.h.
25433
25434         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
25435         't' for compatibility with Solaris 8 sort.
25436
25437 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
25438
25439         * lib/config.charset: Add support for BeOS.
25440
25441 2000-12-17  Jim Meyering  <meyering@lucent.com>
25442
25443         * m4/dos.m4 (jm_AC_DOS): New file and macro.
25444         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
25445
25446 2000-12-16  Jim Meyering  <meyering@lucent.com>
25447
25448         This bug had a serious impact on chown: `chown N:M FILE' (for integer
25449         N and M) would have treated it like `chown N:N FILE'.
25450
25451         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
25452
25453 2000-12-16  Jim Meyering  <meyering@lucent.com>
25454
25455         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
25456         SHELLS_FILE to a file name that's useful on djgpp systems.
25457         Include stdlib.h.
25458         (ADDITIONAL_DEFAULT_SHELLS): Define.
25459         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
25460         Based mostly on a patch from Prashant TR.
25461
25462 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
25463
25464         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
25465         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
25466         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
25467
25468 2000-12-08  Andreas Schwab  <schwab@suse.de>
25469
25470         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
25471         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
25472
25473 2000-12-07  Jim Meyering  <meyering@lucent.com>
25474
25475         * lib/stripslash.c (ISSLASH): Define.
25476         (strip_trailing_slashes): Use ISSLASH rather than comparing against
25477         `/'.
25478         From Prashant TR.
25479
25480         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
25481         (dir_name_r): Declare this function as static.
25482         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
25483         manifest itself on a name containing a mix of slashes and
25484         backslashes.
25485         Make this function work with names starting with a DOS-style
25486         drive letter and colon prefix.
25487         (dir_name): Append `.' if necessary.
25488         Based mostly on patches from Prashant TR and Eli Zaretskii.
25489
25490         * lib/dirname.h (dir_name_r): Remove prototype.
25491
25492 2000-12-06  Paul Eggert  <eggert@twinsun.com>
25493
25494         * m4/off_t-format.m4: Remove this file.
25495         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
25496
25497 2000-12-06  Jim Meyering  <meyering@lucent.com>
25498
25499         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
25500         replacement strtoull, we may well need the replacement strtoul, too.
25501         Check for declarations of strtoul and strtoull.
25502         Check for strtol.  Mainly as a cue to cause automake to include
25503         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
25504         Check for limits.h -- strtol.c needs it.
25505
25506 2000-12-05  Jim Meyering  <meyering@lucent.com>
25507
25508         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
25509
25510 2000-12-04  Jim Meyering  <meyering@lucent.com>
25511
25512         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
25513         Also include memory.h, stdlib.h, unistd.h if appropriate.
25514         Reported by Andreas Jaeger (conflicting declaration of malloc).
25515
25516 2000-12-02  Jim Meyering  <meyering@lucent.com>
25517
25518         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
25519         * m4/jm-macros.m4 (jm_MACROS): require it.
25520
25521 2000-12-02  Jim Meyering  <meyering@lucent.com>
25522
25523         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
25524
25525 2000-12-01  Paul Eggert  <eggert@twinsun.com>
25526
25527         * lib/memrchr.c: Include <config.h> before any system include file.
25528
25529 2000-11-30  Jim Meyering  <meyering@lucent.com>
25530
25531         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
25532
25533 2000-11-30  Jim Meyering  <meyering@lucent.com>
25534
25535         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
25536
25537 2000-11-29  Paul Eggert  <eggert@twinsun.com>
25538
25539         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
25540
25541 2000-11-26  Jim Meyering  <meyering@lucent.com>
25542
25543         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
25544
25545 2000-11-22  Paul Eggert  <eggert@twinsun.com>
25546
25547         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
25548         size of (size_t) -1; it's not portable.
25549
25550 2000-11-17  Jim Meyering  <meyering@lucent.com>
25551
25552         * lib/strstr.c: Update from GNU libc.
25553
25554 2000-11-17  Akim Demaille  <akim@epita.fr>
25555
25556         * lib/obstack.h: Formatting changes.
25557         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
25558         prevent type checking.
25559         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
25560         cast the value to (void *): assigning a `foo *' to a `void *'
25561         variable is valid.
25562         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
25563
25564 2000-11-16  Jim Meyering  <meyering@lucent.com>
25565
25566         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
25567
25568 2000-11-11  Jim Meyering  <meyering@lucent.com>
25569
25570         * lib/error.c: Add a couple #includes, merging from GNU libc version.
25571
25572 2000-11-10  Jim Meyering  <meyering@lucent.com>
25573
25574         * lib/obstack.h: Update from GNU libc.
25575         * lib/obstack.c: Likewise.
25576
25577 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
25578
25579         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
25580
25581 2000-11-06  Paul Eggert  <eggert@twinsun.com>
25582
25583         * lib/getusershell.c (setusershell): Use rewind rather than
25584         fseek/fseeko, to avoid configuration hassles with fseeko.
25585         Don't bother opening SHELLS_FILE if shellstream is NULL;
25586         it's not necessary.
25587
25588 2000-11-05  Jim Meyering  <meyering@lucent.com>
25589
25590         * lib/makepath.h (make_dir): Declare.
25591         * lib/makepath.c (make_dir): Remove `static' attribute.
25592         Tweak a comment.
25593
25594 2000-11-04  Jim Meyering  <meyering@lucent.com>
25595
25596         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
25597
25598 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
25599
25600         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
25601         last one in a bucket, advance to the next bucket.
25602
25603 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
25604
25605         * lib/fnmatch.c: Do not comment out all the code if we are using
25606         the GNU C library, because in some cases we are replacing buggy
25607         code in the GNU C library itself.
25608
25609 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
25610
25611         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
25612         (regex_compile): Catch bogus \(\1\).
25613
25614 2000-10-30  Paul Eggert  <eggert@twinsun.com>
25615
25616         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
25617         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
25618         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
25619
25620 2000-10-30  Paul Eggert  <eggert@twinsun.com>
25621
25622         * lib/error.h, getline.h, modechange.h:
25623         Remove "2000" from Copyright line, as the file hasn't been
25624         changed this year other than in the copyright notice.
25625
25626         * lib/xalloc.h: Add "2000" to Copyright line, as this file
25627         was changed this year.
25628
25629 2000-10-29  Jim Meyering  <meyering@lucent.com>
25630
25631         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
25632         renaming.
25633         * m4/ls-mntd-fs.m4: Likewise
25634
25635 2000-10-29  Jim Meyering  <meyering@lucent.com>
25636
25637         * lib/xstat.in: Fix grammar in comment.
25638
25639 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
25640
25641         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
25642         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
25643         doesn't define __restrict_arr.
25644
25645 2000-10-28  Jim Meyering  <meyering@lucent.com>
25646
25647         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
25648         (jm_PREREQ_MEMCHR): New function.
25649
25650 2000-10-28  Jim Meyering  <meyering@lucent.com>
25651
25652         * lib/memchr.c: Update from libc.
25653         Adjust for portability:
25654         [HAVE_STDLIB_H]: Include stdlib.h.
25655         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
25656         Undef __memchr, too.
25657         [!weak_alias]: Define __memchr to memchr.
25658
25659         * lib/regex.c: Update from libc.
25660         * lib/regex.h: Likewise.
25661         * lib/getopt1.c: Likewise.
25662         * lib/memcmp.c: Likewise.
25663
25664         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
25665         Avoid using fseek, when possible -- it's broken by design.
25666         Patch by Ulrich Drepper.
25667
25668 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
25669
25670         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
25671         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
25672         Giving in to popular pressure to shut up the compiler with casts.
25673
25674 2000-10-26  Jim Meyering  <meyering@lucent.com>
25675
25676         * lib/strftime.c: Update from libc.
25677
25678 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
25679
25680         * regex.c: More `unsigned char' -> `re_char' changes.
25681         Also change several `int' into `re_wchar_t'.
25682         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
25683         (PUSH_FAILURE_POINTER): Don't cast any more.
25684         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
25685         We want GCC to complain, since this piece of code makes
25686         re_match non-reentrant, which *should* be fixed.
25687         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
25688         (EXTEND_BUFFER): Use RETALLOC.
25689         (SET_LIST_BIT): Don't cast.
25690         (re_wchar_t): New type.
25691         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
25692         that those two functions will always properly return.
25693         (IMMEDIATE_QUIT_CHECK): Cast to void.
25694         (analyse_first): Use recursion rather than an explicit stack.
25695         (re_compile_fastmap): Can't fail anymore.
25696         (re_search_2): Don't check re_compile_fastmap for failure.
25697         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
25698         Now also sets the new value (passed in a new argument).
25699         (re_match_2_internal): Use it.
25700         Also, use a new var `reg' of type size_t when looping through regs
25701         rather than reuse the inappropriate `mcnt'.
25702
25703 2000-10-25  Jim Meyering  <meyering@lucent.com>
25704
25705         * lib/obstack.c: Update from libc.
25706
25707 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
25708
25709         * regex.c (regex_compile): Change the way of handling a range from
25710         a char less than 256 to a char not less than 256.
25711
25712 2000-10-24  Andrew Innes  <andrewi@gnu.org>
25713
25714         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
25715         NT-Emacs only.
25716         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
25717         so that re_search functions only quit when callers expect them to.
25718
25719 2000-10-23  Jim Meyering  <meyering@lucent.com>
25720
25721         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
25722         wrong.  That set_locale call must not have any side effects.
25723         From Paul Eggert.
25724
25725 2000-10-22  Jim Meyering  <meyering@lucent.com>
25726
25727         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
25728         [CYCLIC]: Remove now-unused definition.
25729
25730         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
25731         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
25732         Suggestion from Ulrich Drepper.
25733
25734 2000-10-21  Jim Meyering  <meyering@lucent.com>
25735
25736         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
25737         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
25738         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
25739
25740 2000-10-21  Jim Meyering  <meyering@lucent.com>
25741
25742         * lib/dirname.c (memrchr): Declare if necessary.
25743         (dir_name): Remove the restriction that there be no
25744         trailing slashes.  Now, this code skips past them, effectively
25745         ignoring them.
25746         [TEST_DIRNAME] (main): New unit tests.
25747
25748         * lib/memrchr.c: New file from GNU libc.
25749         Undef __memrchr, too.
25750         [!weak_alias]: Define __memrchr to memrchr.
25751         Guard weak_alias use with `#ifdef weak_alias'.
25752
25753 2000-10-21  Jim Meyering  <meyering@lucent.com>
25754
25755         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
25756         (dir_name): Use dir_name_r.
25757         * lib/dirname.h (dir_name_r): Declare it.
25758
25759 2000-10-17  Jim Meyering  <meyering@lucent.com>
25760
25761         * lib/quote.h (PARAMS): Define and use.
25762         Reported by Akim Demaille.
25763
25764         * lib/getopt.c: Update from libc.
25765
25766 2000-10-16  Jim Meyering  <meyering@lucent.com>
25767
25768         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
25769         setlocale.
25770         From Jan Fedak.
25771
25772 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
25773
25774         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
25775
25776 2000-09-25  Jim Meyering  <meyering@lucent.com>
25777
25778         * lib/md5.h (rol): Define (from GnuPG).
25779
25780         * lib/sha.c: Give credit (GnuPG) where due.
25781         (M): Use rol rather than open-coding it.
25782         Add a FIXME comment.
25783
25784 2000-09-21  Jim Meyering  <meyering@lucent.com>
25785
25786         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
25787         Reported by Michael Stone.
25788
25789 2000-09-20  Jim Meyering  <meyering@lucent.com>
25790
25791         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
25792         (noinst_HEADERS): Add sha.h.
25793         Based on code from Scott G. Miller and from GnuPG.
25794
25795 2000-09-18  Jim Meyering  <meyering@lucent.com>
25796
25797         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
25798         LIBS. Otherwise, everyone ends up linking with -lelf for some
25799         configurations.
25800         Reported by Mike Stone.
25801
25802 2000-09-15  Jim Meyering  <meyering@lucent.com>
25803
25804         * lib/regex.c: Update from libc.
25805
25806 2000-09-10  Jim Meyering  <meyering@lucent.com>
25807
25808         * lib/getopt.c (_getopt_internal): Update from glibc.
25809
25810 2000-09-09  Jim Meyering  <meyering@lucent.com>
25811
25812         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
25813         think it should be used as a general replacement for isascii.
25814         * lib/fnmatch.c: Likewise.
25815         * lib/mbswidth.c: Likewise
25816         * lib/regex.c: Likewise.
25817
25818         Don't use atoi.
25819         * lib/userspec.c: Include sys/param.h and limits.h.
25820         Include xstrtol.h.
25821         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
25822         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
25823         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
25824         UID, GID.  Check range.
25825
25826 2000-09-06  Jim Meyering  <meyering@lucent.com>
25827
25828         * lib/getopt.c (_getopt_internal): Update from glibc.
25829
25830 2000-08-30  Jim Meyering  <meyering@lucent.com>
25831
25832         * lib/strftime.c: Merge in changes from GNU libc.
25833
25834 2000-08-26  Jim Meyering  <meyering@lucent.com>
25835
25836         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
25837         * m4/fpending.m4: New file.
25838
25839 2000-08-26  Jim Meyering  <meyering@lucent.com>
25840
25841         * lib/closeout.c: Include "__fpending.h".
25842         (close_stdout_status): Return right away if there's nothing to flush.
25843
25844         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
25845         * lib/__fpending.c: New file.
25846         * lib/__fpending.h: New file.
25847
25848 2000-08-20  Jim Meyering  <meyering@lucent.com>
25849
25850         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
25851         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
25852         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
25853
25854 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
25855
25856         Improve fileutils installation on systems where running
25857         programs (like install) can't be unlinked.
25858         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
25859         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
25860
25861 2000-08-07  Paul Eggert  <eggert@twinsun.com>
25862
25863         Standardize on "memory exhausted" instead of "Memory exhausted"
25864         or "virtual memory exhausted".
25865         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
25866         "virtual memory exhausted".
25867         * lib/same.c (same_name): Invoke xalloc_die instead of printing
25868         our own message.
25869         * lib/userspec.c (parse_user_spec): Likewise.
25870         * lib/bumpalloc.h: comment fix
25871         * lib/same.c, userspec.c: Include xalloc.h.
25872
25873         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
25874         not char *const and pointing to a constant array.
25875         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
25876         (xrealloc): Comment fix.
25877
25878         * lib/userspec.c (parse_user_spec):
25879         Don't translate a message until just before returning,
25880         to avoid unnecessary translation.
25881
25882 2000-08-07  Jim Meyering  <meyering@lucent.com>
25883
25884         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
25885         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
25886         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
25887         getgroups.c, gethostname.c, getopt.h, group-member.c,
25888         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
25889         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
25890         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
25891         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
25892         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
25893         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
25894         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
25895         yesno.c: Back out Copyright date changes for each file with no change
25896         this year.  This eases coordination with other programs using the same
25897         source code modules.  From Paul Eggert.
25898
25899 2000-08-06  Paul Eggert  <eggert@twinsun.com>
25900
25901         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
25902         not char, for compatibility with glibc 2.1.3 strftime.c.
25903
25904 2000-08-03  Greg McGary  <greg@mcgary.org>
25905
25906         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
25907         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
25908         (EXTEND_BUFFER): Use them.
25909
25910 2000-08-01  Jim Meyering  <meyering@lucent.com>
25911
25912         * lib/dirname.c (ISSLASH): Define.
25913         (BACKSLASH_IS_PATH_SEPARATOR): Define.
25914         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
25915         both `\' and `/' may be use as path separators.
25916         Based on a patch from Prashant TR.
25917
25918 2000-07-31  Paul Eggert  <eggert@twinsun.com>
25919
25920         * lib/quotearg.c (quotearg_n_options): Don't make the initial
25921         slot vector a constant, since it might get modified.
25922
25923 2000-07-31  Jim Meyering  <meyering@lucent.com>
25924
25925         * lib/xmalloc.c: Use `virtual memory exhausted', not
25926         `Memory exhausted'.
25927         * lib/obstack.c (print_and_abort): Likewise.
25928
25929 2000-07-30  Paul Eggert  <eggert@twinsun.com>
25930
25931         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
25932         buffer, so that the caller can always quote one small
25933         component of a "memory exhausted" message in slot 0.
25934         From a suggestion by Jim Meyering.
25935
25936 2000-07-30  Jim Meyering  <meyering@lucent.com>
25937
25938         * lib/makepath.c (make_path): Quote the other instance, too.
25939
25940         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
25941         (STATIC_BUF_SIZE): Define.
25942         (quotearg_n_options): Use only statically allocated storage when
25943         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
25944         than STATIC_BUF_SIZE.
25945
25946 2000-07-29  Jim Meyering  <meyering@lucent.com>
25947
25948         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
25949         * lib/dirname.c (dir_name): Likewise.
25950
25951         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
25952         `/'.
25953
25954         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
25955         (dir_name): Assert that there are no trailing slashes.
25956
25957 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
25958
25959         * lib/mbswidth.h (mbswidth): Add a flags argument.
25960         (mbswidth): New declaration.
25961         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
25962         * lib/mbswidth.c (mbswidth): Add a flags argument.
25963         (mbsnwidth): New function.
25964
25965 2000-07-24  Jim Meyering  <meyering@lucent.com>
25966
25967         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
25968
25969 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25970
25971         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
25972
25973 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25974
25975         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
25976         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
25977         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
25978         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
25979         invoke multibyte primitives.
25980
25981 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25982
25983         * lib/quotearg.c:
25984         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
25985         so that mbstate_t is always defined.
25986
25987         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
25988         be 1 in at least one GCC installation, and this configuration
25989         error is likely to be common.  Ignoring MB_LEN_MAX hurts
25990         performance on hosts that have mbrtowc but have only unibyte
25991         locales, but I assume these hosts are rare.
25992
25993 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25994
25995         * lib/mbswidth.c (_XOPEN_SOURCE):
25996         Don't define; this causes problems on Solaris 7.
25997         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
25998
25999 2000-07-23  Jim Meyering  <meyering@lucent.com>
26000
26001         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
26002         too: getgrgid, getpwuid, getuid.
26003
26004 2000-07-23  Jim Meyering  <meyering@lucent.com>
26005
26006         * lib/basename.c (base_name): Add an assertion.
26007
26008 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
26009
26010         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
26011         shadow its mbsinit function.
26012
26013 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
26014
26015         * lib/mbswidth.h: New file.
26016         * lib/mbswidth.c: New file.
26017         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
26018         (noinst_HEADERS): Add mbswidth.h.
26019
26020 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
26021
26022         * lib/config.charset: Add support for FreeBSD. Improve support for
26023         HP-UX and IRIX 6.
26024
26025 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
26026
26027         * m4/mbswidth.m4: New file.
26028         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
26029
26030 2000-07-15  Jim Meyering  <meyering@lucent.com>
26031
26032         * lib/makepath.c: Include quote.h.
26033         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
26034         corresponding argument in a `quote (...)' call.
26035         Give better diagnostics.
26036
26037         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
26038         (noinst_HEADERS): Add quote.h.
26039
26040         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
26041         from tar's src/misc.c.
26042         * lib/quote.h: New file.  Prototypes for same.
26043
26044 2000-07-14  Paul Eggert  <eggert@twinsun.com>
26045
26046         From a suggestion by Bruno Haible.
26047         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
26048         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
26049         to decide whether to define the BeOS workaround macro;
26050         this adjusts to the change to AC_MBSTATE_T.
26051
26052 2000-07-14  Jim Meyering  <meyering@lucent.com>
26053
26054         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
26055         jm_AC_TYPE_UINTMAX_T.
26056
26057 2000-07-13  Paul Eggert  <eggert@twinsun.com>
26058
26059         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
26060
26061         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
26062         quotearg_buffer_restyled): Add support for
26063         clocale_quoting_style.  Undo previous change to
26064         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
26065         and "{RIGHT QUOTATION MARK}" msgids.
26066
26067 2000-07-10  Paul Eggert  <eggert@twinsun.com>
26068
26069         From a suggestion by Bruno Haible.
26070         * m4/mbstate_t.m4 (AC_MBSTATE_T):
26071         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
26072         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
26073         and mbstate_t, to a single-part test that simply defines mbstate_t.
26074         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
26075         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
26076
26077 2000-07-10  Jim Meyering  <meyering@lucent.com>
26078
26079         * m4/strerror_r.m4: Mirror the correction made in autoconf.
26080
26081         * m4/gnu-source.m4: Output to confdefs.h directly.
26082         Suggestion from Akim Demaille.
26083
26084 2000-07-09  Paul Eggert  <eggert@twinsun.com>
26085
26086         The old behavior of quoting `like this' doesn't look good with
26087         newer, ISO-style fonts.  See:
26088         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
26089
26090         Instead, quote "like this" by default.  Let the translator
26091         tailor the locale-specific quoting behavior by providing
26092         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
26093
26094         * lib/quotearg.c (N_): New macro.
26095         (gettext_default): New function.
26096         (quotearg_buffer_restyled): Use
26097         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
26098         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
26099
26100 2000-07-09  Jim Meyering  <meyering@lucent.com>
26101
26102         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
26103         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
26104
26105         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
26106         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
26107
26108 2000-07-09  Jim Meyering  <meyering@lucent.com>
26109
26110         * lib/Most files: Update copyright dates to include 2000.
26111
26112 2000-07-08  Jim Meyering  <meyering@lucent.com>
26113
26114         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
26115         if not defined.
26116         (xgethostname): Remove now-unnecessary #ifdef.
26117         Move declaration of `err' into loop where it's used.
26118
26119 2000-07-05  Paul Eggert  <eggert@twinsun.com>
26120         and Bruno Haible  <haible@clisp.cons.org>
26121
26122         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
26123         only if the test for an object-type mbstate_t fails.  This
26124         prevents us from mistakenly reporting that mbstate_t is a
26125         system object type after we "#define mbstate_t int" to work
26126         around its lack.
26127
26128 2000-07-05  Paul Eggert  <eggert@twinsun.com>
26129         and Bruno Haible  <haible@clisp.cons.org>
26130
26131         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
26132
26133 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
26134
26135         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
26136         to strerror_r.
26137         Include <ctype.h> for use of isalpha.
26138
26139 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
26140
26141         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
26142         by allocating a larger buffer. Test the gethostname return value for
26143         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
26144         returns an error and ENAMETOOLONG isn't defined.
26145
26146 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
26147
26148         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
26149         dimension.
26150
26151 2000-07-04  Jim Meyering  <meyering@lucent.com>
26152
26153         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
26154         of the deprecated AC_CHECKING.
26155
26156 2000-07-04  Jim Meyering  <meyering@lucent.com>
26157
26158         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
26159         Reported by Bruno Haible.
26160
26161 2000-07-04  Jim Meyering  <meyering@lucent.com>
26162
26163         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
26164         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
26165         lacks mbrtowc.
26166
26167 2000-07-03  Paul Eggert  <eggert@twinsun.com>
26168
26169         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
26170         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
26171
26172 2000-07-03  Paul Eggert  <eggert@twinsun.com>
26173         and Bruno Haible  <haible@clisp.cons.org>
26174
26175         * lib/quotearg.c (mbrtowc):
26176         Assign to *pwc, and return 1 only if result is nonzero.
26177         (iswprint): Use ISPRINT when substituting our own mbrtowc.
26178
26179 2000-07-03  Jim Meyering  <meyering@lucent.com>
26180
26181         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
26182
26183 2000-07-03  Jim Meyering  <meyering@lucent.com>
26184
26185         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
26186         This is necessary to get a definition of e.g., UTMP_FILE on
26187         HP-UX 10.20.
26188         From Bob Proulx.
26189
26190 2000-07-02  Jim Meyering  <meyering@lucent.com>
26191
26192         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
26193
26194         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
26195         AC_LIBOBJ(function_name).
26196         * m4/chown.m4: Likewise.
26197         * m4/fnmatch.m4: Likewise.
26198         * m4/ftruncate.m4: Likewise.
26199         * m4/getgroups.m4: Likewise.
26200         * m4/getline.m4: Likewise.
26201         * m4/group-member.m4: Likewise.
26202         * m4/jm-macros.m4: Likewise.
26203         * m4/lstat.m4: Likewise.
26204         * m4/malloc.m4: Likewise.
26205         * m4/memcmp.m4: Likewise.
26206         * m4/nanosleep.m4: Likewise.
26207         * m4/putenv.m4: Likewise.
26208         * m4/realloc.m4: Likewise.
26209         * m4/regex.m4: Likewise.
26210         * m4/stat.m4: Likewise.
26211         * m4/strftime.m4: Likewise.
26212
26213 2000-07-02  Jim Meyering  <meyering@lucent.com>
26214
26215         * lib/quotearg.c (mbstate_t): Don't define here.
26216
26217 2000-07-02  Jim Meyering  <meyering@lucent.com>
26218
26219         * lib/nanosleep.c (SIGCONT): Define if not already defined.
26220
26221 2000-07-01  Jim Meyering  <meyering@lucent.com>
26222
26223         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
26224
26225 2000-07-01  Jim Meyering  <meyering@lucent.com>
26226
26227         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
26228         problem.
26229
26230 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
26231
26232         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
26233         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
26234
26235 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
26236
26237         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
26238         per change in ../m4/ls-mntd-fs.m4.
26239         (read_filesystem_list): Ignore symbolic links.
26240
26241 2000-06-29  Jim Meyering  <meyering@lucent.com>
26242
26243         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
26244         for declaration of strcmp.
26245
26246         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
26247
26248         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
26249         Avoid warning by casting result to `char *' to remove `const'.
26250
26251 2000-06-28  Jim Meyering  <meyering@lucent.com>
26252
26253         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
26254         included by quotearg.c, for which we perform this test.  From
26255         Bruno Haible.
26256
26257 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
26258
26259         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
26260         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
26261         <utmpx.h> exists, put readutmp.o into LIBOBJS.
26262
26263 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
26264
26265         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
26266
26267 2000-06-26  Paul Eggert  <eggert@twinsun.com>
26268
26269         savedir now sets errno on failure and invokes xmalloc to get memory.
26270         Fix a couple of other minor bugs while we're at it.
26271
26272         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
26273         (NAMLEN): Remove macro.
26274         (malloc, realloc): Remove decls.
26275         (stpcpy): Likewise.
26276         ("xalloc.h"): Include.
26277         (NAME_SIZE_DEFAULT): New macro.
26278         (savedir): Use xmalloc / xrealloc to allocate memory.
26279         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
26280         Skip "" directory entries.
26281         Use strlen to calculate directory entry length, since the old method
26282         is rarely used these days and isn't worth supporting.
26283         Don't use a pointer after freeing it.
26284         Check for integer overflow when calculating allocation size.
26285         Use memcpy to copy entries, instead of stpcpy.
26286         Set errno properly when returning NULL.
26287         Check for readdir error.
26288
26289 2000-06-26  Jim Meyering  <meyering@lucent.com>
26290
26291         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
26292
26293 2000-06-25  Jim Meyering  <meyering@lucent.com>
26294
26295         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
26296         Linux header bug when _XOPEN_SOURCE is defined to 500.
26297
26298 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
26299
26300         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
26301         deficiency.
26302
26303 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
26304
26305         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
26306         Include xalloc.h.
26307         Don't include <stdlib.h>.  Don't declare malloc, realloc.
26308
26309 2000-06-24  Jim Meyering  <meyering@lucent.com>
26310
26311         * m4/strerror_r.m4: Revive this file -- to try out an experimental
26312         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
26313         for which strerror does return char*, but which lacks a conveniently
26314         accessible declaration of the function.  If the compile-test says
26315         strerror_r doesn't work, then resort to a `run'-test that works on
26316         BeOS and segfaults on DEC Unix.
26317
26318 2000-06-24  Jim Meyering  <meyering@lucent.com>
26319
26320         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
26321
26322 2000-06-23  Paul Eggert  <eggert@twinsun.com>
26323
26324         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
26325         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
26326
26327 2000-06-23  Paul Eggert  <eggert@twinsun.com>
26328
26329         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
26330         (mbrtowc, mbstate_t): Define substitutes if
26331         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
26332         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
26333         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
26334
26335 2000-06-23  Jim Meyering  <meyering@lucent.com>
26336
26337         * m4/afs.m4: Add missing AC_MSG_RESULT.
26338         Reported by Bruno Haible.
26339
26340         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
26341         Suggestion from Bruno Haible.
26342
26343 2000-06-23  Jim Meyering  <meyering@lucent.com>
26344
26345         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
26346
26347 2000-06-21  Jim Meyering  <meyering@lucent.com>
26348
26349         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
26350
26351 2000-06-21  Jim Meyering  <meyering@lucent.com>
26352
26353         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
26354         (noinst_HEADERS): Add getstr.h.
26355
26356         * lib/getline.c (getstr): Move into a separate file.
26357         * lib/getstr.c (getstr): New file, extracted from getline.c, with
26358         the following changes: new parameter, delim2; both delim[12]
26359         parameters have type `int', not `char'.  The latter would lose
26360         with 8-bit delimiters.
26361         * lib/getstr.h: New file.
26362
26363 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
26364
26365         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
26366         than 1024, return a memory chunk of least possible size, instead
26367         of size PATH_MAX + 2. In the loop, increment the size proportionally.
26368         Use free/xmalloc instead of xrealloc to avoid copying for very long
26369         paths.
26370
26371 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
26372
26373         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
26374         the empty string.
26375
26376 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
26377
26378         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
26379         address, not strdup.  Include <stdlib.h> and don't declare free().
26380
26381 2000-06-19  Jim Meyering  <meyering@lucent.com>
26382
26383         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
26384
26385 2000-06-18  Jim Meyering  <meyering@lucent.com>
26386
26387         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
26388
26389         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
26390         `checking whether...' message to be consistent with that of the
26391         lstat test.
26392
26393 2000-06-18  Jim Meyering  <meyering@lucent.com>
26394
26395         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
26396         Besides, these days every porting target provides a mkdir function.
26397
26398         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
26399         needed. (this snippet comes from src/system.h).
26400
26401 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
26402
26403         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
26404
26405 2000-06-15  Paul Eggert  <eggert@twinsun.com>
26406
26407         * lib/human.c (adjust_value): New function.
26408         (human_readable_inexact): Apply rounding style even when
26409         printing approximate values.
26410
26411 2000-06-14  Paul Eggert  <eggert@twinsun.com>
26412
26413         * lib/human.c (human_readable_inexact): Allow an input block
26414         size that is not a multiple of the output block size, and vice versa.
26415         Reported by Piergiorgio Sartor.
26416
26417 2000-06-14  Paul Eggert  <eggert@twinsun.com>
26418
26419         * lib/getdate.y (get_date): Apply relative times after time
26420         zone indicator, not before.  Reported by Todd A. Jacobs.
26421
26422 2000-06-13  Jim Meyering  <meyering@lucent.com>
26423
26424         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
26425
26426         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
26427
26428 2000-06-12  Paul Eggert  <eggert@twinsun.com>
26429
26430         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
26431
26432 2000-06-12  Jim Meyering  <meyering@lucent.com>
26433
26434         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
26435         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
26436         optional argument.
26437         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
26438         the optional argument, `lib'.
26439
26440 2000-06-08  Jim Meyering  <meyering@lucent.com>
26441
26442         * m4/largefile.m4: Remove file (now that it's part of autoconf).
26443
26444 2000-06-04  Paul Eggert  <eggert@twinsun.com>