8c31b574bc927b092e06b1d9843bf82695a913fa
[gnulib.git] / ChangeLog
1 2007-03-06  Bruno Haible  <bruno@clisp.org>
2
3         * modules/snprintf-posix: New file.
4         * m4/snprintf-posix.m4: New file.
5         * m4/snprintf.m4 (gl_REPLACE_SNPRINTF): New macro, extracted from
6         gl_FUNC_SNPRINTF.
7         (gl_FUNC_SNPRINTF): Invoke it.
8         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_SNPRINTF.
9         * lib/stdio_.h (snprintf): Define as a replacement if REPLACE_SNPRINTF
10         is set.
11         * modules/stdio (Makefile.am): Substitute also REPLACE_SNPRINTF.
12
13 2007-03-06  Bruno Haible  <bruno@clisp.org>
14
15         * modules/vsnprintf-posix-tests: New file.
16         * tests/test-vsnprintf-posix.c: New file.
17         * tests/test-snprintf-posix.h: New file.
18
19         * modules/vsnprintf-posix: New file.
20         * m4/vsnprintf-posix.m4: New file.
21         * m4/vsnprintf.m4 (gl_REPLACE_VSNPRINTF): New macro, extracted from
22         gl_FUNC_VSNPRINTF.
23         (gl_FUNC_VSNPRINTF): Invoke it.
24         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_VSNPRINTF.
25         * lib/stdio_.h (vsnprintf): Define as a replacement if
26         REPLACE_VSNPRINTF is set.
27         * modules/stdio (Makefile.am): Substitute also REPLACE_VSNPRINTF.
28
29 2007-03-06  Bruno Haible  <bruno@clisp.org>
30
31         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Test for vasnprintf here.
32         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): ... not here.
33
34 2007-03-06  Bruno Haible  <bruno@clisp.org>
35
36         * lib/math_.h (acosl): Declare also if HAVE_DECL_ACOSL is set.
37         (asinl): Declare also if HAVE_DECL_ASINL is set.
38         (atanl): Declare also if HAVE_DECL_ATANL is set.
39         (ceill): Declare also if HAVE_DECL_CEILL is set.
40         (cosl): Declare also if HAVE_DECL_COSL is set.
41         (expl): Declare also if HAVE_DECL_EXPL is set.
42         (floorl): Declare also if HAVE_DECL_FLOORL is set.
43         (frexpl): Declare also if HAVE_DECL_FREXPL is set.
44         (ldexpl): Declare also if HAVE_DECL_LDEXPL is set.
45         (logl): Declare also if HAVE_DECL_LOGL is set.
46         (sinl): Declare also if HAVE_DECL_SINL is set.
47         (sqrtl): Declare also if HAVE_DECL_SQRTL is set.
48         (tanl): Declare also if HAVE_DECL_TANL is set.
49         * modules/math (Makefile.am): Substitute the values of HAVE_DECL_*.
50         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Set HAVE_DECL_* to 1.
51         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Fix tests for the
52         declaration of frexpl, ldexpl.
53         * modules/printf-frexpl (Depends-on): Add math.
54         * lib/printf-frexp.c (frexpl, ldexpl): Undo last change.
55
56 2007-03-05  Bruno Haible  <bruno@clisp.org>
57
58         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Also test whether
59         frexpl and ldexpl are declared.
60         * lib/printf-frexp.c (frexpl, ldexpl): Provide fallback declarations.
61
62 2007-03-05  Bruno Haible  <bruno@clisp.org>
63
64         * gnulib-tool (func_get_automake_snippet): Don't synthesize an
65         EXTRA_lib_SOURCES augmentation for the relocatable-prog-wrapper module.
66
67 2007-03-05  Bruno Haible  <bruno@clisp.org>
68
69         * lib/stdio_.h: Include <stddef.h>.
70
71 2007-03-05  Bruno Haible  <bruno@clisp.org>
72
73         * m4/printf.m4 (gl_SNPRINTF_DIRECTIVE_N): New macro.
74
75 2007-03-05  Bruno Haible  <bruno@clisp.org>
76
77         * m4/printf.m4: Update with info about OpenBSD 3.9, HP-UX 10.20,
78         NetBSD 4, from Ralf Wildenhues.
79
80 2007-03-04  Bruno Haible  <bruno@clisp.org>
81
82         * lib/vasprintf.h: Update #if logic for the case when the functions
83         exist but are overridden.
84
85 2007-03-04  Bruno Haible  <bruno@clisp.org>
86
87         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Exclude two buggy
88         implementations: glibc-2.4 and MacOS X 10.3.
89         * tests/test-vasnprintf-posix.c (test_function): Test also the case
90         that exhibits the bugs in glibc-2.4 and MacOS X 10.3.
91         * tests/test-vasprintf-posix.c (test_function): Likewise.
92
93 2007-03-04  Bruno Haible  <bruno@clisp.org>
94
95         * modules/vasprintf-posix-tests: New file.
96         * tests/test-vasprintf-posix.c: New file.
97
98         * modules/vasprintf-posix: New file.
99         * lib/vasprintf.h (asprintf, vasprintf): Rename if REPLACE_VASPRINTF is
100         defined.
101         * m4/vasprintf-posix.m4: New file.
102         * m4/vasprintf.m4 (gl_REPLACE_VASPRINTF): New macro, extracted from
103         gl_FUNC_VASPRINTF.
104         (gl_FUNC_VASPRINTF): Invoke it.
105         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Define REPLACE_VASNPRINTF
106         here.
107         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Not here.
108
109 2007-03-04  Bruno Haible  <bruno@clisp.org>
110
111         * lib/sys_time_.h: Rename GETTIMEOFDAY_REPLACEMENT to
112         REPLACE_GETTIMEOFDAY.
113         * modules/sys_time (Makefile.am): Likewise.
114         * m4/sys_time_h.m4: Likewise.
115         * m4/gettimeofday.m4: Likewise.
116
117 2007-03-04  Bruno Haible  <bruno@clisp.org>
118
119         * modules/vasnprintf-posix-tests: New file.
120         * tests/test-vasnprintf-posix.c: New file.
121
122         * modules/vasnprintf-posix: New file.
123         * lib/vasnprintf.c: Include isnan.h, isnanl.h, printf-frexp.h,
124         printf-frexpl.h.
125         (VASNPRINTF): Handle the 'a' and 'A' directives here, if needed.
126         * lib/vasnprintf.h (asnprintf, vasnprintf): Rename if
127         REPLACE_VASNPRINTF is defined.
128         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): New macro, extracted from
129         gl_FUNC_VASNPRINTF.
130         (gl_FUNC_VASNPRINTF): Invoke it.
131         * m4/vasnprintf-posix.m4: New file.
132         * m4/printf.m4: New file.
133
134 2007-03-04  Bruno Haible  <bruno@clisp.org>
135
136         Compile progreloc.c only if --enable-relocatable is specified.
137         * m4/relocatable.m4 (gl_RELOCATABLE): Arrange to compile progreloc.c
138         if --enable-relocatable was specified.
139         * modules/relocatable-prog (Makefile.am): Remove progreloc.c from
140         lib_SOURCES.
141
142 2007-03-04  Jim Meyering  <jim@meyering.net>
143
144         * lib/acl.c (ACL_NOT_WELL_SUPPORTED): New macro.
145         Use it consistently, rather than enumerating errno constants.
146
147 2007-03-04  Bruno Haible  <bruno@clisp.org>
148
149         * modules/xvasprintf-tests: New file.
150         * tests/test-xvasprintf.c: New file.
151
152         * modules/vasprintf-tests: New file.
153         * tests/test-vasprintf.c: New file.
154
155         * modules/vasnprintf-tests: New file.
156         * tests/test-vasnprintf.c: New file.
157
158         * modules/vsnprintf-tests: New file.
159         * tests/test-vsnprintf.c: New file.
160
161         * modules/snprintf-tests: New file.
162         * tests/test-snprintf.c: New file.
163
164 2007-03-04  Bruno Haible  <bruno@clisp.org>
165
166         Compile relocatable.c only if --enable-relocatable is specified.
167         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY_BODY): Renamed from
168         gl_RELOCATABLE_LIBRARY.
169         (gl_RELOCATABLE_LIBRARY, gl_RELOCATABLE_LIBRARY_SEPARATE): New macros.
170         * m4/relocatable.m4 (gl_RELOCATABLE): Invoke gl_RELOCATABLE_LIBRARY.
171         (gl_RELOCATABLE_BODY): Require gl_RELOCATABLE_LIBRARY_BODY instead of
172         gl_RELOCATABLE_LIBRARY.
173         * modules/relocatable-lib (configure.ac): Invoke gl_RELOCATABLE_LIBRARY.
174         (Makefile.am): Remove lib_SOURCES.
175         * modules/relocatable-lib-lgpl (configure.ac): Invoke
176         gl_RELOCATABLE_LIBRARY.
177         (Makefile.am): Remove lib_SOURCES.
178         * modules/relocatable-prog (Makefile.am): Don't compile relocatable.c
179         always.
180         * modules/relocatable-prog-wrapper (configure.ac): Invoke
181         gl_RELOCATABLE_LIBRARY_SEPARATE instead of gl_RELOCATABLE_LIBRARY.
182
183 2007-03-04  Bruno Haible  <bruno@clisp.org>
184
185         * modules/argmatch-tests: New file.
186         * tests/test-argmatch.c: New file.
187
188         * tests/test-allocsa.c (main): Halve the number of loop runs.
189
190         * modules/alloca-opt-tests: New file.
191         * tests/test-alloca-opt.c: New file.
192
193 2007-03-04  Jim Meyering  <jim@meyering.net>
194
195         Work around difference between Linux ACLs and Solaris 10 ZFS.
196         * lib/acl.c (set_acl): Revert to using chmod_or_fchmod also
197         for EINVAL.
198
199 2007-03-03  Bruno Haible  <bruno@clisp.org>
200
201         * modules/relocatable-prog (Depends-on): Add back progreloc's
202         dependencies: canonicalize-lgpl, xalloc, xreadlink, stdbool, unistd.
203
204 2007-03-03  Bruno Haible  <bruno@clisp.org>
205
206         * modules/relocatable-lib-lgpl: Renamed from modules/relocatable-lib.
207         * modules/relocatable-lib: New file.
208
209 2007-03-03  Bruno Haible  <bruno@clisp.org>
210
211         * modules/relocatable-prog: Renamed from modules/relocatable.
212         * doc/relocatable-maint.texi: Talk about module 'relocatable-prog'.
213
214 2007-03-03  Bruno Haible  <bruno@clisp.org>
215
216         * modules/relocatable-script (Files): Add doc/relocatable.texi,
217         m4/relocatable-lib.m4.
218         (Depends-on): Remove 'relocatable'.
219         (configure.ac): Add gl_RELOCATABLE_NOP.
220
221 2007-03-03  Bruno Haible  <bruno@clisp.org>
222
223         * modules/relocatable-prog-wrapper: New file.
224         * modules/relocatable (Depends-on): Add it. Remove all other
225         dependencies except progname.
226         (Files): Remove build-aux/install-reloc, lib/relocwrapper.c.
227
228         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): New macro.
229         (gl_FUNC_STRERROR): Nop.
230         * lib/strerror.c: Compile the file only if !HAVE_STRERROR.
231
232         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): New macro.
233         * lib/setenv.c: Compile the file only if _LIBC || !HAVE_SETENV.
234
235         * m4/readlink.m4 (gl_FUNC_READLINK_SEPARATE): New macro.
236         (gl_FUNC_READLINK): Update.
237
238         * m4/canonicalize-lgpl.m4 (gl_CANONICALIZE_LGPL_SEPARATE): New macro.
239
240 2007-03-03  Bruno Haible  <bruno@clisp.org>
241
242         * lib/xreadlink.c: Include <unistd.h> unconditionally.
243         * modules/xreadlink (Depends-on): Add unistd.
244         * modules/xreadlink-with-size (Depends-on): Likewise.
245
246 2007-03-03  Bruno Haible  <bruno@clisp.org>
247
248         * m4/setenv.m4 (gl_FUNC_SETENV, gl_FUNC_UNSETENV): New macros,
249         extracted from gt_FUNC_SETENV.
250         (gt_FUNC_SETENV): Remove macro.
251         * modules/setenv (configure.ac): Add gl_FUNC_SETENV, gl_FUNC_UNSETENV,
252         remove gt_FUNC_SETENV.
253
254 2007-03-03  Bruno Haible  <bruno@clisp.org>
255
256         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY): Define
257         ENABLE_RELOCATABLE here.
258         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Don't define it here.
259
260 2007-03-03  Bruno Haible  <bruno@clisp.org>
261
262         * modules/rbtreehash-list-tests (Depends-on): Add progname.
263         * tests/test-rbtreehash_list.c: Include progname.h.
264         (main): Call set_program_name.
265
266         * modules/rbtree-oset-tests (Depends-on): Add progname.
267         * tests/test-rbtree_oset.c: Include progname.h.
268         (main): Call set_program_name.
269
270         * modules/rbtree-list-tests (Depends-on): Add progname.
271         * tests/test-rbtree_list.c: Include progname.h.
272         (main): Call set_program_name.
273
274         * modules/linked-list-tests (Depends-on): Add progname.
275         * tests/test-linked_list.c: Include progname.h.
276         (main): Call set_program_name.
277
278 2007-03-03  Bruno Haible  <bruno@clisp.org>
279
280         * lib/glob-libc.h (_Restrict_): New macro, copied from lib/regex.h.
281         All uses of __restrict changed to _Restrict_.
282         * lib/glob_.h (__restrict): Remove macro.
283
284 2007-03-02  Bruno Haible  <bruno@clisp.org>
285
286         * modules/gettext (configure.ac): Require gettext infrastructure
287         from version 0.16.1.
288
289 2007-03-02  Bruno Haible  <bruno@clisp.org>
290
291         * modules/linkedhash-list-tests (Depends-on): Add progname.
292         * tests/test-linkedhash_list.c: Include progname.h.
293         (main): Call set_program_name.
294
295         * modules/carray-list-tests (Depends-on): Add progname.
296         * tests/test-carray_list.c: Include progname.h.
297         (main): Call set_program_name.
298
299         * modules/avltreehash-list-tests (Depends-on): Add progname.
300         * tests/test-avltreehash_list.c: Include progname.h.
301         (main): Call set_program_name.
302
303         * modules/avltree-oset-tests (Depends-on): Add progname.
304         * tests/test-avltree_oset.c: Include progname.h.
305         (main): Call set_program_name.
306
307         * modules/avltree-list-tests (Depends-on): Add progname.
308         * tests/test-avltree_list.c: Include progname.h.
309         (main): Call set_program_name.
310
311         * modules/array-oset-tests (Depends-on): Add progname.
312         * tests/test-array_oset.c: Include progname.h.
313         (main): Call set_program_name.
314
315         * modules/array-list-tests (Depends-on): Add progname.
316         * tests/test-array_list.c: Include progname.h.
317         (main): Call set_program_name.
318
319         * modules/argp-tests (Depends-on): Add progname.
320         * tests/test-argp.c: Include argp.h first. Include progname.h.
321         (main): Call set_program_name.
322
323 2007-03-02  Paul Eggert  <eggert@cs.ucla.edu>
324
325         * doc/gnulib-tool.texi (Initial import): Reword description of
326         _FILE_OFFSET_BITS and _GNU_SOURCE, since they sometimes have a
327         limited effect even if defined after the first system include.
328
329 2007-03-01  Bruno Haible  <bruno@clisp.org>
330
331         * build-aux/config.libpath: Update to libtool-1.5.22.
332         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
333
334 2007-03-01  Bruno Haible  <bruno@clisp.org>
335
336         * doc/relocatable-maint.texi: Recommend to set foo_CPPFLAGS, not
337         foo_CFLAGS.
338         Reported by Ralf Wildenhues.
339
340 2007-03-01  Bruno Haible  <bruno@clisp.org>
341
342         * build-aux/install-reloc: Remove object files left over by some
343         compilers.
344         Reported by Ralf Wildenhues.
345
346 2007-03-01  Bruno Haible  <bruno@clisp.org>
347
348         * build-aux/install-reloc: Break long lines.
349
350 2007-03-01  Bruno Haible  <bruno@clisp.org>
351
352         * doc/relocatable.texi: Document that it may not work on OpenBSD.
353         Reported by Ralf Wildenhues.
354
355 2007-03-01  Bruno Haible  <bruno@clisp.org>
356
357         * doc/gnulib-tool.texi (Initial import): Remove paragraph about
358         include ordering constraints.
359
360 2007-03-01  Paul Eggert  <eggert@cs.ucla.edu>
361
362         Followup to the 2007-02-12 patch, using suggestions from Bruno Haible in
363         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00136.html>.
364         * doc/gnulib-tool.texi (Initial import): Mention _FILE_OFFSET_BITS
365         as another example.
366         * lib/time_.h: Fix misspelling.
367         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
368         Require gl_HEADER_TIME_H_DEFAULTS.
369         * m4/strptime.m4 (gl_FUNC_STRPTIME): Likewise.
370         * m4/time_r.m4 (gl_TIME_R): Likewise.
371         * m4/timegm.m4 (gl_FUNC_TIMEGM): Likewise.
372
373 2007-03-01  Bruno Haible  <bruno@clisp.org>
374
375         * m4/utimecmp.m4 (gl_UTIMECMP): Don't require gl_TIMESPEC.
376         * m4/utimens.m4 (gl_UTIMENS): Likewise.
377
378 2007-03-01  Jim Meyering  <jim@meyering.net>
379
380         * modules/xreadlink (Maintainer): Add my name.
381         * modules/xreadlink-with-size (Depends-on): Alphabetize.
382
383 2007-02-26  Ben Pfaff  <blp@cs.stanford.edu>
384             Bruno Haible  <bruno@clisp.org>
385
386         * build-aux/install-reloc: Compile also c-ctype.c.
387         * build-aux/relocatable.sh.in: New file.
388         * doc/relocatable.texi: New file.
389         * doc/relocatable-maint.texi: New file.
390         * doc/gnulib.texi: Include relocatable-maint.texi.
391         * lib/progreloc.c: Include unistd.h unconditionally.
392         * lib/relocwrapper.c: Include unistd.h unconditionally.
393         Include c-ctype.h.
394         (add_dotbin): Use c_tolower.
395         * m4/relocatable-lib.m4: New file, extracted from m4/relocatable.m4.
396         (gl_RELOCATABLE_LIBRARY): Renamed from AC_RELOCATABLE_LIBRARY.
397         (gl_RELOCATABLE_NOP): Renamed from AC_RELOCATABLE_NOP.
398         * m4/relocatable.m4 (AC_RELOCATABLE_LIBRARY, AC_RELOCATABLE_NOP): Move
399         to m4/relocatable-lib.m4.
400         (gl_RELOCATABLE): Renamed from AC_RELOCATABLE. Set also
401         RELOCATABLE_CONFIG_H_DIR, RELOCATABLE_SRC_DIR, RELOCATABLE_BUILD_DIR.
402         (gl_RELOCATABLE_BODY): Renamed from AC_RELOCATABLE_BODY. Don't
403         require obsolete macro AC_EXEEXT. Don't check for unistd.h. Don't set
404         SET_RELOCATABLE. Instead set RELOCATABLE_LDFLAGS, INSTALL_PROGRAM_ENV.
405         * modules/relocatable: New file.
406         * modules/relocatable-lib: New file.
407         * modules/relocatable-script: New file.
408
409 2007-02-28  Bruno Haible  <bruno@clisp.org>
410
411         Import --enable-relocatable infrastructure.
412         * build-aux/config.libpath: New file, from GNU gettext.
413         * build-aux/install-reloc: New file, from GNU gettext.
414         * build-aux/reloc-ldflags: New file, from GNU gettext.
415         * lib/relocatable.h: New file, from GNU gettext.
416         * lib/relocatable.c: New file, from GNU gettext.
417         * lib/relocwrapper.c: New file, from GNU gettext.
418         * m4/relocatable.m4: New file, from GNU gettext.
419
420 2007-02-28  Bruno Haible  <bruno@clisp.org>
421
422         * MODULES.html.sh (File system functions): Add xreadlink-with-size.
423
424         * modules/xreadlink: New file, from GNU gettext with modifications.
425         * lib/xreadlink.c: New file, from GNU gettext.
426         * lib/xreadlink.h: Add comments.
427         (xreadlink): New declaration.
428
429         * modules/xreadlink-with-size: Renamed from modules/xreadlink.
430         (Files): Remove m4/xreadlink.m4. Replace lib/xreadlink.c with
431         lib/xreadlink-with-size.c.
432         (configure.ac): Remove gl_XREADLINK invocation.
433         (Makefile.am): Augment lib_SOURCES.
434         * m4/xreadlink.m4: Remove file.
435         * lib/xreadlink-with-size.c: Renamed from lib/xreadlink.c.
436         (xreadlink_with_size): Renamed from xreadink.
437         * lib/xreadlink.h (xreadlink_with_size): Renamed from xreadink.
438         * modules/canonicalize (Depends-on): Replace xreadlink with
439         xreadlink-with-size.
440         * lib/canonicalize.c (canonicalize_filename_mode): Update.
441
442 2007-02-25  Jim Meyering  <jim@meyering.net>
443
444         * build-aux/announce-gen: When complaining about excess arguments,
445         list them.
446
447 2007-02-25  Paul Eggert  <eggert@cs.ucla.edu>
448
449         * README: Document signed integer overflow situation more
450         accurately.
451
452 2007-02-25  Bruno Haible  <bruno@clisp.org>
453
454         * lib/vasnprintf.c (VASNPRINTF): Fix estimate of size needed for a
455         'a' or 'A' conversion.
456
457 2007-02-25  Bruno Haible  <bruno@clisp.org>
458
459         * modules/filename: Renamed from modules/pathname.
460         (Files): Replace lib/pathname.h with lib/filename.h. Replace
461         lib/concatpath.c with lib/concat-filename.c.
462         (Makefile.am): Update.
463         (Include): Replace pathname.h with filename.h.
464         * lib/filename.h: Renamed from lib/pathname.h.
465         (concatenated_filename): Renamed from concatenated_pathname.
466         * lib/concat-filename.c: Renamed from lib/concatpath.c.
467         (concatenated_filename): Renamed from concatenated_pathname.
468         * lib/findprog.c: Include filename.h instead of pathname.h.
469         (find_in_path): Update.
470         * lib/javacomp.c: Include filename.h instead of pathname.h.
471         (is_envjavac_gcj43_usable, is_envjavac_oldgcj_14_14_usable,
472         is_envjavac_oldgcj_14_13_usable, is_envjavac_nongcj_usable,
473         is_gcj_present, is_gcj43_usable, is_oldgcj_14_14_usable,
474         is_oldgcj_14_13_usable, is_javac_usable): Update.
475         * lib/javaexec.c: Include filename.h instead of pathname.h.
476         (execute_java_class): Update.
477         * modules/findprog: Update.
478         * modules/javacomp: Update.
479         * modules/javaexec: Update.
480         * MODULES.html.sh (File system functions): Add 'filename', remove
481         'pathname'.
482
483 2007-02-25  Bruno Haible  <bruno@clisp.org>
484
485         * modules/printf-frexpl-tests: New file.
486         * tests/test-printf-frexpl.c: New file.
487
488         * modules/printf-frexpl: New file.
489         * lib/printf-frexpl.h: New file.
490         * lib/printf-frexpl.c: New file.
491         * m4/printf-frexpl.m4: New file.
492
493 2007-02-25  Bruno Haible  <bruno@clisp.org>
494
495         * modules/printf-frexp-tests: New file.
496         * tests/test-printf-frexp.c: New file.
497
498         * modules/printf-frexp: New file.
499         * lib/printf-frexp.h: New file.
500         * lib/printf-frexp.c: New file.
501         * m4/printf-frexp.m4: New file.
502
503 2007-02-25  Bruno Haible  <bruno@clisp.org>
504
505         Assume automake >= 1.10 for the tests.
506         * modules/arcfour-tests (TESTS): Remove $(EXEEXT) suffix.
507         * modules/arctwo-tests: Likewise.
508         * modules/argp-tests: Likewise.
509         * modules/avltree-list-tests: Likewise.
510         * modules/avltree-oset-tests: Likewise.
511         * modules/avltreehash-list-tests: Likewise.
512         * modules/carray-list-tests: Likewise.
513         * modules/crc-tests: Likewise.
514         * modules/des-tests: Likewise.
515         * modules/gc-arcfour-tests: Likewise.
516         * modules/gc-arctwo-tests: Likewise.
517         * modules/gc-des-tests: Likewise.
518         * modules/gc-hmac-md5-tests: Likewise.
519         * modules/gc-hmac-sha1-tests: Likewise.
520         * modules/gc-md2-tests: Likewise.
521         * modules/gc-md4-tests: Likewise.
522         * modules/gc-md5-tests: Likewise.
523         * modules/gc-pbkdf2-sha1-tests: Likewise.
524         * modules/gc-rijndael-tests: Likewise.
525         * modules/gc-sha1-tests: Likewise.
526         * modules/gc-tests: Likewise.
527         * modules/getaddrinfo-tests: Likewise.
528         * modules/hmac-md5-tests: Likewise.
529         * modules/hmac-sha1-tests: Likewise.
530         * modules/linked-list-tests: Likewise.
531         * modules/linkedhash-list-tests: Likewise.
532         * modules/lock-tests: Likewise.
533         * modules/md2-tests: Likewise.
534         * modules/md4-tests: Likewise.
535         * modules/md5-tests: Likewise.
536         * modules/rbtree-list-tests: Likewise.
537         * modules/rbtree-oset-tests: Likewise.
538         * modules/rbtreehash-list-tests: Likewise.
539         * modules/read-file-tests: Likewise.
540         * modules/rijndael-tests: Likewise.
541         * modules/stdint-tests: Likewise.
542         * modules/tls-tests: Likewise.
543
544 2007-02-24  Bruno Haible  <bruno@clisp.org>
545
546         * lib/isnanl.h (isnanl): Define through isnan if isnan is a macro.
547         * m4/isnan.m4 (gl_FUNC_ISNAN_NO_LIBM): Don't check for isnan as a
548         function; instead check whether isnan with a double argument links.
549         * m4/isnanl.m4 (gl_FUNC_ISNANL_NO_LIBM): Don't check for isnanl as a
550         function; instead check whether isnan with a 'long double' argument
551         links.
552         Reported by Eric Blake <ebb9@byu.net>.
553
554 2007-02-24  Bruno Haible  <bruno@clisp.org>
555
556         * lib/isnan.c: Support the 'long double' case if USE_LONG_DOUBLE is
557         defined.
558         * lib/isnanl.c: Remove all code. Just include isnan.c.
559         * modules/isnanl-nolibm (Files): Add lib/isnan.c.
560
561 2007-02-25  Jim Meyering  <jim@meyering.net>
562
563         Avoid conflicting types for 'unsetenv' on FreeBSD.
564         * lib/putenv.c (_unsetenv): Rename from "unsetenv", to avoid
565         conflicting with FreeBSD's (5.0 and 6.1) function declaration
566         in stdlib.h.
567
568 2007-02-24  Bruno Haible  <bruno@clisp.org>
569
570         * modules/isnanl-nolibm-tests: New file.
571         * tests/test-isnanl.c: New file.
572
573         * modules/isnanl-nolibm: New file.
574         * lib/isnanl.h: New file.
575         * lib/isnanl.c: New file.
576         * m4/isnanl.m4: New file.
577
578 2007-02-24  Bruno Haible  <bruno@clisp.org>
579
580         * modules/isnan-nolibm-tests: New file.
581         * tests/test-isnan.c: New file.
582
583         * modules/isnan-nolibm: New file.
584         * lib/isnan.h: New file.
585         * lib/isnan.c: New file.
586         * m4/isnan.m4: New file.
587
588 2007-02-24  Bruno Haible  <bruno@clisp.org>
589
590         * lib/frexpl.c (frexpl): Correct return values for x = 1.0L. Don't
591         assume that an exponent fits in 20 bits.
592
593 2007-02-24  Jim Meyering  <jim@meyering.net>
594
595         * m4/regex.m4: Update the description of the configure-time option,
596         --without-included-regex, to state accurately what the defaults are,
597         and perhaps to give people an idea why using this option is risky.
598
599 2007-02-24  Paul Eggert  <eggert@cs.ucla.edu>
600
601         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check for a nanosleep that
602         loops on small arguments.  This attempts to avoid the problem
603         Bruno Haible reported for AIX 4.3.2 in
604         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00309.html>.
605
606 2007-02-23  Bruno Haible  <bruno@clisp.org>
607
608         * m4/perl.m4 (gl_PERL): Require version 5.005, not 5.003.
609         Needed for help2man.
610
611 2007-02-23  Karl Berry  <karl@gnu.org>
612
613         * doc/gnulib-tool.texi (CVS Issues): mention that when foo_.h
614         exists, foo.h should be cvs-ignored, not committed.
615
616 2007-02-23  Eric Blake  <ebb9@byu.net>
617
618         * lib/getdate.h (includes):  Include <time.h>, not "timespec.h".
619         * lib/stat-time.h (includes): Likewise.
620         * lib/utimecmp.c (includes): Likewise.
621         * lib/utimens.h (includes): Likewise.
622         * lib/getdate.y (includes): Also include "timespec.h" for use
623         internal to the module.
624         * modules/utimens (Depends-on): Revert yesterday's patch.
625         * modules/nanosleep (Depends-on): Add missing dependency.
626
627 2007-02-22  Bruno Haible  <bruno@clisp.org>
628
629         * lib/glob.c: Don't include getlogin_r.h.
630
631 2007-02-22  Jim Meyering  <jim@meyering.net>
632
633         * modules/utimens (Depends-on): Add timespec, required for
634         utimens.h's inclusion of timespec.h.
635
636 2007-02-21  Paul Eggert  <eggert@cs.ucla.edu>
637
638         * lib/getcwd.c (__getcwd): Undo previous change; it mishandled
639         long unreadable paths in GNU/Linux.  Problem reported by Andreas
640         Schwab in
641         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00261.html>.
642         I'll try to think of a better way to fix the Solaris problem.
643
644         * lib/getcwd.c (__getcwd): Don't assume getcwd (NULL, 0) works
645         like glibc; on Solaris 10, it fails with errno == EINVAL.
646         POSIX says the behavior is unspecified if the first argument is NULL,
647         so play it safe and never pass NULL to the system getcwd.
648
649 2007-02-21  Jim Meyering  <jim@meyering.net>
650
651         * lib/gettimeofday.c (rpl_gettimeofday): Remove declaration
652         of gettimeofday.  It would conflict with the one now always
653         provided via sys_time_.h.  Reported by Matthew Woehlke, as
654         an IRIX 6.5 build failure.
655
656 2007-02-20  Paul Eggert  <eggert@cs.ucla.edu>
657
658         Minor fixups to port to Solaris 10 with Sun C 5.8.
659         * lib/getcwd.c [!_LIBC]: Include dirfd.h, since we use dirfd.
660         * modules/getcwd (Depends-on): Add dirfd.
661         * lib/putenv.c (putenv): #undef it.
662         (rpl_putenv): New decl.
663         (malloc, free): Include <stdlib.h> rather than prototyping separately.
664
665 2007-02-20  Bruno Haible  <bruno@clisp.org>
666
667         * modules/stdio-tests: New file.
668         * tests/test-stdio.c: New file.
669
670         * modules/vsnprintf (Files): Remove lib/vsnprintf.h.
671         (Depends-on): Add stdio.
672         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
673         (Include): Use <stdio.h> instead of vsnprintf.h.
674         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
675         HAVE_DECL_VSNPRINTF.
676         * lib/vsnprintf.c: Include <stdio.h> instead of vsnprintf.h.
677
678         * modules/snprintf (Files): Remove lib/snprintf.h.
679         (Depends-on): Add stdio.
680         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
681         (Include): Use <stdio.h> instead of snprintf.h.
682         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
683         HAVE_DECL_SNPRINTF.
684         * lib/snprintf.c: Include <stdio.h> instead of snprintf.h.
685         * lib/getaddrinfo.c: Likewise.
686
687         * modules/stdio: New file.
688         * lib/stdio_.h: New file, incorporating snprintf.h and vsnprintf.h.
689         * lib/snprintf.h: Remove file.
690         * lib/vsnprintf.h: Remove file.
691         * lib/.cppi-disable: Remove snprintf.h.
692         * m4/stdio_h.m4: New file.
693         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdio.
694
695 2007-02-20  Jim Meyering  <jim@meyering.net>
696
697         * lib/ftruncate.c [HAVE_CHSIZE]: Document that this code is
698         used by e.g., mingw.  From Bruno Haible.
699
700 2007-02-19  Bruno Haible  <bruno@clisp.org>
701
702         * lib/string_.h: Use "#pragma GCC system_header" to suppress some gcc
703         warnings.
704         Reported by Ben Pfaff <blp@cs.stanford.edu>.
705
706 2007-02-19  Bruno Haible  <bruno@clisp.org>
707
708         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Don't request a complaint mail
709         from mingw users.
710
711 2007-02-19  Bruno Haible  <bruno@clisp.org>
712
713         * lib/stdlib_.h: Use "#pragma GCC system_header" to suppress some gcc
714         warnings.
715         Reported by Joel E. Denny <jdenny@ces.clemson.edu> via Paul Eggert.
716
717 2007-02-19  Jim Meyering  <jim@meyering.net>
718
719         Don't use FD after a successful "fdopendir (fd)".
720         * lib/getcwd.c (__getcwd) [AT_FDCWD]: fdopendir (fd) usually closes fd.
721         Reset it by calling dirfd on the just-obtained DIR*.
722
723         * m4/ftruncate.m4: Adjust comment to give this module a 3-year reprieve.
724         Prompted by a report from Bruno Haible that mingw lacks ftruncate.
725
726 2007-02-18  Bruno Haible  <bruno@clisp.org>
727
728         * lib/readlink.c: Include <unistd.h>.
729         * m4/readlink.m4 (gl_FUNC_READLINK): Require gl_UNISTD_H_DEFAULTS. Set
730         HAVE_READLINK.
731         * modules/readlink (Depends-on): Add unistd.
732         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
733         (Include): Add <unistd.h>.
734
735         * lib/getlogin_r.h: Remove file.
736         * lib/getlogin_r.c: Include <unistd.h> instead of getlogin_r.h.
737         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE): Remove macro.
738         (gl_GETLOGIN_R): Inline it here. Require gl_UNISTD_H_DEFAULTS. Set
739         HAVE_DECL_GETLOGIN_R.
740         * modules/getlogin_r (Files): Remove lib/getlogin_r.h.
741         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
742         (Include): Use <unistd.h> instead of getlogin_r.h.
743
744         * lib/getcwd.h: Remove file.
745         * lib/getcwd.c: Include <unistd.h> instead of getcwd.h.
746         * lib/xgetcwd.c: Likewise.
747         * m4/getcwd.m4 (gl_FUNC_GETCWD): Require gl_UNISTD_H_DEFAULTS. Set
748         REPLACE_GETCWD. Don't define __GETCWD_PREFIX.
749         * modules/getcwd (Files): Remove lib/getcwd.h.
750         (Depends-on): Add unistd.
751         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
752         (Include): Use <unistd.h> instad of getcwd.h.
753
754         * lib/ftruncate.c: Include <unistd.h> first.
755         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Require gl_UNISTD_H_DEFAULTS.
756         Set HAVE_FTRUNCATE.
757         * modules/ftruncate (Depends-on): Add unistd.
758         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
759
760         * lib/fchdir.c: Include <unistd.h> first.
761         * lib/dirent_.h: Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT.
762         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_UNISTD_H_DEFAULTS instead
763         of gl_HEADER_UNISTD_DEFAULTS. Set REPLACE_FCHDIR. Don't set UNISTD_H.
764         * modules/fchdir (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
765         (Makefile.am): Substitute also REPLACE_FCHDIR into dirent.h.
766
767         * lib/dup2.c: Include <unistd.h> first.
768         * m4/dup2.m4 (gl_FUNC_DUP2): Require gl_UNISTD_H_DEFAULTS. Set
769         HAVE_DUP2.
770         * modules/dup2 (Depends-on): Add unistd.
771         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
772
773         * lib/chown.c: Include <unistd.h> first. Undefine chown later.
774         * m4/chown.m4 (gl_FUNC_CHOWN): Require gl_UNISTD_H_DEFAULTS. Set
775         REPLACE_CHOWN. Don't define chown as a macro here.
776         * modules/chown (Depends-on): Add unistd.
777         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
778
779         * lib/unistd_.h: Test HAVE_UNISTD_H determined at configure time.
780         Add definition for GL_LINK_WARNING.
781         (chown, dup2): New declarations.
782         (fchdir): Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT. Provide optional
783         link warning.
784         (ftruncate): New declaration.
785         (getcwd): New declaration, taken from old getcwd.h.
786         (getlogin_r): New declaration, taken from old getlogin_r.h.
787         (readlink): New declaration.
788         * m4/unistd_h.m4 (gl_UNISTD_H): Renamed from gl_HEADER_UNISTD. Don't
789         set UNISTD_H. Inline gl_PREREQ_UNISTD. Set HAVE_UNISTD_H.
790         (gl_PREREQ_UNISTD): Remove macro.
791         (gl_UNISTD_MODULE_INDICATOR): New macro.
792         (gl_UNISTD_H_DEFAULTS): Renamed from gl_HEADER_UNISTD_DEFAULTS. Set
793         many new variables. Don't set UNISTD_H.
794         * modules/unistd (Description): Change.
795         (Depends-on): Add link-warning.
796         (configure.ac): Update.
797         (Makefile.am): Create unistd.h always. Substitute many new variables
798         into it.
799
800 2007-02-18  Bruno Haible  <bruno@clisp.org>
801
802         * lib/stdlib_.h (getsubopt): New declaration, copied from getsubopt.h.
803         * modules/stdlib (stdlib.h): Also substitute GNULIB_GETSUBOPT and
804         HAVE_GETSUBOPT.
805         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Also initialize
806         GNULIB_GETSUBOPT and HAVE_GETSUBOPT.
807         * lib/getsubopt.h: Remove file.
808         * modules/getsubopt (Files): Remove lib/getsubopt.h.
809         (Depends-on): Add stdlib.
810         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
811         (Includes): Use <stdlib.h> instead of getsubopt.h.
812         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Require gl_STDLIB_H_DEFAULTS.
813         Set HAVE_GETSUBOPT.
814         * lib/getsubopt.c: Don't include getsubopt.h.
815
816 2007-02-18  Bruno Haible  <bruno@clisp.org>
817
818         * modules/fchdir (Depends-on): Add dup2.
819
820 2007-02-18  Bruno Haible  <bruno@clisp.org>
821
822         * lib/stdlib_.h: Handle glibc's special invocation convention
823         specially.
824
825 2007-02-18  Bruno Haible  <bruno@clisp.org>
826
827         * modules/stdlib-tests: New file.
828         * tests/test-stdlib.c: New file.
829
830         * modules/mkstemp (Files): Remove lib/mkstemp.h.
831         (Depends-on): Add stdlib.
832         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
833         (Includes): Use <stdlib.h> instead of mkstemp.h.
834         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require gl_STDLIB_H_DEFAULTS. Set
835         REPLACE_MKSTEMP. Remove definition of __MKSTEMP_PREFIX.
836         * lib/mkstemp.c: Don't include mkstemp.h.
837         * lib/mkstemp-safer.c: Include <stdlib.h> instead of mkstemp.h.
838         * lib/stdlib--.h: Don't include mkstemp.h.
839
840         * modules/mkdtemp (Files): Remove lib/mkdtemp.h.
841         (Depends-on): Add stdlib.
842         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
843         (Includes): Use <stdlib.h> instead of mkdtemp.h.
844         * m4/mkdtemp.m4 (gt_FUNC_MKDTEMP): Require gl_STDLIB_H_DEFAULTS. Set
845         HAVE_MKDTEMP.
846         * lib/mkdtemp.c: Don't include mkdtemp.h.
847         * lib/clean-temp.c: Don't include mkdtemp.h.
848
849         * modules/exit (Files): Remove lib/exit.h.
850         (Depends-on): Add stdlib.
851         (Makefile.am): Remove lib_SOURCES.
852         (Include): Use <stdlib.h> instead of exit.h.
853         * lib/argmatch.c: Don't include exit.h.
854         * lib/execute.c: Likewise.
855         * lib/pagealign_alloc.c: Likewise.
856         * lib/pipe.c: Likewise.
857         * lib/wait-process.c: Likewise.
858         * lib/copy-file.c: Include <stdlib.h> instead of exit.h.
859         * lib/exitfail.c: Likewise.
860         * lib/savewd.c: Likewise.
861         * lib/xsetenv.c: Likewise.
862
863         * modules/stdlib: New file.
864         * lib/stdlib_.h: New file, incorporating exit.h, mkdtemp.h, mkstemp.h
865         and extra comments about mkstemp().
866         * lib/exit.h: Remove file.
867         * lib/mkdtemp.h: Remove file.
868         * lib/mkstemp.h: Remove file.
869         * m4/stdlib_h.m4: New file.
870         * MODULES.html.sh (Support for systems lacking ANSI C 89): Add stdlib.
871
872 2007-02-18  Bruno Haible  <bruno@clisp.org>
873
874         * modules/math-tests: New file.
875         * tests/test-math.c: New file.
876
877         * modules/math: New file.
878         * modules/mathl (Files): Remove lib/mathl.h.
879         (Depends-on): Add math.
880         (Makefile.am): Don't mention mathl.h.
881         (Include): Use <math.h> instead of mathl.h.
882         * lib/math_.h: New file.
883         * lib/mathl.h: Remove file.
884         * lib/acosl.c: Include <config.h> and <math.h> first. Don't include
885         mathl.h.
886         * lib/asinl.c: Likewise.
887         * lib/atanl.c: Likewise.
888         * lib/ceill.c: Likewise.
889         * lib/cosl.c: Likewise.
890         * lib/expl.c: Likewise.
891         * lib/floorl.c: Likewise.
892         * lib/frexpl.c: Likewise.
893         * lib/ldexpl.c: Likewise.
894         * lib/logl.c: Likewise.
895         * lib/sincosl.c: Likewise.
896         * lib/sinl.c: Likewise.
897         * lib/sqrtl.c: Likewise.
898         * lib/tanl.c: Likewise.
899         * lib/trigl.c: Likewise.
900         * m4/math_h.m4: New file.
901         * MODULES.html.sh (Mathematics): Add math.
902
903 2007-02-17  Bruno Haible  <bruno@clisp.org>
904
905         * modules/wctype-tests: New file.
906         * tests/test-wctype.c: New file.
907
908         * modules/wchar-tests: New file.
909         * tests/test-wchar.c: New file.
910
911         * modules/unistd-tests: New file.
912         * tests/test-unistd.c: New file.
913
914         * modules/time-tests: New file.
915         * tests/test-time.c: New file.
916
917         * modules/sysexits-tests: New file.
918         * tests/test-sysexits.c: New file.
919
920         * modules/sys_time-tests: New file.
921         * tests/test-sys_time.c: New file.
922
923         * modules/sys_stat-tests: New file.
924         * tests/test-sys_stat.c: New file.
925
926         * modules/sys_socket-tests: New file.
927         * tests/test-sys_socket.c: New file.
928
929         * modules/sys_select-tests: New file.
930         * tests/test-sys_select.c: New file.
931
932         * modules/string-tests: New file.
933         * tests/test-string.c: New file.
934
935         * modules/stdbool-tests: New file.
936         * tests/test-stdbool.c: New file.
937
938         * modules/netinet_in-tests: New file.
939         * tests/test-netinet_in.c: New file.
940
941         * modules/inttypes-tests: New file.
942         * tests/test-inttypes.c: New file.
943
944         * modules/fcntl-tests: New file.
945         * tests/test-fcntl.c: New file.
946
947         * modules/byteswap-tests: New file.
948         * tests/test-byteswap.c: New file.
949
950         * modules/arpa_inet-tests: New file.
951         * tests/test-arpa_inet.c: New file.
952
953 2007-02-17  Bruno Haible  <bruno@clisp.org>
954
955         * lib/inttypes_.h: Add definition for GL_LINK_WARNING.
956         (imaxabs, imaxdiv, strtoimax, strtoumax): Don't declare the function
957         if the corresponding module is not enabled. Emit link warnings if
958         the function is used nevertheless.
959         * m4/inttypes.m4 (gl_INTTYPES_H): Never use the existing <inttypes.h>.
960         Don't AC_SUBST HAVE_DECL_IMAXABS, HAVE_DECL_IMAXDIV,
961         HAVE_DECL_STRTOIMAX, HAVE_DECL_STRTOUMAX.
962         (gl_INTTYPES_MODULE_INDICATOR, gl_INTTYPES_H_DEFAULTS): New macros.
963         * modules/inttypes (Depends-on): Add link-warning.
964         (Makefile.am): Copy the contents of build-aux/link-warning.h into
965         inttypes.h. Substitute also GNULIB_IMAXABS, GNULIB_IMAXDIV,
966         GNULIB_STRTOIMAX, GNULIB_STRTOUMAX.
967         * modules/imaxabs (configure.ac): Invoke gl_INTTYPES_MODULE_INDICATOR.
968         * modules/imaxdiv (configure.ac): Likewise.
969         * modules/strtoimax (configure.ac): Likewise.
970         * modules/strtoumax (configure.ac): Likewise.
971
972 2007-02-17  Bruno Haible  <bruno@clisp.org>
973
974         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Include the contents of
975         gl_STRING_MODULE_INDICATOR_DEFAULTS.
976         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Remove macro.
977         (gl_HEADER_STRING_H_BODY, gl_STRING_MODULE_INDICATOR): Update.
978
979 2007-02-17  Bruno Haible  <bruno@clisp.org>
980
981         * modules/link-warning: New file.
982         * build-aux/link-warning.h: New file, extracted from lib/string_.h.
983         * lib/string_.h (GL_LINK_WARNING): Remove definition.
984         * modules/string (Depends-on): Add link-warning.
985         (Makefile.am): Copy the contents of build-aux/link-warning.h into
986         string.h.
987         * MODULES.html.sh (Support for building libraries and executables): Add
988         link-warning.
989
990 2007-02-17  Bruno Haible  <bruno@clisp.org>
991
992         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strcasecmp,
993         strncasecmp, strchr, strchrnul, strdup, strndup, strnlen, strcspn,
994         strpbrk, strspn, strrchr, strsep, strstr, strcasestr, strtok_r): Break
995         long lines.
996
997 2007-02-17  Ben Pfaff  <blp@cs.stanford.edu>
998             Bruno Haible  <bruno@clisp.org>
999
1000         * modules/tmpfile: New file.
1001         * lib/tmpfile.c: New file.
1002         * m4/tmpfile.m4: New file.
1003         * MODULES.html.sh (func_all_modules): New section "Input/output".
1004
1005 2007-02-15  Bruno Haible  <bruno@clisp.org>
1006
1007         * lib/clean-temp.c [WIN32 && !CYGWIN]: Include <windows.h>.
1008         (supports_delete_on_close): New function.
1009         (open_temp, fopen_temp): Use _O_TEMPORARY when supported.
1010
1011 2007-02-14  Bruno Haible  <bruno@clisp.org>
1012
1013         * modules/mbspcasecmp-tests: New file.
1014         * tests/test-mbspcasecmp.sh: New file.
1015         * tests/test-mbspcasecmp.c: New file.
1016
1017         New module mbspcasecmp.
1018         * modules/mbspcasecmp: New file.
1019         * lib/mbspcasecmp.c: New file.
1020         * lib/string_.h (strncasecmp): Change warning message.
1021         (mbspcasecmp): New declaration.
1022         * m4/mbspcasecmp.m4: New file.
1023         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1024         GNULIB_MBSPCASECMP.
1025         * modules/string (string.h): Also substitute GNULIB_MBSPCASECMP.
1026         * MODULES.html.sh (Internationalization functions): Add mbspcasecmp.
1027
1028 2007-02-14  Bruno Haible  <bruno@clisp.org>
1029
1030         * modules/mbsncasecmp-tests: New file.
1031         * tests/test-mbsncasecmp.sh: New file.
1032         * tests/test-mbsncasecmp.c: New file.
1033
1034         New module mbsncasecmp.
1035         * modules/mbsncasecmp: New file.
1036         * lib/mbsncasecmp.c: New file.
1037         * lib/string_.h (mbsncasecmp): New declaration.
1038         * m4/mbsncasecmp.m4: New file.
1039         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1040         GNULIB_MBSNCASECMP.
1041         * modules/string (string.h): Also substitute GNULIB_MBSNCASECMP.
1042         * MODULES.html.sh (Internationalization functions): Add mbsncasecmp.
1043
1044 2007-02-14  Paul Eggert  <eggert@cs.ucla.edu>
1045
1046         * lib/exclude.c (FNM_EXTMATCH): Define if system does not.
1047         Verify that it doesn't overlap with our flags.
1048         (fnmatch_no_wildcards): Don't use strcasecmp or strncasecmp, which
1049         do not have the desired effect in multibyte locales; instead, use
1050         mbscasecmp.
1051         * modules/exclude (Depends-on): Depend on mbscasecmp, not strcase.
1052         Add dependency on xalloc.  Depend on fnmatch, not fnmatch-gnu, since
1053         we don't require GNU fnmatch ourselves (if our users require it, they
1054         should do so explicitly).
1055
1056         Fix regex code so it doesn't rely on strcasecmp.
1057         * lib/regex_internal.h: Include <langinfo.h> only if _LIBC is defined.
1058         Otherwise, include gnulib's langinfo.h.
1059         * lib/regcomp.c (init_dfa): Don't use strcasecmp, as it can have
1060         undesirable behavior in non-C locales.  Instead, rely on localecharset.
1061         * m4/regex.m4 (gl_PREREQ_REGEX): Don't require AM_LANGINFO_CODESET.
1062         * modules/regex (FILES): Remove m4/codeset.m4.
1063         (Depends-on): Add localcharset.  Remove strcase.
1064
1065 2007-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1066
1067         * m4/unlinkdir.m4 (gl_UNLINKDIR): Fix m4 quoting bug.
1068         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
1069
1070 2007-02-13  Bruno Haible  <bruno@clisp.org>
1071
1072         * m4/intdiv0.m4 (gt_INTDIV0): Assume ANSI C. Fix underquoting bug.
1073         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
1074
1075 2007-02-12  Bruno Haible  <bruno@clisp.org>
1076
1077         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
1078         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): If
1079         GNULIB_POSIXCHECK and the gnulib module not enabled, provoke a link-
1080         time warning rather than a link error.
1081
1082 2007-02-12  Bruno Haible  <bruno@clisp.org>
1083
1084         * m4/locale-fr.m4 (gt_LOCALE_FR): Fix m4 quoting bug.
1085         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
1086         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
1087
1088 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
1089
1090         * lib/string_.h (strncasecmp): Fix typo: this macro takes 3
1091         args, not 2.
1092
1093 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
1094
1095         New module 'time', so that apps can include <time.h> as per
1096         POSIX and GNU instead of separate include files like time_r.h
1097         and timegm.h.  This implementation tries out a simpler approach
1098         for replacing decls in standard include files (as compared to
1099         the string module), somewhat as an experiment.
1100
1101         * config/srclist.txt: Comment out mktime.c for now.
1102         * doc/gnulib-tool.texi (Initial import): Don't use time_r as an example
1103         since it doesn't apply any more.  Use generic wording instead.
1104         * MODULES.html.sh (Support for systems lacking POSIX:2001): New module
1105         'time'.
1106         * lib/time_.h, m4/time_h.m4, modules/time: New files.
1107         * lib/strptime.h, lib/time_r.h, lib/timegm.h: Remove.
1108         * lib/mktime.c: Include config.h depending on _LIBC, not HAVE_CONFIG_H.
1109         Don't include <sys/types.h>; no longer needed since we assume C89.
1110         * lib/mktime.c: Don't include "time_r.h"; no longer needed.
1111         * lib/strftime.c: Likewise.
1112         * lib/time_r.c: Likewise.
1113         * lib/nanosleep.c (nanosleep): #undef after include files, not before.
1114         * lib/nanosleep.c: Include <time.h> first, to check interface.
1115         * lib/strptime.c: Likewise.
1116         * lib/time_r.c: Likewise.
1117         * lib/timegm.c: Likewise.
1118         * lib/strptime.c: Don't include strptime.h or time_r.h; no longer
1119         needed.
1120         * lib/timegm.c: Don't include timegm.h; no longer needed.
1121         * lib/timespec.h: Don't include <sys/time.h> before <time.h>;
1122         time.h now handles any problems in that area.
1123         (struct timespec, nanosleep): Remove; time.h now arranges for these.
1124         * lib/xnanosleep.c: Don't include timespec.h; no longer needed now
1125         that time.h defines struct timespec.
1126         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check that nanosleep is declared.
1127         Set REPLACE_NANOSLEEP.  Don't AC_DEFINE nanosleep; the time module now
1128         handles that.
1129         * m4/strptime.m4 (gl_FUNC_STPRTIME): Set REPLACE_STRPTIME.
1130         * m4/time_r.m4 (gl_TIME_R): Don't define HAVE_TIME_R_POSIX; no longer
1131         needed.  Set REPLACE_LOCALTIME.
1132         * m4/timegm.m4 (gl_FUNC_TIMEGM): Set REPLACE_TIMEGM.
1133         * m4/timespec.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Move to time_h.m4.
1134         (gl_TIMESPEC): Don't check for sys/time.h or struct timespec or
1135         nanosleep; time_h.m4 now does that.  Don't require
1136         gl_USE_SYSTEM_EXTENSIONS; no longer needed directly, and the time
1137         module handles this now.
1138         * modules/getdate (Depends-on): Remove timespec.  Add time.
1139         * modules/nanosleep (Depends-on): Likewise.
1140         * modules/stat-time (Depends-on): Likewise.
1141         * modules/nanosleep (Include): Include time.h, not timespec.h.
1142         * modules/strptime (Files): Remove lib/strptime.h.
1143         (Depends-on): Add extensions, time.
1144         (Include): Include time.h, not strptime.h.
1145         * modules/time_r (Files): Remove lib/time_r.h.
1146         (Depends-on): Add time.
1147         (Include): Include time.h, not time_r.h.
1148         * modules/timegm: Likewise.
1149         * modules/timespec (Description): Now does timespec-related decls
1150         of our own, instead of struct timespec itself.
1151         (Depends-on): Add time; remove extensions.
1152         (Maintainer): Add self.
1153         * modules/utimecmp (Depends-on): Add time; remove timespec.
1154         * modules/utimens (Depends-on): Likewise.
1155         * modules/xnanosleep (Depends-on): Likewise.
1156
1157 2007-02-11  Bruno Haible  <bruno@clisp.org>
1158
1159         * lib/c-strstr.c: Include allocsa.h.
1160         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
1161         * lib/c-strcasestr.c: Include allocsa.h.
1162         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
1163         * lib/strcasestr.c: Include allocsa.h.
1164         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
1165         * lib/mbsstr.c: Include allocsa.h.
1166         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
1167         allocsa/freesa instead of malloc/free.
1168         * lib/mbscasestr.c: Include allocsa.h.
1169         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
1170         allocsa/freesa instead of malloc/free.
1171         * modules/c-strstr (Depends-on): Add allocsa.
1172         * modules/c-strcasestr (Depends-on): Likewise.
1173         * modules/strcasestr (Depends-on): Likewise.
1174         * modules/mbsstr (Depends-on): Likewise.
1175         * modules/mbscasestr (Depends-on): Likewise.
1176
1177 2007-02-11  Bruno Haible  <bruno@clisp.org>
1178
1179         * lib/mbsspn.c (mbsspn): Fix bug. Remove unnecessary strlen call.
1180
1181         * modules/mbsspn-tests: New file.
1182         * tests/test-mbsspn.sh: New file.
1183         * tests/test-mbsspn.c: New file.
1184
1185 2007-02-11  Bruno Haible  <bruno@clisp.org>
1186
1187         * lib/mbspbrk.c (mbspbrk): Remove unneeded cast.
1188
1189         * modules/mbspbrk-tests: New file.
1190         * tests/test-mbspbrk.sh: New file.
1191         * tests/test-mbspbrk.c: New file.
1192
1193 2007-02-11  Bruno Haible  <bruno@clisp.org>
1194
1195         * lib/mbscspn.c (mbscspn): Remove unnecessary strlen call and
1196         unneeded cast.
1197
1198         * modules/mbscspn-tests: New file.
1199         * tests/test-mbscspn.sh: New file.
1200         * tests/test-mbscspn.c: New file.
1201
1202 2007-02-11  Bruno Haible  <bruno@clisp.org>
1203
1204         * modules/mbscasecmp-tests: New file.
1205         * tests/test-mbscasecmp.sh: New file.
1206         * tests/test-mbscasecmp.c: New file.
1207
1208 2007-02-11  Bruno Haible  <bruno@clisp.org>
1209
1210         Ensure O(n) worst-case complexity of mbscasestr.
1211         * lib/mbscasestr.c: Include stdbool.h.
1212         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
1213         functions.
1214         (mbscasestr): Add some bookkeeping. Invoke knuth_morris_pratt_* when
1215         the bookkeeping indicates that it's worth it.
1216         * modules/mbscasestr (Depends-on): Add stdbool, mbslen, strnlen.
1217
1218         * modules/mbscasestr-tests: New file.
1219         * tests/test-mbscasestr1.c: New file.
1220         * tests/test-mbscasestr2.sh: New file.
1221         * tests/test-mbscasestr2.c: New file.
1222         * tests/test-mbscasestr3.sh: New file.
1223         * tests/test-mbscasestr3.c: New file.
1224         * tests/test-mbscasestr4.sh: New file.
1225         * tests/test-mbscasestr4.c: New file.
1226         * m4/locale-tr.m4: New file.
1227
1228 2007-02-11  Bruno Haible  <bruno@clisp.org>
1229
1230         Ensure O(n) worst-case complexity of mbsstr.
1231         * lib/mbsstr.c: Include stdbool.h.
1232         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
1233         functions.
1234         (mbsstr): Add some bookkeeping. Invoke knuth_morris_pratt_* when the
1235         bookkeeping indicates that it's worth it.
1236         * modules/mbsstr (Depends-on): Add stdbool, mbslen, strnlen.
1237
1238         * modules/mbsstr-tests: New file.
1239         * tests/test-mbsstr1.c: New file.
1240         * tests/test-mbsstr2.sh: New file.
1241         * tests/test-mbsstr2.c: New file.
1242         * tests/test-mbsstr3.sh: New file.
1243         * tests/test-mbsstr3.c: New file.
1244         * m4/locale-fr.m4: New file.
1245
1246 2007-02-11  Bruno Haible  <bruno@clisp.org>
1247
1248         * lib/mbsrchr.c (mbsrchr): Fix bug.
1249
1250         * modules/mbsrchr-tests: New file.
1251         * tests/test-mbsrchr.sh: New file.
1252         * tests/test-mbsrchr.c: New file.
1253
1254 2007-02-11  Bruno Haible  <bruno@clisp.org>
1255
1256         * lib/mbschr.c (mbschr): Fix bug.
1257
1258         * modules/mbschr-tests: New file.
1259         * tests/test-mbschr.sh: New file.
1260         * tests/test-mbschr.c: New file.
1261         * m4/locale-zh.m4: New file.
1262
1263 2007-02-11  Bruno Haible  <bruno@clisp.org>
1264
1265         Support for copying multibyte string iterators.
1266         * lib/mbiter.h: Include <string.h>.
1267         (mbiter_multi_copy): New function.
1268         (mbi_copy): New macro.
1269         * lib/mbuiter.h: Include <string.h>.
1270         (mbuiter_multi_copy): New function.
1271         (mbui_copy): New macro.
1272
1273 2007-02-11  Bruno Haible  <bruno@clisp.org>
1274
1275         New module mbslen.
1276         * modules/mbslen: New file.
1277         * lib/mbslen.c: New file.
1278         * lib/string_.h (mbslen): New declaration.
1279         * m4/mbslen.m4: New file.
1280         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1281         GNULIB_MBSLEN.
1282         * modules/string (string.h): Also substitute GNULIB_MBSLEN.
1283         * MODULES.html.sh (Internationalization functions): Add mbslen.
1284
1285 2007-02-11  Bruno Haible  <bruno@clisp.org>
1286
1287         Ensure O(n) worst-case complexity of strcasestr substitute.
1288         * lib/strcasestr.c: Include stdbool.h.
1289         (knuth_morris_pratt): New function.
1290         (strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when the
1291         bookkeeping indicates that it's worth it.
1292         * modules/strcasestr (Depends-on): Add stdbool, strnlen.
1293
1294         * modules/strcasestr-tests: New file.
1295         * tests/test-strcasestr.c: New file.
1296
1297 2007-02-11  Bruno Haible  <bruno@clisp.org>
1298
1299         Ensure O(n) worst-case complexity of c_strcasestr.
1300         * lib/c-strcasestr.c: Include stdbool.h, string.h.
1301         (knuth_morris_pratt): New function.
1302         (c_strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when
1303         the bookkeeping indicates that it's worth it.
1304         * modules/c-strcasestr (Depends-on): Add stdbool, strnlen.
1305
1306         * modules/c-strcasestr-tests: New file.
1307         * tests/test-c-strcasestr.c: New file.
1308
1309 2007-02-11  Bruno Haible  <bruno@clisp.org>
1310
1311         Ensure O(n) worst-case complexity of c_strstr.
1312         * lib/c-strstr.c: Include stdbool.h, string.h.
1313         (knuth_morris_pratt): New function.
1314         (c_strstr): Add some bookkeeping. Invoke knuth_morris_pratt when the
1315         bookkeeping indicates that it's worth it.
1316         * modules/c-strstr (Depends-on): Add stdbool, strnlen.
1317
1318         * lib/c-strstr.c: Complete rewrite for maintainability.
1319
1320         * modules/c-strstr-tests: New file.
1321         * tests/test-c-strstr.c: New file.
1322
1323 2007-02-11  Bruno Haible  <bruno@clisp.org>
1324
1325         * m4/javacomp.m4 (gt_JAVACOMP): Work around a 'tr' bug in coreutils
1326         5.2.1 and earlier, whereby \055 was treated just like the range
1327         delimiter '-'.
1328         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
1329
1330 2007-02-08  Bruno Haible  <bruno@clisp.org>
1331
1332         * modules/regex (Depends-on): Add stdbool.
1333         Reported by Dalibor Topic <robilad@kaffe.org>.
1334
1335 2007-02-05  Paul Eggert  <eggert@cs.ucla.edu>
1336
1337         * m4/regex.m4 (gl_REGEX): Check for glibc bug #3957.
1338         Prefer returning from main to exiting from it.
1339         Remove unnecessary parens after sizeof.
1340
1341 2007-02-05  Bruno Haible  <bruno@clisp.org>
1342
1343         New module mbssep.
1344         * modules/mbssep: New file.
1345         * lib/mbssep.c: New file.
1346         * lib/string_.h (strsep): Add a conditional link warning.
1347         (mbssep): New declaration.
1348         * m4/mbssep.m4: New file.
1349         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1350         GNULIB_MBSSEP.
1351         * modules/string (string.h): Also substitute GNULIB_MBSSEP.
1352         * MODULES.html.sh (Internationalization functions): Add mbssep.
1353
1354 2007-02-05  Bruno Haible  <bruno@clisp.org>
1355
1356         * lib/strsep.c (strsep): Fix actions in case of no delimiters.
1357         Optimize search in case of 1 delimiter.
1358
1359 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
1360
1361         * lib/acl.h: Include sys/types.h before sys/acl.h.
1362
1363 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
1364
1365         Merge upstream fix for glibc bugzilla #3957:
1366
1367         2007-02-05  Jakub Jelinek  <jakub@redhat.com>
1368
1369         * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0'
1370         bit for RE_HAT_LISTS_NOT_NEWLINE.
1371         (build_charclass_op): Remove bogus comment.
1372
1373 2007-02-05  Simon Josefsson  <simon@josefsson.org>
1374
1375         * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
1376
1377 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
1378
1379         * lib/getsubopt.c [!_LIBC]: Include config.h and getsubopt.h.
1380         * lib/memmem.c [!defined _LIBC]: Include config.h.
1381
1382 2007-02-04  Bruno Haible  <bruno@clisp.org>
1383
1384         * lib/string_.h (GL_LINK_WARNING2): Put the word "warning:" into the
1385         warning message.
1386
1387 2007-02-04  Bruno Haible  <bruno@clisp.org>
1388
1389         New module mbstok_r.
1390         * modules/mbstok_r: New file.
1391         * lib/mbstok_r.c: New file.
1392         * lib/string_.h (strtok_r): Change argument names to match the
1393         comments. Add a conditional link warning.
1394         (mbstok_r): New declaration.
1395         * m4/mbstok_r.m4: New file.
1396         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1397         GNULIB_MBSTOK_R.
1398         * modules/string (string.h): Also substitute GNULIB_MBSTOK_R.
1399         * MODULES.html.sh (Internationalization functions): Add mbstok_r.
1400
1401 2007-02-04  Bruno Haible  <bruno@clisp.org>
1402
1403         New module mbsspn.
1404         * modules/mbsspn: New file.
1405         * lib/mbsspn.c: New file.
1406         * lib/string_.h (strspn): Add a conditional link warning.
1407         (mbsspn): New declaration.
1408         * m4/mbsspn.m4: New file.
1409         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1410         GNULIB_MBSSPN.
1411         * modules/string (string.h): Also substitute GNULIB_MBSSPN.
1412         * MODULES.html.sh (Internationalization functions): Add mbsspn.
1413
1414 2007-02-04  Bruno Haible  <bruno@clisp.org>
1415
1416         New module mbspbrk.
1417         * modules/mbspbrk: New file.
1418         * lib/mbspbrk.c: New file.
1419         * lib/string_.h (strpbrk): Add a conditional link warning.
1420         (mbspbrk): New declaration.
1421         * m4/mbspbrk.m4: New file.
1422         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1423         GNULIB_MBSPBRK.
1424         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
1425         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
1426
1427 2007-02-04  Bruno Haible  <bruno@clisp.org>
1428
1429         New module mbscspn.
1430         * modules/mbscspn: New file.
1431         * lib/mbscspn.c: New file.
1432         * lib/string_.h (strcspn): Add a conditional link warning.
1433         (mbscspn): New declaration.
1434         * m4/mbscspn.m4: New file.
1435         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1436         GNULIB_MBSCSPN.
1437         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
1438         * MODULES.html.sh (Internationalization functions): Add mbscspn.
1439
1440 2007-02-04  Bruno Haible  <bruno@clisp.org>
1441
1442         New module mbscasestr, reduced goal of strcasestr.
1443         * modules/mbscasestr: New file.
1444         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
1445         (mbscasestr): Renamed from strcasestr.
1446         * lib/strcasestr.c: Don't include mbuiter.h.
1447         (strcasestr): Remove support for multibyte locales.
1448         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
1449         Change the conditional link warning.
1450         (mbscasestr): New declaration.
1451         * m4/mbscasestr.m4: New file.
1452         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
1453         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
1454         REPLACE_STRCASESTR.
1455         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
1456         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
1457         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
1458         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
1459         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
1460         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
1461         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
1462         (Depends-on): Remove mbuiter.
1463         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
1464
1465 2007-02-04  Bruno Haible  <bruno@clisp.org>
1466
1467         Simplify handling of strncasecmp.
1468         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
1469         the conditional link warning.
1470         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
1471         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
1472         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
1473         * modules/strcase (configure.ac): Don't invoke
1474         gl_STRING_MODULE_INDICATOR.
1475         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
1476
1477 2007-02-04  Bruno Haible  <bruno@clisp.org>
1478
1479         New module mbscasecmp, reduced goal of strcasecmp.
1480         * modules/mbscasecmp: New file.
1481         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
1482         (mbscasecmp): Renamed from strcasecmp.
1483         * lib/strcasecmp.c: Don't include mbuiter.h.
1484         (strcasecmp): Remove support for multibyte locales.
1485         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
1486         Change the conditional link warning.
1487         (mbscasecmp): New declaration.
1488         * m4/mbscasecmp.m4: New file.
1489         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
1490         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
1491         REPLACE_STRCASECMP.
1492         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
1493         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1494         GNULIB_MBSCASECMP.
1495         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
1496         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
1497         * modules/strcase (Files): Remove m4/mbrtowc.m4.
1498         (Depends-on): Remove mbuiter.
1499         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
1500
1501 2007-02-04  Bruno Haible  <bruno@clisp.org>
1502
1503         New module mbsstr. Remove module strstr.
1504         * modules/mbsstr: New file.
1505         * modules/strstr: Remove file.
1506         * lib/mbsstr.c: Renamed from lib/strstr.c.
1507         (mbsstr): Renamed from strstr.
1508         * lib/string_.h (strstr): Remove declaration. Change the conditional
1509         link warning.
1510         (mbsstr): New declaration.
1511         * m4/mbsstr.m4: New file.
1512         * m4/strstr.m4: Remove file.
1513         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
1514         REPLACE_STRSTR.
1515         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
1516         Don't initialize GNULIB_STRSTR.
1517         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
1518         substitute GNULIB_STRSTR and REPLACE_STRSTR.
1519         * MODULES.html.sh (Internationalization functions): Add mbsstr.
1520         (Support for systems lacking ANSI C 89): Remove strstr.
1521
1522 2007-02-04  Bruno Haible  <bruno@clisp.org>
1523
1524         New module mbsrchr.
1525         * modules/mbsrchr: New file.
1526         * lib/mbsrchr.c: New file.
1527         * lib/string_.h (strrchr): Add a conditional link warning.
1528         (mbsrchr): New declaration.
1529         * m4/mbsrchr.m4: New file.
1530         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1531         GNULIB_MBSRCHR.
1532         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
1533         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
1534
1535 2007-02-04  Bruno Haible  <bruno@clisp.org>
1536
1537         New module mbschr.
1538         * modules/mbschr: New file.
1539         * lib/mbschr.c: New file.
1540         * lib/string_.h (strchr): Add a conditional link warning.
1541         (mbschr): New declaration.
1542         * m4/mbschr.m4: New file.
1543         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1544         GNULIB_MBSCHR.
1545         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
1546         * MODULES.html.sh (Internationalization functions): Add mbschr.
1547
1548 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
1549
1550         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
1551
1552         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
1553
1554 2007-02-04  Bruno Haible  <bruno@clisp.org>
1555
1556         New module description section 'configure.ac-early'.
1557         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
1558         (func_get_autoconf_early_snippet): New function.
1559         (func_import, func_create_testdir): Use it. Remove special cases for
1560         modules 'extensions' and 'lock'.
1561         * modules/extensions (configure.ac-early): Require
1562         gl_USE_SYSTEM_EXTENSIONS.
1563         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
1564
1565 2007-02-04  Bruno Haible  <bruno@clisp.org>
1566
1567         Make use of gcj-4.3's -fsource and -ftarget option.
1568         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
1569         and if so try the options -fsource and -ftarget.
1570         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
1571         source_version, ftarget_option, target_version arguments.
1572         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
1573         (is_envjavac_oldgcj_14_14_usable): Renamed from
1574         is_envjavac_gcj_14_14_usable.
1575         (is_envjavac_oldgcj_14_13_usable): Renamed from
1576         is_envjavac_gcj_14_13_usable.
1577         (is_gcj_present): Update.
1578         (is_gcj_43, is_gcj43_usable): New functions.
1579         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
1580         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
1581         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
1582         try the options -fsource and -ftarget.
1583
1584 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
1585
1586         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
1587         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
1588         larger value.
1589
1590 2007-02-03  Jim Meyering  <jim@meyering.net>
1591
1592         Give tools a better chance to allocate space for very large buffers.
1593         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
1594
1595         Make pwd and readlink work also when run with an unreadable parent dir
1596         on systems with openat support.
1597         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
1598         provided getcwd function, even when we have openat support.
1599         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
1600
1601 2007-02-02  Bruno Haible  <bruno@clisp.org>
1602
1603         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
1604         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
1605         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
1606         portability problems if one of these functions is only used on specific
1607         platforms.
1608         Reported by Paul Eggert.
1609
1610 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
1611
1612         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
1613         is causing more trouble than it's curing.
1614         * lib/regex_internal.h (__mempcpy): Remove.
1615         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
1616         (and make the code a tad smaller to boot).
1617         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
1618
1619 2007-02-02  Jim Meyering  <jim@meyering.net>
1620
1621         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
1622         section, not in the Makefile.am: one.
1623
1624 2007-02-02  Eric Blake  <ebb9@byu.net>
1625
1626         * lib/strchrnul.c: Always include config.h first.
1627
1628         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
1629         gnulib strstr is not necessary here.
1630
1631 2007-02-02  Simon Josefsson  <simon@josefsson.org>
1632
1633         * m4/socklen.m4: Fix typo.
1634
1635 2007-02-02  Eric Blake  <ebb9@byu.net>
1636
1637         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
1638         * modules/netinet_in (Makefile.am): Likewise.
1639
1640 2007-02-01  Bruno Haible  <bruno@clisp.org>
1641
1642         * lib/string_.h (GL_LINK_WARNING): New macro.
1643         (strcasecmp, strstr, strcasestr): If provided by the system,
1644         conditionally define as a macro that leads to a warning instead of to
1645         an error.
1646         (strncasecmp): Conditionally define as a macro that leads to a warning.
1647
1648 2007-02-01  Karl Berry  <karl@gnu.org>
1649
1650         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
1651
1652 2007-02-01  Bruno Haible  <bruno@clisp.org>
1653
1654         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
1655         renamings.
1656
1657 2007-02-01  Eric Blake  <ebb9@byu.net>
1658
1659         * modules/regex (Depends-on): Revert dependence on mempcpy.
1660         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
1661         module's definition of mempcpy.
1662         Reported by Paul Eggert.
1663
1664 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
1665
1666         * lib/string_.h: If the gnulib module XYZ is not present, undefine
1667         the symbol XYZ before redefining it.  This fixes a problem with
1668         programs that don't use XYZ, when compiled on systems that define
1669         XYZ to something else.
1670
1671 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
1672
1673         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
1674         occurs when "mkdir -m foo" creates a setgid directory that is (1)
1675         writeable to group or other and (2) is intended to have a special
1676         mode bit that is set or cleared.  In such a case, the directory
1677         should be neither group- nor other-writeable until the special
1678         mode bits are right.
1679
1680 2007-01-31  Eric Blake  <ebb9@byu.net>
1681
1682         * modules/mountlist (Depends-on): Add strstr.
1683
1684         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
1685         bug.
1686         * modules/string (Makefile.am): Remove redundant replacement.
1687         * modules/regex (Depends-on): Add mempcpy.
1688
1689 2007-01-31  Bruno Haible  <bruno@clisp.org>
1690
1691         New module description field 'Link'.
1692         * gnulib-tool (func_usage): Document --extract-link-directive.
1693         (sed_extract_prog): Recognize 'Link' directive.
1694         (func_get_link_directive): New function.
1695         (func_import): Show summary of link directives.
1696         Handle --extract-link-directive option.
1697         * modules/acl (Link): New section.
1698         * modules/clock-time (Link): New section.
1699         * modules/euidaccess (Link): New section.
1700         * modules/gettext (Link): New section.
1701         * modules/iconv (Link): New section.
1702         * modules/lock (Link): New section.
1703         * modules/nanosleep (Link): New section.
1704         * modules/readline (Link): New section.
1705
1706 2007-01-27  Bruno Haible  <bruno@clisp.org>
1707
1708         Enforce the use of gnulib modules for unportable <string.h> functions.
1709         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
1710         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
1711         (gl_HEADER_STRING_H_BODY): Require it.
1712         * lib/string_.h: If the gnulib module XYZ is not present, redefine
1713         the symbol XYZ to one that gives a link error.
1714         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
1715         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
1716         * modules/mempcpy (configure.ac): Likewise.
1717         * modules/memrchr (configure.ac): Likewise.
1718         * modules/stpcpy (configure.ac): Likewise.
1719         * modules/stpncpy (configure.ac): Likewise.
1720         * modules/strcase (configure.ac): Likewise.
1721         * modules/strcasestr (configure.ac): Likewise.
1722         * modules/strchrnul (configure.ac): Likewise.
1723         * modules/strdup (configure.ac): Likewise.
1724         * modules/strndup (configure.ac): Likewise.
1725         * modules/strnlen (configure.ac): Likewise.
1726         * modules/strpbrk (configure.ac): Likewise.
1727         * modules/strsep (configure.ac): Likewise.
1728         * modules/strstr (configure.ac): Likewise.
1729         * modules/strtok_r (configure.ac): Likewise.
1730
1731 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
1732
1733         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
1734
1735 2007-01-30  Jim Meyering  <jim@meyering.net>
1736
1737         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
1738
1739 2007-01-29  Bruno Haible  <bruno@clisp.org>
1740
1741         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
1742         * lib/execute.c: Likewise.
1743         * lib/pipe.c: Likewise.
1744         * lib/printf-args.h: Likewise.
1745         * lib/printf-args.c: Likewise.
1746         * lib/printf-parse.c: Likewise.
1747         * lib/vasnprintf.c: Likewise.
1748
1749 2007-01-29  Eric Blake  <ebb9@byu.net>
1750
1751         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
1752         declaration.
1753
1754 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
1755
1756         * lib/strptime.h (strptime): Use 'restrict' for args where
1757         POSIX requires this.
1758         * lib/strptime.c (strptime): Likewise.
1759         Change license notice from LGPL to GPL, since gnulib-tool will
1760         change this as needed.
1761         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
1762         defined.
1763         Include "strptime.h" first, to check interface.
1764         Do not #undef _LIBC and _NL_CURRENT.
1765         Do not include <stdlib.h>; no longer needed.
1766         Include "time_r.h" and declare ptime_locale_status
1767         only if _LIBC is not defined.
1768         (__P): Remove unused macro.
1769         (match_string): Bring back glibc version, but use it only if _LIBC
1770         is defined.
1771         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
1772         Remove unnecessary assertion and abort() call.
1773         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
1774         * m4/strptime.m4: Fix serial number comment.
1775         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
1776         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
1777         (Depends-on): Add time_r.
1778
1779 2007-01-29  Bruno Haible  <bruno@clisp.org>
1780
1781         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
1782         strptime.
1783         * modules/strptime (Depends-on): Add stdbool.
1784         * lib/strptime.h: Include <time.h> always. Add comments.
1785
1786 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
1787
1788         * modules/strptime: New file.
1789         * lib/strptime.h: New file.
1790         * lib/strptime.c: New file.
1791         * m4/strptime.m4: New file.
1792
1793 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
1794
1795         * MODULES.html.sh: New module mpsort.
1796         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
1797
1798         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
1799         a circularity problem with HP-UX ia64 reported by Bob Proulx in
1800         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
1801         All uses changed.
1802         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
1803         All uses changed.
1804         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
1805         to _Restrict_.
1806         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
1807         the parameter matches the prototype.
1808
1809 2007-01-28  Jim Meyering  <jim@meyering.net>
1810
1811         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
1812         sys/time.h here, reverting that part of the previous patch:
1813         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
1814
1815 2007-01-28  Bruno Haible  <bruno@clisp.org>
1816
1817         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
1818         value of $(SYS_TIME_H).
1819         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
1820         remove it conditionally, too. [added by Jim Meyering]
1821         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
1822         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
1823         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
1824         GETTIMEOFDAY_REPLACEMENT to 1.
1825
1826 2007-01-28  Bruno Haible  <bruno@clisp.org>
1827
1828         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
1829         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
1830         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
1831         Set UNISTD_H instead of UNISTD_H2.
1832         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
1833
1834 2007-01-28  Bruno Haible  <bruno@clisp.org>
1835
1836         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
1837         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
1838
1839 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1840
1841         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
1842         (func_create_testdir): Ensure C locale for `grep' and `tr'
1843         character ranges.
1844         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
1845         ACLOCAL_AMFLAGS parsing state machine.
1846
1847 2007-01-27  Bruno Haible  <bruno@clisp.org>
1848
1849         * modules/unistr/base: Update.
1850
1851 2007-01-27  Bruno Haible  <bruno@clisp.org>
1852
1853         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
1854         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
1855         * modules/unistr/u32-mbtouc-unsafe: Renamed from
1856         modules/unistr/u32-mbtouc.
1857         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
1858         * lib/unistr.h: Update.
1859         * lib/linebreak.c: Update.
1860         * modules/unistr/u32-mbtouc: Renamed from
1861         modules/unistr/u32-mbtouc-safe.
1862         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
1863         * lib/unistr.h: Update.
1864         * lib/unistr/u32-to-u8.c: Update.
1865         * lib/unistr/u32-to-u16.c: Update.
1866
1867 2007-01-27  Bruno Haible  <bruno@clisp.org>
1868
1869         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
1870         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
1871         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
1872         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
1873         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
1874         * modules/unistr/u16-mbtouc-unsafe: Renamed from
1875         modules/unistr/u16-mbtouc.
1876         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
1877         * lib/unistr.h: Update.
1878         * lib/linebreak.c: Update.
1879         * modules/linebreak: Update.
1880         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
1881         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
1882         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
1883         * modules/unistr/u16-mbtouc: Renamed from
1884         modules/unistr/u16-mbtouc-safe.
1885         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
1886         * lib/unistr.h: Update.
1887         * lib/unistr/u16-to-u8.c: Update.
1888         * modules/unistr/u16-to-u8: Update.
1889         * lib/unistr/u16-to-u32.c: Update.
1890         * modules/unistr/u16-to-u32: Update.
1891
1892 2007-01-27  Bruno Haible  <bruno@clisp.org>
1893
1894         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
1895         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
1896         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
1897         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
1898         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
1899         * modules/unistr/u8-mbtouc-unsafe: Renamed from
1900         modules/unistr/u8-mbtouc.
1901         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
1902         * lib/unistr.h: Update.
1903         * lib/striconveh.c: Update.
1904         * modules/striconveh: Update.
1905         * lib/linebreak.c: Update.
1906         * modules/linebreak: Update.
1907         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
1908         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
1909         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
1910         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
1911         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
1912         * lib/unistr.h: Update.
1913         * lib/striconveh.c: Update.
1914         * modules/striconveh: Update.
1915         * lib/unistr/u8-to-u16.c: Update.
1916         * modules/unistr/u8-to-u16: Update.
1917         * lib/unistr/u8-to-u32.c: Update.
1918         * modules/unistr/u8-to-u32: Update.
1919
1920 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1921
1922         Sync from Libtool.
1923         * lib/argz.c: Do not include strings.h nor memory.h, include
1924         string.h unconditionally.  Patch by Simon Josefsson.
1925
1926 2007-01-27  Bruno Haible  <bruno@clisp.org>
1927
1928         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
1929         from gl_HEADER_STRING_H_BODY.
1930         (gl_HEADER_STRING_H_BODY): Require it.
1931         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
1932         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
1933         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
1934         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
1935         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
1936         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
1937         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
1938         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
1939         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
1940         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
1941         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
1942         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
1943         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
1944         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
1945         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
1946
1947 2007-01-27  Bruno Haible  <bruno@clisp.org>
1948
1949         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
1950         check_PROGRAMS into noinst_PROGRAMS.
1951         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
1952         check_PROGRAMS in this case.
1953         (func_import): Set for_test to false.
1954         (func_create_testdir): Set for_test to true.
1955
1956 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
1957             Bruno Haible  <bruno@clisp.org>
1958
1959         * modules/strcasestr (Files): Remove lib/strcasestr.h.
1960         (Depends-on): Add string.
1961         (Includes): Use <string.h> instead of strcasestr.h.
1962         * modules/string (Makefile.am): Also substitute the value of
1963         REPLACE_STRCASESTR.
1964         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
1965         assume strcasestr is declared in <string.h> not <strings.h>. Also
1966         set REPLACE_STRCASESTR.
1967         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
1968         REPLACE_STRCASESTR.
1969         * lib/strcasestr.h: Remove file.
1970         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
1971         * lib/string_.h (strcasestr): New declaration.
1972
1973 2007-01-27  Bruno Haible  <bruno@clisp.org>
1974
1975         * lib/string_.h: Use 'extern'.
1976
1977 2007-01-27  Jim Meyering  <jim@meyering.net>
1978
1979         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
1980         of set-but-not-used local, "q".
1981
1982         * lib/mempcpy.c: Include <config.h> before <string.h>.
1983         This fixes a compilation error on HP-UX, due to the system's
1984         "restrict"-using mempcpy prototype.
1985
1986 2007-01-26  Bruno Haible  <bruno@clisp.org>
1987
1988         Small optimization.
1989         * lib/javacomp.c: Include c-strstr.h.
1990          (is_envjavac_gcj): Use c_strstr instead of strstr.
1991         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
1992
1993 2007-01-26  Bruno Haible  <bruno@clisp.org>
1994
1995         * MODULES.html.sh (Unicode string functions): Add the new modules.
1996
1997         * modules/uniconv/u32-strconv-to-locale: New file.
1998         * lib/uniconv/u32-strconv-to-locale.c: New file.
1999
2000         * modules/uniconv/u16-strconv-to-locale: New file.
2001         * lib/uniconv/u16-strconv-to-locale.c: New file.
2002
2003         * modules/uniconv/u8-strconv-to-locale: New file.
2004         * lib/uniconv/u8-strconv-to-locale.c: New file.
2005
2006         * modules/uniconv/u32-strconv-from-locale: New file.
2007         * lib/uniconv/u32-strconv-from-locale.c: New file.
2008
2009         * modules/uniconv/u16-strconv-from-locale: New file.
2010         * lib/uniconv/u16-strconv-from-locale.c: New file.
2011
2012         * modules/uniconv/u8-strconv-from-locale: New file.
2013         * lib/uniconv/u8-strconv-from-locale.c: New file.
2014
2015         * modules/uniconv/u32-strconv-to-enc: New file.
2016         * lib/uniconv/u32-strconv-to-enc.c: New file.
2017         * modules/uniconv/u32-strconv-to-enc-tests: New file.
2018         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
2019
2020         * modules/uniconv/u16-strconv-to-enc: New file.
2021         * lib/uniconv/u16-strconv-to-enc.c: New file.
2022         * lib/uniconv/u-strconv-to-enc.h: New file.
2023         * modules/uniconv/u16-strconv-to-enc-tests: New file.
2024         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
2025
2026         * modules/uniconv/u8-strconv-to-enc: New file.
2027         * lib/uniconv/u8-strconv-to-enc.c: New file.
2028         * modules/uniconv/u8-strconv-to-enc-tests: New file.
2029         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
2030
2031         * modules/uniconv/u32-strconv-from-enc: New file.
2032         * lib/uniconv/u32-strconv-from-enc.c: New file.
2033         * modules/uniconv/u32-strconv-from-enc-tests: New file.
2034         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
2035
2036         * modules/uniconv/u16-strconv-from-enc: New file.
2037         * lib/uniconv/u16-strconv-from-enc.c: New file.
2038         * modules/uniconv/u16-strconv-from-enc-tests: New file.
2039         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
2040
2041         * modules/uniconv/u8-strconv-from-enc: New file.
2042         * lib/uniconv/u8-strconv-from-enc.c: New file.
2043         * lib/uniconv/u-strconv-from-enc.h: New file.
2044         * modules/uniconv/u8-strconv-from-enc-tests: New file.
2045         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
2046
2047         * modules/uniconv/u32-conv-from-enc: New file.
2048         * lib/uniconv/u32-conv-from-enc.c: New file.
2049         * modules/uniconv/u32-conv-from-enc-tests: New file.
2050         * tests/uniconv/test-u32-conv-from-enc.c: New file.
2051
2052         * modules/uniconv/u16-conv-from-enc: New file.
2053         * lib/uniconv/u16-conv-from-enc.c: New file.
2054         * lib/uniconv/u-conv-from-enc.h: New file.
2055         * modules/uniconv/u16-conv-from-enc-tests: New file.
2056         * tests/uniconv/test-u16-conv-from-enc.c: New file.
2057
2058         * modules/uniconv/u8-conv-from-enc: New file.
2059         * lib/uniconv/u8-conv-from-enc.c: New file.
2060         * modules/uniconv/u8-conv-from-enc-tests: New file.
2061         * tests/uniconv/test-u8-conv-from-enc.c: New file.
2062
2063         * modules/uniconv/base: New file.
2064         * lib/uniconv.h: New file.
2065
2066 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
2067
2068         * doc/gnulib-tool.texi (Initial import): Update to match current
2069         behavior with strdup module.
2070         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
2071         * lib/memmem.h: Remove; all uses removed.  This is now done
2072         by <string.h>.
2073         * lib/mempcpy.h: Likewise.
2074         * lib/memrchr.h: Likewise.
2075         * lib/stpcpy.h: Likewise.
2076         * lib/stpncpy.h: Likewise.
2077         * lib/strcase.h: Likewise.
2078         * lib/strchrnul.h: Likewise.
2079         * lib/strdup.h: Likewise.
2080         * lib/strndup.h: Likewise.
2081         * lib/strnlen.h: Likewise.
2082         * lib/strpbrk.h: Likewise.
2083         * lib/strsep.h: Likewise.
2084         * lib/strstr.h: Likewise.
2085         * lib/strtok_r.h: Likewise.
2086         * lib/string_.h: New file.
2087         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
2088         Rely on <string.h> instead.
2089         * lib/canon-host.c: Likewise.
2090         * lib/chdir-long.c: Likewise.
2091         * lib/concatpath.c: Likewise.
2092         * lib/exclude.c: Likewise.
2093         * lib/fchdir.c: Likewise.
2094         * lib/getaddrinfo.c: Likewise.
2095         * lib/getcwd.c: Likewise.
2096         * lib/getsubopt.c: Likewise.
2097         * lib/glob.c: Likewise.
2098         * lib/hard-locale.c: Likewise.
2099         * lib/iconvme.c: Likewise.
2100         * lib/javacomp.c: Likewise.
2101         * lib/mempcpy.c: Likewise.
2102         * lib/memrchr.c: Likewise.
2103         * lib/regex_internal.h: Likewise.
2104         * lib/stpncpy.c: Likewise.
2105         * lib/strcasecmp.c: Likewise.
2106         * lib/strchrnul.c: Likewise.
2107         * lib/strdup.c: Likewise.
2108         * lib/striconv.c: Likewise.
2109         * lib/striconveh.c: Likewise.
2110         * lib/striconveha.c: Likewise.
2111         * lib/strncasecmp.c: Likewise.
2112         * lib/strndup.c: Likewise.
2113         * lib/strnlen.c: Likewise.
2114         * lib/strsep.c: Likewise.
2115         * lib/strstr.c: Likewise.
2116         * lib/strtok_r.c: Likewise.
2117         * lib/userspec.c: Likewise.
2118         * lib/w32spawn.h: Likewise.
2119         * lib/xstrndup.c: Likewise.
2120         * lib/mountlist.c (strstr): Remove decl.
2121         * m4/string_h.m4: New file.
2122         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
2123         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
2124         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
2125         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
2126         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
2127         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
2128         Set REPLACE_STRCASECMP if necessary.
2129         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
2130         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
2131         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
2132         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
2133         HAVE_DECL_STRDUP if necessary.
2134         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
2135         since gl_FUNC_STRNDUP does that now.
2136         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
2137         Check for decl here...
2138         (gl_PREREQ_STRNLEN): ... not here.
2139         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
2140         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
2141         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
2142         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
2143         necessary.
2144         * modules/string: New file.
2145         * modules/memmem (Files): Remove special-purpose include file.
2146         (Depends-on): Add string.
2147         (Include): Include <string.h>, not the removed file.
2148         * modules/mempcpy: Likewise.
2149         * modules/memrchr: Likewise.
2150         * modules/stpcpy: Likewise.
2151         * modules/stpncpy: Likewise.
2152         * modules/strcase: Likewise.
2153         * modules/strchrnul: Likewise.
2154         * modules/strdup: Likewise.
2155         * modules/strndup: Likewise.
2156         * modules/strnlen: Likewise.
2157         * modules/strpbrk: Likewise.
2158         * modules/strsep: Likewise.
2159         * modules/strstr: Likewise.
2160         * modules/strtok_r: Likewise.
2161         * tests/test-dirname.c: Don't include "strdup.h", since
2162         <string.h> now suffices.
2163         * tests/test-memmem.c: Don't include "memmem.h", since
2164         <string.h> now suffices.
2165
2166 2007-01-25  Bruno Haible  <bruno@clisp.org>
2167
2168         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
2169         *resultp is 0.
2170
2171         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
2172         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
2173         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
2174         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
2175
2176         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
2177         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
2178         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
2179         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
2180         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
2181         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
2182
2183 2007-01-24  Bruno Haible  <bruno@clisp.org>
2184
2185         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
2186         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
2187         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
2188         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
2189         gl_FUNC_FTS_CORE.
2190         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
2191         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
2192         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
2193         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
2194         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
2195         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
2196         gl_FUNC_FCHOWNAT.
2197         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
2198         gl_FUNC_STRFTIME.
2199         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
2200         Reported by Ralf Wildenhues.
2201
2202 2007-01-24  Bruno Haible  <bruno@clisp.org>
2203
2204         Drop AC_REQUIRE calls that are redundant with the module dependencies.
2205         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
2206         gl_GETADDRINFO.
2207         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
2208         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
2209         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
2210
2211 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
2212
2213         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
2214         Don't use 'exit'; just return from 'main'.
2215         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
2216
2217         * lib/fnmatch_.h: Readjust white space and comments to match
2218         glibc, to avoid spurious diffs.
2219
2220 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
2221
2222         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
2223         2004-12-01 change by Jakub Jelinek, since this code won't compile
2224         if !LIBC.  Problem reported by Bob Proulx.
2225
2226 2007-01-23  Bruno Haible  <bruno@clisp.org>
2227
2228         * lib/striconveh.c: Include c-strcaseeq.h.
2229         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
2230         * modules/striconveh (Depends-on): Add c-strcaseeq.
2231
2232 2007-01-23  Bruno Haible  <bruno@clisp.org>
2233
2234         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
2235
2236         * modules/c-strcaseeq: New file.
2237         * lib/c-strcaseeq.h: New file.
2238
2239         * modules/streq: New file.
2240         * lib/streq.h: New file.
2241
2242 2007-01-23  Bruno Haible  <bruno@clisp.org>
2243
2244         * modules/striconveha-tests: New file.
2245         * tests/test-striconveha.c: New file.
2246
2247         * lib/striconveha.h: Include <stdbool.h>.
2248         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
2249         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
2250         (mem_iconveha_notranslit): Renamed from mem_iconveha.
2251         (mem_iconveha): New function.
2252         (str_iconveha_notranslit): Renamed from str_iconveha.
2253         (str_iconveha): New function.
2254         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
2255         c-strcase.
2256
2257 2007-01-23  Bruno Haible  <bruno@clisp.org>
2258
2259         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
2260         encodings without forgiving before trying any encoding with handler.
2261         (str_iconveha): Try all encodings without forgiving before trying any
2262         encoding with handler.
2263
2264 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
2265
2266         Import the following changes from libc.
2267
2268         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
2269
2270         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
2271
2272         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
2273
2274         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
2275         normal_bracket label.
2276
2277         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
2278
2279         [BZ #361]
2280         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
2281         to normal_bracket after fetching the next character.
2282
2283 2007-01-22  Bruno Haible  <bruno@clisp.org>
2284
2285         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
2286         argument.
2287         * lib/striconveh.c (iconv_carefully_1): New function.
2288         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
2289         argument.
2290         (str_cd_iconveh): Update.
2291         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
2292         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
2293         * tests/test-striconveh.c (MAGIC): New macro.
2294         (new_offsets): New function.
2295         (main): Test call with and without offsets.
2296
2297 2007-01-22  Bruno Haible  <bruno@clisp.org>
2298
2299         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
2300         * modules/sys_select (Makefile.am): Likewise.
2301         * modules/sys_socket (Makefile.am): Likewise.
2302         * modules/sys_time (Makefile.am): Likewise.
2303
2304 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
2305
2306         * modules/gettimeofday (License): Change from GPL to LGPL, since
2307         gettimeofday is a library function.
2308
2309 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
2310
2311         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
2312
2313 2007-01-21  Bruno Haible  <bruno@clisp.org>
2314
2315         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
2316
2317 2007-01-21  Bruno Haible  <bruno@clisp.org>
2318
2319         * modules/striconveha: New file.
2320         * lib/striconveha.h: New file.
2321         * lib/striconveha.c: New file.
2322         * MODULES.html.sh (Internationalization functions): Add striconveha.
2323         * lib/striconv.c (str_iconv): Optimize the case of an empty input
2324         string.
2325         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
2326
2327 2007-01-21  Bruno Haible  <bruno@clisp.org>
2328
2329         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
2330         * lib/striconveh.c (str_iconveh): Likewise.
2331
2332 2007-01-21  Bruno Haible  <bruno@clisp.org>
2333
2334         * lib/striconveh.h (mem_iconveh): New declaration.
2335         * lib/striconveh.c (mem_iconveh): New function.
2336         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
2337
2338 2007-01-21  Bruno Haible  <bruno@clisp.org>
2339
2340         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
2341
2342         * lib/striconveh.h (mem_cd_iconveh): Change specification.
2343         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
2344         original result buffer.
2345         (str_cd_iconveh): Update.
2346         * tests/test-striconveh.c (main): Update.
2347
2348         * lib/striconv.h (mem_cd_iconv): Change specification.
2349         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
2350         result buffer.
2351         (str_cd_iconv): Update.
2352         * tests/test-striconv.c (main): Update.
2353
2354 2007-01-21  Bruno Haible  <bruno@clisp.org>
2355
2356         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
2357
2358 2007-01-20  Jim Meyering  <jim@meyering.net>
2359
2360         * lib/userspec.c (parse_with_separator): If a user or group string
2361         starts with "+", skip the corresponding name-to-ID look-up, since
2362         such a look-up must fail: user and group names may not include "+".
2363
2364 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
2365
2366         * lib/poll.c: Include sys/time.h and time.h unconditionally,
2367         since we now assume the sys_time module.
2368         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
2369         check for sys/time.h; no longer needed.
2370         * modules/poll (Depends-on): Depend on sys_time.
2371
2372 2007-01-18  Bruno Haible  <bruno@clisp.org>
2373
2374         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
2375         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
2376
2377         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
2378         gettimeofday.
2379
2380         * tests/test-gettimeofday.c: Include <time.h>.
2381         (dummy): Remove variable.
2382
2383         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
2384         gl_HEADER_SYS_TIME_H.
2385         (gl_HEADER_SYS_TIME_H): New macro.
2386
2387         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
2388         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
2389         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
2390         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
2391         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
2392         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
2393         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
2394         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
2395         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
2396         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
2397         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
2398
2399         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
2400         last change; it caused a compilation error when cross-compiling to
2401         Cygwin.
2402
2403 2007-01-18  Jim Meyering  <jim@meyering.net>
2404
2405         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
2406         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
2407         than the race-prone "test -d sys || mkdir sys".
2408         (configure.ac): Use AC_PROG_MKDIR_P.
2409         * modules/sys_select: Likewise.
2410         * modules/sys_socket: Likewise.
2411         * modules/sys_time: Likewise.
2412
2413 2007-01-18  Eric Blake  <ebb9@byu.net>
2414
2415         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
2416         replace gettimeofday.
2417         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
2418         name, to avoid infinite recursion.
2419
2420 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
2421
2422         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
2423         module sys_time.
2424         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
2425         assume timespec.h defines struct timeval.
2426         * lib/settime.c: Likewise.
2427         * lib/utimens.c: Likewise.
2428         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
2429         since we now assume the gettimeofday module.
2430         * lib/tempname.c (__gen_tempname): Likewise.
2431         * lib/gettimeofday.h: Remove.
2432         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
2433         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
2434         Include <time.h>, for 'time()'.
2435         (localtime_buffer_addr): Also use this workaround if
2436         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
2437         to simplify the uses.  All uses changed.
2438         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
2439         that #undef is inside {}, and 'const' follows type name consistently.
2440         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
2441         (gettimeofday): Do not use the maximum possible value for
2442         tv->tv_usec, since that might break usages other than ls.c.
2443         Instead, we'll leave ls.c alone.  This undoes today's patch
2444         by Bruno.  Add a compile-time warning for 1s-clock resolution;
2445         we've never observed the problem but might as well keep the
2446         canary.
2447         * lib/nanosleep.c: Include timespec.h first, for interface check.
2448         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
2449         now assume the sys_time module.
2450         * lib/tempname.c: Likewise.
2451         * lib/timespec.h: Likewise.
2452         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
2453         needed.
2454         * lib/strftime.c: Likewise.
2455         * lib/timespec.h: Likewise.
2456         * lib/posixtm.c: Include posixtm.h first, for interface check.
2457         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
2458         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
2459         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
2460         * lib/sys_time_.h: New file.
2461         * lib/timespec.h (struct timespec): Use long int, not long.
2462         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
2463         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
2464         Remove obsolescent call to AC_HEADER_TIME.
2465         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
2466         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
2467         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
2468         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
2469         Likewise.
2470         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
2471         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
2472         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
2473         into the sys_time module.  Check for gettimeofday just once.
2474         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
2475         for gettimeofday signature to just check the signature.  Merely
2476         compile it, since linking doesn't test signature.  Improve test for
2477         whether gettimeofday.o is actually needed.
2478         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
2479         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
2480         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
2481         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
2482         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
2483         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
2484         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
2485         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
2486         than worrying about sys/time.h.
2487         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
2488         Don't bother worrying about TIME_WITH_SYS_TIME.
2489         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
2490         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
2491         * m4/sys_time_h.m4: New file.
2492         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
2493         Don't include sys/time.h.  Return from main rather than exiting.
2494         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
2495         all uses changed.
2496         * modules/gethrxtime (Depends-on): Add sys_time.
2497         * modules/gettime (Depends-on): Likewise.
2498         * modules/gettimeofday (Depends-on): Likewise.
2499         * modules/nanosleep (Depends-on): Likewise.
2500         * modules/settime (Depends-on): Likewise.
2501         * modules/tempname (Depends-on): Likewise.
2502         * modules/utimens (Depends-on): Likewise.
2503         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
2504         (Include:) Change back to <sys/time.h>.
2505         (Maintainer:) Add self.
2506         * modules/sys_time: New file.
2507         * modules/tempname (Depends-on): Add gettimeofday.
2508         * tests/test-gettimeofday.c: Include <sys/time.h>
2509         rather than gettimeofday.h.
2510
2511 2007-01-17  Bruno Haible  <bruno@clisp.org>
2512
2513         * gnulib-tool (func_get_license): Revert last patch. Instead, let
2514         the license default to GPL.
2515         (func_create_testdir): Don't complain if a module is LGPL and its
2516         tests module depends on GPLed modules.
2517
2518 2007-01-17  Bruno Haible  <bruno@clisp.org>
2519
2520         * lib/gettimeofday.c (gettimeofday): Add code for the case
2521         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
2522         maximum possible value for tv->tv_usec, rather than the minimum one.
2523
2524 2005-10-08  Martin Lambers  <marlam@marlam.de>
2525 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
2526 2007-01-16  Bruno Haible  <bruno@clisp.org>
2527
2528         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
2529         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
2530         gl_FUNC_GETTIMEOFDAY.
2531         (Include): Add gettimeofday.h.
2532         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
2533         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
2534         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
2535         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
2536         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
2537         * lib/gettimeofday.h: New file.
2538         * lib/gettimeofday.c: Include <sys/timeb.h>.
2539         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
2540         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
2541         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
2542         fall back on time().
2543
2544         * tests/test-gettimeofday.c: New file.
2545         * modules/gettimeofday-tests: New file.
2546
2547 2007-01-16  Eric Blake  <ebb9@byu.net>
2548
2549         * modules/fnmatch (Depends-on): Depend on wchar.
2550         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
2551         * m4/fnmatch.m4: Likewise.
2552         * modules/mbchar (Makefile.am): Assume <wchar.h>.
2553         * m4/mbchar.m4: Likewise.
2554         * modules/mbswidth (Depends-on): Depend on wchar.
2555         * lib/mbswidth.c: Assume <wchar.h>.
2556         * m4/mbswidth.m4: Likewise.
2557         * modules/quotearg (Depends-on): Depend on wchar.
2558         * lib/quotearg.c: Assume <wchar.h>.
2559         * m4/quotearg.m4: Likewise.
2560         * modules/regex (Depends-on): Depend on wchar.
2561         * lib/regex_internal.h: Assume <wchar.h>.
2562         * m4/regex.m4: Likewise.
2563         * modules/stdint (Depends-on): Depend on wchar.
2564         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
2565         * m4/stdint.m4: Likewise.
2566         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
2567         * modules/strftime (Depends-on): Depend on wchar.
2568         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
2569         * modules/strtol (Depends-on): Depend on wchar.
2570         * lib/strtol.c: Assume <wchar.h>.
2571         * modules/wcwidth (Depends-on): Depend on wchar.
2572         * lib/wcwidth.h: Assume <wchar.h>.
2573         * m4/wcwidth.m4: Likewise.
2574
2575 2007-01-16  Bruno Haible  <bruno@clisp.org>
2576
2577         * modules/csharpexec-script: New, created from...
2578         * modules/csharpexec: ... this.
2579
2580 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
2581
2582         * modules/javaexec-script: New, created from...
2583         * modules/javaexec: ... this.
2584
2585 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
2586
2587         * modules/poll (Dependencies): Add sys_select.
2588
2589 2007-01-15  Jim Meyering  <jim@meyering.net>
2590
2591         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
2592         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
2593         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
2594         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
2595
2596 2007-01-15  Bruno Haible  <bruno@clisp.org>
2597
2598         * modules/striconveh: New file.
2599         * lib/striconveh.h: New file.
2600         * lib/striconveh.c: New file.
2601         * MODULES.html.sh (Internationalization functions): Add striconveh.
2602
2603         * modules/striconveh-tests: New file.
2604         * tests/test-striconveh.c: New file.
2605
2606 2007-01-15  Bruno Haible  <bruno@clisp.org>
2607
2608         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
2609         not from GNU libiconv or GNU libc.
2610
2611 2007-01-15  Bruno Haible  <bruno@clisp.org>
2612
2613         * doc/gnulib-intro.texi (Copyright): Explain the different license
2614         terms for module descriptions, autoconf macros, tests, documentation.
2615
2616 2007-01-14  Bruno Haible  <bruno@clisp.org>
2617
2618         * modules/striconv-tests: New file.
2619         * tests/test-striconv.c: New file.
2620
2621 2007-01-14  Bruno Haible  <bruno@clisp.org>
2622
2623         * modules/iconv-tests: New file.
2624         * tests/test-iconv.c: New file.
2625
2626 2007-01-14  Bruno Haible  <bruno@clisp.org>
2627
2628         * gnulib-tool (func_get_license): For test modules, use the license of
2629         the main module.
2630
2631 2007-01-14  Bruno Haible  <bruno@clisp.org>
2632
2633         * modules/iconv (Include): Clarify that <iconv.h> can only be included
2634         if iconv is found to exist.
2635
2636 2007-01-14  Bruno Haible  <bruno@clisp.org>
2637
2638         * modules/c-ctype-tests: New file.
2639         * tests/test-c-ctype.c: New file.
2640
2641 2007-01-14  Bruno Haible  <bruno@clisp.org>
2642
2643         * modules/binary-io-tests: New file.
2644         * tests/test-binary-io.sh: New file.
2645         * tests/test-binary-io.c: New file.
2646
2647 2007-01-14  Bruno Haible  <bruno@clisp.org>
2648
2649         * modules/array-oset-tests: New file.
2650         * tests/test-array_oset.c: New file.
2651
2652 2007-01-14  Bruno Haible  <bruno@clisp.org>
2653
2654         * modules/array-list-tests: New file.
2655         * tests/test-array_list.c: New file.
2656
2657 2007-01-14  Bruno Haible  <bruno@clisp.org>
2658
2659         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
2660         and make.
2661         Reported by Simon Josefsson in
2662         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
2663
2664 2007-01-14  Bruno Haible  <bruno@clisp.org>
2665
2666         * modules/allocsa-tests: New file.
2667         * tests/test-allocsa.c: New file.
2668
2669 2007-01-14  Bruno Haible  <bruno@clisp.org>
2670
2671         * modules/fchdir (Depends-on): Add absolute-header.
2672         * modules/unistd (Depends-on): Likewise.
2673
2674 2006-12-30  Bruno Haible  <bruno@clisp.org>
2675
2676         * modules/fchdir: New file.
2677         * modules/unistd (Files): Add lib/unistd_.h.
2678         (Makefile.am): Generate unistd.h from unistd_.h.
2679         * lib/fchdir.c: New file.
2680         * lib/dirent_.h: New file.
2681         * lib/unistd_.h: New file.
2682         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
2683         * m4/fchdir.m4: New file.
2684         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
2685         (gl_HEADER_UNISTD): Invoke it.
2686         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
2687         function.
2688         * lib/backupfile.c (opendir, closedir): Undefine.
2689         * lib/chown.c (open, close): Undefine.
2690         * lib/clean-temp.c (open, close): Undefine.
2691         * lib/copy-file.c (open, close): Undefine.
2692         * lib/execute.c (open, close): Undefine.
2693         * lib/fsusage.c (open, close): Undefine.
2694         * lib/gc-gnulib.c (open, close): Undefine.
2695         * lib/getcwd.c (opendir, closedir): Undefine.
2696         * lib/glob.c (opendir, closedir): Undefine.
2697         * lib/javacomp.c (open, close): Undefine.
2698         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
2699         * lib/openat-proc.c (open, close): Undefine.
2700         * lib/pagealign_alloc.c (open, close): Undefine.
2701         * lib/pipe.c (open, close): Undefine.
2702         * lib/progreloc.c (open, close): Undefine.
2703         * lib/savedir.c (opendir, closedir): Undefine.
2704         * lib/utime.c (open, close): Undefine.
2705         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
2706
2707 2007-01-10  Bruno Haible  <bruno@clisp.org>
2708
2709         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
2710
2711 2007-01-12  Eric Blake  <ebb9@byu.net>
2712
2713         Provide a robust <wchar.h>.  Further simplifications are now
2714         possible in other modules, but not included here.
2715         * modules/wchar: New module.
2716         * m4/wchar.m4: New file.
2717         * lib/wchar_.h: Likewise.
2718         * modules/mbchar (Depends-on): Depend on wchar, as the first use
2719         of the new module.
2720         * MODULES.html.sh (Extended multibyte and wide character utilities):
2721         New section.
2722
2723 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
2724
2725         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
2726         to a reasonable default for memory allocation.
2727         (xreadlink): Don't allocate a huge buffer, to work around a buggy
2728         file system that reports garbage st_size values for symlinks.
2729         Problem reported by Liyang Hu.
2730
2731 2007-01-11  Simon Josefsson  <simon@josefsson.org>
2732
2733         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
2734         Emacs .#* auto-save files).
2735
2736 2007-01-11  Bruno Haible  <bruno@clisp.org>
2737
2738         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
2739         directory.
2740
2741 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
2742
2743         Use @...@ consistently in lib/wctype_.h.
2744         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
2745         on it being set to 1 or 0.
2746         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
2747         go back to AC_SUBSTing it.
2748         * modules/wctype (Makefile.am): Undo previous change.
2749
2750 2007-01-10  Eric Blake  <ebb9@byu.net>
2751
2752         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
2753         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
2754         * modules/wctype (Makefile.am): Likewise.
2755         Reported by Chris McGuire.
2756
2757 2007-01-10  Jim Meyering  <jim@meyering.net>
2758
2759         fts.c: a small readability/maintainability improvement
2760         * lib/fts.c (fts_read): Make this code slightly more readable and
2761         maintainable by hoisting the "sp->fts_cur = p" assignments to
2762         immediately follow the statements that set P.  Derived from
2763         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
2764
2765 2007-01-10  Eric Blake  <ebb9@byu.net>
2766
2767         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
2768         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
2769         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
2770         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
2771         Reported by Chris McGuire.
2772
2773 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2774
2775         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
2776         in sed script.
2777
2778 2007-01-09  Bruno Haible  <bruno@clisp.org>
2779
2780         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
2781         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
2782         variables.
2783         (func_module): Use them.
2784
2785 2007-01-09  Bruno Haible  <bruno@clisp.org>
2786
2787         * modules/unistr/base: New file.
2788         * lib/unistr.h: New file.
2789
2790         * modules/unistr/u8-to-u16: New file.
2791         * lib/unistr/u8-to-u16.c: New file.
2792
2793         * modules/unistr/u8-to-u32: New file.
2794         * lib/unistr/u8-to-u32.c: New file.
2795
2796         * modules/unistr/u16-to-u8: New file.
2797         * lib/unistr/u16-to-u8.c: New file.
2798
2799         * modules/unistr/u16-to-u32: New file.
2800         * lib/unistr/u16-to-u32.c: New file.
2801
2802         * modules/unistr/u32-to-u8: New file.
2803         * lib/unistr/u32-to-u8.c: New file.
2804
2805         * modules/unistr/u32-to-u16: New file.
2806         * lib/unistr/u32-to-u16.c: New file.
2807
2808         * modules/unistr/u8-check: New file.
2809         * modules/unistr/u16-check: New file.
2810         * modules/unistr/u32-check: New file.
2811         * lib/unistr/u8-check.c: New file.
2812         * lib/unistr/u16-check.c: New file.
2813         * lib/unistr/u32-check.c: New file.
2814
2815         * modules/unistr/u8-chr: New file.
2816         * modules/unistr/u16-chr: New file.
2817         * modules/unistr/u32-chr: New file.
2818         * lib/unistr/u8-chr.c: New file.
2819         * lib/unistr/u16-chr.c: New file.
2820         * lib/unistr/u32-chr.c: New file.
2821
2822         * modules/unistr/u8-cmp: New file.
2823         * modules/unistr/u16-cmp: New file.
2824         * modules/unistr/u32-cmp: New file.
2825         * lib/unistr/u8-cmp.c: New file.
2826         * lib/unistr/u16-cmp.c: New file.
2827         * lib/unistr/u32-cmp.c: New file.
2828
2829         * modules/unistr/u8-cpy: New file.
2830         * modules/unistr/u16-cpy: New file.
2831         * modules/unistr/u32-cpy: New file.
2832         * lib/unistr/u8-cpy.c: New file.
2833         * lib/unistr/u16-cpy.c: New file.
2834         * lib/unistr/u32-cpy.c: New file.
2835         * lib/unistr/u-cpy.h: New file.
2836
2837         * modules/unistr/u8-cpy-alloc: New file.
2838         * modules/unistr/u16-cpy-alloc: New file.
2839         * modules/unistr/u32-cpy-alloc: New file.
2840         * lib/unistr/u8-cpy-alloc.c: New file.
2841         * lib/unistr/u16-cpy-alloc.c: New file.
2842         * lib/unistr/u32-cpy-alloc.c: New file.
2843         * lib/unistr/u-cpy-alloc.h: New file.
2844
2845         * modules/unistr/u8-endswith: New file.
2846         * modules/unistr/u16-endswith: New file.
2847         * modules/unistr/u32-endswith: New file.
2848         * lib/unistr/u8-endswith.c: New file.
2849         * lib/unistr/u16-endswith.c: New file.
2850         * lib/unistr/u32-endswith.c: New file.
2851         * lib/unistr/u-endswith.h: New file.
2852
2853         * modules/unistr/u8-mblen: New file.
2854         * modules/unistr/u16-mblen: New file.
2855         * modules/unistr/u32-mblen: New file.
2856         * lib/unistr/u8-mblen.c: New file.
2857         * lib/unistr/u16-mblen.c: New file.
2858         * lib/unistr/u32-mblen.c: New file.
2859
2860         * modules/unistr/u8-mbtouc: New file.
2861         * modules/unistr/u16-mbtouc: New file.
2862         * modules/unistr/u32-mbtouc: New file.
2863         * lib/unistr/u8-mbtouc.c: New file.
2864         * lib/unistr/u16-mbtouc.c: New file.
2865         * lib/unistr/u32-mbtouc.c: New file.
2866
2867         * modules/unistr/u8-mbtouc-safe: New file.
2868         * modules/unistr/u16-mbtouc-safe: New file.
2869         * modules/unistr/u32-mbtouc-safe: New file.
2870         * lib/unistr/u8-mbtouc-safe.c: New file.
2871         * lib/unistr/u16-mbtouc-safe.c: New file.
2872         * lib/unistr/u32-mbtouc-safe.c: New file.
2873
2874         * modules/unistr/u8-move: New file.
2875         * modules/unistr/u16-move: New file.
2876         * modules/unistr/u32-move: New file.
2877         * lib/unistr/u8-move.c: New file.
2878         * lib/unistr/u16-move.c: New file.
2879         * lib/unistr/u32-move.c: New file.
2880         * lib/unistr/u-move.h: New file.
2881
2882         * modules/unistr/u8-next: New file.
2883         * modules/unistr/u16-next: New file.
2884         * modules/unistr/u32-next: New file.
2885         * lib/unistr/u8-next.c: New file.
2886         * lib/unistr/u16-next.c: New file.
2887         * lib/unistr/u32-next.c: New file.
2888
2889         * modules/unistr/u8-prev: New file.
2890         * modules/unistr/u16-prev: New file.
2891         * modules/unistr/u32-prev: New file.
2892         * lib/unistr/u8-prev.c: New file.
2893         * lib/unistr/u16-prev.c: New file.
2894         * lib/unistr/u32-prev.c: New file.
2895
2896         * modules/unistr/u8-set: New file.
2897         * modules/unistr/u16-set: New file.
2898         * modules/unistr/u32-set: New file.
2899         * lib/unistr/u8-set.c: New file.
2900         * lib/unistr/u16-set.c: New file.
2901         * lib/unistr/u32-set.c: New file.
2902         * lib/unistr/u-set.h: New file.
2903
2904         * modules/unistr/u8-startswith: New file.
2905         * modules/unistr/u16-startswith: New file.
2906         * modules/unistr/u32-startswith: New file.
2907         * lib/unistr/u8-startswith.c: New file.
2908         * lib/unistr/u16-startswith.c: New file.
2909         * lib/unistr/u32-startswith.c: New file.
2910         * lib/unistr/u-startswith.h: New file.
2911
2912         * modules/unistr/u8-stpcpy: New file.
2913         * modules/unistr/u16-stpcpy: New file.
2914         * modules/unistr/u32-stpcpy: New file.
2915         * lib/unistr/u8-stpcpy.c: New file.
2916         * lib/unistr/u16-stpcpy.c: New file.
2917         * lib/unistr/u32-stpcpy.c: New file.
2918         * lib/unistr/u-stpcpy.h: New file.
2919
2920         * modules/unistr/u8-stpncpy: New file.
2921         * modules/unistr/u16-stpncpy: New file.
2922         * modules/unistr/u32-stpncpy: New file.
2923         * lib/unistr/u8-stpncpy.c: New file.
2924         * lib/unistr/u16-stpncpy.c: New file.
2925         * lib/unistr/u32-stpncpy.c: New file.
2926         * lib/unistr/u-stpncpy.h: New file.
2927
2928         * modules/unistr/u8-strcat: New file.
2929         * modules/unistr/u16-strcat: New file.
2930         * modules/unistr/u32-strcat: New file.
2931         * lib/unistr/u8-strcat.c: New file.
2932         * lib/unistr/u16-strcat.c: New file.
2933         * lib/unistr/u32-strcat.c: New file.
2934         * lib/unistr/u-strcat.h: New file.
2935
2936         * modules/unistr/u8-strchr: New file.
2937         * modules/unistr/u16-strchr: New file.
2938         * modules/unistr/u32-strchr: New file.
2939         * lib/unistr/u8-strchr.c: New file.
2940         * lib/unistr/u16-strchr.c: New file.
2941         * lib/unistr/u32-strchr.c: New file.
2942
2943         * modules/unistr/u8-strcmp: New file.
2944         * modules/unistr/u16-strcmp: New file.
2945         * modules/unistr/u32-strcmp: New file.
2946         * lib/unistr/u8-strcmp.c: New file.
2947         * lib/unistr/u16-strcmp.c: New file.
2948         * lib/unistr/u32-strcmp.c: New file.
2949
2950         * modules/unistr/u8-strcpy: New file.
2951         * modules/unistr/u16-strcpy: New file.
2952         * modules/unistr/u32-strcpy: New file.
2953         * lib/unistr/u8-strcpy.c: New file.
2954         * lib/unistr/u16-strcpy.c: New file.
2955         * lib/unistr/u32-strcpy.c: New file.
2956         * lib/unistr/u-strcpy.h: New file.
2957
2958         * modules/unistr/u8-strcspn: New file.
2959         * modules/unistr/u16-strcspn: New file.
2960         * modules/unistr/u32-strcspn: New file.
2961         * lib/unistr/u8-strcspn.c: New file.
2962         * lib/unistr/u16-strcspn.c: New file.
2963         * lib/unistr/u32-strcspn.c: New file.
2964         * lib/unistr/u-strcspn.h: New file.
2965
2966         * modules/unistr/u8-strdup: New file.
2967         * modules/unistr/u16-strdup: New file.
2968         * modules/unistr/u32-strdup: New file.
2969         * lib/unistr/u8-strdup.c: New file.
2970         * lib/unistr/u16-strdup.c: New file.
2971         * lib/unistr/u32-strdup.c: New file.
2972         * lib/unistr/u-strdup.h: New file.
2973
2974         * modules/unistr/u8-strlen: New file.
2975         * modules/unistr/u16-strlen: New file.
2976         * modules/unistr/u32-strlen: New file.
2977         * lib/unistr/u8-strlen.c: New file.
2978         * lib/unistr/u16-strlen.c: New file.
2979         * lib/unistr/u32-strlen.c: New file.
2980         * lib/unistr/u-strlen.h: New file.
2981
2982         * modules/unistr/u8-strmblen: New file.
2983         * modules/unistr/u16-strmblen: New file.
2984         * modules/unistr/u32-strmblen: New file.
2985         * lib/unistr/u8-strmblen.c: New file.
2986         * lib/unistr/u16-strmblen.c: New file.
2987         * lib/unistr/u32-strmblen.c: New file.
2988
2989         * modules/unistr/u8-strmbtouc: New file.
2990         * modules/unistr/u16-strmbtouc: New file.
2991         * modules/unistr/u32-strmbtouc: New file.
2992         * lib/unistr/u8-strmbtouc.c: New file.
2993         * lib/unistr/u16-strmbtouc.c: New file.
2994         * lib/unistr/u32-strmbtouc.c: New file.
2995
2996         * modules/unistr/u8-strncat: New file.
2997         * modules/unistr/u16-strncat: New file.
2998         * modules/unistr/u32-strncat: New file.
2999         * lib/unistr/u8-strncat.c: New file.
3000         * lib/unistr/u16-strncat.c: New file.
3001         * lib/unistr/u32-strncat.c: New file.
3002         * lib/unistr/u-strncat.h: New file.
3003
3004         * modules/unistr/u8-strncmp: New file.
3005         * modules/unistr/u16-strncmp: New file.
3006         * modules/unistr/u32-strncmp: New file.
3007         * lib/unistr/u8-strncmp.c: New file.
3008         * lib/unistr/u16-strncmp.c: New file.
3009         * lib/unistr/u32-strncmp.c: New file.
3010
3011         * modules/unistr/u8-strncpy: New file.
3012         * modules/unistr/u16-strncpy: New file.
3013         * modules/unistr/u32-strncpy: New file.
3014         * lib/unistr/u8-strncpy.c: New file.
3015         * lib/unistr/u16-strncpy.c: New file.
3016         * lib/unistr/u32-strncpy.c: New file.
3017         * lib/unistr/u-strncpy.h: New file.
3018
3019         * modules/unistr/u8-strnlen: New file.
3020         * modules/unistr/u16-strnlen: New file.
3021         * modules/unistr/u32-strnlen: New file.
3022         * lib/unistr/u8-strnlen.c: New file.
3023         * lib/unistr/u16-strnlen.c: New file.
3024         * lib/unistr/u32-strnlen.c: New file.
3025         * lib/unistr/u-strnlen.h: New file.
3026
3027         * modules/unistr/u8-strpbrk: New file.
3028         * modules/unistr/u16-strpbrk: New file.
3029         * modules/unistr/u32-strpbrk: New file.
3030         * lib/unistr/u8-strpbrk.c: New file.
3031         * lib/unistr/u16-strpbrk.c: New file.
3032         * lib/unistr/u32-strpbrk.c: New file.
3033         * lib/unistr/u-strpbrk.h: New file.
3034
3035         * modules/unistr/u8-strrchr: New file.
3036         * modules/unistr/u16-strrchr: New file.
3037         * modules/unistr/u32-strrchr: New file.
3038         * lib/unistr/u8-strrchr.c: New file.
3039         * lib/unistr/u16-strrchr.c: New file.
3040         * lib/unistr/u32-strrchr.c: New file.
3041
3042         * modules/unistr/u8-strspn: New file.
3043         * modules/unistr/u16-strspn: New file.
3044         * modules/unistr/u32-strspn: New file.
3045         * lib/unistr/u8-strspn.c: New file.
3046         * lib/unistr/u16-strspn.c: New file.
3047         * lib/unistr/u32-strspn.c: New file.
3048         * lib/unistr/u-strspn.h: New file.
3049
3050         * modules/unistr/u8-strstr: New file.
3051         * modules/unistr/u16-strstr: New file.
3052         * modules/unistr/u32-strstr: New file.
3053         * lib/unistr/u8-strstr.c: New file.
3054         * lib/unistr/u16-strstr.c: New file.
3055         * lib/unistr/u32-strstr.c: New file.
3056         * lib/unistr/u-strstr.h: New file.
3057
3058         * modules/unistr/u8-strtok: New file.
3059         * modules/unistr/u16-strtok: New file.
3060         * modules/unistr/u32-strtok: New file.
3061         * lib/unistr/u8-strtok.c: New file.
3062         * lib/unistr/u16-strtok.c: New file.
3063         * lib/unistr/u32-strtok.c: New file.
3064         * lib/unistr/u-strtok.h: New file.
3065
3066         * modules/unistr/u8-uctomb: New file.
3067         * modules/unistr/u16-uctomb: New file.
3068         * modules/unistr/u32-uctomb: New file.
3069         * lib/unistr/u8-uctomb.c: New file.
3070         * lib/unistr/u16-uctomb.c: New file.
3071         * lib/unistr/u32-uctomb.c: New file.
3072
3073         * MODULES.html.sh (Unicode string functions): Add the new modules.
3074
3075 2007-01-08  Bruno Haible  <bruno@clisp.org>
3076
3077         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
3078         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
3079         subdirectories.
3080
3081 2007-01-08  Karl Berry  <karl@gnu.org>
3082
3083         * doc/error.texi: mention that main() fns must set program_name
3084         when progname is used.
3085
3086 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
3087
3088         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
3089         WCTYPE_H is empty, for the benefit of builds from non-distclean
3090         directories.  Problem reported by Eric Blake in
3091         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
3092
3093 2007-01-08  Bruno Haible  <bruno@clisp.org>
3094
3095         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
3096         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
3097         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
3098         PROVIDE_CANONICALIZE_FILENAME_MODE.
3099         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
3100
3101 2007-01-08  Bruno Haible  <bruno@clisp.org>
3102
3103         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
3104         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
3105         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
3106         * lib/fts.c: Likewise.
3107         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
3108
3109 2006-12-25  Bruno Haible  <bruno@clisp.org>
3110
3111         * modules/utf8-ucs4-safe: New file.
3112         * lib/utf8-ucs4-safe.h: New file.
3113         * lib/unistr/utf8-ucs4-safe.c: New file.
3114
3115         * modules/utf16-ucs4-safe: New file.
3116         * lib/utf16-ucs4-safe.h: New file.
3117         * lib/unistr/utf16-ucs4-safe.c: New file.
3118
3119         * MODULES.html.sh (Unicode string functions): Add the new modules.
3120
3121 2007-01-08  Bruno Haible  <bruno@clisp.org>
3122
3123         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
3124         (Depends-on): Add unitypes.
3125         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
3126         (u8_mbtouc_aux): Move out to separate file.
3127         (u8_mbtouc): Use ucs4_t, uint8_t types.
3128         * lib/unistr/utf8-ucs4.c: New file.
3129
3130         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
3131         (Depends-on): Add unitypes.
3132         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
3133         (u16_mbtouc_aux): Move out to separate file.
3134         (u16_mbtouc): Use ucs4_t, uint16_t types.
3135         * lib/unistr/utf16-ucs4.c: New file.
3136
3137         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
3138         (Depends-on): Add unitypes.
3139         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
3140         (u8_uctomb_aux): Move out to separate file.
3141         (u8_uctomb): Use ucs4_t, uint8_t types.
3142         * lib/unistr/ucs4-utf8.c: New file.
3143
3144         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
3145         (Depends-on): Add unitypes.
3146         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
3147         (u16_uctomb_aux): Move out to separate file.
3148         (u16_uctomb): Use ucs4_t, uint16_t types.
3149         * lib/unistr/ucs4-utf16.c: New file.
3150
3151 2006-12-25  Bruno Haible  <bruno@clisp.org>
3152
3153         * modules/unitypes: New file.
3154         * lib/unitypes.h: New file.
3155         * MODULES.html.sh (func_all_modules): New section "Unicode string
3156         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
3157         this section. Add unitypes.
3158
3159 2007-01-08  Bruno Haible  <bruno@clisp.org>
3160
3161         Avoid variable names that conflict with those from libtool.
3162         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
3163         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
3164         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
3165         library_names_spec to acl_library_names_spec, hardcode_* to
3166         acl_hardcode_*.
3167         Reported by Ralf Wildenhues.
3168
3169 2007-01-08  Bruno Haible  <bruno@clisp.org>
3170
3171         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
3172         definition.
3173         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
3174         definition.
3175         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
3176         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
3177         definition.
3178         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
3179         definition.
3180         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
3181         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
3182         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
3183         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
3184         definition.
3185         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
3186         definition.
3187         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
3188         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
3189         GC_USE_<algorithm>.
3190         * lib/gc-libgcrypt.c: Likewise.
3191         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
3192         * modules/gc-arctwo (configure.ac): Likewise.
3193         * modules/gc-des (configure.ac): Likewise.
3194         * modules/gc-hmac-md5 (configure.ac): Likewise.
3195         * modules/gc-hmac-sha1 (configure.ac): Likewise.
3196         * modules/gc-md2 (configure.ac): Likewise.
3197         * modules/gc-md4 (configure.ac): Likewise.
3198         * modules/gc-md5 (configure.ac): Likewise.
3199         * modules/gc-random (configure.ac): Likewise.
3200         * modules/gc-rijndael (configure.ac): Likewise.
3201         * modules/gc-sha1 (configure.ac): Likewise.
3202
3203 2007-01-08  Bruno Haible  <bruno@clisp.org>
3204
3205         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
3206         macro definition.
3207         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
3208         definition.
3209         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
3210         definition.
3211         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
3212         * modules/fcntl-safer (configure.ac): Likewise.
3213         * modules/fopen-safer (configure.ac): Likewise.
3214         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
3215         GNULIB_FWRITEERROR macro definition.
3216
3217 2007-01-08  Bruno Haible  <bruno@clisp.org>
3218
3219         * m4/gnulib-common.m4: New file.
3220         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
3221         (func_get_filelist): Add m4/gnulib-common.m4.
3222
3223 2007-01-08  Bruno Haible  <bruno@clisp.org>
3224
3225         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
3226         command.
3227
3228 2007-01-08  Jim Meyering  <jim@meyering.net>
3229
3230         Use a more robust test for a "can't happen" condition.
3231         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
3232         narrowed the st_size value.  Presuming the "can't happen" condition
3233         is true, that narrowing could conceivably convert an invalid st_size
3234         value into a valid one.  Instead, use a change based on Matthew
3235         Woehlke's original patch.
3236
3237         Slight readability improvement: use an assert-like macro
3238         in place of literal "abort ()" uses.
3239         * lib/fts.c (fts_assert): Define.
3240         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
3241         Use this macro instead of a bare 'abort'.
3242
3243 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
3244
3245         Don't worry about using IRIX 5.3's wctype.h broken definitions;
3246         simply work around them.
3247         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
3248         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
3249         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before
3250         declaring.
3251         Don't bother to define as macros, since the standard doesn't require it.
3252         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
3253         longer worry about IRIX 5.3.
3254         (HAVE_WCTYPE_CTMP_BUG): Remove.
3255
3256 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
3257
3258         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
3259         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
3260         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
3261         Problems reported by Georg Schwarz for IRIX 5.3.
3262
3263         * gnulib-tool (autoconf_minversion): Take the maximum version number
3264         found, not the minimum.  Problem reported by James Youngman.
3265
3266 2007-01-03  Karl Berry  <karl@gnu.org>
3267
3268         * doc/error.texi: new file, explaining interaction with progname.
3269         * doc/gnulib.texi: include it.  Update copyright.
3270
3271 2007-01-03  Simon Josefsson  <simon@josefsson.org>
3272
3273         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
3274         AC_CANONICAL_HOST, to improve autobuild outputs.
3275
3276 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
3277             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
3278
3279         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
3280         sockets, server sockets, and other file descriptors.  Count errors
3281         to compute the return value.  Reorder the code a bit to be easier
3282         to follow.  Don't set event bits that were not requested (except
3283         POLLERR and POLLHUP).
3284
3285 2007-01-01  Bruno Haible  <bruno@clisp.org>
3286
3287         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
3288
3289 2007-01-03  Jim Meyering  <jim@meyering.net>
3290
3291         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
3292
3293 2007-01-02  Bruno Haible  <bruno@clisp.org>
3294
3295         * modules/settime (Include): Require timespec.h.
3296         * modules/nanosleep (Include): Likewise.
3297
3298 2007-01-01  Bruno Haible  <bruno@clisp.org>
3299
3300         * gnulib-tool (func_emit_copyright_notice): Bump year.
3301         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
3302
3303 2007-01-01  Bruno Haible  <bruno@clisp.org>
3304
3305         Improve support for OpenBSD.
3306         * build-aux/config.rpath (libname_spec): Export.
3307         (library_names_spec): New variable. Export.
3308         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
3309         library_names_spec from the config.rpath output. Locate shared library
3310         through the name pattern in library_names_spec.
3311
3312 2007-01-01  Eric Blake  <ebb9@byu.net>
3313
3314         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
3315
3316 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
3317
3318         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
3319         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
3320         assume the C locale, and avoid an "eval" that could cause trouble.
3321         Problem with SORT reported by Bob Proulx.
3322
3323         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
3324         Define.  Trivial patch from Henning Nielsen Lund, originally
3325         sent to bug-grep@gnu.org today.
3326
3327 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
3328
3329         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
3330         struct stat.  Problem reported by Henning Nielsen Lund.
3331         * lib/acl.c: Include acl.h first, to check interface.  Don't
3332         bother to include sys/types.h and sys/stat.h again.
3333
3334 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
3335
3336         Import the following change from libc; problem reported by
3337         Sven Verdoolaege.
3338
3339         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
3340
3341         [BZ #1373]
3342         * lib/argp.h: Remove __NTH for __argp_usage inline function.
3343
3344 2006-12-28  Jim Meyering  <jim@meyering.net>
3345
3346         * build-aux/announce-gen: Do not assume that the package
3347         builds any of tar.gz, tar.bz2, and .xdelta files.
3348         Suggestion from Simon Josefsson.
3349
3350 2006-12-28  Simon Josefsson  <simon@josefsson.org>
3351
3352         * modules/announce-gen: New file.
3353
3354 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
3355
3356         * lib/mbchar.h: Just include <wctype.h>; the wctype module
3357         handles its gotchas now.
3358         * lib/mbswidth.c: Likewise.
3359         * lib/wcwidth.h: Likewise.
3360         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
3361         and iswcntrl; the wctype module does this stuff now.
3362         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
3363         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
3364         * modules/mbchar (Depends-on): Add wctype.
3365         * modules/mbswidth (Depends-on): Likewise.
3366         * modules/wcwidth (Depends-on): Likewise.
3367
3368 2006-12-27  Eric Blake  <ebb9@byu.net>
3369
3370         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
3371         module uses more than what <wctype.h> is required to provide.
3372
3373 2006-12-26  Eric Blake  <ebb9@byu.net>
3374
3375         * gnulib-tool (sed_extract_prog): Avoid space-tab.
3376
3377 2006-12-26  Eric Blake  <ebb9@byu.net>
3378
3379         * modules/absolute-header: New module.
3380         * modules/fcntl (Depends-on): Depend on it.
3381         * modules/inttypes (Depends-on): Likewise.
3382         * modules/stdint (Depends-on): Likewise.
3383         * modules/sys_stat (Depends-on): Likewise.
3384         * modules/wctype (Depends-on): Likewise.
3385         * MODULES.html.sh (Support for building libraries and
3386         executables): Document it.
3387
3388 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
3389
3390         * gnulib-tool (SED): Remove, undoing previous change.
3391         The problem was that it broke coreutils on Solaris, because
3392         "sed --posix" leaked into a makefile.
3393         (sed): New alias, if 'alias' and GNU sed.
3394
3395 2006-12-24  Jim Meyering  <jim@meyering.net>
3396
3397         Work around an fchownat bug in glibc-2.4:
3398         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
3399         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
3400         in spite of the -P option.
3401         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
3402         New macros.
3403         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
3404         * modules/openat (Files): Add lib/fchownat.c.
3405         * lib/openat.c (fchownat): Don't define here.  Move to...
3406         * lib/fchownat.c: ...this new file.
3407
3408 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
3409
3410         Fix bug reported by Bruno Haible in
3411         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
3412         where quotearg.c didn't compile on Mac OS X 10.2 because it
3413         lacks <wchar.h> and wint_t.
3414         * lib/wctype_.h (__wctype_wint_t): New type.
3415         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
3416         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
3417         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
3418         Arg is now of type __wctype_wint_t, not wint_t.
3419         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
3420         substitute HAVE_WINT_T.
3421         * modules/wctype (Files): Add m4/wint_t.m4.
3422         (wctype.h): Substitute HAVE_WINT_T.
3423
3424 2006-12-23  Bruno Haible  <bruno@clisp.org>
3425
3426         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
3427
3428 2006-12-23  Bruno Haible  <bruno@clisp.org>
3429
3430         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
3431         S_ISLNK.
3432         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
3433         mingw.
3434
3435 2006-12-22  Bruno Haible  <bruno@clisp.org>
3436
3437         * lib/copy-file.c: Include acl.h.
3438         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
3439         Close the file descriptors only after being done with copy_acl.
3440         * modules/copy-file (Depends-on): Add acl.
3441
3442 2006-12-22  Bruno Haible  <bruno@clisp.org>
3443
3444         * gnulib-tool (SED): New variable.
3445         Use $SED instead of sed everywhere.
3446
3447 2006-12-22  Bruno Haible  <bruno@clisp.org>
3448
3449         * modules/no-c++: New file.
3450         * m4/no-c++.m4: New file.
3451         * MODULES.html.sh (Support for building libraries and executables):
3452         Add no-c++.
3453
3454 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
3455
3456         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
3457         Include <limits.h>, and use its INT_MAX to rewrite the
3458         j loop so that it does not overflow 'int'.  Problem reported by
3459         Ralf Wildenhues in
3460         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
3461         Play it safe by shifting left by 1 rather than multiplying by 2,
3462         as GCC is less likely to optimize this away when the value
3463         is signed (when it assumes overflow leads to undefined behavior).
3464         Also, don't assume time_t uses two's complement.
3465
3466 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
3467
3468         * MODULES.html.sh: New module wctype.
3469         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
3470         * lib/fnmatch.c: Don't bother to include <wchar.h> before
3471         <wctype.h>, since the new wctype module should fix this.
3472         * lib/quotearg.c: Include <wctype.h> unconditionally, since
3473         the wctype module should arrange for it.
3474         * lib/regex_internal.h: Likewise.
3475         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
3476         since the wctype module should handle this now.
3477         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
3478         * modules/fnmatch (Depends-on): Add wctype.
3479         * modules/quotearg (Depends-on): Likewise.
3480         * modules/regex (Depends-on): Likewise.
3481
3482 2006-12-19  Bruno Haible  <bruno@clisp.org>
3483
3484         * lib/strdup.h [C++]: Wrap definitions in extern "C".
3485         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
3486
3487 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3488
3489         * modules/savewd (Depends-on): Fix dependency on fcntl.
3490
3491 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
3492
3493         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
3494         conforms to C99, rather than relying on the user's environment
3495         setting of STDINT_H.
3496
3497 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
3498         and Eric Blake  <ebb9@byu.net>
3499
3500         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
3501         This is more consistent with the other defines here.
3502         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
3503         Port to z/OS.  Problem reported by Paul Gilmartin.
3504         Change local vars to use gl_ prefix rather than ac_.
3505         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
3506         with other defines.
3507         * modules/double-slash-root: New module.
3508         * modules/dirname (Files): Remove m4/double-slash-root.m4.
3509         (Depends-on): Add double-slash-root.
3510         * MODULES.html.sh (File system functions): Mention new module.
3511
3512 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
3513
3514         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
3515         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
3516         This is for the benefit of gzip, which doesn't do i18n.
3517
3518 2006-12-12  Jim Meyering  <jim@meyering.net>
3519
3520         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
3521         Reported by Andreas Schwab <schwab@suse.de>.
3522
3523 2006-12-12  Bruno Haible  <bruno@clisp.org>
3524
3525         Merge these changes.
3526         2006-09-05  Bruno Haible  <bruno@clisp.org>
3527         * lib/iconvme.c (iconv_string): No need to save and restore errno when
3528         iconv_alloc succeeded.
3529         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
3530         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
3531         test for " && dest " at the end - dest is always != NULL there. Call
3532         iconv with 4xNULL arguments initially, to reset the state. Call iconv
3533         with 2xNULL arguments, also to flush the state storage. Handle the
3534         IRIX iconv behaviour. Realloc the final result, to throw away unused
3535         memory.
3536
3537 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
3538
3539         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
3540         and fchmodat unconditionally, since glibc 2.4 has them.
3541         Problem reported by Arkadiusz Miskiewicz.
3542
3543 2006-12-10  Bruno Haible  <bruno@clisp.org>
3544
3545         * gnulib-tool (func_import): Show the include files only for those
3546         modules that are copied and specified.
3547         Reported by Karl Berry.
3548
3549 2006-12-08  Jim Meyering  <jim@meyering.net>
3550
3551         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
3552         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
3553
3554         * build-aux/announce-gen: Add two new options, both optional:
3555         --bootstrap-tools=TOOL_LIST
3556               a comma-separated list of tools, e.g.,
3557               autoconf,automake,bison,gnulib
3558         --gnulib-snapshot-date=DATE
3559               if gnulib is in the bootstrap tool list,
3560               then report this as the snapshot date.
3561               If not specified, use the current date/time.
3562               If you specify a date here, be sure it's UTC.
3563
3564 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3565
3566         * tests/test-argp-2.sh: Fix test to match actual output.
3567         (func_compare): Fix sed script to be portable.
3568
3569 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
3570
3571         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
3572         workaround for this case.  It is not autoconfigured now; offhand
3573         it's hard to see how to autoconfigure it.
3574
3575 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
3576
3577         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
3578         a directory that is about to be chowned.  Such a directory's
3579         initial file permissions should permit the owner only and this
3580         should not be changed until after the chown, since the group and
3581         other bits would be incorrect if they granted permission before
3582         the chown.
3583
3584         Fix porting problem for iswctype reported by Georg Schwarz in:
3585         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
3586         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
3587         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
3588         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
3589         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
3590
3591 2006-12-03  Jim Meyering  <jim@meyering.net>
3592
3593         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
3594         p->fts_statp may not yet be defined.
3595         (fts_read): Instead, set it in the caller, once p->fts_statp is
3596         sure to be defined, and corresponds to a top-level directory.
3597         This bug made du -x fail.  Here's the coreutils test case:
3598         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
3599         Reported by Mike Frysinger.
3600
3601 2006-12-01  Jim Meyering  <jim@meyering.net>
3602
3603         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
3604         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
3605         Reported by Simon Josefsson.
3606
3607 2006-11-30  Jim Meyering  <jim@meyering.net>
3608
3609         * m4/warning.m4: Use the all-permissive copyright notice
3610         recommended by RMS (rather than LGPL).
3611         * m4/vararrays.m4: Likewise.
3612         * m4/flexmember.m4: Likewise.
3613
3614 2006-11-29  Bruno Haible  <bruno@clisp.org>
3615
3616         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
3617         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
3618         using +=.
3619         Reported by Simon Josefsson <simon@josefsson.org>.
3620
3621 2006-11-28  James Youngman <jay@gnu.org>
3622
3623         * README: Advise users that they might find the bug-gnulib@gnu.org
3624         and autotools-announce@gnu.org mailing lists useful.
3625
3626 2006-11-28  Bruno Haible  <bruno@clisp.org>
3627
3628         * m4/ptrdiff_max.m4: Remove file.
3629
3630 2006-11-21  Bruno Haible  <bruno@clisp.org>
3631
3632         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
3633         _AC_COMPUTE_INT.
3634         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
3635         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
3636         _AC_COMPUTE_INT.
3637         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
3638         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
3639         _AC_COMPUTE_INT.
3640         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
3641
3642 2006-11-28  Jim Meyering  <jim@meyering.net>
3643
3644         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
3645         warning from "gcc -Wshadow" about shadowing the builtin.
3646
3647 2006-11-27  Bruno Haible  <bruno@clisp.org>
3648
3649         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
3650         _AC_COMPUTE_INT.
3651         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
3652
3653 2006-11-27  Bruno Haible  <bruno@clisp.org>
3654             Paul Eggert  <eggert@cs.ucla.edu>
3655
3656         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
3657
3658 2006-11-26  Bruno Haible  <bruno@clisp.org>
3659
3660         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
3661         noinst_LTLIBRARIES.
3662
3663 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
3664             Bruno Haible  <bruno@clisp.org>
3665
3666         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
3667         if compiling with "gcc -ansi".
3668
3669 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
3670
3671         Fix some incompatibilities with gcc -ansi -pedantic.
3672         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
3673         if compiling pedantically with GCC, unless it's C99 or later.
3674         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
3675         it mishandles gcc -ansi -pedantic as well.
3676         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
3677         if gcc -pedantic.
3678         * lib/regexec.c (check_node_accept_bytes): Don't use auto
3679         initializers for struct if -pedantic, unless it's C99 or later.
3680
3681 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
3682
3683         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
3684         Don't close an fd more than once. Identical atimes indicate
3685         success, not failure.
3686
3687 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
3688
3689         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
3690
3691 2006-11-23  Jim Meyering  <jim@meyering.net>
3692
3693         * build-aux/announce-gen: New file.  From coreutils.
3694
3695 2006-11-22  Jim Meyering  <jim@meyering.net>
3696
3697         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
3698         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
3699         (fts_read): Use a temporary to narrow the overused st_size member
3700         before using it in a switch statement.  Reported by Matthew Woehlke.
3701
3702         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
3703         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
3704
3705 2006-11-20  Bruno Haible  <bruno@clisp.org>
3706
3707         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
3708         changequote instead of pairs of brackets.
3709         Reported by Andreas Schwab <schwab@suse.de>.
3710
3711 2006-11-21  Jim Meyering  <jim@meyering.net>
3712
3713         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
3714         so as to remain compatible with older compilers.
3715         Patch from Michael Deutschmann.
3716
3717 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
3718
3719         * MODULES.html.sh (File system functions): Add openat.
3720
3721         * lib/openat.h (rpl_fstatat): New macro, if
3722         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
3723         (fstatat): Define to rpl_fstatat under the same conditions,
3724         unless COMPILING_FSTATAT.
3725         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
3726         seems to have the bug.
3727         * lib/fstatat.c: New file.
3728         * modules/openat (Files): Add it.
3729
3730 2006-11-20  Bruno Haible  <bruno@clisp.org>
3731
3732         * Makefile: New file.
3733
3734 2006-11-20  Jim Meyering  <jim@meyering.net>
3735
3736         The beginnings of syntax-related checks for gnulib.
3737         * lib/Makefile: New file.
3738         * lib/t-idcache: New script.  Ensure that the two halves of
3739         idcache.c stay in sync.
3740
3741         * lib/idcache.c: Adjust comments in user- and group- portions to
3742         be more accurate, and to be consistent with one another.
3743
3744 2006-11-20  Jim Meyering  <jim@meyering.net>
3745
3746         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
3747         continue using the flexible array member (thus, this module performs
3748         half as many malloc calls), with the addition that...
3749         (getgroup, getuser): Consistently record a non-match via an empty
3750         "name" string, and map an empty string match to a NULL return value.
3751         * modules/idcache (Depends-on): Re-add flexmember.
3752
3753         * lib/idcache.c (getuser): Remove all uses of the register keyword.
3754         (getuidbyname, getgroup, getgidbyname): Likewise.
3755
3756         Use cleaner syntax: NULL rather than 0.
3757         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
3758
3759 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
3760
3761         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
3762         It mishandled the case where the group was missing.
3763         Problem reported by Greg Schafer.
3764         * modules/idcache: Likewise.
3765
3766 2006-11-18  Jim Meyering  <jim@meyering.net>
3767
3768         * check-module (%exempt_header): Add exception for some
3769         conditionally-included headers.
3770
3771         * modules/i-ring (Depends-on): Add verify.
3772         (License): Change to LGPL.
3773
3774 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
3775
3776         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
3777         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
3778         and inttostr.h.  Use snprintf rather than uinttostr, so that
3779         LGPLed code doesn't depend on GPLed.
3780
3781 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
3782
3783         * modules/inline (License): Change from GPL to LGPL.
3784
3785 2006-11-17  Jim Meyering  <jim@meyering.net>
3786
3787         * modules/d-type (License): Switch to LGPL.
3788
3789 2006-11-15  Bruno Haible  <bruno@clisp.org>
3790
3791         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
3792
3793 2006-11-15  Eric Blake  <ebb9@byu.net>
3794
3795         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
3796         the module dependency.
3797
3798 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
3799             Bruno Haible  <bruno@clisp.org>
3800
3801         * gnulib-tool (func_create_testdir): Add license consistency check.
3802
3803 2006-11-15  Eric Blake  <ebb9@byu.net>
3804
3805         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
3806         random "(cached)" in configure output.
3807
3808 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3809
3810         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
3811         test for conforming inttypes.h is both announced and cached.
3812
3813         * MODULES.html.sh (seen_modules, seen_files): New variables.
3814         (func_module): Rewrite to use a few less gnulib-tool and sed
3815         invocations.  Avoid a couple of quadratic algorithms for ...
3816         (missed_modules, missed_files): ... these, with ...
3817         (func_append, func_tmpdir): ... these new functions, from
3818         gnulib-tool.  Analogously, install traps for cleanup.
3819
3820         * tests/test-gc.c (main): Remove unused variables.
3821         * tests/test-read-file.c: Include stdlib.h, for 'free'.
3822
3823 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
3824
3825         * modules/inttostr (License): Change to LGPL.
3826
3827 2006-11-14  Eric Blake  <ebb9@byu.net>
3828
3829         * modules/tempname (License): Change to LGPL.
3830
3831 2006-11-14  Eric Blake  <ebb9@byu.net>
3832
3833         * doc/functions.texi (Function Portability): *printf functions on
3834         Cygwin now understand all POSIX size specifiers.
3835
3836 2006-11-14  Bruno Haible  <bruno@clisp.org>
3837
3838         * modules/c-ctype (License): Change to LGPL.
3839
3840 2006-11-12  Bruno Haible  <bruno@clisp.org>
3841
3842         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
3843         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
3844         for GNOME libraries, for which the include files are installed in
3845         subdirectories of $prefix/include.
3846
3847 2006-11-12  Bruno Haible  <bruno@clisp.org>
3848
3849         * m4/lib-link.m4: Require at least autoconf-2.54.
3850         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
3851         name to underscores for the --with option.
3852
3853 2006-11-13  Bruno Haible  <bruno@clisp.org>
3854
3855         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
3856         the tests directory.
3857         Reported by Ralf Wildenhues.
3858
3859 2006-11-13  Bruno Haible  <bruno@clisp.org>
3860
3861         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
3862         (func_emit_initmacro_end): Undo the override here.
3863         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
3864         Works around the famous automake error in coreutils.
3865
3866 2006-11-13  Eric Blake  <ebb9@byu.net>
3867
3868         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
3869         element, not its node.
3870
3871 2006-11-12  Bruno Haible  <bruno@clisp.org>
3872
3873         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
3874         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
3875
3876 2006-11-12  Bruno Haible  <bruno@clisp.org>
3877
3878         * gnulib-tool: New option --local-symlink.
3879         (func_usage): Document it.
3880         (lsymbolic): New variable.
3881         (func_import, func_create_testdir): If --symlink was not specified,
3882         test whether --local-symlink was specified and the file comes from
3883         the local_gnulib_dir.
3884
3885 2006-11-12  Bruno Haible  <bruno@clisp.org>
3886
3887         * gnulib-tool (func_ln): New function.
3888         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
3889
3890 2006-11-12  Bruno Haible  <bruno@clisp.org>
3891
3892         Finish support for source files in subdirectories.
3893         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
3894         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
3895         AUTOMAKE_OPTIONS.
3896         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
3897
3898 2006-11-12  Bruno Haible  <bruno@clisp.org>
3899
3900         * gnulib-tool (func_get_automake_snippet): Synthesize also an
3901         EXTRA_lib_SOURCES augmentation.
3902         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
3903
3904 2006-11-12  Jim Meyering  <jim@meyering.net>
3905
3906         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
3907         file descriptors.  This also averts a failure on systems with
3908         native openat support when a traversed directory lacks "x" access.
3909         * lib/fts_.h: Include "i-ring.h"
3910         (struct FTS) [fts_fd_ring]: New member.
3911         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
3912         (FCHDIR): Add parentheses.
3913         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
3914         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
3915         When descending, rather than simply closing the previous
3916         fts_cwd_fd value, push that file descriptor onto the ring.
3917         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
3918         (fts_open): Initialize the new fd_ring member.
3919         (fts_close): Clear the ring.
3920         (fts_safe_changedir): When possible, use our new fd_ring to skip
3921         the diropen and fstat and dev/ino comparison that would normally
3922         accompany a virtual `chdir ("..")'.
3923
3924         * modules/fts (Depends-on): Add i-ring.
3925         * modules/i-ring: New module.
3926         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
3927         * m4/i-ring.m4: New file.
3928
3929 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3930
3931         * gnulib-tool (func_create_testdir): Fix replacement of
3932         `build-aux' in configure.ac.  Run autotools in gltests
3933         subdirectory.
3934         (func_create_testdir, func_create_megatestdir, test): There is
3935         no need for '--force' in most autotool invocations in a new
3936         tree.  Actually fail the whole test if any of the tools, or the
3937         configure or make stages fail.
3938
3939         Sync from Automake.
3940         * build-aux/gnupload: Revert last change.  Add pointer to upload
3941         instructions of the GNU Maintenance Instructions.
3942         Suggestion by Karl Berry.
3943
3944 2006-11-10  Jim Meyering  <jim@meyering.net>
3945
3946         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
3947
3948 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
3949
3950         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
3951         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
3952         (bind_textdomain_codeset) [! ENABLE_NLS]:
3953         Evaluate all the arguments.  That way, callers get compatible behavior
3954         if the arguments have side effects.  Also, it avoids some GCC
3955         diagnostics in some cases; Joel E. Denny reported problems when Bison
3956         was configured with --enable-gcc-warnigs.
3957
3958 2006-11-10  Jim Meyering  <jim@meyering.net>
3959
3960         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
3961         relevant options in CFLAGS (like -O, -fno-inline) are taken into
3962         account.
3963
3964 2006-11-10  Jim Meyering  <jim@meyering.net>
3965
3966         * modules/inline: New file/module.
3967         * modules/xalloc (Files): Remove m4/inline.m4.
3968         (Depends-on): Add inline, instead.
3969         * modules/oset: Likewise.
3970         * modules/list: Likewise.
3971
3972 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
3973
3974         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
3975         Problem reported by Matthew Woehlke.
3976
3977 2006-11-09  Bruno Haible  <bruno@clisp.org>
3978
3979         * lib/tempname.c (gen_tempname): Remove variant that invokes
3980         __gen_tempname.
3981         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
3982         __gen_tempname.
3983
3984 2006-11-08  Bruno Haible  <bruno@clisp.org>
3985
3986         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
3987         to 'yes' instead of 'cross-compiling'.
3988
3989 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
3990
3991         * lib/quotearg.h (quotearg_free): New decl.
3992         * lib/quotearg.c (quotearg_free): New function.
3993         (slot0, nslots, slotvec0, slotvec):
3994         Now file-scope so that quotearg_free can get at them.
3995
3996 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3997
3998         Sync from Automake.
3999         * build-aux/gnupload: Add missing 'gnu' to example URL.
4000         Report by Karl Berry.
4001
4002 2006-11-08  Bruno Haible  <bruno@clisp.org>
4003
4004         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
4005         Suggested by Paul Eggert.
4006
4007 2006-11-08  Jim Meyering  <jim@meyering.net>
4008
4009         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
4010         It's already included if !_LIBC.
4011         (fts_safe_changedir): Add a comment.
4012
4013 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
4014
4015         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
4016         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
4017         Matthew Woehlke.
4018
4019         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
4020         definitions up, to avoid colliding with change below.
4021         (static_inline) [HAVE_INLINE]: New macro.
4022         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
4023         Provide extern decls when !HAVE_INLINE.  Do not define unless
4024         static_inline is defined, either by us or by xmalloc.c.  Use
4025         static_inline rather than static inline.
4026         (XCALLOC): Optimize sizeof(T) = 1 case.
4027         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
4028
4029 2006-11-07  Bruno Haible  <bruno@clisp.org>
4030
4031         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
4032         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
4033         AC_C_INLINE.
4034         * modules/xalloc (Files): Add m4/inline.m4.
4035
4036 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4037
4038         * README: Fix typo.
4039         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
4040         (Miscellanous Notes): ...from this.
4041
4042 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
4043
4044         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
4045         Mention that offsetof should be used instead of sizeof.
4046         From Bruno Haible.
4047
4048 2006-11-07  Bruno Haible  <bruno@clisp.org>
4049
4050         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
4051
4052 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
4053
4054         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
4055         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
4056         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
4057         (gl_tree_add_before, gl_tree_add_after):
4058         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
4059         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
4060         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
4061         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
4062         (gl_linked_add_after, gl_linked_add_at): Likewise.
4063         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
4064         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
4065         (gl_tree_add_before, gl_tree_add_after): Likewise.
4066         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
4067         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
4068         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
4069
4070 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4071
4072         * lib/gl_oset.h: Use C comment style, not C++ comment style.
4073
4074 2006-11-06  Bruno Haible  <bruno@clisp.org>
4075
4076         * m4/inline.m4: New file.
4077         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
4078         * modules/list (Files): Add m4/inline.m4.
4079         * modules/oset (Files): Likewise.
4080
4081 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
4082
4083         * lib/idcache.c: Include <stddef.h>, for offsetof.
4084         (struct userid.name): Change from char * to a flexible array member.
4085         All uses changed.
4086         * modules/idcache (Depends-on): Add flexmember.
4087
4088         * MODULES.html.sh (Core language properties): New module flexmember.
4089         * modules/flexmember, m4/flexmember.m4: New files.
4090
4091         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
4092         inline functions that are identical with the old xnmalloc_inline,
4093         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
4094         that we can avoid some unnecessary integer multiplications and
4095         divisions in the common case where the element size is known at
4096         compile time.
4097         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
4098         needed.
4099         (xnboundedmalloc): Remove.
4100         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
4101         arguments, for consistency with rest of this header.
4102         (xcharalloc): Rewrite using XNMALLOC.
4103         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
4104         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
4105         versions have been moved to lib/xalloc.h and renamed to be the
4106         non-*_inline versions.
4107         (xmalloc, xrealloc): Implement without reference to the xnmalloc
4108         and xnrealloc functions, since those functions are now inline and
4109         now call us.
4110         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
4111         renaming described above.
4112         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
4113         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
4114         captures the dependency in AC_C_INLINE.
4115
4116         New module canonicalize-lgpl, proposed by Charles Wilson in
4117         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
4118         with a few small changes afterwards.
4119         * MODULES.html.sh (File system functions): New module
4120         canonicalize-lgpl.
4121         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
4122         and canonicalize_file_name.
4123         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
4124         * modules/canonicalize-lgpl: New files.
4125
4126 2006-11-05  Bruno Haible  <bruno@clisp.org>
4127
4128         * gnulib-tool (func_import, func_create_testdir): Create directories
4129         also for files in subdirectories of lib/.
4130
4131 2006-11-05  Bruno Haible  <bruno@clisp.org>
4132
4133         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
4134         ANSI C compliant.
4135
4136 2006-11-03  Bruno Haible  <bruno@clisp.org>
4137
4138         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
4139         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
4140         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
4141         (xnboundedmalloc): New inline function.
4142         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
4143         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
4144         xmalloc.
4145         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
4146         xmalloc.
4147         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
4148         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
4149         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
4150         xmalloc.
4151         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
4152         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
4153         xmalloc.
4154         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
4155         gl_tree_add_after): Use XMALLOC instead of xmalloc.
4156         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
4157         xmalloc.
4158         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
4159         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
4160         gl_tree_add_after): Use XMALLOC instead of xmalloc.
4161         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
4162         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
4163         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
4164         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
4165
4166 2006-11-03  Bruno Haible  <bruno@clisp.org>
4167
4168         * lib/c-ctype.h [C++]: Define functions without name mangling.
4169         * lib/fwriteerror.h [C++]: Likewise.
4170         * lib/gcd.h [C++]: Likewise.
4171         * lib/linebreak.h [C++]: Likewise.
4172
4173 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
4174
4175         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
4176         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
4177         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
4178         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
4179         Check for functions and headers just once.
4180         Check for declaration of canonicalize_file_name.
4181         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
4182
4183 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
4184
4185         * gnulib-tool (func_import): Fix typo in actioncmd.
4186
4187 2006-11-02  Bruno Haible  <bruno@clisp.org>
4188
4189         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
4190         newline sequence in the Makefile.am snippet as a space, like "make"
4191         does.
4192         Reported by Roger Persson <perrog@gmail.com>.
4193
4194 2006-11-01  Bruno Haible  <bruno@clisp.org>
4195
4196         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
4197         already declared in <string.h>.
4198         * lib/strcase.h (strncasecmp): Don't declare it if yes.
4199
4200 2006-11-01  Bruno Haible  <bruno@clisp.org>
4201
4202         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
4203         * lib/strcase.h: Include <string.h>.
4204         (strcasecmp): Define to rpl_strcasecmp here.
4205
4206 2006-11-01  Bruno Haible  <bruno@clisp.org>
4207
4208         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
4209
4210 2006-11-01  Eric Blake  <ebb9@byu.net>
4211
4212         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
4213
4214         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
4215
4216 2006-10-29  Bruno Haible  <bruno@clisp.org>
4217
4218         Make it compile in C++ mode.
4219         * lib/full-write.c (full_rw): Add a cast.
4220
4221 2006-11-01  Bruno Haible  <bruno@clisp.org>
4222
4223         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
4224         be POSIX compliant.
4225         Reported by Roger Persson <perrog@gmail.com>.
4226
4227 2006-11-01  Eric Blake  <ebb9@byu.net>
4228
4229         * lib/getopt_.h: Fix comments.
4230
4231 2006-10-31  Eric Blake  <ebb9@byu.net>
4232
4233         * modules/tmpdir (Depends-on): Add sys_stat.
4234         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
4235         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
4236         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
4237         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
4238         tempname.
4239
4240 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
4241
4242         Avoid some C++ diagnostics reported by Bruno Haible.
4243         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
4244         xmalloc.
4245         (quotearg_alloc): Use xcharalloc rather than xmalloc.
4246         (struct slotvec): Move to top level.
4247         (quotearg_n_options): Rewrite to avoid xmalloc.
4248         * lib/xalloc.h (xcharalloc): New function.
4249         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
4250         [defined __cplusplus]: Add function template that provides result
4251         type propagation.  This part of the change is from Bruno Haible.
4252
4253 2006-10-29  Bruno Haible  <bruno@clisp.org>
4254
4255         Make it compile in C++ mode.
4256         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
4257         * lib/strnlen1.c (strnlen1): Cast memchr result.
4258         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
4259         * lib/clean-temp.c (string_equals, string_hash): Add casts.
4260         (create_temp_dir): Rename local variable 'template'.
4261         (compile_csharp_using_sscli): Add cast.
4262         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
4263         * lib/findprog.c (find_in_path): Likewise.
4264         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
4265         * lib/wait-process.c (register_slave_subprocess): Likewise.
4266
4267 2006-10-22  Bruno Haible  <bruno@clisp.org>
4268
4269         * modules/tsearch: New file.
4270         * lib/tsearch.h: New file.
4271         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
4272         * m4/tsearch.m4: New file.
4273         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
4274
4275 2006-10-29  Eric Blake  <ebb9@byu.net>
4276
4277         * lib/arcfour.c: Assume config.h.
4278         * lib/arctwo.c: Likewise.
4279         * lib/base64.c: Likewise.
4280         * lib/check-version.c: Likewise.
4281         * lib/crc.c: Likewise.
4282         * lib/des.c: Likewise.
4283         * lib/gc-gnulib.c: Likewise.
4284         * lib/gc-libgcrypt.c: Likewise.
4285         * lib/gc-pbkdf2-sha1.c: Likewise.
4286         * lib/getaddrinfo.c: Likewise.
4287         * lib/getdelim.c: Likewise.
4288         * lib/getline.c: Likewise.
4289         * lib/hmac-md5.c: Likewise.
4290         * lib/hmac-sha1.c: Likewise.
4291         * lib/iconvme.c: Likewise.
4292         * lib/md2.c: Likewise.
4293         * lib/md4.c: Likewise.
4294         * lib/memxor.c: Likewise.
4295         * lib/read-file.c: Likewise.
4296         * lib/readline.c: Likewise.
4297         * lib/rijndael-alg-fst.c: Likewise.
4298         * lib/rijndael-api-fst.c: Likewise.
4299         * lib/xgetdomainname.c: Likewise.
4300
4301 2006-10-28  Eric Blake  <ebb9@byu.net>
4302
4303         * lib/xstrndup.c: Assume config.h.
4304
4305 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
4306
4307         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
4308         stat-macros.h is now for our own macros, whereas stat_h is for
4309         macros in the <sys/stat.h> name space.
4310         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
4311         (STAT_MACROS_H): Remove.
4312         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
4313         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
4314         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
4315         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
4316         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
4317         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
4318         Move these macros to ...
4319         * lib/stat_.h: here.  Don't include stat-macros.h.
4320         * lib/canonicalize.c: Don't include stat-macros.h.
4321         * lib/chown.c: Likewise.
4322         * lib/euidaccess.c: Likewise.
4323         * lib/file-type.c: Likewise.
4324         * lib/filemode.c: Likewise.
4325         * lib/glob.c: Likewise.
4326         * lib/isapipe.c: Likewise.
4327         * lib/lchown.c: Likewise.
4328         * lib/lstat.c: Likewise.
4329         * lib/mkdir-p.c: Likewise.
4330         * lib/rmdir.c: Likewise.
4331         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
4332         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
4333         unless mkdir isn't declared, to speed up 'configure'.
4334         Always create sys/stat.h, since it's unlikely any real sys/stat.h
4335         would define all the S_* symbols.
4336         * modules/canonicalize (Depends-on):
4337         Depend on sys_stat, not stat-macros.
4338         * modules/chown: Likewise.
4339         * modules/euidaccess: Likewise.
4340         * modules/filemode: Likewise.
4341         * modules/file-type: Likewise.
4342         * modules/glob: Likewise.
4343         * modules/isapipe: Likewise.
4344         * modules/lchown: Likewise.
4345         * modules/lstat: Likewise.
4346         * modules/mkancesdirs: Likewise.
4347         * modules/rmdir: Likewise.
4348         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
4349         * modules/modechange: Likewise.
4350         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
4351         (configure.ac): Remove gl_STAT_MACROS.
4352         * modules/sys_stat (Depends-on): Remove stat-macros.
4353
4354 2006-10-27  Bruno Haible  <bruno@clisp.org>
4355
4356         * m4/signed.m4: Remove file.
4357         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
4358         invocation.
4359         * modules/vasnprintf (Files): Remove m4/signed.m4.
4360
4361 2006-10-27  Bruno Haible  <bruno@clisp.org>
4362
4363         Update to GNU gettext 0.16.
4364         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
4365         m4/inttypes-h.m4, m4/signed.m4.
4366         * m4/gettext.m4: Update to GNU gettext 0.16.
4367         * m4/intl.m4: New file, from GNU gettext.
4368         * m4/intldir.m4: New file, from GNU gettext.
4369         * config/srclist.txt: Update
4370
4371 2006-10-27  Eric Blake  <ebb9@byu.net>
4372
4373         * MODULES.html.sh: Document tempname.
4374         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
4375         dependencies.
4376         (Files): Move lib/tempname.c...
4377         * modules/tempname: ...to this new module.
4378         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
4379         (gl_PREREQ_TEMPNAME): Move...
4380         * m4/tempname.m4: ...to this new file.
4381         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
4382         * modules/sys_stat (Depends-on): Add stat-macros.
4383         * lib/stat_.h (includes): Pick up stat macros.
4384         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
4385         if stat macros are broken.
4386         * lib/tempname.c (includes): No need to include "stat-macros.h".
4387         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
4388         (direxists, __path_search) [!_LIBC]: Don't compile these in
4389         gnulib; the tmpdir module covers that.
4390         * lib/tempname.h: New file.
4391
4392 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
4393
4394         * COPYING: Explain how gnulib-tool converts licence headers.
4395         Almost all wording by Eric Blake.
4396
4397 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
4398
4399         * lib/mbchar.h (is_basic_table): Make read-only.
4400         * lib/mbchar.c (is_basic_table): Likewise.
4401         Reported by John Darrington.
4402
4403 2006-10-25  Bruno Haible  <bruno@clisp.org>
4404
4405         * lib/progname.h (set_program_name): Undefine before defining.
4406
4407 2006-10-25  Bruno Haible  <bruno@clisp.org>
4408
4409         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
4410         false for non-gcc C++ compilers.
4411         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
4412
4413 2006-10-24  Bruno Haible  <bruno@clisp.org>
4414
4415         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
4416         iconv implementations like Irix iconv.
4417
4418 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
4419
4420         * modules/vararrays: New file.
4421         * m4/vararrays.m4: New file, taken from diffutils.
4422         * MODULES.html.sh: New module vararrays.
4423
4424 2006-10-24  Karl Berry  <karl@gnu.org>
4425
4426         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
4427         Don't call GNU Unix.
4428
4429 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4430
4431         * users.txt: Add Libtool.
4432
4433         Sync from Libtool:
4434
4435         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
4436
4437         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
4438         to gnulib's policy of including config.h unconditionally.
4439
4440 2006-10-24  Bruno Haible  <bruno@clisp.org>
4441
4442         * modules/wcwidth (Files): Add m4/wint_t.m4.
4443         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
4444         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
4445
4446 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
4447
4448         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
4449         to pacify GCC with some -W flags enabled.  Problem reported by
4450         Bruno Haible.
4451
4452 2006-10-24  Jim Meyering  <jim@meyering.net>
4453
4454         * MODULES.html.sh: Remove uinttostr.  It's not a module.
4455         Reported by Karl Berry.
4456
4457 2006-10-23  Bruno Haible  <bruno@clisp.org>
4458
4459         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
4460
4461 2006-10-24  Bruno Haible  <bruno@clisp.org>
4462
4463         * lib/gl_list.h: Use C comment style, not C++ comment style.
4464
4465 2006-10-23  Eric Blake  <ebb9@byu.net>
4466
4467         * lib/getaddrinfo.c (includes): Add missing include.
4468
4469 2006-10-23  Bruno Haible  <bruno@clisp.org>
4470             Paul Eggert  <eggert@cs.ucla.edu>
4471
4472         Ability to rename obstack_free.
4473         * lib/obstack.h (__obstack_free): New macro. Declare instead of
4474         obstack_free.
4475         (obstack_free): Invoke the __obstack_free macro.
4476         * lib/obstack.c (obstack_free): Use __obstack_free macro.
4477
4478 2006-10-23  Bruno Haible  <bruno@clisp.org>
4479             Paul Eggert  <eggert@cs.ucla.edu>
4480
4481         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
4482         __argc, __argv from the declaration. (They are defined as macros on
4483         mingw.)
4484
4485 2006-10-22  Bruno Haible  <bruno@clisp.org>
4486
4487         * doc/gnulib-intro.texi: New file.
4488         * doc/gnulib.texi: Include it.
4489
4490 2006-10-21  Bruno Haible  <bruno@clisp.org>
4491
4492         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
4493         "Introduction", "Miscellanous Notes", "Particular Modules".
4494
4495 2006-10-21  Bruno Haible  <bruno@clisp.org>
4496
4497         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
4498         Change mostlyclean-local rule to avoid sh syntax error from bash
4499         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
4500
4501 2006-10-23  Jim Meyering  <jim@meyering.net>
4502
4503         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
4504         in place of snprintf.
4505
4506         * modules/inttostr (Files): Add lib/uinttostr.c.
4507         * lib/uinttostr.c (inttostr): New file/function.
4508         * lib/inttostr.h (uinttostr): Declare.
4509         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
4510         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
4511         Add uinttostr.
4512         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
4513
4514 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
4515
4516         * lib/canonicalize.c (ELOOP): Define if not already defined.
4517         Problem reported by Bruno Haible in
4518         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
4519
4520 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
4521
4522         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
4523         Problem reported by Perry Smith and Ville Laurikari.
4524
4525         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
4526         uses.
4527
4528 2006-10-19  Bruno Haible  <bruno@clisp.org>
4529
4530         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
4531         for mingw.
4532
4533 2006-10-19  Bruno Haible  <bruno@clisp.org>
4534
4535         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
4536         Needed for mingw.
4537
4538 2006-10-19  Bruno Haible  <bruno@clisp.org>
4539
4540         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
4541
4542 2006-10-19  Bruno Haible  <bruno@clisp.org>
4543
4544         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
4545         it.
4546
4547 2006-10-19  Bruno Haible  <bruno@clisp.org>
4548
4549         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
4550         invocation.
4551
4552 2006-10-19  Bruno Haible  <bruno@clisp.org>
4553
4554         * gnulib-tool (func_create_testdir): Don't include ftruncate and
4555         mountlist by default.
4556
4557 2006-10-16  Bruno Haible  <bruno@clisp.org>
4558
4559         * lib/c-strstr.c: Include c-strstr.h.
4560
4561 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
4562
4563         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
4564         in a slash.
4565
4566 2006-10-18  Bruno Haible  <bruno@clisp.org>
4567
4568         * lib/lock.h [C++]: Wrap definitions in extern "C".
4569
4570 2006-10-18  Bruno Haible  <bruno@clisp.org>
4571
4572         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
4573         gl_LIBOBJS list.
4574
4575 2006-10-18  Bruno Haible  <bruno@clisp.org>
4576
4577         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
4578
4579 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
4580
4581         * lib/xstrtol.h: Include gettext.h.
4582         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
4583         Problem reported by Eric Blake.
4584         * modules/xstrtol (Depends-on): Add gettext-h.
4585
4586 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
4587
4588         * lib/strftime.c (advance): New macro.
4589         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
4590         incomplete type, so you can't add 0 to it.  Problem and patch
4591         reported by Eelco Dolstra for dietlibc.
4592
4593 2006-10-18  Jim Meyering  <jim@meyering.net>
4594
4595         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
4596         type for a local, and rename it: s/up/user_proc/.
4597
4598 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
4599
4600         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
4601         READ_UTMP_USER_PROCESS.
4602         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
4603
4604 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
4605
4606         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
4607         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
4608
4609 2006-10-17  Eric Blake  <ebb9@byu.net>
4610
4611         * lib/sigprocmask.c (sigprocmask): Fix typo.
4612
4613         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
4614
4615         * modules/clean-temp (Makefile.am): Don't add to make output...
4616         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
4617         config.h.
4618
4619 2006-10-17  Bruno Haible  <bruno@clisp.org>
4620
4621         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
4622         differently if DEFAULT_TEXT_DOMAIN is set.
4623
4624 2006-10-16  Bruno Haible  <bruno@clisp.org>
4625
4626         * lib/clean-temp.c: Include fwriteerror.h.
4627
4628 2006-10-16  Bruno Haible  <bruno@clisp.org>
4629
4630         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
4631
4632 2006-10-16  Bruno Haible  <bruno@clisp.org>
4633
4634         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
4635         * lib/sigprocmask.h: Include <sys/types.h>.
4636         (sigset_t): Use the system's definition if present.
4637
4638 2006-10-17  Eric Blake  <ebb9@byu.net>
4639
4640         * lib/xvasprintf.c (includes): Assume config.h.
4641         * lib/xasprintf.c (includes): Likewise.
4642
4643 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
4644
4645         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
4646         at least as wide as intmax_t.
4647
4648 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
4649
4650         (Imported from Automake.)
4651         * build-aux/gnupload: Update to version 1.1 of directive file.
4652
4653 2006-10-16  Eric Blake  <ebb9@byu.net>
4654
4655         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
4656         match Automake 1.10a.
4657
4658 2006-10-14  Bruno Haible  <bruno@clisp.org>
4659
4660         * modules/sigprocmask: New file.
4661         * lib/sigprocmask.h: New file.
4662         * lib/sigprocmask.c: New file.
4663         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
4664         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
4665         request sigprocmask.o.
4666         (gl_PREREQ_SIGPROCMASK): New macro.
4667         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
4668         (Depends-on): Add sigprocmask.
4669         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
4670         gt_SIGNALBLOCKING. Test for 'raise' only once.
4671         * lib/fatal-signal.c: Include sigprocmask.h.
4672         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
4673         unblock_fatal_signals): Define always.
4674         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
4675         sigprocmask.
4676
4677 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
4678
4679         Sync from Automake.
4680         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
4681         which incorrectly sets the mode of an existing destination
4682         directory.  In some cases the unpatched install-sh could do the
4683         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
4684         system.  We hope this is rare in practice, but it's clearly worth
4685         fixing.  Problem reported by Alex Unleashed in
4686         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
4687         Also, don't bother to check for -m bugs unless we're using -m;
4688         suggested by Stepan Kasal.
4689
4690 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4691
4692         Sync from Automake.
4693         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
4694         `-c' flag, so they appear at the same position as in %FASTDEP%
4695         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
4696         which ignores unknown options only after the first non-option.
4697         Bug report against M4 by Nelson H. F. Beebe.
4698
4699 2006-10-13  Jim Meyering  <jim@meyering.net>
4700
4701         Fix a bug in yesterday's change.
4702         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
4703         p->fts_statp->st_dev would be used uninitialized.
4704         Ensures that we always call fts_stat on the very first entry.
4705         Miklos Szeredi reported that find -xdev stopped working.
4706
4707 2006-10-12  Bruno Haible  <bruno@clisp.org>
4708
4709         * gnulib-tool (func_get_automake_snippet): Append an automatically
4710         computed EXTRA_DIST augmentation.
4711         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
4712         * modules/alloca-opt (Makefile.am): Likewise.
4713         * modules/allocsa (Makefile.am): Likewise.
4714         * modules/arcfour (Makefile.am): Likewise.
4715         * modules/arctwo (Makefile.am): Likewise.
4716         * modules/argmatch (Makefile.am): Likewise.
4717         * modules/argz (Makefile.am): Likewise.
4718         * modules/atexit (Makefile.am): Likewise.
4719         * modules/backupfile (Makefile.am): Likewise.
4720         * modules/byteswap (Makefile.am): Likewise.
4721         * modules/c-strtod (Makefile.am): Likewise.
4722         * modules/c-strtold (Makefile.am): Likewise.
4723         * modules/calloc (Makefile.am): Likewise.
4724         * modules/canon-host (Makefile.am): Likewise.
4725         * modules/canonicalize (Makefile.am): Likewise.
4726         * modules/chdir-long (Makefile.am): Likewise.
4727         * modules/chdir-safer (Makefile.am): Likewise.
4728         * modules/check-version (Makefile.am): Likewise.
4729         * modules/chown (Makefile.am): Likewise.
4730         * modules/cloexec (Makefile.am): Likewise.
4731         * modules/close-stream (Makefile.am): Likewise.
4732         * modules/closeout (Makefile.am): Likewise.
4733         * modules/crc (Makefile.am): Likewise.
4734         * modules/csharpexec (Makefile.am): Likewise.
4735         * modules/cycle-check (Makefile.am): Likewise.
4736         * modules/des (Makefile.am): Likewise.
4737         * modules/dev-ino (Makefile.am): Likewise.
4738         * modules/dirfd (Makefile.am): Likewise.
4739         * modules/dirname (Makefile.am): Likewise.
4740         * modules/dup2 (Makefile.am): Likewise.
4741         * modules/eealloc (Makefile.am): Likewise.
4742         * modules/error (Makefile.am): Likewise.
4743         * modules/euidaccess (Makefile.am): Likewise.
4744         * modules/exclude (Makefile.am): Likewise.
4745         * modules/exitfail (Makefile.am): Likewise.
4746         * modules/fcntl-safer (Makefile.am): Likewise.
4747         * modules/fcntl (Makefile.am): Likewise.
4748         * modules/file-type (Makefile.am): Likewise.
4749         * modules/fileblocks (Makefile.am): Likewise.
4750         * modules/filemode (Makefile.am): Likewise.
4751         * modules/filenamecat (Makefile.am): Likewise.
4752         * modules/fnmatch (Makefile.am): Likewise.
4753         * modules/fopen-safer (Makefile.am): Likewise.
4754         * modules/fpending (Makefile.am): Likewise.
4755         * modules/fprintftime (Makefile.am): Likewise.
4756         * modules/free (Makefile.am): Likewise.
4757         * modules/fsusage (Makefile.am): Likewise.
4758         * modules/ftruncate (Makefile.am): Likewise.
4759         * modules/fts (Makefile.am): Likewise.
4760         * modules/gc-arcfour (Makefile.am): Likewise.
4761         * modules/gc-des (Makefile.am): Likewise.
4762         * modules/gc-hmac-md5 (Makefile.am): Likewise.
4763         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
4764         * modules/gc-md4 (Makefile.am): Likewise.
4765         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
4766         * modules/gc-sha1 (Makefile.am): Likewise.
4767         * modules/gc (Makefile.am): Likewise.
4768         * modules/getaddrinfo (Makefile.am): Likewise.
4769         * modules/getcwd (Makefile.am): Likewise.
4770         * modules/getdelim (Makefile.am): Likewise.
4771         * modules/getdomainname (Makefile.am): Likewise.
4772         * modules/getgroups (Makefile.am): Likewise.
4773         * modules/gethostname (Makefile.am): Likewise.
4774         * modules/gethrxtime (Makefile.am): Likewise.
4775         * modules/getline (Makefile.am): Likewise.
4776         * modules/getloadavg (Makefile.am): Likewise.
4777         * modules/getlogin_r (Makefile.am): Likewise.
4778         * modules/getndelim2 (Makefile.am): Likewise.
4779         * modules/getopt (Makefile.am): Likewise.
4780         * modules/getpagesize (Makefile.am): Likewise.
4781         * modules/getpass-gnu (Makefile.am): Likewise.
4782         * modules/getpass (Makefile.am): Likewise.
4783         * modules/getsubopt (Makefile.am): Likewise.
4784         * modules/gettime (Makefile.am): Likewise.
4785         * modules/gettimeofday (Makefile.am): Likewise.
4786         * modules/getugroups (Makefile.am): Likewise.
4787         * modules/getusershell (Makefile.am): Likewise.
4788         * modules/glob (Makefile.am): Likewise.
4789         * modules/group-member (Makefile.am): Likewise.
4790         * modules/hard-locale (Makefile.am): Likewise.
4791         * modules/hash (Makefile.am): Likewise.
4792         * modules/hmac-md5 (Makefile.am): Likewise.
4793         * modules/hmac-sha1 (Makefile.am): Likewise.
4794         * modules/human (Makefile.am): Likewise.
4795         * modules/idcache (Makefile.am): Likewise.
4796         * modules/imaxabs (Makefile.am): Likewise.
4797         * modules/imaxdiv (Makefile.am): Likewise.
4798         * modules/inet_ntop (Makefile.am): Likewise.
4799         * modules/inet_pton (Makefile.am): Likewise.
4800         * modules/intprops (Makefile.am): Likewise.
4801         * modules/inttostr (Makefile.am): Likewise.
4802         * modules/inttypes (Makefile.am): Likewise.
4803         * modules/isapipe (Makefile.am): Likewise.
4804         * modules/javaversion (Makefile.am): Likewise.
4805         * modules/lchmod (Makefile.am): Likewise.
4806         * modules/lchown (Makefile.am): Likewise.
4807         * modules/localcharset (Makefile.am): Likewise.
4808         * modules/long-options (Makefile.am): Likewise.
4809         * modules/lstat (Makefile.am): Likewise.
4810         * modules/malloc (Makefile.am): Likewise.
4811         * modules/mathl (Makefile.am): Likewise.
4812         * modules/mbchar (Makefile.am): Likewise.
4813         * modules/md2 (Makefile.am): Likewise.
4814         * modules/md4 (Makefile.am): Likewise.
4815         * modules/md5 (Makefile.am): Likewise.
4816         * modules/memcasecmp (Makefile.am): Likewise.
4817         * modules/memchr (Makefile.am): Likewise.
4818         * modules/memcmp (Makefile.am): Likewise.
4819         * modules/memcoll (Makefile.am): Likewise.
4820         * modules/memcpy (Makefile.am): Likewise.
4821         * modules/memmem (Makefile.am): Likewise.
4822         * modules/memmove (Makefile.am): Likewise.
4823         * modules/mempcpy (Makefile.am): Likewise.
4824         * modules/memrchr (Makefile.am): Likewise.
4825         * modules/memset (Makefile.am): Likewise.
4826         * modules/memxor (Makefile.am): Likewise.
4827         * modules/mkancesdirs (Makefile.am): Likewise.
4828         * modules/mkdir-p (Makefile.am): Likewise.
4829         * modules/mkdir (Makefile.am): Likewise.
4830         * modules/mkdtemp (Makefile.am): Likewise.
4831         * modules/mkstemp (Makefile.am): Likewise.
4832         * modules/mktime (Makefile.am): Likewise.
4833         * modules/modechange (Makefile.am): Likewise.
4834         * modules/mountlist (Makefile.am): Likewise.
4835         * modules/nanosleep (Makefile.am): Likewise.
4836         * modules/obstack (Makefile.am): Likewise.
4837         * modules/openat (Makefile.am): Likewise.
4838         * modules/pagealign_alloc (Makefile.am): Likewise.
4839         * modules/pathmax (Makefile.am): Likewise.
4840         * modules/physmem (Makefile.am): Likewise.
4841         * modules/poll (Makefile.am): Likewise.
4842         * modules/posixtm (Makefile.am): Likewise.
4843         * modules/posixver (Makefile.am): Likewise.
4844         * modules/putenv (Makefile.am): Likewise.
4845         * modules/quote (Makefile.am): Likewise.
4846         * modules/quotearg (Makefile.am): Likewise.
4847         * modules/raise (Makefile.am): Likewise.
4848         * modules/read-file (Makefile.am): Likewise.
4849         * modules/readline (Makefile.am): Likewise.
4850         * modules/readlink (Makefile.am): Likewise.
4851         * modules/readtokens (Makefile.am): Likewise.
4852         * modules/readutmp (Makefile.am): Likewise.
4853         * modules/realloc (Makefile.am): Likewise.
4854         * modules/regex (Makefile.am): Likewise.
4855         * modules/rename-dest-slash (Makefile.am): Likewise.
4856         * modules/rename (Makefile.am): Likewise.
4857         * modules/rijndael (Makefile.am): Likewise.
4858         * modules/rmdir (Makefile.am): Likewise.
4859         * modules/rpmatch (Makefile.am): Likewise.
4860         * modules/safe-read (Makefile.am): Likewise.
4861         * modules/safe-write (Makefile.am): Likewise.
4862         * modules/same-inode (Makefile.am): Likewise.
4863         * modules/same (Makefile.am): Likewise.
4864         * modules/save-cwd (Makefile.am): Likewise.
4865         * modules/savedir (Makefile.am): Likewise.
4866         * modules/setenv (Makefile.am): Likewise.
4867         * modules/settime (Makefile.am): Likewise.
4868         * modules/sha1 (Makefile.am): Likewise.
4869         * modules/sig2str (Makefile.am): Likewise.
4870         * modules/snprintf (Makefile.am): Likewise.
4871         * modules/stat-macros (Makefile.am): Likewise.
4872         * modules/stat-time (Makefile.am): Likewise.
4873         * modules/stdbool (Makefile.am): Likewise.
4874         * modules/stdint (Makefile.am): Likewise.
4875         * modules/stdlib-safer (Makefile.am): Likewise.
4876         * modules/stpcpy (Makefile.am): Likewise.
4877         * modules/stpncpy (Makefile.am): Likewise.
4878         * modules/strcase (Makefile.am): Likewise.
4879         * modules/strcasestr (Makefile.am): Likewise.
4880         * modules/strchrnul (Makefile.am): Likewise.
4881         * modules/strcspn (Makefile.am): Likewise.
4882         * modules/strdup (Makefile.am): Likewise.
4883         * modules/strerror (Makefile.am): Likewise.
4884         * modules/strftime (Makefile.am): Likewise.
4885         * modules/strndup (Makefile.am): Likewise.
4886         * modules/strnlen (Makefile.am): Likewise.
4887         * modules/strpbrk (Makefile.am): Likewise.
4888         * modules/strsep (Makefile.am): Likewise.
4889         * modules/strstr (Makefile.am): Likewise.
4890         * modules/strtod (Makefile.am): Likewise.
4891         * modules/strtoimax (Makefile.am): Likewise.
4892         * modules/strtok_r (Makefile.am): Likewise.
4893         * modules/strtol (Makefile.am): Likewise.
4894         * modules/strtoll (Makefile.am): Likewise.
4895         * modules/strtoul (Makefile.am): Likewise.
4896         * modules/strtoull (Makefile.am): Likewise.
4897         * modules/strtoumax (Makefile.am): Likewise.
4898         * modules/strverscmp (Makefile.am): Likewise.
4899         * modules/sys_socket (Makefile.am): Likewise.
4900         * modules/sys_stat (Makefile.am): Likewise.
4901         * modules/sysexits (Makefile.am): Likewise.
4902         * modules/time_r (Makefile.am): Likewise.
4903         * modules/timegm (Makefile.am): Likewise.
4904         * modules/timespec (Makefile.am): Likewise.
4905         * modules/tmpfile-safer (Makefile.am): Likewise.
4906         * modules/trim (Makefile.am): Likewise.
4907         * modules/unistd-safer (Makefile.am): Likewise.
4908         * modules/unlinkdir (Makefile.am): Likewise.
4909         * modules/unlocked-io (Makefile.am): Likewise.
4910         * modules/userspec (Makefile.am): Likewise.
4911         * modules/utime (Makefile.am): Likewise.
4912         * modules/utimecmp (Makefile.am): Likewise.
4913         * modules/utimens (Makefile.am): Likewise.
4914         * modules/vasnprintf (Makefile.am): Likewise.
4915         * modules/vasprintf (Makefile.am): Likewise.
4916         * modules/vsnprintf (Makefile.am): Likewise.
4917         * modules/xalloc (Makefile.am): Likewise.
4918         * modules/xgetcwd (Makefile.am): Likewise.
4919         * modules/xnanosleep (Makefile.am): Likewise.
4920         * modules/xreadlink (Makefile.am): Likewise.
4921         * modules/xstrtod (Makefile.am): Likewise.
4922         * modules/xstrtol (Makefile.am): Likewise.
4923         * modules/xstrtold (Makefile.am): Likewise.
4924         * modules/yesno (Makefile.am): Likewise.
4925         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
4926
4927 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
4928
4929         * modules/error (Makefile.am): Distribute files through
4930         EXTRA_DIST, not lib_SOURCES.
4931
4932 2006-10-12  Eric Blake  <ebb9@byu.net>
4933
4934         * modules/error (Makefile.am): Distribute files in /lib.
4935         * modules/obstack (Makefile.am): Likewise.
4936
4937 2006-10-12  Bruno Haible  <bruno@clisp.org>
4938
4939         * modules/acl (Makefile.am): Distribute all files in lib/ through
4940         EXTRA_DIST.
4941         * modules/arcfour (Makefile.am): Likewise.
4942         * modules/arctwo (Makefile.am): Likewise.
4943         * modules/argmatch (Makefile.am): Likewise.
4944         * modules/argz (Makefile.am): Likewise.
4945         * modules/atexit (Makefile.am): Likewise.
4946         * modules/backupfile (Makefile.am): Likewise.
4947         * modules/c-strtod (Makefile.am): Likewise.
4948         * modules/c-strtold (Makefile.am): Likewise.
4949         * modules/calloc (Makefile.am): Likewise.
4950         * modules/canon-host (Makefile.am): Likewise.
4951         * modules/canonicalize (Makefile.am): Likewise.
4952         * modules/chdir-long (Makefile.am): Likewise.
4953         * modules/chdir-safer (Makefile.am): Likewise.
4954         * modules/check-version (Makefile.am): Likewise.
4955         * modules/chown (Makefile.am): Likewise.
4956         * modules/cloexec (Makefile.am): Likewise.
4957         * modules/close-stream (Makefile.am): Likewise.
4958         * modules/closeout (Makefile.am): Likewise.
4959         * modules/crc (Makefile.am): Likewise.
4960         * modules/cycle-check (Makefile.am): Likewise.
4961         * modules/des (Makefile.am): Likewise.
4962         * modules/dirfd (Makefile.am): Likewise.
4963         * modules/dirname (Makefile.am): Likewise.
4964         * modules/dup2 (Makefile.am): Likewise.
4965         * modules/euidaccess (Makefile.am): Likewise.
4966         * modules/exclude (Makefile.am): Likewise.
4967         * modules/exitfail (Makefile.am): Likewise.
4968         * modules/fcntl-safer (Makefile.am): Likewise.
4969         * modules/file-type (Makefile.am): Likewise.
4970         * modules/fileblocks (Makefile.am): Likewise.
4971         * modules/filemode (Makefile.am): Likewise.
4972         * modules/filenamecat (Makefile.am): Likewise.
4973         * modules/fnmatch (Makefile.am): Likewise.
4974         * modules/fopen-safer (Makefile.am): Likewise.
4975         * modules/fpending (Makefile.am): Likewise.
4976         * modules/fprintftime (Makefile.am): Likewise.
4977         * modules/free (Makefile.am): Likewise.
4978         * modules/fsusage (Makefile.am): Likewise.
4979         * modules/ftruncate (Makefile.am): Likewise.
4980         * modules/fts (Makefile.am): Likewise.
4981         * modules/gc (Makefile.am): Likewise.
4982         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
4983         * modules/getaddrinfo (Makefile.am): Likewise.
4984         * modules/getcwd (Makefile.am): Likewise.
4985         * modules/getdelim (Makefile.am): Likewise.
4986         * modules/getdomainname (Makefile.am): Likewise.
4987         * modules/getgroups (Makefile.am): Likewise.
4988         * modules/gethostname (Makefile.am): Likewise.
4989         * modules/gethrxtime (Makefile.am): Likewise.
4990         * modules/getline (Makefile.am): Likewise.
4991         * modules/getloadavg (Makefile.am): Likewise.
4992         * modules/getlogin_r (Makefile.am): Likewise.
4993         * modules/getopt (Makefile.am): Likewise.
4994         * modules/getpass (Makefile.am): Likewise.
4995         * modules/getpass-gnu (Makefile.am): Likewise.
4996         * modules/getsubopt (Makefile.am): Likewise.
4997         * modules/gettime (Makefile.am): Likewise.
4998         * modules/gettimeofday (Makefile.am): Likewise.
4999         * modules/getugroups (Makefile.am): Likewise.
5000         * modules/getusershell (Makefile.am): Likewise.
5001         * modules/glob (Makefile.am): Likewise.
5002         * modules/group-member (Makefile.am): Likewise.
5003         * modules/hard-locale (Makefile.am): Likewise.
5004         * modules/hash (Makefile.am): Likewise.
5005         * modules/hmac-md5 (Makefile.am): Likewise.
5006         * modules/hmac-sha1 (Makefile.am): Likewise.
5007         * modules/human (Makefile.am): Likewise.
5008         * modules/idcache (Makefile.am): Likewise.
5009         * modules/imaxabs (Makefile.am): Likewise.
5010         * modules/imaxdiv (Makefile.am): Likewise.
5011         * modules/inet_ntop (Makefile.am): Likewise.
5012         * modules/inet_pton (Makefile.am): Likewise.
5013         * modules/inttostr (Makefile.am): Likewise.
5014         * modules/isapipe (Makefile.am): Likewise.
5015         * modules/lchown (Makefile.am): Likewise.
5016         * modules/long-options (Makefile.am): Likewise.
5017         * modules/lstat (Makefile.am): Likewise.
5018         * modules/malloc (Makefile.am): Likewise.
5019         * modules/mathl (Makefile.am): Likewise.
5020         * modules/mbchar (Makefile.am): Likewise.
5021         * modules/md2 (Makefile.am): Likewise.
5022         * modules/md4 (Makefile.am): Likewise.
5023         * modules/md5 (Makefile.am): Likewise.
5024         * modules/memcasecmp (Makefile.am): Likewise.
5025         * modules/memchr (Makefile.am): Likewise.
5026         * modules/memcmp (Makefile.am): Likewise.
5027         * modules/memcoll (Makefile.am): Likewise.
5028         * modules/memcpy (Makefile.am): Likewise.
5029         * modules/memmem (Makefile.am): Likewise.
5030         * modules/memmove (Makefile.am): Likewise.
5031         * modules/mempcpy (Makefile.am): Likewise.
5032         * modules/memrchr (Makefile.am): Likewise.
5033         * modules/memset (Makefile.am): Likewise.
5034         * modules/memxor (Makefile.am): Likewise.
5035         * modules/mkancesdirs (Makefile.am): Likewise.
5036         * modules/mkdir (Makefile.am): Likewise.
5037         * modules/mkdir-p (Makefile.am): Likewise.
5038         * modules/mkdtemp (Makefile.am): Likewise.
5039         * modules/mkstemp (Makefile.am): Likewise.
5040         * modules/mktime (Makefile.am): Likewise.
5041         * modules/modechange (Makefile.am): Likewise.
5042         * modules/mountlist (Makefile.am): Likewise.
5043         * modules/nanosleep (Makefile.am): Likewise.
5044         * modules/openat (Makefile.am): Likewise.
5045         * modules/pagealign_alloc (Makefile.am): Likewise.
5046         * modules/physmem (Makefile.am): Likewise.
5047         * modules/poll (Makefile.am): Likewise.
5048         * modules/posixtm (Makefile.am): Likewise.
5049         * modules/posixver (Makefile.am): Likewise.
5050         * modules/putenv (Makefile.am): Likewise.
5051         * modules/quote (Makefile.am): Likewise.
5052         * modules/quotearg (Makefile.am): Likewise.
5053         * modules/raise (Makefile.am): Likewise.
5054         * modules/read-file (Makefile.am): Likewise.
5055         * modules/readline (Makefile.am): Likewise.
5056         * modules/readlink (Makefile.am): Likewise.
5057         * modules/readtokens (Makefile.am): Likewise.
5058         * modules/readutmp (Makefile.am): Likewise.
5059         * modules/realloc (Makefile.am): Likewise.
5060         * modules/regex (Makefile.am): Likewise.
5061         * modules/rename (Makefile.am): Likewise.
5062         * modules/rename-dest-slash (Makefile.am): Likewise.
5063         * modules/rijndael (Makefile.am): Likewise.
5064         * modules/rmdir (Makefile.am): Likewise.
5065         * modules/rpmatch (Makefile.am): Likewise.
5066         * modules/safe-read (Makefile.am): Likewise.
5067         * modules/safe-write (Makefile.am): Likewise.
5068         * modules/same (Makefile.am): Likewise.
5069         * modules/save-cwd (Makefile.am): Likewise.
5070         * modules/savedir (Makefile.am): Likewise.
5071         * modules/setenv (Makefile.am): Likewise.
5072         * modules/settime (Makefile.am): Likewise.
5073         * modules/sha1 (Makefile.am): Likewise.
5074         * modules/sig2str (Makefile.am): Likewise.
5075         * modules/snprintf (Makefile.am): Likewise.
5076         * modules/stdlib-safer (Makefile.am): Likewise.
5077         * modules/stpcpy (Makefile.am): Likewise.
5078         * modules/stpncpy (Makefile.am): Likewise.
5079         * modules/strcase (Makefile.am): Likewise.
5080         * modules/strcasestr (Makefile.am): Likewise.
5081         * modules/strchrnul (Makefile.am): Likewise.
5082         * modules/strcspn (Makefile.am): Likewise.
5083         * modules/strdup (Makefile.am): Likewise.
5084         * modules/strerror (Makefile.am): Likewise.
5085         * modules/strftime (Makefile.am): Likewise.
5086         * modules/strndup (Makefile.am): Likewise.
5087         * modules/strnlen (Makefile.am): Likewise.
5088         * modules/strpbrk (Makefile.am): Likewise.
5089         * modules/strsep (Makefile.am): Likewise.
5090         * modules/strstr (Makefile.am): Likewise.
5091         * modules/strtod (Makefile.am): Likewise.
5092         * modules/strtoimax (Makefile.am): Likewise.
5093         * modules/strtok_r (Makefile.am): Likewise.
5094         * modules/strtol (Makefile.am): Likewise.
5095         * modules/strtoll (Makefile.am): Likewise.
5096         * modules/strtoul (Makefile.am): Likewise.
5097         * modules/strtoull (Makefile.am): Likewise.
5098         * modules/strtoumax (Makefile.am): Likewise.
5099         * modules/strverscmp (Makefile.am): Likewise.
5100         * modules/time_r (Makefile.am): Likewise.
5101         * modules/timegm (Makefile.am): Likewise.
5102         * modules/tmpfile-safer (Makefile.am): Likewise.
5103         * modules/unistd-safer (Makefile.am): Likewise.
5104         * modules/unlinkdir (Makefile.am): Likewise.
5105         * modules/userspec (Makefile.am): Likewise.
5106         * modules/utime (Makefile.am): Likewise.
5107         * modules/utimecmp (Makefile.am): Likewise.
5108         * modules/utimens (Makefile.am): Likewise.
5109         * modules/vasnprintf (Makefile.am): Likewise.
5110         * modules/vasprintf (Makefile.am): Likewise.
5111         * modules/vsnprintf (Makefile.am): Likewise.
5112         * modules/xalloc (Makefile.am): Likewise.
5113         * modules/xgetcwd (Makefile.am): Likewise.
5114         * modules/xnanosleep (Makefile.am): Likewise.
5115         * modules/xreadlink (Makefile.am): Likewise.
5116         * modules/xstrtod (Makefile.am): Likewise.
5117         * modules/xstrtol (Makefile.am): Likewise.
5118         * modules/xstrtold (Makefile.am): Likewise.
5119         * modules/yesno (Makefile.am): Likewise.
5120
5121 2006-10-12  Jim Meyering  <jim@meyering.net>
5122
5123         * m4/getloadavg.m4: Revert the change below.
5124
5125         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
5126         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
5127         fail with a symlink, which is what coreutils' ./bootstrap now
5128         creates by default.
5129
5130 2006-10-12  Bruno Haible  <bruno@clisp.org>
5131
5132         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
5133         mingw.
5134         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
5135         MSVC and mingw explicitly.
5136
5137 2006-10-11  Simon Josefsson  <jas@extundo.com>
5138             Bruno Haible  <bruno@clisp.org>
5139
5140         Add support for multiple gnulib-tool invocations in the scope of a
5141         single configure.ac file.
5142         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
5143         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
5144         with the same contents as the _LIBADD variable.
5145         (func_emit_initmacro_start, func_emit_initmacro_end,
5146         func_emit_initmacro_done): New functions.
5147         (func_import, func_create_testdir): Invoke them. Allow the identifiers
5148         gl_LIBOBJS and gl_LTLIBOBJS.
5149
5150 2006-10-11  Bruno Haible  <bruno@clisp.org>
5151
5152         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
5153         (func_create_testdir): Don't create po/Makefile.am, don't invoke
5154         autoreconf. Instead, invoke autopoint explicitly but move back the
5155         *.m4 files from gnulib.
5156
5157 2006-10-11  Bruno Haible  <bruno@clisp.org>
5158
5159         * gnulib-tool (func_usage): Make module names after --create-testdir
5160         optional.
5161         (func_create_testdir): If no module was specified, use nearly all
5162         modules.
5163
5164 2006-10-12  Jim Meyering  <jim@meyering.net>
5165
5166         Big performance improvement for fts-based tools that use FTS_NOSTAT.
5167         Avoid spurious inode-mismatch problems on non-POSIX file systems.
5168         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
5169         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
5170         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
5171         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
5172         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
5173         (fts_set_stat_required): New function.
5174         (fts_open): Defer the calls to fts_stat, if possible or requested.
5175         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
5176         into fts_stat itself.
5177         (fts_read): Perform any required (deferred) fts_stat call.
5178         (fts_build): Likewise, for the directory we're about to open and read.
5179         In the readdir loop, carefully decide whether each entry will require
5180         an eventual call to fts_stat, using dirent.d_type info if available.
5181         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
5182         a command line argument into this function.  Update all callers.
5183         Map a return value of FTS_DOT to FTS_D for a command line argument.
5184         * modules/fts (Depends-on): Add d-type.  Alphabetize.
5185         Thanks to Miklos Szeredi for his tenacity and for the initial
5186         bug report about "find" failing on a FUSE-based file system.
5187
5188         * lib/fts.c (fts_open): Use consistent indentation.
5189
5190 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
5191
5192         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
5193         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
5194         reported by Jim Meyering.  All uses of cache variables renamed
5195         to match Autoconf's.
5196         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
5197         the other one.
5198
5199         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
5200         Fix misspelling in diagnostic.
5201
5202 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
5203
5204         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
5205         defined.  Problem reported by Matthew Woehlke.
5206
5207         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
5208         Add support for Tandem NonStop R series.
5209         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
5210         Use new macro.
5211
5212         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
5213         (has_trailing_slash): Omit size arg; all callers changed.
5214         Omit 'inline', since it doesn't help performance and we'd
5215         need to configure it.
5216         Don't count //, ///, etc. as having a trailing slash.
5217         As a side effect, this removes a C99ism reported by Matthew Woehlke.
5218         (rpl_rename_dest_slash): On failure, use rename's errno rather
5219         than (in some cases) an incorrect or junk errno.
5220         Simplify code by removing need to compute length; this does
5221         cause it to make two passes instead of one over the file name,
5222         but it's worth it.
5223
5224         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
5225         change, since Autoconf's version may no longer be appropriate now
5226         that we are using CVS Autoconf's version.  Add support for Tandem.
5227
5228 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
5229             Bruno Haible  <bruno@clisp.org>
5230
5231         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
5232         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
5233         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
5234         gl_AC_TYPE_LONG_LONG.
5235
5236         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
5237         instead of HAVE_LONG_LONG.
5238         * lib/printf-args.c (printf_fetchargs): Likewise.
5239         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
5240         * lib/vasnprintf.c (VASNPRINTF): Likewise.
5241         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
5242         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
5243         gl_AC_TYPE_LONG_LONG.
5244
5245 2006-10-11  Bruno Haible  <bruno@clisp.org>
5246
5247         * m4/longlong.m4: Add comments.
5248         * m4/ulonglong.m4: Likewise.
5249
5250 2006-10-10  Bruno Haible  <bruno@clisp.org>
5251
5252         Make it possible to #define stpcpy, strdup to aliases.
5253         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
5254         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
5255
5256 2006-10-10  Bruno Haible  <bruno@clisp.org>
5257
5258         Make it possible to #define gcd to an alias.
5259         * lib/gcd.c: Include config.h.
5260
5261 2006-10-10  Bruno Haible  <bruno@clisp.org>
5262
5263         Make it possible to #define c_isascii to an alias.
5264         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
5265         defined. Undefine the macros before defining them, to avoid gcc
5266         warnings.
5267         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
5268         define NO_C_CTYPE_MACROS early.
5269
5270 2006-10-10  Bruno Haible  <bruno@clisp.org>
5271
5272         Make it possible to #define set_program_name to an alias.
5273         * lib/progname.c: Don't undefine set_program_name; instead, undefine
5274         ENABLE_RELOCATABLE early.
5275
5276 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
5277
5278         Port to Tandem NSK OSS, which has 64-bit signed int but at most
5279         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
5280         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
5281         More generally, don't assume that 64-bit signed int is available
5282         if unsigned int is, and vice versa.
5283         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
5284         unsigned symbols, not on their signed counterparts.
5285         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
5286         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
5287         (UINT64_C, UINTMAX_C):
5288         Likewise.
5289         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
5290         unsigned counterparts.
5291         (Have_long_long, Unsigned): New macros.
5292         (Int): Renamed from INT.
5293         (strtoimax): Use the new macros.
5294         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
5295         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
5296         * modules/inttypes (inttypes.h): Substitute
5297         HAVE_UNSIGNED_LONG_LONG_INT.
5298         * modules/stdint (stdint.h): Likewise.
5299         (Files): Add m4/ulonglong.m4.
5300
5301 2006-10-10  Bruno Haible  <bruno@clisp.org>
5302
5303         Fix a gcc -Wshadow warning.
5304         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
5305         to 'bucket'.
5306         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
5307         gl_linked_indexof_from_to): Likewise.
5308         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
5309         Likewise.
5310         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
5311         Likewise.
5312         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
5313         Reported by Eric Blake.
5314
5315 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
5316
5317         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
5318         for NetBSD.  Problem reported by Bruno Haible.
5319
5320 2006-10-09  Jim Meyering  <jim@meyering.net>
5321
5322         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
5323         Patch from Bruno Haible.
5324
5325 2006-10-09  Jim Meyering  <jim@meyering.net>
5326
5327         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
5328         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
5329         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
5330
5331 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
5332
5333         Don't include <config.h> twice; this doesn't work in some cases,
5334         e.g., when config.h has "#define intmax_t long long int" and
5335         we include <config.h>, <inttypes.h>, <config.h> in that order.
5336         Problem reported by Matthew Woehlke in:
5337         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
5338         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
5339         * lib/fts-cycle.c: Don't include config.h.
5340         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
5341         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
5342         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
5343         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
5344         inttypes.h.
5345         * lib/xstrtoumax.c: Likewise.
5346         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
5347         __strtol and the like, so that this module is more like its siblings.
5348         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
5349         Remove; no longer needed now that we assume gnulib inttypes.h.
5350
5351 2006-10-08  Bruno Haible  <bruno@clisp.org>
5352
5353         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
5354         option.
5355
5356 2006-10-07  Jim Meyering  <jim@meyering.net>
5357
5358         * modules/inttypes (inttypes.h): Revert what seems to have been
5359         an inadvertent part of today's change: use "|", not "/" in the
5360         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
5361
5362 2006-10-07  Bruno Haible  <bruno@clisp.org>
5363
5364         * modules/sublist: New file.
5365
5366 2006-10-07  Bruno Haible  <bruno@clisp.org>
5367
5368         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
5369         * modules/argz (argz.h): Likewise.
5370         * modules/arpa_inet (arpa/inet.h): Likewise.
5371         * modules/byteswap (byteswap.h): Likewise.
5372         * modules/configmake (configmake.h): Likewise.
5373         * modules/fcntl (fcntl.h): Likewise.
5374         * modules/fnmatch (fnmatch.h): Likewise.
5375         * modules/getopt (getopt.h): Likewise.
5376         * modules/glob (glob.h): Likewise.
5377         * modules/inttypes (inttypes.h): Likewise.
5378         * modules/netinet_in (netinet/in.h): Likewise.
5379         * modules/poll (poll.h): Likewise.
5380         * modules/stdbool (stdbool.h): Likewise.
5381         * modules/stdint (stdint.h): Likewise.
5382         * modules/sys_select (sys/select.h): Likewise.
5383         * modules/sys_socket (sys/socket.h): Likewise.
5384         * modules/sys_stat (sys/stat.h): Likewise.
5385         * modules/sysexits (sysexits.h): Likewise.
5386         * modules/unistd (unistd.h): Likewise.
5387         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5388         Add a "DO NOT EDIT" comment to the generated file.
5389         (func_import): Likewise for gnulib-comp.m4.
5390
5391 2006-10-07  Bruno Haible  <bruno@clisp.org>
5392
5393         * lib/gl_sublist.h: New file.
5394         * lib/gl_sublist.c: New file.
5395
5396 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
5397
5398         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
5399         name (relative to the original working directory) and the file
5400         name component (relative to the temporary working directory).  All
5401         callers changed.
5402         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
5403         * lib/mkdir-p.c (make_dir_parents): Likewise.
5404         * lib/mkdir-p.h (make_dir_parents): Likewise.
5405
5406 2006-10-06  Eric Blake  <ebb9@byu.net>
5407
5408         Define several macros for use by the clean-temp module.
5409         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
5410         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
5411         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
5412
5413         * lib/clean-temp.h (close_stream_temp): New declaration.
5414         * lib/clean-temp.c (includes): Pull in headers according to what
5415         other modules are in use.
5416         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
5417
5418 2006-10-06  Bruno Haible  <bruno@clisp.org>
5419
5420         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
5421         instead of fopen, fwriteerror.
5422
5423 2006-10-06  Bruno Haible  <bruno@clisp.org>
5424
5425         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
5426         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
5427         int.
5428         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
5429         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
5430         Return an error indicator.
5431         Suggested by Eric Blake.
5432
5433 2006-10-06  Bruno Haible  <bruno@clisp.org>
5434
5435         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
5436         Reported by Eric Blake.
5437
5438 2006-10-06  Bruno Haible  <bruno@clisp.org>
5439
5440         * modules/closeout (Description): Mention stderr too.
5441
5442 2006-10-06  Bruno Haible  <bruno@clisp.org>
5443         and Paul Eggert  <eggert@cs.ucla.edu>
5444
5445         * lib/closeout.c (close_stdout): Also close stderr.
5446         * lib/closeout.h: Update comment.
5447
5448 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
5449
5450         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
5451         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
5452         * lib/dirchownmod.c: Include lchown.h.
5453         * lib/lchown.c: Don't include files that lchown.h now includes.
5454         Don't declare chown, since lchown.h now does that.
5455         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
5456         (lchown): Define to rpl_chown if lchown is declared but
5457         does not exist.  Declare using a prototype if lchown is not
5458         declared.  Add a copyright notice.
5459         * lib/mkstemp.h: Include <unistd.h>.
5460         * lib/openat.c: Include lchown.h.
5461
5462         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
5463         we now test for that separately.
5464         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
5465         rather than O_NOFOLLOW, when testing whether it's possible to
5466         avoid a race condition reliably.
5467         * lib/savewd.c (savewd_chdir): Likewise.
5468
5469         Remove macros that are no longer needed now that stdint.h is
5470         reliable.
5471         * lib/fsusage.c (UINTMAX_MAX): Remove.
5472         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
5473         * lib/utimecmp.c (SIZE_MAX): Remove.
5474
5475         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
5476
5477         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
5478         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
5479         O_NOATIME works.
5480
5481 2006-10-05  Bruno Haible  <bruno@clisp.org>
5482
5483         * lib/gl_list.h (gl_sortedlist_search_from_to,
5484         gl_sortedlist_indexof_from_to): New declarations.
5485         (gl_list_implementation): New fields sortedlist_search_from_to,
5486         sortedlist_indexof_from_to.
5487         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
5488         inline functions.
5489         * lib/gl_list.c (gl_sortedlist_search_from_to,
5490         gl_sortedlist_indexof_from_to): New functions.
5491         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
5492         function.
5493         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
5494         (gl_array_sortedlist_search_from_to): New function.
5495         (gl_array_list_implementation): Update.
5496         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
5497         function.
5498         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
5499         (gl_carray_sortedlist_search_from_to): New function.
5500         (gl_carray_list_implementation): Update.
5501         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
5502         gl_linked_sortedlist_indexof_from_to): New functions.
5503         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
5504         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
5505         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
5506         gl_tree_sortedlist_indexof_from_to): New functions.
5507         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
5508         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
5509         Update.
5510         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
5511         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
5512         Update.
5513
5514 2006-10-05  Bruno Haible  <bruno@clisp.org>
5515
5516         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
5517         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
5518         (struct gl_list_implementation): Add fields search_from_to,
5519         indexof_from_to. Remove fields search, indexof.
5520         (gl_list_search): Use the search_from_to method.
5521         (gl_list_search_from, gl_list_search_from_to): New functions.
5522         (gl_list_indexof): Use the indexof_from_to method.
5523         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
5524         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
5525         (gl_list_search_from, gl_list_search_from_to): New functions.
5526         (gl_list_indexof): Use the indexof_from_to method.
5527         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
5528         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
5529         gl_array_indexof. Add start_index, end_index arguments.
5530         (gl_array_search_from_to): Renamed from gl_array_search. Add
5531         start_index, end_index arguments.
5532         (gl_array_remove, gl_array_list_implementation): Update.
5533         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
5534         gl_carray_indexof. Add start_index, end_index arguments.
5535         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
5536         start_index, end_index arguments.
5537         (gl_carray_remove, gl_carray_list_implementation): Update.
5538         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
5539         gl_linked_search. Add start_index, end_index arguments.
5540         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
5541         start_index, end_index arguments.
5542         (gl_linked_remove): Update.
5543         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
5544         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
5545         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
5546         field to 'size_t'.
5547         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
5548         gl_tree_search. Add start_index, end_index arguments.
5549         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
5550         start_index, end_index arguments.
5551         (gl_tree_remove): Update.
5552         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
5553         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
5554         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
5555         function.
5556         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
5557         gl_tree_search. Add start_index, end_index arguments.
5558         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
5559         start_index, end_index arguments.
5560         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
5561         Update.
5562         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
5563
5564 2006-10-05  Bruno Haible  <bruno@clisp.org>
5565
5566         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
5567
5568         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
5569         fwriteerror_temp): New declarations.
5570         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
5571         (descriptors): New variable.
5572         (cleanup): First, close the descriptors.
5573         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
5574         fclose_temp, fwriteerror_temp): New functions.
5575
5576 2006-10-04  Jim Meyering  <jim@meyering.net>
5577
5578         * lib/fts.c (fts_open): Tiny comment change.
5579
5580 2006-10-04  Bruno Haible  <bruno@clisp.org>
5581
5582         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
5583         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
5584         gl_LOCK_BODY.
5585         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
5586         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
5587         gl_LOCK_EARLY_BODY.
5588         (gl_LOCK): Require gl_LOCK_BODY.
5589
5590 2006-10-04  Bruno Haible  <bruno@clisp.org>
5591
5592         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
5593         (gl_oset_search_atleast): New declaration.
5594         (struct gl_oset_implementation): Add field 'search_atleast'.
5595         (gl_oset_search_atleast): New inline function.
5596         * lib/gl_oset.c (gl_oset_search_atleast): New function.
5597         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
5598         (gl_array_oset_implementation): Update.
5599         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
5600         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
5601         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
5602
5603 2006-10-04  Bruno Haible  <bruno@clisp.org>
5604
5605         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
5606
5607 2006-10-03  Bruno Haible  <bruno@clisp.org>
5608
5609         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
5610         from gl_avltreehash_list_implementation.
5611
5612 2006-10-03  Bruno Haible  <bruno@clisp.org>
5613
5614         * lib/gl_oset.c (gl_oset_add): Fix return type.
5615
5616 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
5617
5618         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
5619
5620 2006-10-02  Eric Blake  <ebb9@byu.net>
5621
5622         * modules/strnlen (Depends-on): Add extensions.
5623
5624 2006-10-02  Eric Blake  <ebb9@byu.net>
5625
5626         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
5627         definition in 2.60+.
5628
5629 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
5630
5631         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
5632         checks.
5633
5634 2006-10-02  Bruno Haible  <bruno@clisp.org>
5635
5636         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
5637         to the AUTOMAKE_OPTIONS.
5638         Reported by Jim Meyering.
5639
5640 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
5641
5642         Work around bug in Solaris 10 /proc file system:
5643         /proc/self/fd/NNN/.. isn't the parent directory of
5644         the directory whose file descriptor is NNN.  This needs to
5645         be worked around at run time, not compile time, since a
5646         program might be built on Solaris 8, where things work, and
5647         run on Solaris 10.
5648         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
5649         to use the following interface instead:
5650         (OPENAT_BUFFER_SIZE): New macro.
5651         (openat_proc_name): New function.
5652         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
5653         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
5654         Likewise.
5655         * lib/openat-proc.c: New file.
5656         * modules/openat (Files): Add lib/openat-proc.c.
5657         (Depends-on): Add same-inode, stdbool.
5658         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
5659
5660 2006-09-29  Bruno Haible  <bruno@clisp.org>
5661
5662         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
5663         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
5664         argument. Set stdout_closed before testing for ferror, not after.
5665         (fwriteerror, fwriteerror_no_ebadf): New functions.
5666
5667 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5668
5669         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
5670
5671 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
5672
5673         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
5674         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
5675
5676 2006-09-28  Jim Meyering  <jim@meyering.net>
5677
5678         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
5679         Include <unistd.h>.
5680
5681 2006-09-28  Bruno Haible  <bruno@clisp.org>
5682
5683         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
5684         * modules/linkedhash-list (Depends-on): Likewise.
5685         * modules/rbtreehash-list (Depends-on): Likewise.
5686
5687 2006-09-28  Bruno Haible  <bruno@clisp.org>
5688
5689         * lib/strndup.h: Simplify the redefinition of strndup.
5690         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
5691         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
5692
5693 2006-09-28  Bruno Haible  <bruno@clisp.org>
5694
5695         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
5696         * lib/gl_linkedhash_list.c: Likewise.
5697         * lib/gl_rbtreehash_list.c: Likewise.
5698
5699 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
5700
5701         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
5702         getaddrinfo.
5703
5704         * lib/__fpending.h: Don't include <stdio_ext.h> unless
5705         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
5706         it causes <stdio_ext.h> to cause a compile-time error.
5707         Problem reported by Nelson H. F. Beebe.
5708         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
5709         of HAVE_DECL___PENDING.
5710
5711         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
5712         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
5713         declaration.
5714
5715 2006-09-27  Jim Meyering  <jim@meyering.net>
5716
5717         This file could end up with a definition for a function
5718         named __strndup, rather than rpl_strndup on a system with
5719         incomplete weak_alias support.
5720         * lib/strndup.c (strndup): Rename from __strndup.
5721         Remove #defines that used to map __strndup to strndup.
5722         Don't use K&R prototypes.
5723         Remove LIBC-related code, since this file is not sync'd with glibc.
5724         * lib/strndup.h: Revamp, accordingly.
5725         * m4/strndup.m4: Modernize.
5726
5727 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
5728
5729         * modules/savewd (Depends-on): Add 'raise'.
5730         * lib/savewd.c: Include <signal.h>, for 'raise'.
5731
5732 2006-09-26  Jim Meyering  <jim@meyering.net>
5733
5734         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
5735         when we detect Darwin 8.7.0's acl_get_file bug.
5736         Rearrange to perform the new (below) run-test while $LIBS
5737         contains any acl-related library.  Set USE_ACL at the end.
5738         (gl_ACL_GET_FILE): New function.
5739
5740 2006-09-26  Eric Blake  <ebb9@byu.net>
5741
5742         * lib/verror.c: Include <config.h> unconditionally.
5743
5744 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
5745
5746         * modules/clock-time (Maintainer): Add self.
5747         * modules/getlogin_r (Depends-on): Add extensions.
5748
5749 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5750
5751         * modules/clock-time: New module.
5752         * modules/nanosleep (Depends-on): Add clock-time.
5753         * modules/gethrxtime (Depends-on): Likewise.
5754         * modules/gettime (Depends-on): Likewise.
5755         * modules/settime (Depends-on): Likewise.
5756
5757         * modules/fts-lgpl: Depend on openat.
5758         * modules/mkancesdirs: Depend on savewd.
5759         * modules/mkdir-p: Likewise.
5760
5761 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5762
5763         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
5764
5765         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
5766         `gl_have_arbitrary_file_name_length_limit' to
5767         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
5768         actually works between configure runs.
5769
5770 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5771             Bruno Haible  <bruno@clisp.org>
5772
5773         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
5774
5775 2006-09-25  Jim Meyering  <jim@meyering.net>
5776
5777         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
5778         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
5779
5780 2006-09-25  Eric Blake  <ebb9@byu.net>
5781
5782         * gnulib-tool (func_import, func_create_testdir): Fix typos in
5783         exec's in 2006-09-18 patch when shuffling fds.
5784
5785 2006-09-25  Bruno Haible  <bruno@clisp.org>
5786
5787         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
5788         Reported by Jim Meyering.
5789
5790 2006-09-24  Jim Meyering  <jim@meyering.net>
5791
5792         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
5793         compare a pointer against a literal "0".  That caused failures with
5794         at least HP-UX's hpcc.
5795
5796 2006-09-22  Simon Josefsson  <jas@extundo.com>
5797
5798         * modules/gc-sha1:
5799         * modules/gc-md4:
5800         * modules/gc-hmac-sha1:
5801         * modules/gc-hmac-md5:
5802         * modules/gc-des:
5803         * modules/gc-arcfour: Distribute more files.
5804
5805 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5806
5807         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
5808         (gl_linked_iterator_from_to): Initialize struct completely.
5809         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
5810         (gl_tree_iterator_from_to): Likewise
5811         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
5812         * lib/gl_array_list.c [lint] (gl_array_iterator)
5813         (gl_array_iterator_from_to): Likewise.
5814         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
5815         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
5816         (gl_carray_iterator_from_to): Likewise.
5817
5818         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
5819         * lib/md4.c (md4_process_block): Remove unused variable.
5820         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
5821         parentheses for clarity.
5822
5823 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5824
5825         * modules/bison-i18n (Depends-on): Add gettext.
5826
5827 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5828
5829         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
5830         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
5831         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
5832         also add missing comma that caused broken test.
5833         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
5834         stdlib.h, for `abort'.
5835         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
5836         variables.
5837         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
5838         include unistd.h if present, for `rmdir'.
5839         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
5840         variables.
5841         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
5842         in the process include standard headers for prototypes.
5843         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
5844         gets declared on GNU/Linux.
5845         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
5846         unistd.h, for `rmdir'.
5847         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
5848
5849         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
5850         always true.
5851         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
5852
5853         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
5854
5855 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5856
5857         * gnulib-tool (func_version): Create output all at once.  This
5858         may help avoid triggering unnecessary SIGPIPEs, and at any
5859         rate it doesn't hurt.
5860
5861 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5862             Bruno Haible  <bruno@clisp.org>
5863
5864         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
5865         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
5866         * m4/signed.m4 (bh_C_SIGNED): Likewise.
5867
5868         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
5869         (gl_FUNC_VASPRINTF): Invoke it.
5870
5871 2006-09-22  Bruno Haible  <bruno@clisp.org>
5872
5873         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
5874         getloadavg.c as first argument.
5875
5876 2006-09-22  Bruno Haible  <bruno@clisp.org>
5877
5878         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
5879         at the beginning of the gl_INIT macro.
5880         * modules/getloadavg (configure.ac): Pass $gl_source_base to
5881         gl_GETLOADAVG.
5882
5883 2006-09-22  Bruno Haible  <bruno@clisp.org>
5884
5885         * gnulib-tool (func_create_megatestdir): Don't include the config-h
5886         module.
5887         Suggested by Ralf Wildenhues.
5888
5889 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
5890
5891         Import this patch from libc:
5892
5893         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
5894
5895         * lib/regex_internal.c (re_string_reconstruct): Handle
5896         offset < pstr->valid_raw_len && pstr->offsets_needed case.
5897         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
5898         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
5899         re_string_context_at.
5900
5901         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
5902         now requires it.
5903         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
5904         gl_REGEX now does it for us.
5905         (gl_REGEX): Add test taken from
5906         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
5907
5908         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
5909         Check that large offsets work.  Modernize Autoconf usages.
5910         Prefer "yes" to mean a good thing rather than a bad.
5911         Don't put "#define mkstemp" in config.h, as this might interfere
5912         with standard system headers that "#define mkstemp mkstemp64".
5913
5914         * modules/mkstemp (Depends-on): Add extensions, so that
5915         mkstemp is visible on some platforms.
5916         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
5917         (Include): Change to "mkstemp.h" from <stdlib.h>.
5918         (Files): Add mkstemp.h.
5919
5920         * lib/mkstemp.h: New file, since some standard headers
5921         #define mkstemp.
5922         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
5923         Include "mkstemp.h".
5924         Make the _LIBC code resemble glibc original more,
5925         e.g., use K&R style.
5926         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
5927         (mkstemp): Remove, since mkstemp.h does this for us.
5928         * lib/stdlib--.h: Include mkstemp.h.
5929
5930         Import this patch from libc:
5931
5932         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
5933
5934         * lib/tempname.c (__gen_tempname): Change attempts_min
5935         into a macro.  Use preprocessor to decide how to initialize
5936         attempts [Coverity CID 67].
5937
5938 2006-09-20  Bruno Haible  <bruno@clisp.org>
5939
5940         * lib/mkdtemp.c: Import from libc.
5941         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
5942                 * sysdeps/posix/tempname.c (__gen_tempname): Change
5943                 attempts_min into a macro.  Use preprocessor to decide how to
5944                 initialize attempts [Coverity CID 67].
5945         2001-11-27  Paul Eggert  <eggert@twinsun.com>
5946                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
5947                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
5948
5949 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5950
5951         * gnulib-tool (func_exit): New function, to allow to pass the
5952         exit status portably through the trap.  Use everywhere.
5953         (--help, --version): Signal a write error.
5954         (trap): catch SIGPIPE, for write errors.
5955         Exit at the end of the trap, with the correct exit status.
5956
5957 2006-09-19  Karl Berry  <karl@gnu.org>
5958
5959         * doc/gnulib.texi: note about the license texinfo files.
5960
5961 2006-09-19  Eric Blake  <ebb9@byu.net>
5962
5963         * gnulib-tool: Avoid space-tab.
5964
5965 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
5966
5967         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
5968         that prevented coreutils 6.1 from building.  Problem reported
5969         by Petter Reinholdtsen.
5970
5971 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
5972
5973         * gnulib-tool (avoidlist): Fix typo that broke options like
5974         --avoid=lock that are used by coreutils bootstrap.
5975
5976 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
5977
5978         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
5979         more systematically.
5980
5981 2006-09-18  Jim Meyering  <jim@meyering.net>
5982
5983         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
5984
5985 2006-09-18  Bruno Haible  <bruno@clisp.org>
5986
5987         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
5988
5989 2006-09-18  Bruno Haible  <bruno@clisp.org>
5990
5991         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
5992         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
5993         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
5994         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
5995         * m4/gettext.m4: Require autoconf >= 2.52.
5996         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
5997         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
5998         of gl_cv_header_inttypes_h.
5999
6000 2006-09-18  Bruno Haible  <bruno@clisp.org>
6001
6002         * lib/javaversion.c: Include configmake.h.
6003
6004 2006-09-18  Bruno Haible  <bruno@clisp.org>
6005
6006         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
6007         avoid that the while loops be executed in a subshell.
6008
6009 2006-09-18  Bruno Haible  <bruno@clisp.org>
6010
6011         * MODULES.html.sh (func_module): Break long lines.
6012         Suggested by Bruce Korb <bkorb@gnu.org>.
6013
6014 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6015
6016         Speed up by a factor of 1.12.
6017         * gnulib-tool (nl): New variable.
6018         (func_import): Rewrite include directive extraction to only read each
6019         directive once.
6020
6021 2006-09-17  Bruno Haible  <bruno@clisp.org>
6022
6023         * modules/javaversion (Makefile.am): Remove DEFS setting.
6024         (Depends-on): Add configmake, for PKGDATADIR definition.
6025
6026 2006-09-17  Bruno Haible  <bruno@clisp.org>
6027
6028         * gnulib-tool (func_create_testdir): Rewrite all files at once.
6029
6030 2006-09-17  Bruno Haible  <bruno@clisp.org>
6031
6032         * gnulib-tool (func_append): New function, stolen from libtool.m4.
6033         (func_modules_transitive_closure, func_modules_add_dummy,
6034         func_modules_to_filelist, func_import, func_create_testdir,
6035         func_create_megatestdir, ...): Use it wherever possible.
6036         Suggested by Ralf Wildenhues.
6037
6038 2006-09-16  Karl Berry  <karl@gnu.org>
6039
6040         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
6041         to avoid sectioning errors.
6042         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
6043         [ifinfo]: blank line after @center-ed titles.
6044         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
6045         Spell FSF address consistently with others.
6046         (These changes approved by rms.)
6047
6048 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6049
6050         Speed up by a factor of 1.61.
6051         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
6052         already checked module names again.
6053
6054 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6055
6056         Speed up by a factor of 1.13.
6057         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
6058         for new_files, and the input to func_add_or_update.
6059
6060 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6061
6062         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
6063         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
6064
6065 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
6066
6067         * modules/mkancesdirs (Depends-on): Add fcntl.
6068         * modules/savewd: New file.
6069         * MODULES.html.sh (File system functions): Add savewd.
6070
6071         * modules/configmake (Makefile.am): Add support for the
6072         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
6073
6074 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
6075
6076         * m4/savewd.m4: New file.
6077
6078 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
6079
6080         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
6081         (dirchownmod): New arg FD.  All callers changed.
6082         Use FD rather than opening the directory ourself, as opening is
6083         now the caller's responsibility.
6084         * lib/dirchownmod.h: Likewise.
6085         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
6086         hosts that require <sys/types.h> before <sys/stat.h>.  Include
6087         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
6088         (test_dir): Remove.
6089         (mkancesdirs): Return length of prefix of FILE that has already
6090         been made, or -2 if there is a child doing the work.  Redo
6091         algorithm so that it is O(N) rather than O(N**2).  Optimize away
6092         ".", and treat ".." specially since it might stray back into
6093         already-created areas.  Use a subprocess if necessary.  New arg
6094         WD; all users changed.  MAKE_DIR function should now return 1
6095         if it creates a directory that is not readable.  Return -2 if
6096         a child process is spun off.
6097         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
6098         Adjust signature to match code.
6099         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
6100         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
6101         all users changed.
6102         * lib/savewd.c, lib/savewd.h: New files.
6103
6104 2006-09-15  Jim Meyering  <jim@meyering.net>
6105
6106         * modules/rename-dest-slash: New module.
6107         * MODULES.html.sh (posix_compat): Add it here.
6108
6109         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
6110
6111 2006-09-15  Jim Meyering  <jim@meyering.net>
6112
6113         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
6114         file.
6115
6116         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
6117
6118 2006-09-15  Jim Meyering  <jim@meyering.net>
6119
6120         * lib/rename-dest-slash.c (has_trailing_slash): Use
6121         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
6122         (rpl_rename_dest_slash): Perform the cheaper trailing slash
6123         test before testing whether SRC is a directory.
6124         Suggestions from Bruno Haible.
6125
6126         Avoid a warning about an unused variable.
6127         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
6128         into the #ifdef block where it's used.
6129
6130         * lib/rename-dest-slash.c: New file.
6131
6132 2006-09-14  Bruno Haible  <bruno@clisp.org>
6133
6134         * lib/allocsa.c: Include <config.h> unconditionally.
6135         * lib/asnprintf.c: Likewise.
6136         * lib/asprintf.c: Likewise.
6137         * lib/c-strcasecmp.c: Likewise.
6138         * lib/c-strcasestr.c: Likewise.
6139         * lib/c-strncasecmp.c: Likewise.
6140         * lib/c-strstr.c: Likewise.
6141         * lib/classpath.c: Likewise.
6142         * lib/clean-temp.c: Likewise.
6143         * lib/concatpath.c: Likewise.
6144         * lib/copy-file.c: Likewise.
6145         * lib/csharpcomp.c: Likewise.
6146         * lib/csharpexec.c: Likewise.
6147         * lib/execute.c: Likewise.
6148         * lib/fatal-signal.c: Likewise.
6149         * lib/findprog.c: Likewise.
6150         * lib/fwriteerror.c: Likewise.
6151         * lib/gl_array_list.c: Likewise.
6152         * lib/gl_array_oset.c: Likewise.
6153         * lib/gl_avltree_list.c: Likewise.
6154         * lib/gl_avltree_oset.c: Likewise.
6155         * lib/gl_avltreehash_list.c: Likewise.
6156         * lib/gl_carray_list.c: Likewise.
6157         * lib/gl_linked_list.c: Likewise.
6158         * lib/gl_linkedhash_list.c: Likewise.
6159         * lib/gl_list.c: Likewise.
6160         * lib/gl_oset.c: Likewise.
6161         * lib/gl_rbtree_list.c: Likewise.
6162         * lib/gl_rbtree_oset.c: Likewise.
6163         * lib/gl_rbtreehash_list.c: Likewise.
6164         * lib/imaxabs.c: Likewise.
6165         * lib/imaxdiv.c: Likewise.
6166         * lib/javacomp.c: Likewise.
6167         * lib/javaexec.c: Likewise.
6168         * lib/javaversion.c: Likewise.
6169         * lib/linebreak.c: Likewise.
6170         * lib/localcharset.c: Likewise.
6171         * lib/lock.c: Likewise.
6172         * lib/mbchar.c: Likewise.
6173         * lib/mbswidth.c: Likewise.
6174         * lib/mkdtemp.c: Likewise.
6175         * lib/pipe.c: Likewise.
6176         * lib/printf-args.c: Likewise.
6177         * lib/printf-parse.c: Likewise.
6178         * lib/progname.c: Likewise.
6179         * lib/progreloc.c: Likewise.
6180         * lib/readlink.c: Likewise.
6181         * lib/sh-quote.c: Likewise.
6182         * lib/stpcpy.c: Likewise.
6183         * lib/stpncpy.c: Likewise.
6184         * lib/strcasecmp.c: Likewise.
6185         * lib/strcasestr.c: Likewise.
6186         * lib/strcspn.c: Likewise.
6187         * lib/striconv.c: Likewise.
6188         * lib/strncasecmp.c: Likewise.
6189         * lib/strnlen1.c: Likewise.
6190         * lib/strstr.c: Likewise.
6191         * lib/strtok_r.c: Likewise.
6192         * lib/tls.c: Likewise.
6193         * lib/tmpdir.c: Likewise.
6194         * lib/unicodeio.c: Likewise.
6195         * lib/unsetenv.c: Likewise.
6196         * lib/vasnprintf.c: Likewise.
6197         * lib/vasprintf.c: Likewise.
6198         * lib/wait-process.c: Likewise.
6199         * lib/xallocsa.c: Likewise.
6200         * lib/xsetenv.c: Likewise.
6201         * lib/xstriconv.c: Likewise.
6202
6203 2006-09-13  Simon Josefsson  <jas@extundo.com>
6204
6205         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
6206         that internally, suggested by Ralf Wildenhues
6207         <Ralf.Wildenhues@gmx.de>.
6208
6209 2006-09-13  Simon Josefsson  <jas@extundo.com>
6210
6211         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
6212         @LIBOBJS@.
6213         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6214
6215 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
6216
6217         * lib/_fpending.c: Include <config.h> unconditionally, since we no
6218         longer worry about uses that don't define HAVE_CONFIG_H.
6219         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
6220         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
6221         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
6222         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
6223         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
6224         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
6225         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
6226         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
6227         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
6228         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
6229         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
6230         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
6231         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
6232         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
6233         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
6234         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
6235         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
6236         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
6237         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
6238         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
6239         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
6240         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
6241         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
6242         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
6243         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
6244         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
6245         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
6246         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
6247         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
6248         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
6249         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
6250         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
6251         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
6252         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
6253         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
6254         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
6255         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
6256         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
6257         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
6258         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
6259         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
6260         Likewise.
6261
6262 2006-09-13  Eric Blake  <ebb9@byu.net>
6263
6264         * lib/getopt.c: Fix typo in last commit.
6265
6266 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
6267
6268         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
6269         dgettext.
6270
6271 2006-09-12  Jim Meyering  <jim@meyering.net>
6272
6273         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
6274         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
6275         Reported by Nelson H. F. Beebe.
6276
6277 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
6278
6279         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
6280         program_invocation_name and program_invocation_short_name are
6281         initialized.
6282         * lib/argp-namefrob.h: Move declarations of program_invocation_name
6283         and program_invocation_short_name to argp.h, so they are visible
6284         to user programs.
6285         * lib/argp.h: Likewise
6286
6287 2006-09-10  Bruno Haible  <bruno@clisp.org>
6288
6289         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
6290         m4/inttypes_h.m4, m4/uintmax_t.m4.
6291
6292 2006-09-10  Bruno Haible  <bruno@clisp.org>
6293
6294         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
6295         gl_AC_TYPE_UINTMAX_T.
6296
6297 2006-09-10  Bruno Haible  <bruno@clisp.org>
6298
6299         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
6300
6301 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
6302
6303         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
6304         convention.  Text proposed by Bruno Haible.
6305         (struct argp_option): Document the use of N_() wrappers.
6306
6307         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
6308         '\v', and translate the two parts separately, instead of feeding
6309         the whole string to gettext.  This allows to exclude
6310         '\v' from the strings visible to the translator by writing doc
6311         strings as N_("..") "\v" N_("..").
6312
6313 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
6314
6315         * config/srclist.txt: Undo latest change; the bug was fixed.
6316
6317 2006-09-09  Bruno Haible  <bruno@clisp.org>
6318
6319         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
6320         assignments if building a library without libtool.
6321         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
6322         in func_emit_lib_Makefile_am.
6323         (func_import): When building a static library libfoo.a, arrange to
6324         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
6325         (func_create_testdir): Likewise.
6326         * modules/gc (configure.ac, Makefile.am): If building statically,
6327         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
6328         * modules/iconvme (configure.ac, Makefile.am): Likewise.
6329         * modules/striconv (configure.ac, Makefile.am): Likewise.
6330         Based on a suggestion by Ralf Wildenhues.
6331
6332 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
6333
6334         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
6335         Check for unistd.h too, since Autoconf doesn't assume POSIX.
6336         Also:
6337
6338         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
6339         Add year_2050_test to catch glibc bug 2821
6340         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
6341
6342         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
6343         Prefer #ifdef to #if.
6344
6345         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
6346         Return from 'main' instead of calling 'exit'.
6347
6348 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
6349
6350         * lib/mktime.c (guess_time_tm): Fix bug where mktime
6351         returned the maximum time_t value rather than (time_t) -1.
6352         Problem originally reported by William Bardwell
6353         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
6354
6355         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
6356         Moved to here ...
6357         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
6358         ... from here.
6359
6360 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
6361
6362         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
6363         2821 is fixed.
6364
6365 2006-09-08  Jim Meyering  <jim@meyering.net>
6366
6367         Don't make generated files read-only.  That would bother too many
6368         people.  However, do retain the ability to work when targets are
6369         read-only: remove the destination and temporary files before writing
6370         them (when generated via sed or echo), or by using the -f option for
6371         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
6372         * modules/alloca-opt, modules/argz, modules/arpa_inet:
6373         * modules/byteswap, modules/configmake, modules/fcntl:
6374         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
6375         * modules/localcharset, modules/netinet_in, modules/poll:
6376         * modules/stdbool, modules/stdint, modules/sys_select:
6377         * modules/sys_socket, modules/sys_stat, modules/sysexits:
6378
6379 2006-09-08  Jim Meyering  <jim@meyering.net>
6380
6381         Avoid new build failure on FreeBSD 6.0.
6382         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
6383         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
6384         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
6385
6386 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6387
6388         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
6389
6390 2006-09-07  Jim Meyering  <jim@meyering.net>
6391
6392         Fix global typo in last change: use chmod u-w, not chmod u-x.
6393         Spotted by Paul Eggert and Bruce Korb.
6394         * modules/alloca-opt, modules/argz, modules/arpa_inet:
6395         * modules/byteswap, modules/configmake, modules/fcntl:
6396         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
6397         * modules/localcharset, modules/netinet_in, modules/poll:
6398         * modules/stdbool, modules/stdint, modules/sys_select:
6399         * modules/sys_socket, modules/sys_stat, modules/sysexits:
6400
6401 2006-09-06  Jim Meyering  <jim@meyering.net>
6402
6403         Make generated files be read-only.
6404         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
6405         Ensure that each generated file is now read-only.
6406         * modules/argz: Likewise.
6407         * modules/arpa_inet: Likewise.
6408         * modules/byteswap: Likewise.
6409         * modules/configmake: Likewise.
6410         * modules/fcntl: Likewise.
6411         * modules/fnmatch: Likewise.
6412         * modules/getopt: Likewise.
6413         * modules/glob: Likewise.
6414         * modules/inttypes: Likewise.
6415         * modules/netinet_in: Likewise.
6416         * modules/poll: Likewise.
6417         * modules/stdbool: Likewise.
6418         * modules/stdint: Likewise.
6419         * modules/sys_select: Likewise.
6420         * modules/sys_socket: Likewise.
6421         * modules/sys_stat: Likewise.
6422         * modules/sysexits: Likewise.
6423         * modules/localcharset: Same as above, but continue using temporary
6424         file named "t-$@" (why different?) rather than the "$@-t" used
6425         everywhere else.
6426
6427         * modules/sysexits (Makefile.am): Replace literal occurrences
6428         of "sysexit.h" more readable, and more consistent, "$@".
6429
6430 2006-09-06  Bruno Haible  <bruno@clisp.org>
6431
6432         * modules/striconv: New file.
6433         * modules/xstriconv: New file.
6434         * MODULES.html.sh (Internationalization functions): Add striconv,
6435         xstriconv.
6436
6437 2006-09-06  Bruno Haible  <bruno@clisp.org>
6438
6439         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
6440         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
6441         not using libtool correctly.
6442
6443 2006-09-06  Bruno Haible  <bruno@clisp.org>
6444
6445         * lib/striconv.h: New file.
6446         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
6447         iconvstring.c.
6448         * lib/xstriconv.h: New file.
6449         * lib/xstriconv.c: New file.
6450
6451 2006-09-06  Bruno Haible  <bruno@clisp.org>
6452
6453         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
6454         lib_..._LDFLAGS.
6455
6456 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6457
6458         * lib/argz_.h: Sync from Libtool.
6459
6460         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
6461                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6462
6463         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
6464
6465 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
6466
6467         * modules/trim: New file.
6468
6469 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
6470
6471         * lib/trim.h: New file.
6472         * lib/trim.c: New file.
6473
6474 2006-09-05  Bruno Haible  <bruno@clisp.org>
6475
6476         * MODULES.html.sh (String handling): Add trim.
6477
6478 2006-09-04  Karl Berry  <karl@gnu.org>
6479
6480         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
6481         until next release.
6482
6483 2006-09-03  Bruno Haible  <bruno@clisp.org>
6484
6485         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
6486         correctly.
6487
6488 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
6489
6490         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
6491         not gl_GETLOADAVG.  Omit unneeded semicolons.
6492         Problems reported by Ralf Wildenhues in
6493         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
6494         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
6495         at the end, which is the usual gnulib style.
6496
6497         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
6498         of doing all the work ourselves.
6499         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
6500         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
6501
6502 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
6503
6504         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
6505         Problem reported by Ralf Wildenhues in
6506         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
6507
6508         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
6509         HAVE_STRUCT_STATFS_F_FSTYPENAME.
6510
6511 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
6512
6513         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
6514         yesterday's patch by changing test -n to test -z.
6515
6516 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
6517
6518         * modules/getloadavg (Files): Add m4/getloadavg.m4.
6519         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
6520         the former is now obsolescent.
6521
6522         * modules/chdir-long (Depends-on): Add fcntl.
6523
6524 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
6525
6526         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
6527         obsolescent, and programs should use gnulib instead.
6528         * m4/getloadavg.m4: New file, with contents taken from Autoconf
6529         but with prefixes changed.
6530
6531 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
6532
6533         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
6534         or stdbool.h, because they might not exist while configuring.
6535
6536         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
6537         Don't include unistd.h or limits.h; not needed, since chdir-long.h
6538         does that for us.
6539         (O_DIRECTORY): Remove.
6540
6541 2006-08-31  Eric Blake  <ebb9@byu.net>
6542
6543         * gnulib-tool: Don't let emacs change spaces to TAB.
6544
6545 2006-08-31  Bruno Haible  <bruno@clisp.org>
6546
6547         * gnulib-tool: When calling func_import more than once, do it in a
6548         subshell.
6549         Reported by Eric Blake <ebb9@byu.net>.
6550
6551 2006-08-31  Bruno Haible  <bruno@clisp.org>
6552
6553         * gnulib-tool (nl): Remove variable.
6554         (sed_transform_lib_file): Use more robust test for config-h module.
6555         (func_import): Fix typo in 2006-08-25 patch.
6556
6557 2006-08-31  Bruno Haible  <bruno@clisp.org>
6558
6559         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
6560         specified, augment Makefile.am variables instead of assigning them.
6561
6562 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
6563
6564         Work around a bug in both the Linux and SunOS 64-bit kernels:
6565         nanosleep mishandles sleeps for longer than 2**31 seconds.
6566         Problem reported by Frank v Waveren in
6567         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
6568         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
6569         Check for nanosleep bug.
6570         (LIB_NANOSLEEP): Append clock_gettime library if needed.
6571
6572 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
6573
6574         Work around a bug in both the Linux and SunOS 64-bit kernels:
6575         nanosleep mishandles sleeps for longer than 2**31 seconds.
6576         Problem reported by Frank v Waveren in
6577         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
6578         * lib/nanosleep.c (BILLION): New constant.
6579         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
6580         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
6581         implementation.
6582
6583 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
6584
6585         * modules/nanosleep (Depends-on): Add gettime.
6586
6587 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
6588         and Simon Josefsson  <jas@extundo.com>
6589         and Oskar Liljeblad  <oskar@osk.mine.nu>
6590
6591         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
6592         * gnulib-tool (func_import): New license type 'unmodifiable license
6593         text'.
6594         * modules/fdl: Use it.  Longer description.
6595         * module/gpl, module/lgpl: New files.
6596
6597 2006-08-30  Jim Meyering  <jim@meyering.net>
6598
6599         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
6600         shadowing the parameter.
6601
6602 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6603
6604         Sync from Libtool:
6605
6606         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6607
6608         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
6609         sharing with gnulib.  Report by Eric Blake.
6610
6611 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
6612
6613         * modules/isapipe: New file.
6614         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
6615
6616 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
6617
6618         * modules/configmake (Makefile.am): Add a comment, and omit
6619         the CONFIGMAKE_ prefix from generated macro names.  Suggested
6620         by Bruno Haible.
6621
6622 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
6623
6624         * m4/isapipe.m4: New file.
6625
6626 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
6627
6628         * lib/isapipe.c, lib/isapipe.h: New files.
6629
6630 2006-08-29  Jim Meyering  <jim@meyering.net>
6631
6632         * modules/configmake (Makefile.am): Make configmake.h depend on
6633         Makefile.  Otherwise, a stale configmake.h could hang around.
6634
6635 2006-08-29  Eric Blake  <ebb9@byu.net>
6636
6637         * lib/error.c (error_at_line, print_errno_message): Match libc, after
6638         resolution of upstream bug 3044.
6639
6640 2006-08-29  Bruno Haible  <bruno@clisp.org>
6641
6642         * modules/localcharset (Depends-on): Add configmake.
6643         (Makefile.am): Remove setting of LIBDIR through DEFS.
6644
6645 2006-08-29  Bruno Haible  <bruno@clisp.org>
6646
6647         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
6648         defined.
6649
6650 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
6651
6652         * modules/fcntl: New file.
6653         * modules/chdir-safer (Depends-on): Add fcntl.
6654         * modules/fts: Likewise.
6655         * modules/mkdir-p: Likewise.
6656
6657         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
6658         This undoes the most recent change, since we're now addressing the
6659         problem in a different way.
6660
6661         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
6662         into output, since the output might be called Makefile.am even
6663         if $makefile_name is something different.
6664         (func_import): Use $makefile_am rather than
6665         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
6666         empty.
6667
6668         * modules/inttypes (Files): Add m4/inttypes-h.m4.
6669
6670 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
6671
6672         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
6673         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
6674         recent change to stdint.m4, since we're now addressing the problem in a
6675         different way.
6676
6677 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
6678
6679         * m4/fcntl_h.m4: New file.
6680
6681 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
6682
6683         * lib/fcntl_.h: New file.
6684         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
6685         the fcntl module.
6686         * lib/dirchownmod.c: Likewise.
6687         * lib/fts.c: Likewise.
6688
6689         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
6690         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
6691         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
6692         just before including <inttypes.h>, to avoid circular inclusion.
6693
6694 2006-08-28  Jim Meyering  <jim@meyering.net>
6695
6696         * doc/visibility.texi: Actually read and correct the grammar of the
6697         sentence affected by yesterday's change.
6698
6699 2006-08-28  Eric Blake  <ebb9@byu.net>
6700
6701         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
6702         needs wrapper.
6703
6704 2006-08-28  Eric Blake  <ebb9@byu.net>
6705
6706         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
6707
6708 2006-08-28  Eric Blake  <ebb9@byu.net>
6709
6710         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
6711
6712 2006-08-28  Bruno Haible  <bruno@clisp.org>
6713
6714         * modules/c-strstr: New file, from GNU gettext.
6715         * MODULES.html.sh (String handling): Add c-strstr.
6716
6717 2006-08-28  Bruno Haible  <bruno@clisp.org>
6718
6719         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
6720         macros.
6721         Reported by Eric Blake.
6722
6723 2006-08-28  Bruno Haible  <bruno@clisp.org>
6724
6725         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
6726         (VASNPRINTF): Return a string of length > INT_MAX without failing.
6727         * lib/vasprintf.c: Include errno.h, limits.h.
6728         (EOVERFLOW): New fallback definition.
6729         (vasprintf): Test here whether the string length is > INT_MAX.
6730         * lib/vsnprintf.c: Include errno.h, limits.h.
6731         (EOVERFLOW): New fallback definition.
6732         (vsnprintf): Fix bug when generated string was too long for the buffer.
6733         Test here whether the string length is > INT_MAX.
6734
6735 2006-08-28  Bruno Haible  <bruno@clisp.org>
6736
6737         * lib/inttypes_.h (SCNX*): Remove definitions.
6738         Reported by Eric Blake.
6739
6740 2006-08-28  Bruno Haible  <bruno@clisp.org>
6741
6742         * lib/c-strstr.h: New file, from GNU gettext.
6743         * lib/c-strstr.c: New file, from GNU gettext.
6744
6745 2006-08-28  Bruno Haible  <bruno@clisp.org>
6746
6747         * gnulib-tool: Reorder some statements.
6748
6749 2006-08-28  Bruno Haible  <bruno@clisp.org>
6750
6751         * gnulib-tool: New option --makefile-name.
6752         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
6753         $makefile_name.
6754         (func_import): Write $makefile_name to the cache file, and read it from
6755         there unless explicitly specified. Use $makefile_name as file name
6756         instead of Makefile.am. Adjust the recommendations accordingly.
6757
6758 2006-08-28  Bruno Haible  <bruno@clisp.org>
6759
6760         * gnulib-tool (func_verify_module): Check against misapplying patch.
6761
6762 2006-08-28  Bruno Haible  <bruno@clisp.org>
6763
6764         * gnulib-tool (func_relativize, func_relconcat): New functions.
6765         Give an error if --local-dir is given with --update.
6766         Remove trailing slashes from $local_gnulib_dir.
6767         (func_import): Store the relativized $local_gnulib_dir in
6768         gnulib-cache.m4, and read it from there if not specified explicitly.
6769
6770 2006-08-28  Bruno Haible  <bruno@clisp.org>
6771
6772         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
6773         is the current directory. Respect also $local_gnulib_dir.
6774
6775 2006-08-28  Bruno Haible  <bruno@clisp.org>
6776             Simon Josefsson  <jas@extundo.com>
6777
6778         BeOS portability.
6779         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
6780
6781 2006-08-27  Jim Meyering  <jim@meyering.net>
6782
6783         * doc/visibility.texi: Remove duplicate word: "pointer".
6784
6785 2006-08-26  Bruno Haible  <bruno@clisp.org>
6786
6787         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
6788         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
6789         (Makefile.am): Create inttypes.h from inttypes_.h.
6790         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
6791
6792         * modules/imaxabs: New file.
6793
6794         * modules/imaxdiv: New file.
6795
6796 2006-08-26  Bruno Haible  <bruno@clisp.org>
6797
6798         * m4/inttypes.m4: New file.
6799         * m4/_inttypes_h.m4: Remove file.
6800         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
6801         PRI_MACROS_BROKEN.
6802         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
6803
6804         * m4/imaxabs.m4: New file.
6805
6806         * m4/imaxdiv.m4: New file.
6807
6808 2006-08-26  Bruno Haible  <bruno@clisp.org>
6809
6810         * lib/inttypes_.h: New file.
6811         * lib/inttypes.h: Remove file.
6812         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
6813
6814         * lib/imaxabs.c: New file.
6815
6816         * lib/imaxdiv.c: New file.
6817
6818 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
6819
6820         New config-h module, so that "make" output needn't be cluttered
6821         by -DHAVE_CONFIG_H.
6822         * MODULES.html.sh (Support for building libraries and executables):
6823         Add config-h.
6824         * modules/config-h: New file.
6825         * gnulib-tool (nl, sed_transform_lib_file): New vars.
6826         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
6827         the config-h module is used.
6828
6829         New configmake module, so that "make" output needn't be cluttered
6830         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
6831         * MODULES.html.sh (Support for building libraries and executables):
6832         Add configmake.
6833         * modules/configmake: New file.
6834
6835 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
6836
6837         * m4/config-h.m4: New file.
6838
6839 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
6840
6841         * config/srclist.txt: Add elisp-comp.
6842
6843 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
6844
6845         * MODULES.html.sh (Support for building libraries and executables):
6846         Add elisp-comp.
6847         * build-aux/elisp-comp: New file.
6848         * modules/elisp-comp: New file.
6849
6850 2006-08-24  Bruno Haible  <bruno@clisp.org>
6851
6852         * gnulib-tool (func_create_testdir): Use non-default values of
6853         sourcebase and m4base.
6854
6855 2006-08-24  Bruno Haible  <bruno@clisp.org>
6856
6857         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
6858         HTML structure.
6859
6860 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
6861
6862         * modules/openat (Depends-on): Add lchown.
6863
6864 2006-08-23  Bruno Haible  <bruno@clisp.org>
6865
6866         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
6867         of gl_LOCK_EARLY instead of gl_LOCK.
6868
6869 2006-08-23  Bruno Haible  <bruno@clisp.org>
6870
6871         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
6872         on OSF/1 to no.
6873         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
6874
6875 2006-08-23  Bruno Haible  <bruno@clisp.org>
6876
6877         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
6878         as unusable.
6879
6880         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
6881         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
6882         (gl_LOCK): New macro.
6883
6884 2006-08-22  Simon Josefsson  <jas@extundo.com>
6885
6886         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
6887         to md5 module.
6888
6889 2006-08-22  Simon Josefsson  <jas@extundo.com>
6890
6891         * MODULES.html.sh: Add "Support for maintaining and release
6892         projects".
6893
6894         * build-aux/gnupload: New file, from coreutils.
6895
6896 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
6897
6898         Avoid the need for AC_LIBSOURCES in m4 macros.
6899         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
6900         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
6901         * modules/check-version (EXTRA_DIST): Add check-version.h.
6902         * modules/crc (EXTRA_DIST): Add crc.h.
6903         * modules/des (EXTRA_DIST): Add des.h.
6904         * modules/gc (EXTRA_DIST): Add gc.h.
6905         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
6906         * modules/getline (EXTRA_DIST): Add getline.h.
6907         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
6908         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
6909         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
6910         * modules/md2 (EXTRA_DIST): Add md2.h.
6911         * modules/md4 (EXTRA_DIST): Add md4.h.
6912         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
6913         * modules/read-file (EXTRA_DIST): Add read-file.h.
6914         * modules/readline (EXTRA_DIST): Add readline.h.
6915         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
6916         rijndael-api-fst.h.
6917
6918 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
6919
6920         * m4/rijndael.m4 (gl_ARCFOUR):
6921         * m4/arctwo.m4 (gl_ARCTWO):
6922         * m4/check-version.m4 (gl_CHECK_VERSION):
6923         * m4/crc.m4 (gl_CRC):
6924         * m4/des.m4 (gl_DES):
6925         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
6926         * m4/gc.m4 (gl_GC):
6927         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
6928         * m4/getline.m4 (gl_FUNC_GETLINE):
6929         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
6930         * m4/hmac-md5.m4 (gl_HMAC_MD5):
6931         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
6932         * m4/md2.m4 (gl_MD2):
6933         * m4/md4.m4 (gl_MD4):
6934         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
6935         * m4/read-file.m4 (gl_FUNC_READ_FILE):
6936         * m4/readline.m4 (gl_FUNC_READLINE):
6937         * m4/rijndael.m4 (gl_RIJNDAEL):
6938         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
6939         to get the necessary .h files and whatnot.
6940
6941 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
6942
6943         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
6944         gnulib rather than the other way around.
6945         * config/srclistvars.sh (COREUTILS): Remove.
6946
6947 2006-08-22  Jim Meyering  <jim@meyering.net>
6948
6949         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
6950
6951         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
6952
6953 2006-08-22  Eric Blake  <ebb9@byu.net>
6954
6955         * modules/regexprops-generic: New file.
6956         * MODULES.html.sh (Support for building documentation): List it.
6957
6958 2006-08-22  Eric Blake  <ebb9@byu.net>
6959
6960         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
6961         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
6962         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
6963         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
6964
6965 2006-08-22  Bruno Haible  <bruno@clisp.org>
6966
6967         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
6968         and lib_LTLIBRARIES like the other lib_* variables.
6969
6970 2006-08-22  Bruno Haible  <bruno@clisp.org>
6971
6972         * build-aux/x-to-1.in: New file, from GNU gettext.
6973
6974 2006-08-22  Bruno Haible  <bruno@clisp.org>
6975
6976         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
6977         <utmpx.h> exists.
6978
6979 2006-08-22  Bruno Haible  <bruno@clisp.org>
6980
6981         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
6982         <utmpx.h> exists.
6983
6984 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
6985
6986         BeOS portability.
6987         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
6988         exist.
6989         Problem reported by Bruno Haible.
6990
6991 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
6992
6993         Avoid the need for AC_LIBSOURCES in m4 macros.
6994         * modules/acl (EXTRA_DIST): Add acl.h.
6995         * modules/argmatch (Files): Add m4/argmatch.m4.
6996         (configure.ac): Add gl_ARGMATCH.
6997         (EXTRA_DIST): Renamed from lib_SOURCES, for
6998         consistency with the other modules.  Remove argmatch.c.
6999         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
7000         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
7001         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
7002         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
7003         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
7004         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
7005         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
7006         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
7007         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
7008         * modules/closeout (EXTRA_DIST): Add closeout.h.
7009         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
7010         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
7011         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
7012         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
7013         dirname.h; remove basename.c and stripslash.c.
7014         * modules/exclude (EXTRA_DIST): Add exclude.h.
7015         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
7016         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
7017         * modules/file-type (EXTRA_DIST): Add file-type.h.
7018         * modules/filemode (EXTRA_DIST): Add filemode.h.
7019         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
7020         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
7021         * modules/fpending (EXTRA_DIST): Add __fpending.h.
7022         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
7023         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
7024         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
7025         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
7026         * modules/getdate (EXTRA_DIST): Add getdate.c.
7027         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
7028         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
7029         * modules/getpass (EXTRA_DIST): Add getpass.h.
7030         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
7031         * modules/group-member (EXTRA_DIST): Add group-member.h.
7032         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
7033         * modules/hash (EXTRA_DIST): Add hash.h.
7034         * modules/human (EXTRA_DIST): Add human.h.
7035         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
7036         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
7037         * modules/lchown (EXTRA_DIST): Add lchown.h.
7038         * modules/long-options (EXTRA_DIST): Add long-options.h.
7039         * modules/lstat (EXTRA_DIST): Add lstat.h.
7040         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
7041         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
7042         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
7043         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
7044         * modules/memxor (EXTRA_DIST): Add memxor.h.
7045         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
7046         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
7047         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
7048         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
7049         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
7050         * modules/physmem (EXTRA_DIST): Add physmem.h.
7051         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
7052         * modules/posixver (EXTRA_DIST): Add posixver.h.
7053         * modules/quote (EXTRA_DIST): Add quote.h.
7054         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
7055         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
7056         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
7057         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
7058         regex_internal.h regexec.c.
7059         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
7060         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
7061         * modules/same (EXTRA_DIST): Add same.h.
7062         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
7063         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
7064         * modules/savedir (EXTRA_DIST): Add savedir.h.
7065         * modules/sha1 (EXTRA_DIST): Add sha1.h.
7066         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
7067         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
7068         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
7069         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
7070         * modules/strdup (EXTRA_DIST): Add strdup.h.
7071         * modules/strftime (EXTRA_DIST): Add strftime.h.
7072         * modules/strndup (EXTRA_DIST): Add strndup.h.
7073         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
7074         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
7075         * modules/time_r (EXTRA_DIST): Add time_r.h.
7076         * modules/timespec (EXTRA_DIST): Add timespec.h.
7077         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
7078         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
7079         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
7080         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
7081         * modules/userspec (EXTRA_DIST): Add userspec.h.
7082         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
7083         * modules/utimens (EXTRA_DIST): Add utimens.h.
7084         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
7085         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
7086         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
7087         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
7088         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
7089         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
7090         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
7091         * modules/yesno (EXTRA_DIST): Add yesno.h.
7092
7093 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
7094
7095         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
7096
7097         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
7098         * m4/dev-ino.m4, same-inode.m4: Remove.
7099
7100         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
7101         * m4/acl.m4 (AC_FUNC_ACL):
7102         * m4/backupfile.m4 (gl_BACKUPFILE):
7103         * m4/c-strtod.m4 (gl_C99_STRTOLD):
7104         * m4/canon-host.m4 (gl_CANON_HOST):
7105         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
7106         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
7107         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
7108         * m4/cloexec.m4 (gl_CLOEXEC):
7109         * m4/close-stream.m4 (gl_CLOSE_STREAM):
7110         * m4/closeout.m4 (gl_CLOSEOUT):
7111         * m4/dirfd.m4 (gl_FUNC_DIRFD):
7112         * m4/dirname.m4 (gl_DIRNAME):
7113         * m4/exclude.m4 (gl_EXCLUDE):
7114         * m4/exitfail.m4 (gl_EXITFAIL):
7115         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
7116         * m4/file-type.m4 (gl_FILE_TYPE):
7117         * m4/filemode.m4 (gl_FILEMODE):
7118         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
7119         * m4/fpending.m4 (gl_FUNC_FPENDING):
7120         * m4/fprintftime.m4 (gl_FPRINTFTIME):
7121         * m4/fts.m4 (gl_FUNC_FTS):
7122         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
7123         * m4/getdate.m4 (gl_GETDATE):
7124         * m4/gethrxtime.m4 (gl_GETHRXTIME):
7125         * m4/getpagesize.m4 (gl_GETPAGESIZE):
7126         * m4/getpass.m4 (gl_FUNC_GETPASS):
7127         * m4/gettime.m4 (gl_GETTIME):
7128         * m4/getugroups.m4 (gl_GETUGROUPS):
7129         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
7130         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
7131         * m4/hard-locale.m4 (gl_HARD_LOCALE):
7132         * m4/hash.m4 (gl_HASH):
7133         * m4/idcache.m4 (gl_IDCACHE):
7134         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
7135         * m4/lchown.m4 (gl_FUNC_LCHOWN):
7136         * m4/long-options.m4 (gl_LONG_OPTIONS):
7137         * m4/lstat.m4 (gl_FUNC_LSTAT):
7138         * m4/md5.m4 (gl_MD5):
7139         * m4/memcasecmp.m4 (gl_MEMCASECMP):
7140         * m4/memcoll.m4 (gl_MEMCOLL):
7141         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
7142         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
7143         * m4/memxor.m4 (gl_MEMXOR):
7144         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
7145         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
7146         * m4/modechange.m4 (gl_MODECHANGE):
7147         * m4/mountlist.m4 (gl_MOUNTLIST):
7148         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
7149         * m4/openat.m4 (gl_FUNC_OPENAT):
7150         * m4/pathmax.m4 (gl_PATHMAX):
7151         * m4/physmem.m4 (gl_PHYSMEM):
7152         * m4/posixtm.m4 (gl_POSIXTM):
7153         * m4/posixver.m4 (gl_POSIXVER):
7154         * m4/quote.m4 (gl_QUOTE):
7155         * m4/quotearg.m4 (gl_QUOTEARG):
7156         * m4/readtokens.m4 (gl_READTOKENS):
7157         * m4/readutmp.m4 (gl_READUTMP):
7158         * m4/regex.m4 (gl_REGEX):
7159         * m4/safe-read.m4 (gl_SAFE_READ):
7160         * m4/safe-write.m4 (gl_SAFE_WRITE):
7161         * m4/same.m4 (gl_SAME):
7162         * m4/save-cwd.m4 (gl_SAVE_CWD):
7163         * m4/savedir.m4 (gl_SAVEDIR):
7164         * m4/settime.m4 (gl_SETTIME):
7165         * m4/sha1.m4 (gl_SHA1):
7166         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
7167         * m4/stat-macros.m4 (gl_STAT_MACROS):
7168         * m4/stat-time.m4 (gl_STAT_TIME):
7169         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
7170         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
7171         * m4/strdup.m4 (gl_FUNC_STRDUP):
7172         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
7173         * m4/strndup.m4 (gl_FUNC_STRNDUP):
7174         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
7175         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
7176         * m4/time_r.m4 (gl_TIME_R):
7177         * m4/timespec.m4 (gl_TIMESPEC):
7178         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
7179         * m4/unlinkdir.m4 (gl_UNLINKDIR):
7180         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
7181         * m4/userspec.m4 (gl_USERSPEC):
7182         * m4/utimecmp.m4 (gl_UTIMECMP):
7183         * m4/utimens.m4 (gl_UTIMENS):
7184         * m4/xalloc.m4 (gl_XALLOC):
7185         * m4/xgetcwd.m4 (gl_XGETCWD):
7186         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
7187         * m4/xreadlink.m4 (gl_XREADLINK):
7188         * m4/xstrtod.m4 (gl_XSTRTOD):
7189         * m4/yesno.m4 (gl_YESNO):
7190         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
7191         to get the necessary .h files and whatnot.
7192
7193 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
7194             Bruno Haible  <bruno@clisp.org>
7195
7196         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
7197         /bin/sh understanding of '!' conditional negation.
7198
7199 2006-08-21  Jim Meyering  <jim@meyering.net>
7200
7201         * modules/openat (Depends-on): Really alphabetize.
7202
7203         * modules/acl (Depends-on): Add error and quote.
7204
7205         * check-module (find_included_lib_files): Add at-func.c to the
7206         ok-to-include-more-than-once white list.
7207
7208         * modules/openat (Depends-on): Add lstat.  Alphabetize.
7209
7210 2006-08-21  Bruno Haible  <bruno@clisp.org>
7211
7212         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7213         Emit a pkgdata_DATA variable only if some snippets add contents to it.
7214         Reported by Martin Lambers <marlam@marlam.de>.
7215
7216 2006-08-21  Bruno Haible  <bruno@clisp.org>
7217
7218         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
7219         specify an installation location, don't emit a noinst_LIBRARIES or
7220         noinst_LTLIBRARIES assignment.
7221
7222 2006-08-21  Bruno Haible  <bruno@clisp.org>
7223
7224         BeOS portability.
7225         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
7226         BeOS has mbrtowc() but no <wctype.h>.
7227
7228 2006-08-21  Bruno Haible  <bruno@clisp.org>
7229
7230         BeOS portability.
7231         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
7232         exist.
7233
7234 2006-08-21  Bruno Haible  <bruno@clisp.org>
7235
7236         BeOS portability.
7237         * lib/mbchar.h: Include <wctype.h> only if it exists.
7238
7239 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
7240
7241         Remove files that are no longer needed by their respective modules.
7242         * m4/obstack.m4: Remove.
7243         * m4/strerror_r.m4: Remove.
7244         * m4/uint32_t.m4: Remove.
7245         * m4/uintptr_t.m4: Remove.
7246         * m4/ullong_max.m4: Remove.
7247         * m4/xstrtoimax.m4: Remove.
7248         * m4/xstrtoumax.m4: Remove.
7249
7250         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
7251         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
7252         dependencies now capture this.
7253
7254         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
7255         Do not use AC_LIBSOURCES, since gnulib modules now do this.
7256         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
7257         * m4/human.m4 (gl_HUMAN): Likewise.
7258         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
7259         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
7260
7261         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
7262
7263         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
7264         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
7265         stdint.
7266         * m4/human.m4 (gl_HUMAN): Likewise.
7267         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
7268         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
7269         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
7270         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
7271         * m4/xstrtol (gl_XSTRTOL): Likewise.
7272
7273         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
7274         AC_TYPE_LONG_LONG_INT.
7275         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
7276         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
7277         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
7278         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
7279
7280         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
7281         on stdbool.
7282
7283         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
7284         (gl_PREREQ_XSTRTOUL): Remove.
7285
7286         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
7287
7288         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
7289         mode.
7290
7291 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
7292
7293         Add and change modules to make it easier for coreutils to use
7294         gnulib-tool.
7295         * modules/backupfile (Files): Remove m4/d-ino.m4.
7296         (Depends-on): Add d-ino.
7297         * modules/cycle-check (Depends-on): Add stdint.
7298         (lib_SOURCES): Add cycle-check.h.
7299         * modules/d-ino: New module.
7300         * modules/d-type: New module.
7301         * modules/error (Files): Remove m4/strerror_r.m4.
7302         * modules/filemode (Files): Add m4/st_dm_mode.m4.
7303         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
7304         m4/inttypes_h.m4, m4/uintmax_t.m4.
7305         (Depends-on): Add stdint.
7306         (lib_SOURCES): Add fsusage.h.
7307         * modules/getcwd (Files): Remove d-ino.m4.
7308         (Depends-on): Add d-ino.
7309         * modules/getndelim2 (Depends-on): Add stdint.
7310         * modules/glob (Files): Remove m4/d-type.m4.
7311         (Depends-on): Add d-type.
7312         * modules/host-os: New module.
7313         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
7314         m4/inttypes_h.m4, m4/uintmax_t.m4.
7315         * Depends-on: Add stdint.
7316         (lib_SOURCES): Add human.h.
7317         * modules/inttostr (Files): Remove m4/intmax_t.m4,
7318         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
7319         m4/uintmax_t.m4, m4/ulonglong.m4.
7320         (Depends-on): Add stdint.
7321         (EXTRA_DIST): Add inttostr.h.
7322         * modules/lchmod: New module.
7323         * modules/link-follow: New module.
7324         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
7325         (Depends-on): Add lchmod.
7326         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
7327         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
7328         (Depends-on): Add stdint.
7329         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
7330         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
7331         (Depends-on): Add stdint.
7332         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
7333         * modules/perl: New module.
7334         * modules/regex (Depends-on): Add stdint.
7335         * modules/rmdir-errno: New module.
7336         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
7337         m4/intmax_t.m4.
7338         (Depends-on): Add stdint.
7339         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
7340         m4/uintmax_t.m4.
7341         (Depends-on): Add stdint.
7342         * modules/unlink-busy: New module.
7343         * modules/utimecmp (Depends-on): Add stdint.
7344         * modules/uptime: New module.
7345         * modules/winsz-ioctl: New module.
7346         * modules/winsz-termios: New module.
7347         * modules/xnanosleep (Depends-on): Add nanosleep.
7348         * modules/ullong_max: Remove.
7349         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
7350         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
7351         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
7352         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
7353         (Depends-on): Add inttypes.
7354         (lib_SOURCES): Add xstrtol.h.
7355         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
7356         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
7357         * MODULES.html.sh: Move 'assert' into the assert section.
7358         Move 'dummy' into the linking section.
7359         Remove ullong_max.
7360         Add section for compatibility checks for POSIX:2001 functions,
7361         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
7362         winsz-ioctl, and winsz-termios into it.
7363         Add lchmod.
7364         Add top-level Misc section and put host-os, perl, and uptime
7365         into it.
7366
7367 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
7368
7369         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
7370         now assume the stdint module.  Do not include inttypes.h.
7371         * lib/fsusage.h: Likewise.
7372         * lib/getndelim2.c: Likewise.
7373         * lib/human.h: Likewise.
7374         * lib/inttostr.h: Likewise.
7375         * lib/obstack.c: Likewise.
7376         * lib/regex_internal.h: Likewise.
7377         * lib/tempname.c: Likewise.
7378         * lib/utimecmp.c: Likewise.
7379         * lib/xstrtol.h: Likewise.
7380
7381         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
7382
7383         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
7384         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
7385         * lib/xtime.h: Likewise.
7386
7387 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
7388
7389         * modules/openat (Files): Add lib/fchmodat.c.
7390         Fixes problem reported by Jay Youngman.
7391
7392 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
7393
7394         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
7395         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
7396
7397 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
7398             Bruno Haible  <bruno@clisp.org>
7399
7400         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
7401         and is a script that invokes bison. Tighten the code. Add comments.
7402
7403 2006-08-18  Jim Meyering  <jim@meyering.net>
7404
7405         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
7406         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
7407         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
7408         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
7409
7410 2006-08-18  Bruno Haible  <bruno@clisp.org>
7411
7412         * modules/bison-i18n: New file.
7413         * MODULES.html.sh (Internationalization functions): Add it.
7414
7415 2006-08-18  Bruno Haible  <bruno@clisp.org>
7416
7417         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
7418         sys/statvfs.h. When getmntinfo was found, check its declaration and
7419         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
7420
7421 2006-08-18  Bruno Haible  <bruno@clisp.org>
7422
7423         * m4/bison-i18n.m4: New file, from bison.
7424
7425 2006-08-18  Bruno Haible  <bruno@clisp.org>
7426
7427         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
7428         (ME_DUMMY): Treat "kernfs" as a dummy.
7429         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
7430
7431 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
7432
7433         Update from coreutils.
7434
7435         2006-08-15  Jim Meyering  <jim@meyering.net>
7436
7437         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
7438
7439         2006-01-17  Jim Meyering  <jim@meyering.net>
7440
7441         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
7442
7443         2006-01-11  Jim Meyering  <jim@meyering.net>
7444
7445         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
7446         Check for the lchmod function.
7447
7448 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
7449
7450         Update from coreutils.
7451
7452         * lib/__fpending.h: Add copyright notice.
7453         * lib/fprintftime.h: Likewise.
7454         * lib/savedir.c: Use (C) in copyright notice.
7455         * lib/savedir.h: Likewise.
7456
7457         2006-08-15  Jim Meyering  <jim@meyering.net>
7458
7459         * lib/at-func.c: New file, with the logic of all emulated at-functions.
7460         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
7461         in support of the EXPECTED_ERRNO macro.
7462         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
7463         definitions.  Instead, define the appropriate symbols and include
7464         "at-func.c".
7465         * lib/mkdirat.c (mkdirat): Likewise.
7466         * lib/fchmodat.c (fchmodat): Likewise.
7467         (ENOSYS): Remove definition.
7468         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
7469         it.  Don't include "unistd--.h" -- it wasn't ever used.
7470
7471         2006-01-17  Jim Meyering  <jim@meyering.net>
7472
7473         Rewrite fts.c not to change the current working directory,
7474         by using openat, fstatat, fdopendir, etc..
7475
7476         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
7477         (HAVE_OPENAT_SUPPORT): Define.
7478         [_LIBC] (fchdir): Don't undef or define; no longer used.
7479         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
7480         Now, this `function' always succeeds, and consumes its file descriptor
7481         parameter -- so callers must not close such FDs.  Update callers.
7482         (diropen_fd, opendirat, cwd_advance_fd): New functions.
7483         (diropen): Add parameter, SP.  Adjust all callers.
7484         Implement using diropen_fd, rather than open.
7485         (fts_open): Initialize new member, fts_cwd_fd.
7486         Remove fts_rft-setting code.
7487         (fts_close): Close fts_cwd_fd, if necessary.
7488         (__opendir2): Define in terms of opendir or opendirat,
7489         depending on whether the FST_NOCHDIR flag is set.
7490         (fts_build): Since fts_safe_changedir consumes its FD, and since
7491         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
7492         and close the dup'd file descriptor upon failure.
7493         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
7494         (fts_safe_changedir): Tweak semantics to reflect that this function
7495         now calls cwd_advance_fd and hence consumes its FD argument.
7496         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
7497         [struct FTS] (fts_rft): Remove now-unused member.
7498         [struct FTS] (fts_cycle.state): Improve comment.
7499
7500         * lib/openat.c (openat_needs_fchdir): New function.
7501         * lib/openat.h (openat_needs_fchdir): Declare it.
7502
7503 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
7504
7505         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
7506         Problem and fix reported by Pádraig Brady in
7507         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
7508
7509 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
7510
7511         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
7512
7513 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
7514
7515         * lib/memcoll.c (memcoll): Optimize for the common case where the
7516         arguments are bytewise equal.
7517
7518 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
7519
7520         * doc/regexprops-generic.texi: Add a copyright notice.
7521
7522 2006-08-15  Bruno Haible  <bruno@clisp.org>
7523
7524         * modules/tmpdir (License): Change to LGPL.
7525
7526 2006-08-15  Bruno Haible  <bruno@clisp.org>
7527
7528         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
7529         module.
7530
7531 2006-08-14  Simon Josefsson  <jas@extundo.com>
7532
7533         * config/srclist.txt: Add gnupload.
7534
7535 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
7536
7537         Change copyright notice from LGPL 2 to GPL 2, since that's the
7538         standard form used in the gnulib repository.
7539         * tests/test-lock.c: Likewise.
7540         * tests/test-stdint.c: Likewise.
7541         * tests/test-tls.c: Likewise.
7542
7543         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
7544         prelude-manager.  User shorter URLs for GNU projects, without '?'.
7545         Add copyright notice.
7546
7547         * check-module: Add copyright notice.  Output a copyright
7548         notice if "--version" is specified.
7549         * modules/COPYING: New file.
7550         * tests/test-getaddrinfo.c: Add copyright notice.
7551         * tests/test-verify.c: Likewise.
7552
7553 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
7554
7555         Change copyright notice from LGPL 2 to GPL 2, since that's the
7556         standard form used in the gnulib repository.
7557         * lib/lock.c: LGPL -> GPL.
7558         * lib/lock.h: Likewise.
7559         * lib/strnlen1.c: Likewise.
7560         * lib/strnlen1.h: Likewise.
7561         * lib/tls.c: Likewise.
7562         * lib/tls.h: Likewise.
7563         * lib/tmpdir.c: Likewise.
7564
7565         * lib/TODO: Remove; this belongs only in coreutils.
7566
7567 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
7568
7569         Add copyright notices to long-enough files that lack them, since
7570         otherwise the files aren't clearly free.  Use the same notice that
7571         getdate.texi already uses.
7572         * doc/alloca-opt.texi: Add copyright notice.
7573         * doc/alloca.texi: Likewise.
7574         * doc/ctime.texi: Likewise.
7575         * doc/functions.texi: Likewise.
7576         * doc/gcd.texi: Likewise.
7577         * doc/gnulib-tool.texi: Likewise.
7578         * doc/inet_ntoa.texi: Likewise.
7579         * doc/visibility.texi: Likewise.
7580
7581         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
7582         * doc/quote.texi: Add copyright notice.
7583
7584         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
7585         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
7586         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
7587         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
7588         is now obsolete, and give a pointer to the Sun list.
7589         Add copyright notice.
7590
7591 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
7592
7593         * config/srclistvars.sh: Add copyright notice.
7594
7595 2006-08-14  Eric Blake  <ebb9@byu.net>
7596
7597         Import the following change from libc:
7598
7599         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
7600
7601         Upstream bug 2997.
7602         * lib/misc/error.c: Add space between program name and message if file
7603         name is missing.
7604
7605 2006-08-12  Karl Berry  <karl@gnu.org>
7606
7607         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
7608         remove, these originate in gnulib now.
7609
7610 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7611
7612         * doc/Makefile (standards.info standards.html standards.dvi):
7613         Also depend on make-stds.texi.
7614
7615 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
7616
7617         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
7618         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
7619
7620         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
7621         in wchar_t.  Problem reported by Eric Blake.
7622
7623         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
7624         LEN is smaller than SIZE.  Suggested by Bruno Haible.
7625         Also, help the compiler to keep LEN in a register.
7626
7627 2006-08-11  Eric Blake  <ebb9@byu.net>
7628
7629         * users.txt: Sort.  Add tar.
7630
7631 2006-08-11  Bruno Haible  <bruno@clisp.org>
7632
7633         * users.txt: New file.
7634
7635 2006-08-11  Bruno Haible  <bruno@clisp.org>
7636
7637         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
7638         before <wchar.h>. Needed for OSF/1 and BSD/OS.
7639
7640 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
7641
7642         * modules/snprintf (Depends-on): Remove minmax.
7643         (Maintainer): Add self and Bruno.
7644
7645 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
7646
7647         * lib/.cppi-disable: Add snprintf.h, socket_.h.
7648         * lib/snprintf.c: Include <errno.h> and <limits.h>.
7649         (EOVERFLOW): Define if the system does not.
7650         Do not include "minmax.h"; it wasn't used.
7651         (snprintf): Don't assume size_t promotes to an unsigned type.
7652         Fix bug when generated string was too long for the buffer: the
7653         buffer's contents are supposed to be the initial prefix of the
7654         output.  Don't assume vasnprintf returns EOVERFLOW if the size
7655         exceeds INT_MAX; do the check ourselves.
7656
7657         Import the following changes from libc:
7658
7659         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
7660
7661         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
7662         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
7663         set wc to the byte which couldn't be converted.
7664         (re_string_reconstruct): Don't clear valid_raw_len before calling
7665         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
7666         tip_context using re_string_context_at.
7667
7668         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
7669
7670         * lib/posix/regex.h: g++ still cannot handled [restrict].
7671
7672         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
7673
7674         * lib/posix/regex.h: Remove special handling for VMS.
7675
7676 2006-08-10  Jim Meyering  <jim@meyering.net>
7677
7678         * modules/same-inode: New module.
7679         * modules/dev-ino: New module.
7680         * modules/cycle-check: Depend on these modules, rather than simply
7681         including their .h files.
7682         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
7683         required via m4/cycle-check.m4.
7684         * modules/same: Depend on new same-inode module, rather than
7685         including same-inode.h.
7686         * modules/chdir-safer: New file.
7687
7688         * modules/chown (Depends-on): Add stat-macros.
7689
7690 2006-08-10  Jim Meyering  <jim@meyering.net>
7691
7692         * m4/cycle-check.m4: New file.
7693         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
7694         * m4/dev-ino.m4, m4/same-inode.m4: New files.
7695
7696 2006-08-10  Eric Blake  <ebb9@byu.net>
7697
7698         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
7699         in from original proposal.
7700
7701 2006-08-10  Eric Blake  <ebb9@byu.net>
7702         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7703
7704         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
7705         namespace.
7706
7707 2006-08-10  Bruno Haible  <bruno@clisp.org>
7708
7709         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
7710         as well.
7711
7712 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
7713
7714         Sync from coreutils.
7715
7716         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
7717
7718         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
7719         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
7720
7721 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
7722
7723         * modules/restrict: Remove; no longer needed now that we assume
7724         Autoconf 2.59 or later.
7725         * MODULES.html.sh: Remove 'restrict'.
7726         * modules/argp (Depends-on): Remove 'restrict'.
7727         * modules/base64 (Depends-on): Likewise.
7728         * modules/gc (Depends-on): Likewise.
7729         * modules/getaddrinfo (Depends-on): Likewise.
7730         * modules/glob (Depends-on): Likewise.
7731         * modules/inet_ntop (Depends-on): Likewise.
7732         * modules/inet_pton (Depends-on): Likewise.
7733         * modules/memxor (Depends-on): Likewise.
7734         * modules/regex (Depends-on): Likewise.
7735         * modules/strtok_r (Depends-on): Likewise.
7736         * modules/time_r (Depends-on): Likewise.
7737
7738 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
7739
7740         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
7741         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
7742         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
7743         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
7744         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
7745         * m4/memxor.m4 (gl_MEMXOR): Likewise.
7746         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
7747         gl_C_RESTRICT replaced by AC_C_RESTRICT.
7748
7749         Merge from coreutils.
7750         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
7751         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
7752         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
7753         * m4/time_r.m4 (gl_TIME_R): Likewise.
7754
7755 2006-08-09  Karl Berry  <karl@gnu.org>
7756
7757         * config/srclist.txt: no more gettext-tools, per Bruno.
7758
7759 2006-08-08  Eric Blake  <ebb9@byu.net>
7760
7761         * modules/verror: New module.
7762         * MODULES.html.sh: Document it.
7763
7764 2006-08-08  Eric Blake  <ebb9@byu.net>
7765
7766         * lib/verror.h, lib/verror.c: New files.
7767
7768 2006-08-08  Eric Blake  <ebb9@byu.net>
7769
7770         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
7771         verror_at_line output complies with GNU Coding Standards even when
7772         file is NULL.
7773
7774 2006-08-07  Bruno Haible  <bruno@clisp.org>
7775
7776         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
7777         versions of AIX.
7778         Reported by Ralf Wildenhues.
7779
7780 2006-08-07  Bruno Haible  <bruno@clisp.org>
7781
7782         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
7783         in an AC_DEFUN. Needed so that the autoconf snippets can use
7784         AC_REQUIRE.
7785
7786 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7787
7788         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7789         Initialize pkgdata_DATA.
7790         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
7791         overriding it.
7792
7793 2006-08-06  Eric Blake  <ebb9@byu.net>
7794
7795         * lib/error.h: Fold in some upstream changes from glibc.
7796         * lib/error.c: Likewise.
7797
7798 2006-08-04  Bruno Haible  <bruno@clisp.org>
7799
7800         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7801         Make the mostlyclean-local rule depend on mostlyclean-generic.
7802         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
7803
7804 2006-07-31  Bruno Haible  <bruno@clisp.org>
7805
7806         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
7807         <stdlib.h>, <string.h>.
7808
7809 2006-07-30  Bruno Haible  <bruno@clisp.org>
7810
7811         * modules/readlink (License): Change to LGPL.
7812
7813 2006-07-30  Bruno Haible  <bruno@clisp.org>
7814
7815         * modules/javaversion (Makefile.am): Distribute javaversion.java and
7816         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
7817         set PKGDATADIR to point to it.
7818
7819 2006-07-30  Bruno Haible  <bruno@clisp.org>
7820
7821         * modules/csharpexec (configure.ac): Comment out macro invocation.
7822         * modules/javaexec (configure.ac): Likewise.
7823         * modules/javacomp-script (configure.ac): Likewise.
7824
7825         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
7826
7827 2006-07-30  Bruno Haible  <bruno@clisp.org>
7828
7829         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
7830         linked-list.
7831
7832 2006-07-30  Bruno Haible  <bruno@clisp.org>
7833
7834         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
7835
7836 2006-07-30  Bruno Haible  <bruno@clisp.org>
7837
7838         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7839         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
7840         get removed.
7841
7842 2006-07-29  Bruno Haible  <bruno@clisp.org>
7843
7844         Make it possible for gnulib-tool to work with locally modified or
7845         augmented gnulib repositories.
7846         * gnulib-tool (func_usage): Document --local-dir option.
7847         (local_gnulib_dir): New variable.
7848         Handle --local-dir option.
7849         (func_lookup_file): New function.
7850         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
7851         (func_get_description, func_get_filelist, func_get_description,
7852         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
7853         func_get_automake_snippet, func_get_include_directive,
7854         func_get_license, func_get_maintainer): Use func_lookup_file.
7855         (func_import, func_create_testdir): Use func_lookup_file.
7856
7857 2006-07-29  Bruno Haible  <bruno@clisp.org>
7858
7859         * modules/setenv (Depends-on): Add unistd.
7860
7861 2006-07-29  Bruno Haible  <bruno@clisp.org>
7862
7863         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
7864
7865 2006-07-29  Bruno Haible  <bruno@clisp.org>
7866
7867         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
7868
7869 2006-07-29  Bruno Haible  <bruno@clisp.org>
7870
7871         * gnulib-tool (import, update): If there is no Makefile.am, look at
7872         aclocal.m4, instead of bailing out.
7873
7874 2006-07-29  Bruno Haible  <bruno@clisp.org>
7875
7876         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
7877         Categorize the options by when they are useful.
7878
7879 2006-07-29  Bruno Haible  <bruno@clisp.org>
7880
7881         * gnulib-tool (func_usage): Document option --no-libtool.
7882         Handle option --no-libtool.
7883         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
7884         for changed semantics of $libtool variable.
7885         (func_import): Likewise. If libtool is not used, show this through
7886         an option --no-libtool.
7887         (func_create_testdir): Update.
7888
7889 2006-07-29  Bruno Haible  <bruno@clisp.org>
7890
7891         * gnulib-tool (func_import): Extend error message about missing
7892         --doc-base.
7893
7894 2006-07-29  Bruno Haible  <bruno@clisp.org>
7895
7896         * gnulib-tool (func_import): Don't create the $docbase directory if
7897         there is no file to store there.
7898
7899 2006-07-29  Bruno Haible  <bruno@clisp.org>
7900
7901         * gnulib-tool (autoconf_minversion): If a --dir option is given and
7902         relevant, look for configure.ac there, not in the current directory.
7903         Also use a simple search for AC_PREREQ, not "autoconf --trace".
7904
7905 2006-07-29  Bruno Haible  <bruno@clisp.org>
7906
7907         * gnulib-tool (SORT): New variable.
7908         (func_usage): Undocument --assume-autoconf option.
7909         Remove --assume-autoconf option handling.
7910         (autoconf_minversion): Determine from the contents of configure.ac.
7911         (func_import): Remove autoconf_minversion handling.
7912         Suggested by Eric Blake.
7913
7914 2006-07-29  Bruno Haible  <bruno@clisp.org>
7915
7916         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
7917
7918 2006-07-29  Bruno Haible  <bruno@clisp.org>
7919
7920         * config/srclist.txt (*setenv.[ch]): Remove rules.
7921
7922 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7923
7924         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
7925
7926 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7927
7928         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
7929         arpa/inet.h.
7930
7931 2006-07-28  Simon Josefsson  <jas@extundo.com>
7932
7933         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
7934         * modules/inet_pton (Depends-on): Likewise.
7935
7936 2006-07-28  Simon Josefsson  <jas@extundo.com>
7937
7938         * m4/netinet_in_h.m4: New file.
7939
7940 2006-07-28  Simon Josefsson  <jas@extundo.com>
7941
7942         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
7943         #include's.
7944
7945 2006-07-28  Simon Josefsson  <jas@extundo.com>
7946
7947         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
7948         #include's.
7949
7950 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
7951
7952         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
7953         setgid on directories only if they set these bits.
7954         * lib/modechange.h: Remove obsolete comment about masks.
7955
7956 2006-07-28  Eric Blake  <ebb9@byu.net>
7957
7958         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
7959         macro expansion.
7960
7961 2006-07-28  Bruno Haible  <bruno@clisp.org>
7962
7963         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
7964
7965 2006-07-28  Bruno Haible  <bruno@clisp.org>
7966
7967         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
7968
7969 2006-07-28  Bruno Haible  <bruno@clisp.org>
7970
7971         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
7972         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
7973         Define fallbacks.
7974         Avoids link error on FreeBSD 4.x.
7975         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
7976
7977         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
7978         encoding.
7979         * lib/mbswidth.c (iswcntrl): Likewise.
7980
7981 2006-07-27  Bruno Haible  <bruno@clisp.org>
7982
7983         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
7984         test.
7985
7986 2006-07-27  Bruno Haible  <bruno@clisp.org>
7987
7988         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
7989         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
7990         defined.
7991
7992 2006-07-26  Eric Blake  <ebb9@byu.net>
7993
7994         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
7995
7996 2006-07-26  Eric Blake  <ebb9@byu.net>
7997
7998         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
7999         like mingw that lack mkstemp.
8000         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
8001         avoid compilation warning on mingw.
8002
8003 2006-07-26  Bruno Haible  <bruno@clisp.org>
8004
8005         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
8006         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
8007         INT_FAST*_MIN, INTPTR_MIN.
8008
8009 2006-07-25  Bruno Haible  <bruno@clisp.org>
8010
8011         * modules/version-etc (Depends-on): Add stdarg.
8012
8013 2006-07-25  Bruno Haible  <bruno@clisp.org>
8014
8015         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
8016         complex commands.
8017
8018 2006-07-25  Bruno Haible  <bruno@clisp.org>
8019
8020         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
8021         defined in <stdarg.h> or config.h.
8022
8023 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
8024
8025         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
8026         (gl_STDIO_SAFER): Remove.
8027
8028 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
8029
8030         * MODULES.html.sh (File stream based Input/Output):
8031         Add fopen-safer, tmpfile-safer; remove stdio-safer.
8032         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
8033         * modules/fopen-safer, modules/tmpfile-safer: New files.
8034         * modules/stdio-safer: Remove.
8035
8036 2006-07-24  Bruno Haible  <bruno@clisp.org>
8037
8038         * modules/tmpdir: New file.
8039         * MODULES.html.sh (File system functions): Add it.
8040
8041 2006-07-24  Bruno Haible  <bruno@clisp.org>
8042
8043         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
8044         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
8045
8046 2006-07-24  Bruno Haible  <bruno@clisp.org>
8047
8048         * modules/clean-temp: New file.
8049
8050 2006-07-24  Bruno Haible  <bruno@clisp.org>
8051
8052         * m4/tmpdir.m4: New file, from GNU gettext.
8053
8054 2006-07-24  Bruno Haible  <bruno@clisp.org>
8055
8056         * lib/tmpdir.h: New file, from GNU gettext.
8057         * lib/tmpdir.c: New file, from GNU gettext.
8058
8059 2006-07-24  Bruno Haible  <bruno@clisp.org>
8060
8061         * lib/clean-temp.h: New file, from GNU gettext.
8062         * lib/clean-temp.c: New file, from GNU gettext.
8063
8064 2006-07-23  Eric Blake  <ebb9@byu.net>
8065
8066         * modules/stdio-safer (Files): Add tmpfile-safer.c.
8067         (Depends-on): Add binary-io.
8068
8069 2006-07-23  Eric Blake  <ebb9@byu.net>
8070
8071         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
8072
8073 2006-07-23  Eric Blake  <ebb9@byu.net>
8074
8075         * lib/tmpfile-safer.c: New file.
8076         * lib/stdio-safer.h (fopen_safer): Add prototype.
8077         * lib/stdio--.h (tmpfile): Make safer.
8078
8079 2006-07-23  Bruno Haible  <bruno@clisp.org>
8080
8081         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
8082         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
8083         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
8084         gl_linked_remove_at): Use it.
8085
8086 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
8087         and Simon Josefsson <jas@extundo.com>
8088
8089         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
8090
8091         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
8092
8093 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
8094
8095         * modules/close-stream: New file.
8096         * modules/closeout (Description): Make it clear that it exits
8097         with a diagnostic on error.
8098         (Depends-on): Add close-stream.  Remove fpending, stdbool.
8099         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
8100
8101 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
8102
8103         * m4/close-stream.m4: New file.
8104
8105 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
8106
8107         * lib/close-stream.c, lib/close-stream.h: New files.
8108
8109 2006-07-22  Bruno Haible  <bruno@clisp.org>
8110
8111         Merge from GNU gettext 0.15.
8112
8113         2006-05-01  Bruno Haible  <bruno@clisp.org>
8114
8115                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
8116
8117         2006-07-22  Bruno Haible  <bruno@clisp.org>
8118
8119                 * modules/javaversion: New file.
8120                 * MODULES.html.sh (Java): Add javaversion.
8121
8122         2006-03-12  Bruno Haible  <bruno@clisp.org>
8123
8124                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
8125
8126         2005-12-04  Bruno Haible  <bruno@clisp.org>
8127
8128                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
8129                 (untested).
8130
8131         2006-06-21  Bruno Haible  <bruno@clisp.org>
8132
8133                 Avoid warnings from recent versions of mcs.
8134                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
8135                 -o, -L, -r any more. Use options documented since mcs-1.0
8136                 instead. Similarly for -g.
8137
8138         2005-12-04  Bruno Haible  <bruno@clisp.org>
8139
8140                 * build-aux/csharpcomp.sh.in: Suffix for resources is
8141                 .resources, not .resource.
8142
8143         2005-07-09  Bruno Haible  <bruno@clisp.org>
8144
8145                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
8146                 add a .dll suffix.
8147                 Reported by Mark Junker <mjscod@gmx.de>.
8148
8149         2006-07-22  Bruno Haible  <bruno@clisp.org>
8150
8151                 * modules/gettext: Upgrade to gettext-0.15.
8152                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
8153                 m4/visibility.m4.
8154                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
8155
8156 2006-07-22  Bruno Haible  <bruno@clisp.org>
8157
8158         Merge from GNU gettext 0.15.
8159
8160         2006-03-25  Bruno Haible  <bruno@clisp.org>
8161
8162                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
8163
8164         2006-07-21  Bruno Haible  <bruno@clisp.org>
8165
8166                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
8167                 "1.1".
8168
8169         2006-05-09  Bruno Haible  <bruno@clisp.org>
8170
8171                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
8172                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
8173                 for the conftestver execution.
8174
8175         2006-05-01  Bruno Haible  <bruno@clisp.org>
8176
8177                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
8178                 optional target-version argument. Verify that the compiler
8179                 groks source of the specified source-version, or add -source
8180                 option as necessary. Verify that the compiler produces
8181                 bytecode in the specified target-version, or add -target and
8182                 -source options as necessary. Make the result of the test
8183                 available as variable CONF_JAVAC. Also log error output in
8184                 config.log.
8185
8186         2006-03-11  Bruno Haible  <bruno@clisp.org>
8187
8188                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
8189
8190         2006-05-09  Bruno Haible  <bruno@clisp.org>
8191
8192                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
8193                 CLASSPATH_SEPARATOR to a semicolon.
8194
8195         2006-03-12  Bruno Haible  <bruno@clisp.org>
8196
8197                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
8198                 available as variable CONF_JAVA, for subsequent autoconf
8199                 tests. Also log error output in config.log.
8200
8201         2006-07-19  Bruno Haible  <bruno@clisp.org>
8202
8203                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
8204                 that getline works on glibc2 systems. Needed to avoid trouble
8205                 in relocatable.c.
8206                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
8207
8208         2005-12-04  Bruno Haible  <bruno@clisp.org>
8209
8210                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
8211                 launcher (untested).
8212
8213         2005-12-04  Bruno Haible  <bruno@clisp.org>
8214
8215                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
8216
8217         2006-07-22  Bruno Haible  <bruno@clisp.org>
8218
8219                 * gettext.m4: Update from GNU gettext-0.15.
8220                 * nls.m4: Likewise.
8221                 * po.m4: Likewise.
8222                 * inttypes-pri.m4: Likewise.
8223                 * inttypes-h.m4: Renamed from inttypes.m4.
8224                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
8225
8226 2006-07-22  Bruno Haible  <bruno@clisp.org>
8227
8228         Merge from GNU gettext 0.15.
8229
8230         2005-07-05  Bruno Haible  <bruno@clisp.org>
8231
8232                 * printf-args.c (printf_fetchargs): Work around broken
8233                 definition of wint_t on mingw.
8234
8235         2005-02-12  Bruno Haible  <bruno@clisp.org>
8236
8237                 * xallocsa.h: Add extern "C" for C++.
8238
8239         2006-05-17  Bruno Haible  <bruno@clisp.org>
8240
8241                 Cygwin portability.
8242                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
8243
8244         2006-04-30  Bruno Haible  <bruno@clisp.org>
8245
8246                 * progreloc.c: Include <mach-o/dyld.h> if available.
8247                 (find_executable): Use _NSGetExecutablePath when possible.
8248
8249         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
8250
8251                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
8252                 function.
8253
8254         2005-12-29  Bruno Haible  <bruno@clisp.org>
8255
8256                 * progreloc.c (set_program_name_and_installdir): Fix
8257                 compilation error.
8258
8259         2005-12-04  Bruno Haible  <bruno@clisp.org>
8260
8261                 Cygwin portability.
8262                 * progreloc.c: Include <windows.h> also on Cygwin.
8263                 (find_executable): Add support for Cygwin.
8264                 (set_program_name_and_installdir): Handle also platforms with
8265                 nonempty EXEEXT.
8266
8267         2006-07-11  Bruno Haible  <bruno@clisp.org>
8268
8269                 * javacomp.c: Fix a comment.
8270                 Reported by Jim Meyering.
8271
8272         2006-04-30  Bruno Haible  <bruno@clisp.org>
8273
8274                 * javacomp.h (compile_java_class): Add source_version,
8275                 target_version arguments.
8276                 * javacomp.c: Rewritten to choose only a compiler that
8277                 respects the specified source_version and target_version.
8278
8279         2006-06-27  Bruno Haible  <bruno@clisp.org>
8280
8281                 Assume correct S_ISDIR macro.
8282                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
8283
8284         2006-07-22  Bruno Haible  <bruno@clisp.org>
8285
8286                 * javaversion.h: New file, from GNU gettext.
8287                 * javaversion.c: New file, from GNU gettext.
8288                 * javaversion.java: New file, from GNU gettext.
8289                 * javaversion.class: New file, from GNU gettext.
8290
8291         2006-05-17  Bruno Haible  <bruno@clisp.org>
8292
8293                 Cygwin portability.
8294                 * javaexec.c (execute_java_class): Test for jview program
8295                 also on Cygwin.
8296
8297         2006-04-09  Bruno Haible  <bruno@clisp.org>
8298
8299                 * fatal-signal.c: Don't include string.h.
8300                 (at_fatal_signal): Use a copying loop instead of memcpy.
8301
8302         2005-12-04  Bruno Haible  <bruno@clisp.org>
8303
8304                 * csharpexec.c: Add support for 'clix' launcher (untested).
8305                 (execute_csharp_using_sscli): New function.
8306                 (execute_csharp_program): Call it.
8307
8308         2006-06-21  Bruno Haible  <bruno@clisp.org>
8309
8310                 Avoid warnings from recent versions of mcs.
8311                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
8312                 -o, -L, -r any more. Use options documented since mcs-1.0
8313                 instead. Similarly for -g.
8314
8315         2005-07-09  Bruno Haible  <bruno@clisp.org>
8316
8317                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
8318                 add a .dll suffix.
8319                 Reported by Mark Junker <mjscod@gmx.de>.
8320
8321         2006-06-17  Bruno Haible  <bruno@clisp.org>
8322
8323                 * config.charset: Update for NetBSD 3.0.
8324
8325         2006-05-17  Bruno Haible  <bruno@clisp.org>
8326
8327                 Cygwin portability.
8328                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
8329
8330         2006-05-16  Bruno Haible  <bruno@clisp.org>
8331
8332                 * localcharset.c [CYGWIN]: Include <windows.h>.
8333                 (get_charset_aliases): For Cygwin, return the same CPxxx
8334                 aliases list as under WIN32.
8335                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
8336                 the environment variables. Fall back to GetACP().
8337
8338         2006-04-05  Bruno Haible  <bruno@clisp.org>
8339
8340                 * config.charset: Update Juan Manuel Guerrero's address.
8341
8342         2005-02-12  Bruno Haible  <bruno@clisp.org>
8343
8344                 * allocsa.h: Add extern "C" for C++.
8345
8346         2005-02-10  Bruno Haible  <bruno@clisp.org>
8347
8348                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
8349                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
8350
8351         2006-07-22  Bruno Haible  <bruno@clisp.org>
8352
8353                 * gettext.h: Update to GNU gettext-0.15.
8354
8355 2006-07-22  Bruno Haible  <bruno@clisp.org>
8356
8357         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
8358         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
8359         lib-prefix.m4, longdouble.m4, ssize_t.m4.
8360
8361 2006-07-21  Eric Blake  <ebb9@byu.net>
8362
8363         * modules/stdlib-safer: New file.
8364         * MODULES.html.sh (File stream based Input/Output): Add
8365         stdlib-safer.
8366
8367 2006-07-21  Eric Blake  <ebb9@byu.net>
8368
8369         * lib/stdlib-safer.h: New file from coreutils, required by
8370         stdlib--.h.
8371
8372 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
8373
8374         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
8375
8376 2006-07-20  Bruno Haible  <bruno@clisp.org>
8377
8378         * gnulib-tool: Recognize new option --assume-autoconf.
8379         (autoconf_minversion): New variable.
8380         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
8381
8382 2006-07-20  Bruno Haible  <bruno@clisp.org>
8383
8384         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
8385
8386 2006-07-19  Derek R. Price  <derek@ximbiot.com>
8387
8388         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
8389         Reindent and repaginate.
8390
8391 2006-07-19  Derek Price  <derek@ximbiot.com>
8392
8393         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
8394         Correct grammar.
8395
8396 2006-07-17  Bruno Haible  <bruno@clisp.org>
8397
8398         * modules/list: New file.
8399         * modules/array-list: New file.
8400         * modules/carray-list, modules/carray-list-tests: New files.
8401         * modules/linked-list, modules/linked-list-tests: New files.
8402         * modules/avltree-list, modules/avltree-list-tests: New files.
8403         * modules/rbtree-list, modules/rbtree-list-tests: New files.
8404         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
8405         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
8406         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
8407         * modules/oset: New file.
8408         * modules/array-oset: New file.
8409         * modules/avltree-oset, modules/avltree-oset-tests: New files.
8410         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
8411         * tests/test-carray_list.c: New file.
8412         * tests/test-linked_list.c: New file.
8413         * tests/test-avltree_list.c: New file.
8414         * tests/test-rbtree_list.c: New file.
8415         * tests/test-linkedhash_list.c: New file.
8416         * tests/test-avltreehash_list.c: New file.
8417         * tests/test-rbtreehash_list.c: New file.
8418         * tests/test-avltree_oset.c: New file.
8419         * tests/test-rbtree_oset.c: New file.
8420         * MODULES.html.sh (Container data structures): New section.
8421
8422 2006-07-17  Bruno Haible  <bruno@clisp.org>
8423
8424         * m4/gl_list.m4: New file.
8425
8426 2006-07-17  Bruno Haible  <bruno@clisp.org>
8427
8428         * lib/gl_list.h: New file.
8429         * lib/gl_list.c: New file.
8430         * lib/gl_array_list.h: New file.
8431         * lib/gl_array_list.c: New file.
8432         * lib/gl_carray_list.h: New file.
8433         * lib/gl_carray_list.c: New file.
8434         * lib/gl_linked_list.h: New file.
8435         * lib/gl_linked_list.c: New file.
8436         * lib/gl_anylinked_list1.h: New file.
8437         * lib/gl_anylinked_list2.h: New file.
8438         * lib/gl_avltree_list.h: New file.
8439         * lib/gl_avltree_list.c: New file.
8440         * lib/gl_anyavltree_list1.h: New file.
8441         * lib/gl_anyavltree_list2.h: New file.
8442         * lib/gl_rbtree_list.h: New file.
8443         * lib/gl_rbtree_list.c: New file.
8444         * lib/gl_anyrbtree_list1.h: New file.
8445         * lib/gl_anyrbtree_list2.h: New file.
8446         * lib/gl_anytree_list1.h: New file.
8447         * lib/gl_anytree_list2.h: New file.
8448         * lib/gl_linkedhash_list.h: New file.
8449         * lib/gl_linkedhash_list.c: New file.
8450         * lib/gl_anyhash_list1.h: New file.
8451         * lib/gl_anyhash_list2.h: New file.
8452         * lib/gl_avltreehash_list.h: New file.
8453         * lib/gl_avltreehash_list.c: New file.
8454         * lib/gl_rbtreehash_list.h: New file.
8455         * lib/gl_rbtreehash_list.c: New file.
8456         * lib/gl_anytreehash_list1.h: New file.
8457         * lib/gl_anytreehash_list2.h: New file.
8458
8459         * lib/gl_oset.h: New file.
8460         * lib/gl_oset.c: New file.
8461         * lib/gl_array_oset.h: New file.
8462         * lib/gl_array_oset.c: New file.
8463         * lib/gl_avltree_oset.h: New file.
8464         * lib/gl_avltree_oset.c: New file.
8465         * lib/gl_rbtree_oset.h: New file.
8466         * lib/gl_rbtree_oset.c: New file.
8467         * lib/gl_anytree_oset.h: New file.
8468
8469 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
8470
8471         * m4/mkancesdirs.m4: New file.
8472         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
8473         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
8474         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
8475         it.
8476
8477 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
8478
8479         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
8480         * lib/mkancesdirs.h: New files.
8481         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
8482         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
8483         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
8484         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
8485         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
8486         callers changed.  Revamp internals significantly, by not
8487         attempting to create directories that are temporarily more
8488         permissive than the final results.  Do not attempt to use
8489         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
8490         This removes some race conditions, fixes some bugs, and simplifies
8491         things.  Use new dirchownmod function to do owner and mode changes.
8492         * lib/mkdir-p.h: Likewise.
8493         * lib/modechange.c (octal_to_mode): New function.
8494         (struct mode_change): New member mentioned.
8495         (make_node_op_equals): New arg mentioned.  All callers changed.
8496         (mode_compile): Keep track of which mode bits the user has explicitly
8497         mentioned.
8498         (mode_adjust): New arg DIR, so that we implement the X op correctly.
8499         New arg PMODE_BITS, to keep track of which mode bits the user
8500         mentioned; it treats S_ISUID and S_ISGID speciall.
8501         All callers changed.
8502         * lib/modechange.h: Likewise.
8503
8504 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
8505
8506         * MODULES.html.sh: Add mkancestors.
8507         * modules/mkancesdirs: New module.
8508         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
8509         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
8510         The chdir-safer and afs files are now orphans; I'll remove them
8511         unless someone speaks up.
8512         Add lib/dirchownmod.c, lib/dirchownmod.h.
8513         (Depends-on): Remove alloca, chown, save-cwd, dirname.
8514         Add lchown, mkancesdirs.
8515         (Maintainer): Add self.
8516
8517 2006-07-15  Karl Berry  <karl@gnu.org>
8518
8519         * gnulib-tool: help message wording/arrangement.
8520
8521 2006-07-14  Simon Josefsson  <jas@extundo.com>
8522
8523         * doc/gnulib.texi (Libtool and Windows): New section.
8524
8525 2006-07-12  Simon Josefsson  <jas@extundo.com>
8526
8527         * modules/gendocs (License): Fix license, approved by Karl.
8528
8529 2006-07-12  Eric Blake  <ebb9@byu.net>
8530
8531         * MODULES.html.sh: Add gendocs.
8532
8533 2006-07-11  Eric Blake  <ebb9@byu.net>
8534
8535         * modules/fdl: New module, to install doc/fdl.texi.
8536         * MODULES.html.sh: Add new section for documentation modules.
8537         * gnulib-tool: Avoid space-tab.
8538         (--doc-base): New option, to manage files from doc.
8539
8540 2006-07-11  Eric Blake  <ebb9@byu.net>
8541
8542         * m4/absolute-header.m4: Fix comments to match recent change.
8543
8544 2006-07-11  Eric Blake  <ebb9@byu.net>
8545
8546         * gnulib-tool: List --doc-base before --tests-base.
8547
8548 2006-07-11  Derek R. Price  <derek@ximbiot.com>
8549
8550         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
8551
8552 2006-07-11  Bruno Haible  <bruno@clisp.org>
8553
8554         * README: Mention where to put documentation.
8555
8556 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8557
8558         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
8559
8560 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
8561
8562         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
8563         to stdint.m4.
8564
8565 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
8566
8567         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
8568         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
8569         "no/such/file/stdint.h" when there is no such file, so that
8570         the resulting C code can be parsed by dodgy compilers.
8571         Problems reported by Bob Proulx.
8572
8573 2006-07-10  Derek R. Price  <derek@ximbiot.com>
8574
8575         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
8576         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
8577         macros into the GNU _D_EXACT_NAMLEN.
8578         * lib/savedir.c:  Likewise.
8579         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
8580
8581 2006-07-10  Derek R. Price  <derek@ximbiot.com>
8582         and Paul Eggert  <eggert@cs.ucla.edu>
8583
8584         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
8585         * m4/savedir.m4:
8586         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
8587         macros into the GNU _D_EXACT_NAMLEN.
8588
8589 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
8590
8591         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
8592         around the absolute name, to work around a problem with the HP-UX
8593         11.23 native C compiler, reported by Bob Proulx.
8594
8595 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
8596
8597         * doc/maintain.texi, make-stds.texi: Sync from
8598         <http://savannah.gnu.org/projects/gnustandards>.
8599
8600 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
8601
8602         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
8603
8604 2006-07-09  Jim Meyering  <jim@meyering.net>
8605
8606         * m4/glob.m4: Remove a doubled word in a comment.
8607
8608 2006-07-09  Jim Meyering  <jim@meyering.net>
8609
8610         * lib/argp-pv.c: Remove a doubled word in a comment.
8611         * lib/check-version.c (check_version): Likewise.
8612         * lib/javacomp.c (compile_java_class): Likewise.
8613
8614 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
8615
8616         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
8617         for the benefit of people using Autoconf 2.60.  If you want to
8618         support older Autoconf versions you can copy m4/onceonly_2_57.m4
8619         (or m4/onceonly.m4, if pre-2.57) manually.
8620
8621 2006-07-08  Jim Meyering  <jim@meyering.net>
8622
8623         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
8624         comment.
8625         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
8626         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
8627         comment.
8628
8629 2006-07-08  Jim Meyering  <jim@meyering.net>
8630
8631         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
8632
8633 2006-07-07  Simon Josefsson  <jas@extundo.com>
8634
8635         * tests/test-crc.c: Change expected crc value, the test vector
8636         were probably computed using the old broken crc.c?
8637
8638 2006-07-06  Simon Josefsson  <jas@extundo.com>
8639
8640         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
8641         now the canonical place for the M4 file).
8642
8643         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
8644         from the sys_socket dependency now.
8645
8646         * modules/inet_pton (Files): Ditto.
8647
8648         * modules/inet_ntop (Files): Ditto.
8649
8650 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
8651
8652         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
8653         not gl_PREREQ_GETUSERSHELL.
8654
8655 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8656
8657         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
8658         with only one argument, for Autoconf 2.60.
8659         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
8660         expand to nothing, so add a shell command to avoid syntax error.
8661         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
8662
8663 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8664
8665         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
8666
8667 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
8668
8669         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
8670         no longer needed.  Check for isblank decl.
8671         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
8672         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
8673         of existence.
8674
8675 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
8676
8677         * lib/getloadavg.c: Use __VMS, not VMS.
8678         * lib/getopt.c: Likewise.
8679         * lib/getpagesize.h: Likewise.
8680         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
8681         and probably does not work.
8682
8683 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
8684
8685         * lib/.cppi-disable: Add wcwidth.
8686         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
8687         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
8688         (ISGRAPH): Remove.  All uses changed to isgraph.
8689         (FOLD) [!defined _LIBC]: Remove special case.
8690         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
8691         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
8692         HAVE_ISBLANK.
8693         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
8694         case.
8695
8696 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
8697
8698         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
8699         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
8700         brackets.  Other minor changes to suppress some compiler
8701         warnings.
8702
8703 2006-07-06  Derek R. Price  <derek@ximbiot.com>
8704         and Paul Eggert  <eggert@cs.ucla.edu>
8705
8706         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
8707         of invoking obsolescent AC_HEADER_DIRENT macro.
8708         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
8709         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
8710         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
8711         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
8712         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
8713         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
8714         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
8715         * m4/readdir.m4: Remove; no longer needed.
8716
8717 2006-07-06  Derek R. Price  <derek@ximbiot.com>
8718         and Paul Eggert  <eggert@cs.ucla.edu>
8719
8720         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
8721         Don't worry about this obsolete case any more.
8722         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
8723         directories.
8724         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
8725         worry about this obsolete case any more.
8726         * lib/fts.c: Likewise.
8727         * lib/getcwd.c: Likewise.
8728         * lib/glob.h: Likewise.
8729         * lib/savedir.c: Likewise.
8730
8731 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
8732
8733         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
8734         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
8735         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
8736         needed.
8737         All uses removed.
8738         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
8739         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
8740         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
8741         needed.
8742         * m4/getdate.m4 (gl_GETDATE): Likewise.
8743         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
8744         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
8745         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
8746         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
8747         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
8748         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
8749         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
8750         needed.
8751
8752 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
8753
8754         * lib/memcasecmp.c: Include <limits.h>.
8755         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
8756         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
8757         Don't assume isdigit succeeds only on '0' through '9'.
8758
8759 2006-07-05  Eric Blake  <ebb9@byu.net>
8760
8761         * modules/getaddrinfo (Depends-on): Add snprintf.
8762
8763 2006-07-05  Eric Blake  <ebb9@byu.net>
8764
8765         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
8766         to avoid 'header present but could not be compiled' on cygwin.
8767
8768 2006-07-05  Eric Blake  <ebb9@byu.net>
8769
8770         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
8771         missing from netdb.h.
8772         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
8773
8774 2006-07-05  Derek R. Price  <derek@ximbiot.com>
8775
8776         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
8777         no longer needed.
8778         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
8779         * m4/getdate.m4 (gl_GETDATE): Likewise.
8780         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
8781         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
8782         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
8783         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
8784         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
8785
8786 2006-07-05  Derek R. Price  <derek@ximbiot.com>
8787
8788         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
8789         All uses of is_space replaced by isspace.
8790         * lib/exit.h: Don't talk about STDC_HEADERS.
8791         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
8792         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
8793         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
8794         replaced by isprint etc.
8795         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
8796         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
8797         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
8798         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
8799         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
8800         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
8801
8802 2006-07-05  Bruno Haible  <bruno@clisp.org>
8803
8804         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
8805         the function exists, before testing against AIX.
8806         Reported by Martin Lambers <marlam@marlam.de>.
8807
8808 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
8809
8810         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
8811         From Mark D. Baushke.
8812
8813 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
8814
8815         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
8816         to the absolute name, not just one, to bypass Sun C 5.8's
8817         "warning: #include of /usr/include/... may be non-portable".
8818
8819 2006-07-04  Eric Blake  <ebb9@byu.net>
8820
8821         * modules/dirname-tests: New test module.
8822         * tests/test-dirname.c: New file, replacing dirname.c
8823         TEST_DIRNAME section that was recently deleted.
8824
8825 2006-07-04  Bruno Haible  <bruno@clisp.org>
8826
8827         Assume ANSI C header files and <ctype.h> functions.
8828         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
8829         (mbsnwidth): Use isprint, iscntrl instead.
8830
8831 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
8832
8833         Merge from coreutils.
8834         * MODULES.html.sh: Add xstrtold.
8835         * modules/xstrtold: New file.
8836         * modules/cycle-check (Files): Add lib/same-inode.h.
8837         * modules/dirname (Files): Add m4/double-slash-root.m4.
8838         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
8839         * modules/mkdir-p (Files): Add lib/same-inode.h.
8840         * modules/same (Files): Add lib/same-inode.h.
8841
8842 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
8843
8844         * m4/absolute-header.m4: Renamed from full-header-path.m4.
8845         This is to keep the terminology clean; POSIX talks about
8846         "absolute pathnames", not "full pathnames", but the GNU
8847         Coding Standards say to use "path" for something else;
8848         so use "absolute" to keep both sides happy.
8849         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
8850         Set gl_absolute_header, not gl_full_header_path.
8851         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
8852         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
8853         All uses changed.
8854
8855         Merge from coreutils.
8856
8857         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
8858
8859         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
8860         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
8861         want to require the building of c-strtod.o.
8862         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
8863         needs -lm directly.
8864         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
8865
8866         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
8867
8868         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
8869         --as-needed option if available.  Problem reported by Albert Chin in
8870         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
8871         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
8872         cc merely issues a bunch of annoying warnings for --as-needed
8873         (this problem was reported by Bob Proulx).  Also, try linking with
8874         -lm to detect a bug in binutils 2.16 (this problem was reported
8875         by Ralf Wildenhues).
8876
8877         2006-06-18  Jim Meyering  <jim@meyering.net>
8878
8879         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
8880         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
8881         macro.
8882         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
8883         also check for glibc-2.4's abort-inducing bug.
8884
8885         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
8886         Low-probability clean-up should be to use rmdir to get rid of
8887         the just-created directory, not unlink.
8888
8889         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
8890         configure fail, and request a bug report to inform us about it.
8891         Add a comment that, barring reports to the contrary, in 2007 we'll
8892         assume ftruncate is universally available.
8893
8894         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
8895
8896         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
8897
8898         2006-03-12  Jim Meyering  <jim@meyering.net>
8899
8900         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
8901         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
8902         * m4/same.m4 (gl_SAME): Likewise.
8903         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
8904
8905         2006-03-11  Eric Blake  <ebb9@byu.net>
8906
8907         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
8908         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
8909         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
8910         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
8911
8912 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
8913
8914         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
8915         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
8916         reported by Mark D. Baushke, one in
8917         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
8918
8919         Merge from coreutils.
8920
8921         * lib/.cppi-disable: Add stdint_.h.
8922         * lib/.cvsignore: Add stdint.h.
8923
8924         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
8925
8926         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
8927         both double and long double versions.
8928         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
8929         * lib/xstrtold.c: New file.
8930         * lib/xstrtod.h (xstrtold): New decl.
8931
8932         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
8933
8934         * lib/filemode.c (setst): Remove.
8935         (strmode): Rewrite to avoid setst.  This makes the code shorter,
8936         (arguably) clearer, and the generated code is a bit smaller on my
8937         Debian GNU/Linux stable x86 host.
8938
8939         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
8940
8941         * lib/filemode.c: Include "filemode.h" first, to test the interface.
8942         Assume that filemode.h includes sys/types.h and sys/stat.h.
8943         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
8944         (ftypelet): Reorder to put common cases first, for efficiency.
8945         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
8946         to do 'M'.
8947         (strmode): Renamed from mode_string, and now stores 12 bytes instead
8948         of 10, for compatibility with FreeBSD.  All callers changed.
8949         (filemodestring): Now stores 12 bytes instead of 10, and sets file
8950         types that can't be deduced solely from st_mode.  First arg is now a
8951         const pointer.
8952         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
8953         (strmode): Renamed from mode_string.
8954         (filemodestring): New decl.
8955         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
8956         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
8957         needed.
8958         (S_ISPORT, S_ISWHT): New macros, if not already defined.
8959
8960         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
8961
8962         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
8963         fsusage.h now does that.  Include fsusage.h first, to test interface.
8964         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
8965         at most one method (the old code could have generated decls that
8966         didn't conform to C89, not that this was ever exercised).
8967         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
8968
8969         2006-03-19  Jim Meyering  <jim@meyering.net>
8970
8971         Work even in a chroot where d_ino values for entries in "/"
8972         don't match the stat.st_ino values for the same names.
8973         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
8974         number, iterate through all entries again, using lstat instead.
8975         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
8976         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
8977
8978         * lib/getcwd.c (__getcwd): Clarify a comment.
8979         Use memcpy in place of a call to strcpy.
8980
8981         2006-03-12  Jim Meyering  <jim@meyering.net>
8982
8983         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
8984         matches that of the current directory (which we're about to chdir ".."
8985         out of), then save the dev-ino of the parent, instead.
8986
8987         * lib/same-inode.h (SAME_INODE): New file/macro.
8988         * lib/chdir-safer.c (SAME_INODE): Remove definition.
8989         Include "same-inode.h", instead.
8990         * lib/same.c: Likewise.
8991         * lib/cycle-check.h: Include "same-inode.h".
8992         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
8993         * lib/cycle-check.c (SAME_INODE): Remove definition.
8994         * lib/root-dev-ino.h: Include "same-inode.h".
8995
8996         2006-03-11  Eric Blake  <ebb9@byu.net>
8997
8998         * lib/same.c (same_name): s/base_name/last_component/
8999         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
9000         * lib/filenamecat.c (file_name_concat): Likewise.
9001
9002         2006-03-11  Eric Blake  <ebb9@byu.net>,
9003                     Paul Eggert  <eggert@cs.ucla.edu>
9004
9005         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
9006         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
9007         drive prefix.
9008         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
9009         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
9010         (last_component): New method.
9011         * lib/dirname.c (dir_len): Determine when drive letters need a
9012         subsequent slash.  Preserve // when it is special.
9013         (dir_name): Don't append dot when drive letter is absolute.
9014         [TEST_DIRNAME]: Move into a full-blown gnulib test.
9015         * lib/basename.c (base_name): New semantics - malloc the result.
9016         Preserve // when it is special.  Preserve relative files that look
9017         like drive letters.
9018         (base_len): Preserve // when it is special.
9019         (last_component): New method, similar to old base_name semantics.
9020         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
9021         base_name.  Strip redundant slashes from ///.
9022
9023 2006-07-03  Jim Meyering  <jim@meyering.net>
9024
9025         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
9026         macro is used before the first cycle_check call.
9027
9028 2006-07-03  Eric Blake  <ebb9@byu.net>
9029
9030         * modules/dirname (Depends-on): Add xstrndup.
9031
9032 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
9033
9034         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
9035         test cases, so that config.log is a bit easier to follow.
9036
9037 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
9038
9039         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
9040         both are 64 bits, since this seems to be the tradition, and this
9041         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
9042         we ever run into a host that prefers long long to long in this
9043         case, we'll need another configure-time test.  Problem reported by
9044         Jim Meyering.
9045
9046 2006-07-02  Eric Blake  <ebb9@byu.net>
9047
9048         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
9049
9050 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
9051
9052         * modules/inttypes (Depends-on): No longer depends on stdint.
9053         * modules/stdint (Description): Say more about assumptions.
9054         Say that the fast types might differ.  Say macros are used.
9055         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
9056         (Makefile.am): Revise list of substituted symbols to match
9057         new stdint.m4.
9058         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
9059         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
9060         * tests/test-stdint.c (verify_same_types)
9061         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
9062         the code conforms to C99/C89.
9063         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
9064         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
9065
9066 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
9067
9068         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
9069         but fix a bug, by requiring at least 64 bits.
9070         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
9071         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
9072         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
9073         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
9074
9075         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
9076         changes.  Make 2.59 a prerequisite.  Check and substitute for
9077         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
9078         inttypes.h.  Do not use special include files; just use the
9079         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
9080         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
9081         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
9082         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
9083         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
9084         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
9085         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
9086         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
9087         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
9088         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
9089         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
9090         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
9091         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
9092         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
9093         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
9094         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
9095         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
9096         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
9097         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
9098         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
9099         WINT_MAX.  Check for C99 conformance more strictly, by detecting
9100         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
9101         not check for things that C99 does not require, e.g., int8_t.  If
9102         a test isn't needed unless <stdint.h> isn't working, and is
9103         unlikely to be needed for any other reason, then don't do it
9104         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
9105         size_t, since we assume C89 freestanding at least.  Do not check
9106         for sig_atomic_t, wchar_t, or wint_t, since the code now does
9107         the right thing even if the types are not defined.  Instead use:
9108         (gl_STDINT_TYPE_PROPERTIES): New macro.
9109         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
9110         testing whether <sys/types.h> clashes, as Autoconf does this for
9111         us now.  All uses removed.
9112         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
9113         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
9114         (gl_CHECK_TYPE_SAME):
9115         Remove; no longer needed.
9116         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
9117         exists, since we'll return 0 anyway in that case.
9118         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
9119
9120 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
9121
9122         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
9123         possible collision with system files.
9124         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
9125         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
9126         WCHAR_MIN and WCHAR_MAX in this case.
9127         (<stddef.h>): Do not include; no longer needed.
9128         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
9129         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
9130         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
9131         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
9132         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
9133         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
9134         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
9135         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
9136         !defined(__c99))]: Include in this case too, since it's harmless
9137         now.
9138         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
9139         dangerous to do so.
9140         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
9141         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
9142         (_STDINT_MIN, _STDINT_MAX): New macros.
9143         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
9144         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
9145         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
9146         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
9147         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
9148         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
9149         macros, not typedefs; this simplifies things quite a bit.
9150         Use long int for all types narrower than int64_t.
9151         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
9152         Define in terms of long long int or int64_t or long int,
9153         not int64_t or int32_t.  This saves some compile-time testing.
9154         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
9155         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
9156         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
9157         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
9158         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
9159         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
9160         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
9161         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
9162         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
9163         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
9164         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
9165         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
9166         undef any previous version and define our own version, for
9167         simplicity and consistency with the new macros for types.
9168         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
9169         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
9170         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
9171         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
9172         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
9173         @WINT_T_SUFFIX@ to keep things simple here.
9174         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
9175         Simplify by assuming typical 8/16/32/64 host, since we're
9176         already doing that elsewhere anyway.
9177         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
9178         and assume long long int is 64 bits if available.  This
9179         speeds up 'configure'.
9180
9181 2006-07-01  Eric Blake  <ebb9@byu.net>
9182
9183         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
9184         Reported by Andreas Buening.
9185
9186 2006-07-01  Eric Blake  <ebb9@byu.net>
9187
9188         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
9189
9190 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
9191
9192         * lib/getaddrinfo.c: fixed typo
9193
9194 2006-06-29  Jim Meyering  <jim@meyering.net>
9195
9196         * modules/strftime (Maintainer): Add my name, since with the
9197         FPRINTFTIME changes strftime.c has forked from glibc.
9198
9199 2006-06-29  Eric Blake  <ebb9@byu.net>
9200
9201         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
9202
9203 2006-06-29  Eric Blake  <ebb9@byu.net>
9204
9205         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
9206
9207 2006-06-29  Eric Blake  <ebb9@byu.net>
9208
9209         * lib/stat_.h: New file.
9210
9211 2006-06-29  Eric Blake  <ebb9@byu.net>
9212
9213         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
9214         unused static function.
9215
9216 2006-06-29  Eric Blake  <ebb9@byu.net>
9217
9218         * doc/functions.texi (Function Portability): Document missing lstat
9219         on mingw.
9220
9221 2006-06-29  Eric Blake  <ebb9@byu.net>
9222
9223         * MODULES.html.sh: Add sys_stat.
9224         * modules/sys_stat: New module.
9225         * modules/mkstemp (Depends-on): Add sys_stat.
9226
9227 2006-06-29  Derek R. Price  <derek@ximbiot.com>
9228
9229         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
9230
9231 2006-06-29  Derek R. Price  <derek@ximbiot.com>
9232
9233         * m4/c-bs-a.m4: Removed.
9234
9235 2006-06-29  Derek R. Price  <derek@ximbiot.com>
9236
9237         * lib/strftime.c: Assume strftime() exists.
9238
9239 2006-06-29  Derek Price  <derek@ximbiot.com>
9240
9241         * modules/c-bs-a: Removed - \a is C89.
9242         * MODULES.html.sh: Remove c-bs-a.
9243
9244 2006-06-29  Bruno Haible  <bruno@clisp.org>
9245
9246         * modules/wcwidth (License): Change to LGPL.
9247
9248 2006-06-28  Simon Josefsson  <jas@extundo.com>
9249
9250         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
9251         on _WIN32.
9252
9253         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
9254         getnameinfo.
9255
9256 2006-06-28  Simon Josefsson  <jas@extundo.com>
9257
9258         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
9259
9260 2006-06-28  Simon Josefsson  <jas@extundo.com>
9261
9262         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
9263         functions there.  It will succeed on Windows XP, but on Windows
9264         2000 and (presumably) earlier, it will fail, and use the internal
9265         re-implementation.
9266         (use_win32_p): New function.
9267         (getaddrinfo): Use strtoul on servname, to support numeric ports.
9268         Support AI_NUMERICSERV to disable getservbyname.
9269         (getnameinfo): New function, only supports
9270         NI_NUMERICHOST|NI_NUMERICSERV for now.
9271
9272         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
9273         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
9274         getnameinfo.
9275
9276 2006-06-28  Eric Blake  <ebb9@byu.net>
9277
9278         * modules/wcwidth: New file.
9279         * modules/mbchar (Depends-on): Add wcwidth.
9280         * modules/mbswidth (Depends-on): Add wcwidth.
9281         * MODULES.html.sh: Add wcwidth.
9282
9283 2006-06-28  Eric Blake  <ebb9@byu.net>
9284
9285         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
9286         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
9287
9288 2006-06-28  Eric Blake  <ebb9@byu.net>
9289
9290         * lib/xvasprintf.h: Fix comments.
9291
9292 2006-06-28  Eric Blake  <ebb9@byu.net>
9293
9294         * lib/mbchar.h (wcwidth): Include wcwidth.h.
9295         * lib/mbswidth.c (wcwidth): Move from here...
9296         * lib/wcwidth.h: ...to this new file.
9297
9298 2006-06-28  Derek R. Price  <derek@ximbiot.com>
9299
9300         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
9301
9302         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
9303         it's obsolete.
9304         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
9305
9306 2006-06-28  Derek R. Price  <derek@ximbiot.com>
9307
9308         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
9309         Autoconf 2.60 says this stuff was obsolete.
9310
9311 2006-06-28  Bruno Haible  <bruno@clisp.org>
9312
9313         * modules/wcwidth (Files): Add m4/wchar_t.m4.
9314
9315 2006-06-28  Bruno Haible  <bruno@clisp.org>
9316
9317         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
9318         gt_TYPE_WCHAR_T.
9319
9320 2006-06-28  Bruno Haible  <bruno@clisp.org>
9321
9322         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
9323         declaration for wcwidth.
9324         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
9325
9326 2006-06-28  Bruno Haible  <bruno@clisp.org>
9327
9328         * lib/mkdtemp.c [MINGW]: Include <io.h>.
9329         (mkdir): Define using _mkdir.
9330
9331 2006-06-28  Bruno Haible  <bruno@clisp.org>
9332
9333         * lib/getaddrinfo.h: Fix POSIX URL.
9334         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
9335         _WIN32.
9336         (use_win32_p): Make static.
9337         (getaddrinfo): Reject service name if it is empty or does not consist
9338         solely of decimal digits, or if its value is > 65535.
9339         (getnameinfo): Remove useless casts.
9340
9341 2006-06-27  Simon Josefsson  <jas@extundo.com>
9342
9343         * modules/sys_select: New file, suggested by Bruno Haible, Paul
9344         Eggert and Martin Lambers.
9345
9346 2006-06-27  Simon Josefsson  <jas@extundo.com>
9347
9348         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
9349         Eggert and Martin Lambers.
9350
9351 2006-06-27  Bruno Haible  <bruno@clisp.org>
9352
9353         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
9354         result to 0, not to empty.
9355         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
9356
9357 2006-06-27  Bruno Haible  <bruno@clisp.org>
9358
9359         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
9360
9361 2006-06-26  Simon Josefsson  <jas@extundo.com>
9362
9363         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
9364         present.
9365
9366 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
9367
9368         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
9369         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
9370         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
9371
9372 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
9373
9374         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
9375
9376 2006-06-26  Bruno Haible  <bruno@clisp.org>
9377
9378         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
9379
9380 2006-06-26  Bruno Haible  <bruno@clisp.org>
9381
9382         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
9383
9384 2006-06-26  Bruno Haible  <bruno@clisp.org>
9385
9386         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
9387         SGI C compiler in pre-C99 mode.
9388         Suggested by Mark D. Baushke and Larry Jones.
9389
9390 2006-06-26  Bruno Haible  <bruno@clisp.org>
9391
9392         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
9393         WCHAR_MAX.
9394         Reported by Mark D. Baushke and Larry Jones.
9395
9396 2006-06-26  Bruno Haible  <bruno@clisp.org>
9397
9398         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
9399         in pre-C99 mode.
9400         Suggested by Mark D. Baushke and Larry Jones.
9401
9402 2006-06-23  Simon Josefsson  <jas@extundo.com>
9403             Bruno Haible  <bruno@clisp.org>
9404
9405         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
9406         Emit mostlyclean-local rule.
9407         (func_emit_tests_Makefile_am): Likewise.
9408         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
9409
9410 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
9411
9412         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
9413
9414 2006-06-23  Bruno Haible  <bruno@clisp.org>
9415
9416         * tests/test-stdint.c: Update to match ISO C 99 Technical
9417         Corrigendum 1.
9418
9419 2006-06-23  Bruno Haible  <bruno@clisp.org>
9420
9421         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
9422
9423 2006-06-23  Bruno Haible  <bruno@clisp.org>
9424
9425         * lib/stdint_.h: Treat IRIX like OpenBSD.
9426
9427 2006-06-23  Bruno Haible  <bruno@clisp.org>
9428
9429         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
9430         ISO C 99 Technical Corrigendum 1.
9431
9432 2006-06-22  Simon Josefsson  <jas@extundo.com>
9433
9434         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
9435         MinGW.
9436
9437 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
9438
9439         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
9440         needed.  Some compiler complained about some of them.  Problem reported
9441         by Larry Jones in
9442         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
9443
9444 2006-06-21  Simon Josefsson  <jas@extundo.com>
9445
9446         * tests/test-getaddrinfo.c: New file.
9447
9448         * modules/getaddrinfo-tests: New file.
9449
9450         * MODULES.html.sh: Add inet_pton.
9451
9452         * modules/inet_pton: New file.
9453
9454 2006-06-21  Simon Josefsson  <jas@extundo.com>
9455
9456         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
9457         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
9458         of using the (limited) gnulib implementation on Windows XP.
9459
9460         * m4/inet_pton.m4: New file.
9461
9462 2006-06-21  Simon Josefsson  <jas@extundo.com>
9463
9464         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
9465         variable.
9466
9467         * lib/socket_.h: Don't define WINVER.
9468
9469         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
9470         slightly modified to work in gnulib.
9471
9472 2006-06-21  Simon Josefsson  <jas@extundo.com>
9473
9474         * doc/gnulib.texi (Windows sockets): Add.
9475
9476 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
9477
9478         * lib/read-file.c (fread_file): Start with buffer allocation of
9479         0 bytes rather than 1 byte; this simplifies the code.
9480         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
9481         code to free buffer and save/restore errno.
9482         (internal_read_file): Remove unused local.
9483
9484 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
9485
9486         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
9487         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
9488         Problem reported by Denis Excoffier in
9489         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
9490
9491 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
9492
9493         * modules/sys_socket, modules/socklen: Include sys/types since
9494         FreeBSD 4.x's sys/socket.h needs it.
9495
9496 2006-06-19  Simon Josefsson  <jas@extundo.com>
9497
9498         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
9499
9500 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
9501
9502         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
9503
9504 2006-06-19  Bruno Haible  <bruno@clisp.org>
9505
9506         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
9507         and FULL_PATH_INTTYPES_H in angle brackets.
9508         Reported by Mark D. Baushke <mdb@gnu.org>.
9509
9510 2006-06-17  Eric Blake  <ebb9@byu.net>
9511
9512         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
9513         errno.
9514
9515 2006-06-17  Bruno Haible  <bruno@clisp.org>
9516
9517         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
9518         <sys/inttypes.h>.
9519
9520 2006-06-17  Bruno Haible  <bruno@clisp.org>
9521
9522         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
9523         whether errno is declared. Assume <errno.h> declares errno.
9524
9525 2006-06-17  Bruno Haible  <bruno@clisp.org>
9526
9527         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
9528
9529 2006-06-17  Bruno Haible  <bruno@clisp.org>
9530
9531         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
9532         problem on Solaris 2.5.1.
9533
9534 2006-06-16  Eric Blake  <ebb9@byu.net>
9535
9536         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
9537         * lib/unicodeio.c [!defined errno]: Likewise.
9538         * lib/strtol.c [!defined errno]: Likewise.
9539         * lib/strtod.c [!defined errno]: Likewise.
9540
9541 2006-06-15  Eric Blake  <ebb9@byu.net>
9542
9543         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
9544
9545 2006-06-15  Eric Blake  <ebb9@byu.net>
9546
9547         * config/srclist.txt (ssize_t.m4): Lose sync.
9548
9549 2006-06-15  Bruno Haible  <bruno@clisp.org>
9550
9551         * modules/stdint (Files): Include m4/full-header-path.m4,
9552         m4/size_max.m4, m4/wchar_t.m4.
9553         (Makefile.am): Many more substitutions.
9554         * modules/stdint-tests: New file.
9555         * tests/test-stdint.c: New file.
9556
9557 2006-06-15  Bruno Haible  <bruno@clisp.org>
9558
9559         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
9560         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
9561         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
9562         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
9563         gl_CHECK_TYPE_SAME): New macros.
9564
9565 2006-06-15  Bruno Haible  <bruno@clisp.org>
9566
9567         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
9568
9569 2006-06-15  Bruno Haible  <bruno@clisp.org>
9570
9571         * lib/stdint_.h: Rewritten to be fully auto-configured.
9572         Fixes bug on HP-UX/IA64.
9573
9574 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
9575
9576         * lib/getdate.y (__attribute__): Don't define if already defined.
9577         Problem reported by Larry Jones.
9578         * lib/utimens.c (__attribute__): Likewise.
9579
9580 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
9581
9582         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
9583         reported by Andreas Schwab.
9584
9585 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9586             Bruno Haible  <bruno@clisp.org>
9587
9588         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
9589         check for the declaration of strnlen and a run test that exposes the
9590         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
9591         rpl_strndup.
9592
9593 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9594             Bruno Haible  <bruno@clisp.org>
9595
9596         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
9597
9598 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9599
9600         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
9601         compile test, for Tru64 4.0D.
9602
9603 2006-05-28  Karl Berry  <karl@gnu.org>
9604
9605         * config/srclist.txt (printf-args.c): lose sync.
9606
9607 2006-05-26  Martin Lambers  <marlam@marlam.de>
9608
9609         * lib/getpass.c: Updates the test for the native W32 API, and adds
9610         missing includes, thus fixing compilation warnings.
9611
9612 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
9613
9614         * lib/exclude.c (exclude_fnmatch): New function.
9615         (excluded_file_name): Call exclude_fnmatch.
9616         * lib/exclude.h (excluded_file_name): New prototype
9617
9618 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
9619
9620         * lib/tempname.c (small_open, large_open): New macros.
9621         (__open, __open64) [!_LIBC]: Remove.
9622         (__gen_tempname): Use small_open and large_open instead of __open
9623         and __open64.  This fixes a portability bug on HP-UX 11.11i
9624         reported by Simon Wing-Tang in
9625         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
9626
9627 2006-05-24  Bruno Haible  <bruno@clisp.org>
9628
9629         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
9630         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
9631         Reported by Thorsten Maerz <torte@netztorte.de> via
9632         Aaron Stone <aaron@serendipity.cx>.
9633
9634 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
9635
9636         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
9637         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
9638         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
9639         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
9640         not really conditional on the cache.
9641         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
9642
9643 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
9644
9645         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
9646         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
9647         (my_usleep): Don't mishandle maximum value.
9648
9649 2006-05-19  Jim Meyering  <jim@meyering.net>
9650
9651         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
9652
9653 2006-05-17  Bruno Haible  <bruno@clisp.org>
9654
9655         Cygwin portability.
9656         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
9657
9658 2006-05-17  Bruno Haible  <bruno@clisp.org>
9659
9660         * lib/stdint_.h: Fix recognition of Cygwin.
9661
9662 2006-05-15  Bruno Haible  <bruno@clisp.org>
9663
9664         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
9665         on libtool patch by Ralf Wildenhues.
9666
9667 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
9668
9669         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
9670         test for C99 conformance; (bool) 0.5 is an integer constant
9671         expression, but (bool) -0.5 is not.  Problem reported by Fedor
9672         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
9673
9674 2006-05-11  Simon Josefsson  <jas@extundo.com>
9675
9676         * m4/xvasprintf.m4: Fix obvious typo.
9677
9678 2006-05-11  Jim Meyering  <jim@meyering.net>
9679
9680         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
9681         James Lemley.
9682
9683 2006-05-10  Simon Josefsson  <jas@extundo.com>
9684
9685         * lib/md4.c: Typo fix, update copyright years.
9686         (K1, K2): Don't use L because it turn computations into 64-bit on
9687         64-bit platforms.
9688
9689 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
9690
9691         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
9692         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
9693         unwanted sign propagation, e.g., on hosts with 64-bit int.
9694         There still are some problems with reeelly weird theoretical hosts
9695         (e.g., 33-bit int) but it's not worth worrying about now.
9696         * lib/sha1.c (rol): Likewise.
9697         (K1, K2, K3, K4): Remove unnecessary L suffix.
9698
9699 2006-05-10  Bruno Haible  <bruno@clisp.org>
9700
9701         * lib/des.c: Cast to avoid warnings.
9702
9703 2006-05-09  Bruno Haible  <bruno@clisp.org>
9704
9705         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
9706         (Depends-on): Depend also on xsize, stdarg.
9707         (configure.ac): Add gl_XVASPRINTF.
9708
9709 2006-05-09  Bruno Haible  <bruno@clisp.org>
9710
9711         * m4/xvasprintf.m4: New file.
9712
9713 2006-05-09  Bruno Haible  <bruno@clisp.org>
9714
9715         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
9716         (EOVERFLOW): Define fallback value.
9717         (xstrcat): New function.
9718         (xvasprintf): Recognize the special case of a string concatenation.
9719
9720 2006-05-08  Eric Blake  <ebb9@byu.net>
9721
9722         * gnulib-tool (func_version): Base copyright year on CVS date.
9723         (func_emit_copyright_notice): New function.
9724         (func_emit_lib_Makefile_am): Use it.
9725         (func_emit_tests_Makefile_am): Likewise.
9726         (func_import): Likewise.
9727
9728 2006-05-08  Bruno Haible  <bruno@clisp.org>
9729
9730         * modules/stdarg: New file.
9731         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
9732
9733 2006-05-08  Bruno Haible  <bruno@clisp.org>
9734
9735         * m4/stdarg.m4: New file, from GNU gettext.
9736
9737 2006-05-08  Bruno Haible  <bruno@clisp.org>
9738
9739         * config/srclist.txt (build-aux/config.rpath): different from latest
9740         release.
9741
9742 2006-05-08  Bruno Haible  <bruno@clisp.org>
9743
9744         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
9745
9746 2006-05-05  Jim Meyering  <jim@meyering.net>
9747
9748         * m4/warning.m4: New file, derived from bison's file by the same name.
9749
9750 2006-05-03  Bruno Haible  <bruno@clisp.org>
9751
9752         * lib/stdint_.h: Shorter URL.
9753         * lib/inttypes.h: Likewise.
9754
9755 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
9756
9757         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
9758
9759 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
9760
9761         * lib/verify.h: Document the internals better.  Most of this change
9762         was written by Bruno Haible.
9763
9764 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
9765
9766         * doc/verify.texi: New file, partly based on a proposal by
9767         Bruno Haible.
9768
9769 2006-05-02  Bruno Haible  <bruno@clisp.org>
9770
9771         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
9772         test from here...
9773         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
9774
9775 2006-04-29  Bruno Haible  <bruno@clisp.org>
9776
9777         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
9778         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
9779
9780 2006-04-29  Bruno Haible  <bruno@clisp.org>
9781
9782         * gnulib-tool: Make --update option actually work.
9783
9784 2006-04-29  Bruno Haible  <bruno@clisp.org>
9785
9786         * doc/gcd.texi: New file.
9787         * doc/gnulib.texi: Include it.
9788
9789 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
9790
9791         * lib/getdate.y (get_date): When adding relative date, start with the
9792         initial time, not with the result of the first mktime call.
9793
9794 2006-04-25  Bruno Haible  <bruno@clisp.org>
9795
9796         * gnulib-tool (func_import): Output the include directives in three
9797         blocks, sorted separately.
9798         Reported by Ben Pfaff <blp@cs.stanford.edu>.
9799
9800 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
9801
9802         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
9803         to define main with arguments, for C++.  Reported by Eric Blake.
9804         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
9805         Prefer 'int main ()' to 'int main (void)', for C++.
9806         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
9807         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
9808         for 'main', for C99 and C++.
9809
9810 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
9811
9812         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
9813         Don't assume that exit status -1 is valid.
9814         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
9815         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
9816         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
9817         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
9818         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
9819         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
9820         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
9821         functions can be used without declaring them, or that you can
9822         exit with status -1.
9823         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
9824
9825 2006-04-24  Karl Berry  <karl@gnu.org>
9826
9827         * config/srclist.txt (longdouble.m4): sync lost.
9828
9829 2006-04-24  Eric Blake  <ebb9@byu.net>
9830
9831         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
9832
9833 2006-04-24  Bruno Haible  <bruno@clisp.org>
9834
9835         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
9836         poll() implementation in AIX.
9837         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9838
9839 2006-04-24  Bruno Haible  <bruno@clisp.org>
9840
9841         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
9842         assigned exactly once.
9843
9844 2006-04-23  Claudio Fontana  <claudio@gnu.org>
9845             Bruno Haible  <bruno@clisp.org>
9846
9847         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
9848         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
9849         for AM_CPPFLAGS.
9850
9851 2006-04-23  Bruno Haible  <bruno@clisp.org>
9852
9853         * modules/copy-file: Depend on unistd.
9854         * modules/execute: Likewise.
9855         * modules/fatal-signal: Likewise.
9856         * modules/findprog: Likewise.
9857         * modules/mkdtemp : Likewise.
9858         * modules/pipe: Likewise.
9859         * modules/wait-process: Likewise.
9860
9861 2006-04-23  Bruno Haible  <bruno@clisp.org>
9862
9863         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
9864         condition was already detected.
9865         Reported by Ben Pfaff <blp@cs.stanford.edu>.
9866
9867 2006-04-23  Bruno Haible  <bruno@clisp.org>
9868
9869         * lib/copy-file.c: Include <unistd.h> unconditionally.
9870         * lib/execute.c: Likewise.
9871         * lib/fatal-signal.c: Likewise.
9872         * lib/findprog.c: Likewise.
9873         * lib/mkdtemp.c: Likewise.
9874         * lib/pipe.h: Likewise.
9875         * lib/pipe.c: Likewise.
9876         * lib/wait-process.h: Likewise.
9877
9878 2006-04-23  Bruno Haible  <bruno@clisp.org>
9879
9880         * gnulib-tool (func_usage): Fix --import description. Document
9881         --update.
9882         (func_import): Create temporary file in a temporary directory, if
9883         --dry-run is specified. Silence errors from 'grep' when there are no
9884         m4 files in $m4dir.
9885         (func_create_testdir): Silence errors from 'grep' when there are no
9886         m4 files in $m4dir.
9887         Reported by Karl Berry <karl@freefriends.org>.
9888
9889 2006-04-20  Bruno Haible  <bruno@clisp.org>
9890
9891         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
9892         one argument, so that the code will be portable to Autoconf 2.60.
9893         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
9894         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
9895         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
9896
9897 2006-04-19  Derek Price  <derek@ximbiot.com>
9898             Eric Blake  <ebb9@byu.net>
9899
9900         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
9901         rather than "/full/path.h".  Update comment to match.  Shorten &
9902         generalize m4_translit call via AS_TR_CPP.
9903
9904 2006-04-19  Derek Price  <derek@ximbiot.com>
9905             Eric Blake  <ebb9@byu.net>
9906
9907         * lib/inttypes.h: Correct grammar in comment.
9908
9909 2006-04-18  Derek Price  <derek@ximbiot.com>
9910             Paul Eggert  <eggert@cs.ucla.edu>
9911
9912         * modules/inttypes: New file.
9913         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
9914
9915 2006-04-18  Derek Price  <derek@ximbiot.com>
9916             Paul Eggert  <eggert@cs.ucla.edu>
9917
9918         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
9919         New files.
9920
9921 2006-04-18  Derek Price  <derek@ximbiot.com>
9922             Paul Eggert  <eggert@cs.ucla.edu>
9923
9924         * lib/inttypes.h: New file.
9925         * lib/strtoimax.c: Assume <inttypes.h>.
9926
9927 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
9928
9929         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
9930         isn't mounted.  Problem reported by Kir Kolyshkin.
9931
9932 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
9933
9934         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
9935         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
9936         Derek R. Price.
9937         * lib/regex.h (RE_DUP_MAX): Update comment to match current
9938         implementation.
9939
9940 2006-04-12  Eric Blake  <ebb9@byu.net>
9941
9942         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
9943         is now done automatically by the corresponding Autoconf macro.
9944
9945 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
9946
9947         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
9948         time_r.h.
9949
9950 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9951
9952         Merge regex changes from libc, removing some of our
9953         POSIX-conformance changes that were rejected and redoing them in a
9954         less-intrusive way.
9955
9956         * lib/regcomp.c (re_compile_internal, init_dfa):
9957         Length arg is now size_t, not Idx.  All uses changed.
9958         (peek_token): Forward decl now says internal_function.
9959         (__re_error_msgid, __re_error_msgid_idx):
9960         Now static rather than extern with attribute_hidden.
9961         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
9962         For some reason libc prefers K&R style defns for external functions.
9963         (regerror) [!defined _LIBC]: Likewise.
9964         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
9965         (seek_collating_symbol_entry, lookup_collation_sequence_value):
9966         (build_range_exp, build_collating_symbol):
9967         Use K&R-style defn.
9968         (re_compile_fastmap): Use '\0' to memset, not 0.
9969         (utf8_sb_map): Make the calculations more obvious.
9970         (init_dfa, parse_bracket_exp, build_charclass_op):
9971         Call calloc and cast result, as glibc does.
9972         (init_word_char, fetch_token, peek_token, peek_token_bracket):
9973         (build_range_exp, build_collating_symbol):
9974         Now internal functions.
9975
9976         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
9977
9978         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
9979         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
9980         Don't depend on VMS; depend on __VMS instead, for POSIX
9981         namespace cleanness.
9982         (regoff_t): Define to ssize_t, not long int.
9983
9984         Remove the REG_ macros named below.  Instead, make the old names
9985         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
9986         __USE_GNU_REGEX.
9987         (REG_BACKSLASH_ESCAPE_IN_LISTS):
9988         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
9989         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
9990         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
9991         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
9992         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
9993         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
9994         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
9995         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
9996         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
9997         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
9998         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
9999         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
10000         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
10001         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
10002         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
10003         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
10004         (REG_NREGS):
10005         Remove.  All uses replaced by the old RE_* names.
10006         (RE_BACKSLASH_ESCAPE_IN_LISTS):
10007         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
10008         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
10009         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
10010         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
10011         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
10012         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
10013         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
10014         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
10015         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
10016         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
10017         Don't bother having these macros be independent of each others'
10018         values, since they no longer exist in the POSIX name space.
10019
10020         Rename the following member names back to their old names,
10021         unless !__USE_GNU_REGEX.  All uses changed back.
10022         (buffer): Renamed from re_buffer.
10023         (allocated): Renamed from re_allocated.
10024         (used): Renamed from re_used.
10025         (syntax): Renamed from re_syntax.
10026         (fastmap): Renamed from re_fastmap.
10027         (translate): Renamed from re_translate.
10028         (can_be_null): Renamed from re_can_be_null.
10029         (regs_allocated): Renamed from re_regs_allocated.
10030         (fastmap_accurate): Renamed from re_fastmap_accurate.
10031         (no_sub): Renamed from re_no_sub.
10032         (not_bol): Renamed from re_not_bol.
10033         (not_eol): Renamed from re_not_eol.
10034         (newline_anchor): Renamed from re_newline_anchor.
10035         (num_regs): Renamed from rm_num_regs.
10036         (start): Renamed from rm_start.
10037         (end): Renamed from rm_end.
10038
10039         (free_state): Move up a bit.
10040
10041         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
10042         #define to be empty.
10043         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
10044         when that is what is intended.
10045         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
10046         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
10047         (MAX): New macro.
10048         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
10049         All uses changed back to re_malloc, etc.  It's now the caller's
10050         responsibility to check for overflow; all callers changed.
10051         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
10052         (re_x2nrealloc): Remove.
10053         (free_state): Remove decl.
10054
10055         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
10056         (re_set_registers, re_exec):
10057         Use K&R-style defn.
10058
10059         2006-01-31  Roland McGrath  <roland@redhat.com>
10060
10061         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
10062         Reported by Mike Frysinger <vapier@gentoo.org>.
10063
10064         2006-01-15  Andreas Jaeger  <aj@suse.de>
10065
10066         [BZ #1950]
10067         * lib/regex_internal.c (re_string_reconstruct): Adjust for
10068         build_wcs_upper_buffer change.
10069         (build_wcs_upper_buffer): Change return type.
10070
10071         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
10072
10073         * lib/regex_internal.h: Include <stdint.h> if available.
10074
10075         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
10076
10077         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
10078
10079         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
10080
10081         * lib/regcomp.c: Adjust for changed secondary hash function.
10082
10083         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
10084
10085         * lib/regex.h: Pretty printing.
10086         Clean up namespace a bit.
10087
10088         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
10089
10090         * lib/regexec.c (update_cur_sifted_state, check_arrival,
10091         check_arrival_add_next_nodes): Avoid using uninitialized variable.
10092
10093         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
10094                     Ulrich Drepper  <drepper@redhat.com>
10095
10096         [BZ #1302]
10097         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
10098         changed.
10099         (bitset_word_t): Renamed from bitset_word.  All uses changed.
10100
10101         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
10102
10103         [BZ #281]
10104         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
10105         * lib/regcomp.c: Remove unnecessary uses of
10106         unsigned RE_TRANSLATE_TYPE.
10107         * lib/regex_internal.h: Likewise.
10108         * lib/regex_internal.c: Likewise.
10109         * lib/regexec.c: Likewise.
10110         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
10111
10112         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
10113
10114         * lib/regexec.c (find_recover_state): Remove unnecessary
10115         initialization.
10116         (transit_state_bkref): Make DFA a const pointer.
10117         (get_subexp): Likewise.
10118         (check_arrival): Likewise.
10119         (update_cur_sifted_state): Likewise.
10120         (re_search_internal): Likewise.
10121         (prune_impossible_nodes): Likewise.
10122         (acquire_init_state_context): Likewise.
10123         (proceed_next_node): Likewise.
10124         (set_regs): Likewise.
10125         (free_fail_stack_return): Likewise.
10126         (check_arrival_expand_ecl): Mark DFA parameter as const.
10127         (check_arrival_expand_ecl_sub): Likewise.
10128         (check_subexp_limits): Likewise.
10129         (sub_epsilon_src_nodes):  Likewise.
10130         (add_epsilon_src_nodes):  Likewise.
10131         (merge_state_array): Likewise.
10132         (update_regs): Likewise.
10133         (build_trtable): Likewise.
10134         (sift_states_backward): Mark MCTX parameter as const.
10135         (build_sifted_states): Likewise.
10136         (update_cur_sifted_state): Likewise.
10137         (sift_states_mkref): Likewise.
10138         (check_arrival_expand_ecl): Mark eclosure as const.
10139         (check_dst_limits_calc_pos_1): Likewise.
10140         * lib/regex_internal.h (re_match_context_t): Make dfa a const
10141         pointer.
10142
10143         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
10144
10145         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
10146         (transit_state_sb): Likewise.
10147         (transit_state_mb): Likewise.
10148         (sift_states_iter_mb): Likewise.
10149         (check_arrival_add_next_nodes): Likewise.
10150         (check_node_accept_bytes): Change first parameter to pointer-to-const.
10151         [_LIBC] (re_search_2_stub): Use mempcpy.
10152
10153         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
10154         mbrtowc for very simple UTF-8 case.
10155
10156         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
10157         a pointer-to-const.
10158         (re_acquire_state_context): Likewise.
10159         * lib/regex_internal.h: Adjust prototypes.
10160
10161         * lib/regex.c: Prevent using C++ compilers.
10162
10163         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
10164         (re_acquire_state_context): Likewise.
10165
10166 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
10167
10168         * modules/regex (Depends-on): Add ssize_t.
10169
10170 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
10171
10172         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
10173         translation table.
10174
10175 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
10176
10177         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
10178
10179 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
10180             Bruno Haible  <bruno@clisp.org>
10181
10182         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
10183         <sys/types.h> and <inttypes.h>.
10184
10185 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10186
10187         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
10188         `__error_t_defined', so argp.h will not typedef the former.
10189
10190 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
10191
10192         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
10193         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
10194         glibc names.  Even if glibc is changed to conform to POSIX, the
10195         traditional names will be available anyway, since regex depends on
10196         the extensions module.  Also, fix a longstanding typo in the
10197         implementation of Spencer ERE test #75 from grep 2.3.  Problems
10198         reported by Emanuele Giaquinta.  Also, change sense of cached
10199         variable, so that the message makes sense.
10200
10201 2006-03-24  Simon Josefsson  <jas@extundo.com>
10202
10203         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
10204         including some doc fixes.
10205         (base64_encode_alloc): Fix +1 bug on allocation failures.
10206
10207 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10208
10209         * lib/base64.c (base64_encode): Do not read past end of array with
10210         unsanitized input on systems with CHAR_BIT > 8.
10211
10212 2006-03-24  Eric Blake  <ebb9@byu.net>
10213
10214         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
10215
10216 2006-03-22  Karl Berry  <karl@gnu.org>
10217
10218         * config/srclist.txt (*setenv.[ch]): get from coreutils.
10219         * config/srclistvars.sh (COREUTILS): new var.
10220
10221 2006-03-17  Jim Meyering  <jim@meyering.net>
10222
10223         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
10224         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
10225
10226 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
10227
10228         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
10229         no longer needs it.  Instead, check that regoff_t is as least
10230         as wide as ptrdiff_t.
10231
10232         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
10233         so that our regex.h stays compatible with the installed regex.
10234         This is helpful for installers who configure --without-included-regex.
10235         Problem reported by Emanuele Giaquinta.
10236
10237 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
10238
10239         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
10240         Typedef to long int, not to off_, as POSIX will likely change
10241         in that direction.
10242
10243 2006-03-15  Eric Blake  <ebb9@byu.net>
10244
10245         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
10246
10247 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
10248
10249         * lib/argp-help.c (validate_uparams): Fix typo
10250         * lib/argp-parse.c (argp_default_options): Consistently begin help
10251         messages with a lowercase letter.
10252
10253 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
10254
10255         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
10256         overrun buffers and shouldn't be used (much as gets shouldn't be
10257         used).
10258         * lib/time_r.c (asctime_r, ctime_r): Likewise.
10259
10260 2006-03-08  Simon Josefsson  <jas@extundo.com>
10261
10262         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
10263         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10264
10265 2006-03-08  Simon Josefsson  <jas@extundo.com>
10266
10267         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
10268         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10269
10270 2006-03-08  Simon Josefsson  <jas@extundo.com>
10271
10272         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
10273         signal that configure disabled the device.
10274
10275 2006-03-08  Simon Josefsson  <jas@extundo.com>
10276
10277         * build-aux/maint.mk: Fix refresh-po, to handle no translated
10278         languages.
10279
10280 2006-03-07  Simon Josefsson  <jas@extundo.com>
10281
10282         * modules/getopt (Depends-on): Add unistd.
10283
10284         * modules/unistd: New file.
10285
10286 2006-03-07  Simon Josefsson  <jas@extundo.com>
10287
10288         * modules/gc-random: New file.
10289
10290 2006-03-07  Simon Josefsson  <jas@extundo.com>
10291
10292         * m4/unistd_h.m4: New file.
10293
10294 2006-03-07  Simon Josefsson  <jas@extundo.com>
10295
10296         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
10297         test to be side-effect free by storing the result in the cache
10298         variable gl_cv_lib_readline, and moving the assignment of
10299         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
10300         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10301
10302 2006-03-07  Simon Josefsson  <jas@extundo.com>
10303
10304         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
10305         error on missing devices (the functions will return an error).
10306
10307         * m4/gc.m4: Move random stuff to gc-random.m4
10308
10309 2006-03-07  Simon Josefsson  <jas@extundo.com>
10310
10311         * lib/unistd_.h: New file.
10312
10313 2006-03-07  Simon Josefsson  <jas@extundo.com>
10314
10315         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
10316
10317 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
10318
10319         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
10320         Problem reported by Juan Manuel Guerrero.
10321
10322 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
10323
10324         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
10325         the unistd module.
10326         * lib/getlogin_r.c: Likewise.
10327         * lib/getlogin_r.h: Likewise.
10328         * lib/glob.c: Likewise.
10329         * lib/pagealign_alloc.c: Likewise.
10330         * lib/unistd_.h: Remove; no longer needed.
10331
10332 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
10333
10334         * MODULES.html.sh (Support for systems lacking POSIX:2001):
10335         Add unistd.
10336         * modules/c-stack (Depends-on): Add unistd.
10337         * modules/getlogin_r: Likewise.
10338         * modules/glob: Likewise.
10339         * modules/pagealign_alloc: Likewise.
10340         * modules/unistd (Files): Remove lib/unistd_.h.
10341         (EXTRA_DIST): Remove.
10342         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
10343         need unistd_.h.
10344         (MOSTLYCLEANFILES): Remove unistd.h-t.
10345
10346 2006-03-03  Simon Josefsson  <jas@extundo.com>
10347
10348         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
10349
10350 2006-03-03  Simon Josefsson  <jas@extundo.com>
10351
10352         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
10353         libidn and bison.
10354
10355 2006-03-03  Simon Josefsson  <jas@extundo.com>
10356
10357         * build-aux/maint.mk: Add indent target.
10358
10359 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
10360
10361         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
10362         our replacement poll.h in any case, to avoid a differing
10363         declaration from a system header.  Seen on AIX.
10364
10365 2006-03-01  Simon Josefsson  <jas@extundo.com>
10366
10367         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
10368         <kasal@ucw.cz>.
10369
10370 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
10371
10372         * modules/gettime (Depends-on): Add extensions module.
10373         * modules/nanosleep (Depends-on): Likewise.
10374         * modules/settime (Depends-on): Likewise.
10375
10376 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
10377
10378         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
10379         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
10380         pedantically.
10381         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
10382         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
10383
10384         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
10385         not "==".  Reported by Ralf Wildenhues.
10386
10387 2006-03-01  Karl Berry  <karl@gnu.org>
10388
10389         * doc/Copyright/request-*: new files, synced from gnuorg.
10390
10391 2006-03-01  Karl Berry  <karl@gnu.org>
10392
10393         * config/srclist.txt (Copyright/*): new entries.
10394
10395 2006-02-28  Simon Josefsson  <jas@extundo.com>
10396
10397         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
10398
10399 2006-02-27  Simon Josefsson  <jas@extundo.com>
10400
10401         * lib/base64.h: Indent #define's.  From Jim Meyering
10402         <jim@meyering.net>.
10403
10404 2006-02-27  Jim Meyering  <jim@meyering.net>
10405
10406         Revert the change of 2006-02-24, so these files can continue
10407         to be sync'd from gettext.
10408         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
10409         of `config.h'.
10410
10411 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
10412
10413         * modules/intprops: New file.
10414         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
10415         Add intprops.
10416         * modules/getloadavg (Files): Remove lib/intprops.h.
10417         (Depends-on): Add intprops.
10418         * modules/human: Likewise.
10419         * modules/inttostr: Likewise.
10420         * modules/openat: Likewise.
10421         * modules/sig2str: Likewise.
10422         * modules/userspec: Likewise.
10423         * modules/utimecmp: Likewise.
10424         * modules/xnanosleep: Likewise.
10425         * modules/xstrtol: Likewise.
10426
10427 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
10428
10429         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
10430         * modules/lock-tests (TESTS): Use $(EXEEXT).
10431         * modules/tls-tests: Likewise.
10432         * modules/argp-tests: Likewise.
10433         (check_PROGRAMS): New var, replacing...
10434         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
10435
10436 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10437
10438         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
10439         `config.h'.
10440
10441 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
10442
10443         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
10444
10445 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10446
10447         Sync from coreutils.
10448         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
10449         gl_CHDIR_SAFER.
10450
10451 2006-02-22  Jim Meyering  <jim@meyering.net>
10452
10453         Sync from coreutils.
10454         * m4/chdir-safer.m4: New file.
10455
10456 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
10457
10458         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
10459         AT_FDCWD exceeds INT_MAX.
10460         * lib/openat.h (AT_FDCWD): Likewise.
10461
10462 2006-02-17  Eric Blake  <address@hidden>
10463
10464         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
10465
10466 2006-02-16  Simon Josefsson  <jas@extundo.com>
10467
10468         * modules/getaddrinfo (Depends-on): Add sys_socket.
10469
10470 2006-02-15  Simon Josefsson  <jas@extundo.com>
10471
10472         * build-aux/maint.mk: Add dsyntax-check rule.
10473
10474 2006-02-15  Eric Blake  <ebb9@byu.net>
10475
10476         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
10477         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
10478         'present but cannot compile' warnings on cygwin.
10479         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
10480         use ws2tcpip.h if sys/socket.h works.
10481         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
10482         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
10483
10484 2006-02-14  Simon Josefsson  <jas@extundo.com>
10485
10486         * modules/maintainer-makefile (Files): Rename.
10487
10488         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
10489         and (the local) Makefile.cfg to maint-cfg.mk.
10490
10491         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
10492         to the latter.
10493
10494         * modules/maintainer-makefile: New module.
10495
10496         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
10497         severaly stripped to make it possible to build it up from scratch
10498         with reliable tests.
10499
10500         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
10501         fixes to permit overriding the default actions when configure and
10502         makefile are not available.
10503
10504 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
10505
10506         Sync from coreutils.
10507         * modules/lstat (Depends-on): Don't depend on xalloc.
10508         (License): Change from GPL to LGPL, since this is now simply a
10509         replacement for a libc function.
10510
10511 2006-02-14  Jim Meyering  <jim@meyering.net>
10512
10513         Sync from coreutils.
10514
10515         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
10516         failure on deficient systems, and simplify gnulib lgpl dependencies.
10517         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
10518         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
10519
10520         * lib/xalloc-die.c: Remove unused definition of N_.
10521
10522 2006-02-14  Jim Meyering  <jim@meyering.net>
10523
10524         Sync from coreutils.
10525         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
10526         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
10527         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
10528         double-quote uses of that variable, to accommodate the rare case in
10529         which getmntent is available in none of the libraries checked.  This
10530         happens at least on FreeBSD 5.0.
10531
10532 2006-02-13  Simon Josefsson  <jas@extundo.com>
10533
10534         * gnulib-tool (Usage): Fix --import, from
10535         karl@freefriends.org (Karl Berry).
10536
10537 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
10538
10539         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
10540
10541 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
10542
10543         * lib/argp-namefrob.h: Restore changes accidentally lost during the
10544         "autoupdate" on 2005-12-12.
10545
10546 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
10547
10548         * modules/closeout (Depends-on): Remove atexit.
10549
10550 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
10551
10552         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
10553         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
10554
10555 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
10556
10557         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
10558         __EXTENSIONS__ if this causes compilation to fail.  Problem
10559         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
10560         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
10561
10562 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
10563
10564         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
10565         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
10566         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
10567         All uses changed.
10568
10569 2006-01-26  Simon Josefsson  <jas@extundo.com>
10570
10571         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
10572         prototype is visible on mingw32.
10573
10574         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
10575         for mingw32.
10576
10577         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
10578         mingw32).
10579
10580 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
10581
10582         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
10583         attempt to open for write; this always fails, at least on POSIX
10584         hosts.  This reinstates the 2006-01-09 change, which was
10585         inadvertently removed.
10586
10587 2006-01-26  Bruno Haible  <bruno@clisp.org>
10588
10589         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
10590         Reported by Paul Eggert.
10591
10592 2006-01-26  Bruno Haible  <bruno@clisp.org>
10593             Paul Eggert  <eggert@cs.ucla.edu>
10594
10595         * lib/stdbool_.h (_Bool)
10596         [(! (defined __cplusplus || defined __BEOS__)
10597           && !defined __GNUC__
10598           && !(defined __HP_cc || defined __xlc__
10599                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
10600                || defined __sgi))]:
10601         #define to signed char in these cases too; this simplifies
10602         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
10603         etc., separately) and makes it more conservative.
10604
10605 2006-01-25  Simon Josefsson  <jas@extundo.com>
10606
10607         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
10608         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
10609         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
10610
10611 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
10612
10613         * lib/argp-namefrob.h: Bugfix. Remove stray #
10614
10615 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
10616
10617         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
10618         so that we test the test.
10619         Check for yet another HP-UX cc bug involving *bool |= bool.
10620
10621 2006-01-25  Karl Berry  <karl@gnu.org>
10622
10623         * config/srclist.txt (vasnprintf.c): sync lost.
10624
10625 2006-01-25  Jim Meyering  <jim@meyering.net>
10626
10627         Sync from the stable (b5) branch of coreutils:
10628
10629         * lib/fts.c (fts_children): Don't let close() clobber errno from
10630         failed fchdir().
10631
10632         * lib/fts.c (fts_stat): When following a symlink-to-directory,
10633         don't necessarily interpret stat-fails+lstat-succeeds as indicating
10634         a dangling symlink.  That can also happen at least for ELOOP.
10635         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
10636         FYI, this bug predates the inclusion of fts.c in coreutils.
10637
10638         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
10639         in their own block, so pre-c99 compilers don't object.
10640
10641         Avoid the double-free (first in fts_read, second in fts_close) that
10642         would occur when an `active' directory is made inaccessible (e.g.,
10643         via chmod a-x) during a traversal.
10644         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
10645         before returning.  Reproduce this failure by
10646         mkdir -p a/b; cd a; chmod a-x . b
10647         Reported by Stavros Passas.
10648
10649 2006-01-25  Jim Meyering  <jim@meyering.net>
10650
10651         * lib/fileblocks.c: Remove more useless parentheses.
10652         * lib/readutmp.h: Likewise.
10653
10654 2006-01-25  Bruno Haible  <bruno@clisp.org>
10655
10656         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
10657         warnings.
10658         Reported by Paul Eggert.
10659
10660 2006-01-25  Bruno Haible  <bruno@clisp.org>
10661
10662         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
10663         rid of a trap command. For Solaris sh.
10664         Reported by Mark D. Baushke <mdb@gnu.org>.
10665
10666 2006-01-24  Simon Josefsson  <jas@extundo.com>
10667
10668         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
10669         Bruno.
10670
10671 2006-01-24  Karl Berry  <karl@gnu.org>
10672
10673         * config/srclist.txt (argp-namefrob.h): sync lost.
10674
10675 2006-01-24  Jim Meyering  <jim@meyering.net>
10676
10677         * modules/openat (Files): Add lib/intprops.h.
10678         From Mark D. Baushke.
10679
10680 2006-01-24  Jim Meyering  <jim@meyering.net>
10681
10682         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
10683         Reported by Mark D. Baushke.
10684
10685 2006-01-24  Jim Meyering  <jim@meyering.net>
10686
10687         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
10688
10689 2006-01-24  Bruno Haible  <bruno@clisp.org>
10690
10691         * modules/strnlen (Maintainer): Change from glibc to all.
10692
10693 2006-01-24  Bruno Haible  <bruno@clisp.org>
10694
10695         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
10696         Patch by Paul Eggert.
10697
10698 2006-01-24  Bruno Haible  <bruno@clisp.org>
10699
10700         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
10701         already has it.
10702         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
10703         2005-11-26.
10704
10705         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
10706         'signed char' to avoid problems with the built-in _Bool type.
10707         Reported by Paul Eggert on 2005-11-26.
10708
10709 2006-01-24  Bruno Haible  <bruno@clisp.org>
10710
10711         * gnulib-tool (func_import): Avoid constructing complicated sed
10712         expressions inside backquote.
10713         Report and solution by Mark D. Baushke <mdb@gnu.org>.
10714
10715 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
10716
10717         These changes imported from libc.
10718         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
10719         test and two separate function calls.
10720         * lib/strndup.c (__strndup): Add libc_hidden_def.
10721
10722 2006-01-23  Simon Josefsson  <jas@extundo.com>
10723
10724         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
10725         Remove the test_*_SOURCES variable: automake infers it by default.
10726         * modules/tls-tests: Likewise.
10727
10728 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
10729
10730         Work around porting bugs reported by Dieter in
10731         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
10732         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
10733         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
10734         Include "getopt.h" first, to check interface.
10735         (getenv): Declare only if defined HAVE_DECL_GETENV &&
10736         !HAVE_DECL_GETENV.
10737         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
10738         (__strndup): Revert to K&R-style function dfns, the glibc style.
10739         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
10740         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
10741         Include strnlen.h first, to get prototype properly.
10742         (strnlen): Renamed from __strnlen.
10743         Remove weak alias.
10744
10745 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
10746
10747         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
10748
10749 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
10750
10751         * config/srclist.txt: Adjust to reflect glibc reorganization.
10752         This affects only comments.
10753
10754 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
10755
10756          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
10757          Reported by Bruce Korb <bkorb@gnu.org>.
10758
10759 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
10760
10761         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
10762         to pacify gcc -Wswitch-default.
10763
10764 2006-01-22  Bruno Haible  <bruno@clisp.org>
10765
10766         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
10767         temporary buffer for sprintf, take into account the precision also
10768         for 'd', 'i', 'u', 'o', 'x', 'X'.
10769
10770 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
10771
10772         * modules/argp-tests: New module
10773         * tests/test-argp.c: New file
10774         * tests/test-argp-2.sh: New file
10775
10776 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
10777
10778         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
10779         (__argp_base_name): Removed
10780         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
10781         typo.
10782         (__argp_base_name): Provide macro definition or extern declaration
10783         depending on the configuration
10784
10785 2006-01-20  Simon Josefsson  <jas@extundo.com>
10786
10787         * modules/inet_ntop (Depends-on): Depend on sys_socket.
10788
10789 2006-01-20  Simon Josefsson  <jas@extundo.com>
10790
10791         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
10792
10793 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
10794
10795         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
10796         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
10797         Suggested by Bruno Haible.
10798
10799 2006-01-20  Karl Berry  <karl@gnu.org>
10800
10801         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
10802         until changes propagate, I guess.
10803
10804 2006-01-19  Simon Josefsson  <jas@extundo.com>
10805
10806         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
10807
10808 2006-01-19  Simon Josefsson  <jas@extundo.com>
10809
10810         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
10811
10812 2006-01-19  Simon Josefsson  <jas@extundo.com>
10813
10814         * gnulib-tool: Set check_PROGRAMS.
10815
10816         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
10817         modules/des-tests, modules/gc-arcfour-tests,
10818         modules/gc-arctwo-tests, modules/gc-des-tests,
10819         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
10820         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
10821         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
10822         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
10823         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
10824         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
10825         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
10826         test_*_SOURCES.
10827
10828 2006-01-18  Simon Josefsson  <jas@extundo.com>
10829
10830         * modules/socklen (Depends-on): Depend on sys_socket.
10831
10832 2006-01-18  Simon Josefsson  <jas@extundo.com>
10833
10834         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
10835         modules/des-tests, modules/gc-arcfour-tests,
10836         modules/gc-arctwo-tests, modules/gc-des-tests,
10837         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
10838         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
10839         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
10840         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
10841         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
10842         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
10843         $(EXEEXT) to automake TESTS variable, for mingw32.
10844
10845 2006-01-17  Simon Josefsson  <jas@extundo.com>
10846
10847         * modules/socklen (Include): Need sys/socket.h.
10848
10849 2006-01-17  Bruno Haible  <bruno@clisp.org>
10850
10851         * modules/ssize_t (Include): Add <sys/types.h>.
10852
10853 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
10854
10855         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
10856         it's not portable and it doesn't work with cross-compiles.
10857         Problem reported by Bruno Haible.  Fix missing-$ typo in
10858         'test "gl_cv_ignore_unused_libraries" ...' that prevented
10859         -zignore from being used with Sun's C compiler.
10860
10861 2006-01-12  Simon Josefsson  <jas@extundo.com>
10862
10863         * lib/base64.c: Fix warning, reported by Bruno Haible
10864         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
10865
10866 2006-01-12  Bruno Haible  <bruno@clisp.org>
10867
10868         * modules/ldd: New file.
10869         * build-aux/ldd.sh.in: New file.
10870         * MODULES.html.sh (Support for building libraries and executables): Add
10871         ldd.
10872
10873 2006-01-12  Bruno Haible  <bruno@clisp.org>
10874
10875         * m4/ldd.m4: New file.
10876
10877 2006-01-12  Bruno Haible  <bruno@clisp.org>
10878
10879         * gnulib-tool (func_import, func_create_testdir): Don't go into an
10880         endless loop while replacing $auxdir with build-aux.
10881
10882 2006-01-11  Simon Josefsson  <jas@extundo.com>
10883
10884         * lib/stdint_.h (SIZE_MAX): Add missing (.
10885
10886 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
10887
10888         Sync from coreutils.
10889         * lib/md5.c: Fix commentary typos.
10890         (alignof, UNALIGNED_P): No need for a GCC-specific version.
10891         * lib/md5.h (__attribute__): Remove; unused.
10892         * lib/sha1.c: Fix commentary to match md5 better.
10893         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
10894         so that we don't need to worry about alignment.  All uses changed.
10895         This merges the 2005-10-28 md5 change into sha1.
10896
10897 2006-01-11  Jim Meyering  <jim@meyering.net>
10898
10899         Sync from coreutils.
10900         * lib/md5.c (OP): Fix spacing.
10901
10902 2006-01-11  Bruno Haible  <bruno@clisp.org>
10903
10904         Ensure automatic ordering between gl_LOCK and gl_ARGP.
10905         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
10906         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
10907
10908 2006-01-11  Bruno Haible  <bruno@clisp.org>
10909
10910         Ensure automatic ordering between gl_LOCK and gl_ARGP.
10911         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
10912         the "early" section as well.
10913
10914 2006-01-11  Bruno Haible  <bruno@clisp.org>
10915
10916         Avoid "ar: no archive members specified" error on MacOS X.
10917         * gnulib-tool (func_modules_add_dummy): New function.
10918         (func_import, func_create_testdir): Invoke it.
10919
10920 2006-01-11  Bruno Haible  <bruno@clisp.org>
10921
10922         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
10923         with $auxdir in AC_CONFIG_FILES statements.
10924
10925 2006-01-11  Bruno Haible  <bruno@clisp.org>
10926
10927         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
10928         Initialize also noinst_HEADERS to empty.
10929
10930 2006-01-11  Bruno Haible  <bruno@clisp.org>
10931
10932         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
10933         variables.
10934         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
10935         autoreconf.
10936
10937 2006-01-11  Bruno Haible  <bruno@clisp.org>
10938
10939         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
10940         overridable by the user.
10941         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10942
10943 2006-01-10  Simon Josefsson  <jas@extundo.com>
10944
10945         * modules/sys_socket: New file.
10946
10947 2006-01-10  Simon Josefsson  <jas@extundo.com>
10948
10949         * m4/sys_socket_h.m4: New file.
10950
10951 2006-01-10  Simon Josefsson  <jas@extundo.com>
10952
10953         * lib/socket_.h: New file.
10954
10955 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
10956
10957         * modules/readutmp (Maintainer): Add myself.
10958
10959 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
10960
10961         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
10962         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
10963         People who are still concerned with buggy memcmp implementations
10964         can invoke gl_FUNC_MEMCMP themselves.
10965
10966 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
10967
10968         * lib/regex_internal.h (BITSET_WORD_BITS):
10969         Work around a bug in 64-bit PGC (before version 6.1-2), where the
10970         preprocessor mishandles large unsigned values as if they were signed.
10971         Problem reported by Claudio Fontana in
10972         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
10973
10974 2006-01-10  Jim Meyering  <jim@meyering.net>
10975
10976         Avoid the double-free (first in fts_read, second in fts_close) that
10977         would occur when an `active' directory is made inaccessible (e.g.,
10978         via chmod a-x) during a traversal.
10979         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
10980         before returning.  Reproduce this failure by
10981         mkdir -p a/b; cd a; chmod a-x . b
10982         Reported by Stavros Passas.
10983
10984         Sync from coreutils.
10985         * lib/sha1.c: Tweak grammar in a comment.
10986
10987 2006-01-10  Jim Meyering  <jim@meyering.net>
10988
10989         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
10990         Patch by Joerg Sonnenberger.
10991
10992 2006-01-10  Bruno Haible  <bruno@clisp.org>
10993
10994         * modules/readutmp: Depend on module free.
10995         * modules/strtok_r: Depend on module restrict.
10996
10997 2006-01-10  Bruno Haible  <bruno@clisp.org>
10998
10999         * modules/gettext (configure.ac): Add an invocation of
11000         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
11001
11002 2006-01-10  Bruno Haible  <bruno@clisp.org>
11003
11004         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
11005         Reported by Werner Lemberg <wl@gnu.org>.
11006
11007 2006-01-10  Bruno Haible  <bruno@clisp.org>
11008
11009         * lib/localcharset.c: Update from GNU gettext.
11010
11011 2006-01-10  Bruno Haible  <bruno@clisp.org>
11012
11013         * lib/argp.h (__const): Remove macro. Use const instead.
11014         * lib/argp-fmtstream.h (__const): Likewise.
11015         * lib/glob_.h (__const): Remove macro.
11016         * lib/glob-libc.h: Use const instead of __const.
11017
11018 2006-01-10  Bruno Haible  <bruno@clisp.org>
11019
11020         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
11021         variable.
11022         Needed to avoid an automake error regarding the 'gettext' module.
11023
11024 2006-01-09  Simon Josefsson  <jas@extundo.com>
11025
11026         * modules/inet_ntop (Depends-on): Add restrict.
11027
11028 2006-01-09  Simon Josefsson  <jas@extundo.com>
11029
11030         * modules/gc-rijndael-tests (License): Put under LGPL.
11031
11032         * modules/gc-des-tests (License): Likewise.
11033
11034         * modules/gc-arcfour-tests (License): Likewise.
11035
11036         * modules/gc-arctwo-tests (License): Likewise.
11037
11038         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
11039
11040         * modules/gc-hmac-sha1-tests (Files): Likewise.
11041
11042         * modules/gc-hmac-md5-tests (License): Likewise.
11043
11044         * modules/gc-sha1-tests (License): Likewise.
11045
11046         * modules/gc-md5-tests (License): Likewise.
11047
11048         * modules/gc-md4-tests (License): Likewise.
11049
11050         * modules/gc-md2-tests (License): Likewise.
11051
11052         * modules/gc-tests (License): Likewise.
11053
11054         * modules/des-tests (License): Likewise.
11055
11056         * modules/md4-tests (License): Likewise.
11057
11058         * modules/md2-tests (License): Likewise.
11059
11060 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
11061
11062         Sync from coreutils:
11063
11064         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
11065         * modules/lib-ignore: New file.
11066         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
11067         chdir-safer.m4, lchmod.m4.
11068         * modules/openat: Add mkdirat.c, openat-priv.h.
11069
11070 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
11071
11072         Sync from coreutils.
11073         * m4/lib-ignore.m4: New file.
11074         * m4/lchmod.m4: New file.
11075
11076 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
11077
11078         Sync from coreutils.
11079         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
11080         for write access: POSIX says that must fail.
11081         * lib/fts.c (diropen): Likewise.
11082         * lib/save-cwd.c (save_cwd): Likewise.
11083         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
11084         well, for minor improvements on hosts that lack O_DIRECTORY.
11085         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
11086         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
11087         Fall back on chown if open failed with EACCES.
11088
11089         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
11090         Report an error at compile-time if only a 1-second nominal clock
11091         resolution is found.
11092
11093         * lib/lchmod.h: New file.
11094         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
11095         (make_dir_parents): Use lchown rather than chown, and
11096         lchmod rather than chmod.
11097
11098         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
11099         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
11100         "proc" reported by n0dalus.
11101
11102         * lib/mountlist.c: Include <limits.h>.
11103         (dev_from_mount_options)
11104         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
11105         New function.  It no longer assumes "dev=" has the System V meaning
11106         on Linux (since it doesn't).  It also parses "dev=" more carefully.
11107         (read_file_system_list)
11108         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
11109         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
11110         dev= in that case.
11111
11112         * lib/posixtm.h (PDS_PRE_2000): New macro.
11113         * lib/posixtm.c (year): Arg is now syntax_bits rather than
11114         allow_century.  All usages changed.  Reject dates outside the range
11115         1969-1999 if PDS_PRE_2000 is used.
11116
11117 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
11118
11119         Sync from coreutils.
11120         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
11121         (Time of day items): Mention the possibility of leap seconds.
11122         Problem reported by Dr. David Alan Gilbert.
11123
11124 2006-01-09  Jim Meyering  <jim@meyering.net>
11125
11126         Sync from coreutils.
11127
11128         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
11129
11130         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
11131
11132         * lib/modechange.c (mode_compile): Reject an invalid mode string
11133         that starts with an octal digit.  From Andreas Gruenbacher.
11134
11135         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
11136         and dup to open_safer and dup_safer, respectively.
11137         (openat_permissive): Fix typo in comment.
11138
11139         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
11140         "gettext.h"; either no longer needed or are guaranteed by openat.h.
11141         (_): Remove; no longer needed.
11142         (openat): Renamed from rpl_openat; no need for rpl_openat
11143         since openat.h renames openat for us.
11144         Replace most of the body with a call to openat_permissive,
11145         to avoid duplicate code.
11146         Port to (probably hypothetical) environments were mode_t is
11147         wider than int.
11148         (openat_permissive): Require mode arg, so that we can check
11149         types better.  Put it just after flags.  Change cwd failure
11150         indicator from pointer-to-bool to pointer-to-errno-value.
11151         All callers changed.
11152         Invoke openat_save_fail and/or openat_restore_fail if
11153         cwd_errno is null, so that openat can call us.
11154         (openat_permissive, fdopendir, fstatat, unlinkat):
11155         Simplify errno handling to avoid some duplicate code,
11156         as it's OK to set errno on success.
11157         * lib/openat.h: Revamp code so that function macros depend on
11158         __OPENAT_PREFIX only, not also on AT_FDCWD.
11159         (openat_ro): Remove.  Caller changed to use openat_permissive.
11160         (openat_permissive): Now a macro, if not a function.
11161         (openat_restore_fail, openat_save_fail): Now always functions,
11162         since mkdirat needs them even if __OPENAT_PREFIX is defined.
11163
11164         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
11165         and openat.c.
11166         * lib/mkdirat.c: Include openat-priv.h.
11167         Remove definitions of macros defined therein.
11168         * lib/openat.c: Likewise.
11169
11170         * lib/mkdirat.c (mkdirat): New file and function.
11171         * lib/openat.h (mkdirat): Declare.
11172
11173         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
11174
11175         * lib/openat.h (openat_permissive): Declare.
11176         (openat_ro): Define.
11177
11178         * lib/openat.c (EXPECTED_ERRNO): New macro.
11179         (openat_permissive): New function -- used in remove.c rewrite.
11180         (all functions): Set errno just before returning, only if there
11181         was an actual failure.
11182         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
11183
11184         Emulate openat-family functions using Linux's procfs, if possible.
11185         Idea and some code based on Ulrich Drepper's glibc changes.
11186
11187         * lib/openat.c: (BUILD_PROC_NAME): New macro.
11188         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
11189         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
11190         before falling back on save_cwd and restore_cwd.
11191         (fdopendir, fstatat, unlinkat): Likewise.
11192
11193         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
11194         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
11195
11196         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
11197         as second argument to va_arg.  Otherwise, some versions of gcc
11198         warn that `if this code is reached, the program will abort'.
11199
11200 2006-01-09  Jim Meyering  <jim@meyering.net>
11201
11202         Sync from coreutils.
11203         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
11204         Require openat-priv.h.
11205
11206 2006-01-09  Bruno Haible  <bruno@clisp.org>
11207
11208         * modules/strnlen (Include): Use strnlen.h.
11209
11210 2006-01-09  Bruno Haible  <bruno@clisp.org>
11211
11212         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
11213
11214 2006-01-09  Bruno Haible  <bruno@clisp.org>
11215
11216         * lib/sysexit_.h (EX_OK): New macro.
11217         Suggested by Martin Lambers <marlam@marlam.de>.
11218
11219 2006-01-09  Bruno Haible  <bruno@clisp.org>
11220
11221         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
11222         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
11223
11224 2006-01-09  Bruno Haible  <bruno@clisp.org>
11225
11226         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
11227         numbers.
11228
11229 2006-01-09  Bruno Haible  <bruno@clisp.org>
11230
11231         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
11232         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
11233         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
11234         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
11235
11236 2006-01-09  Bruno Haible  <bruno@clisp.org>
11237
11238         * build-aux/javacomp.sh.in: New file, moved from lib/.
11239         * modules/javacomp-script (Files): Update.
11240         (configure.ac): Add AC_CONFIG_FILES invocation.
11241         (EXTRA_DIST): Remove variable.
11242
11243         * build-aux/javaexec.sh.in: New file, moved from lib/.
11244         * modules/javaexec (Files): Update.
11245         (configure.ac): Add AC_CONFIG_FILES invocation.
11246         (EXTRA_DIST): Remove javaexec.sh.in.
11247
11248         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
11249         * modules/csharpcomp-script (Files): Update.
11250         (configure.ac): Add AC_CONFIG_FILES invocation.
11251         (EXTRA_DIST): Remove variable.
11252
11253         * build-aux/csharpexec.sh.in: New file, moved from lib/.
11254         * modules/csharpexec (Files): Update.
11255         (configure.ac): Add AC_CONFIG_FILES invocation.
11256         (EXTRA_DIST): Remove csharpexec.sh.in.
11257
11258 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
11259
11260         Sync from coreutils.
11261
11262         Add POSIX ACL support
11263         * lib/acl.h (copy_acl, set_acl): Add declarations.
11264         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
11265         systems other than Linux.
11266         (chmod_or_fchmod): New function: use fchmod when possible,
11267         and chmod otherwise.
11268         (file_has_acl): Add a POSIX ACL implementation, with a
11269         Linux-specific subcase.
11270         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
11271         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
11272         acls are unsupported.
11273         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
11274         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
11275         are unsupported.
11276
11277 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
11278
11279         Sync from coreutils.
11280         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
11281
11282 2006-01-07  Bruno Haible  <bruno@clisp.org>
11283
11284         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
11285         gl_EARLY.
11286
11287 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
11288
11289         * lib/strftime.c (tzname): Don't declare if it is already #defined.
11290         Problem reported for Mingw by Mark Junker.
11291
11292 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
11293
11294         * README: Gnulib normally doesn't generate a tarball.
11295
11296 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
11297
11298         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
11299         long int, not int, for nanosecond counts, so that people who are
11300         used to POSIX struct timespec won't be surprised.  Reported by Jim
11301         Meyering.
11302
11303 2005-12-28  Bruno Haible  <bruno@clisp.org>
11304
11305         * build-aux/config.rpath: Update from GNU gettext.
11306
11307 2005-12-16  Jim Meyering  <jim@meyering.net>
11308
11309         * modules/fprintftime: New module.
11310         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
11311
11312 2005-12-16  Jim Meyering  <jim@meyering.net>
11313
11314         * m4/fprintftime.m4: New file.
11315
11316 2005-12-16  Jim Meyering  <jim@meyering.net>
11317
11318         * lib/fprintftime.c, lib/fprintftime.h: New files.
11319
11320 2005-12-15  Simon Josefsson  <jas@extundo.com>
11321
11322         * modules/socklen (configure.ac): Fix M4 macro name, to align with
11323         new m4/socklen.m4.
11324
11325 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
11326
11327         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
11328         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
11329
11330 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
11331
11332         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
11333         * lib/argp-help.c (fill_in_uparams): Check if the constructed
11334         struct uparams is valid. Fall back to the default values if it is
11335         not.
11336
11337 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
11338
11339         * modules/argp (Files): Add argp-pin.c
11340         (Depends-on): dirname
11341         (lib_SOURCES): Add argp-pin.c
11342
11343 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
11344
11345         * m4/argp.m4:  Check if program_invocation_name and
11346         program_invocation_short_name are declared and define appropriate
11347         macros if they are not.
11348
11349 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
11350
11351         * lib/argp-help.c (__argp_base_name): New function
11352         (__argp_short_program_name): Rewrite using __argp_base_name
11353         * lib/argp-namefrob.h: Define program_invocation_name and
11354         program_invocation_short_name if requested
11355         (__argp_base_name): Add prototype
11356         * lib/argp-parse.c (argp_def): Use gettext wrappers
11357         (argp_default_parser): Use __argp_base_name
11358         * lib/argp-pin.c: New file. Defines program_invocation_name and
11359         program_invocation_short_name on systems that lack them.
11360
11361 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
11362
11363         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
11364         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
11365         porting problem reported by Georg Schwarz in
11366         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
11367
11368 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
11369
11370         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
11371         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
11372         porting problem reported by Georg Schwarz in
11373         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
11374
11375 2005-12-05  Bruno Haible  <bruno@clisp.org>
11376
11377         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
11378         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
11379         Reported by Mark Junker <mjscod@gmx.de>.
11380
11381 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
11382
11383         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
11384         Use implementation from Albert Chin, with some
11385         comments/corrections by Stepan Kasal and myself.
11386
11387 2005-12-02  Bruno Haible  <bruno@clisp.org>
11388
11389         * gnulib-tool (func_import): Accept GPLed build tool modules when
11390         --lgpl is given.
11391         * modules/csharpcomp-script: New file.
11392         * modules/csharpcomp: Depend on it.
11393         * modules/javacomp-script: New file.
11394         * modules/javacomp: Depend on it.
11395         Suggested by Simon Josefsson.
11396
11397 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
11398
11399         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
11400         statement, to work around an HP-UX 10.20 compiler bug reported by
11401         Peter O'Gorman.
11402
11403 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
11404
11405         * modules/savedir (Depends-on): Add openat.
11406
11407 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
11408
11409         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
11410         (uintmax_t) [defined uintmax_t]: Do not declare.
11411         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
11412         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
11413         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
11414         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
11415         sake of portability to weird hosts that C allows (though we don't
11416         know of any practical examples).
11417
11418         * lib/savedir.h (fdsavedir): New decl.
11419         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
11420         contains most of the former guts of savedir.
11421         (savedir): Use savedirstream.
11422         Include "openat.h".
11423
11424 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
11425
11426         * modules/obstack (Files): Add m4/ulonglong.m4.
11427         Problem reported by Davide Angelocola.
11428
11429 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
11430
11431         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
11432         coreutils no longer futzes with rounding modes.
11433
11434 2005-11-14  Jim Meyering  <jim@meyering.net>
11435
11436         * lib/mkstemp-safer.c: Include <config.h>, required for possible
11437         replacement of mkstemp.
11438
11439 2005-11-10  Simon Josefsson  <jas@extundo.com>
11440
11441         * lib/readline.c: Remove EOL.
11442
11443 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
11444
11445         * modules/gethrxtime (Depends-on): Add gettime.
11446
11447 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
11448
11449         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
11450         or gettimeofday; no longer needed.
11451
11452 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
11453
11454         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
11455         time business.
11456         (gethrxtime) [! (HAVE_NANOUPTIME
11457         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
11458         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
11459         our own approximation.
11460
11461 2005-11-08  Eric Blake  <ebb9@byu.net>
11462
11463         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
11464
11465 2005-11-08  Eric Blake  <ebb9@byu.net>
11466
11467         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
11468
11469 2005-11-04  Bruno Haible  <bruno@clisp.org>
11470
11471         * gnulib-tool: Implement --update mode.
11472
11473 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
11474
11475         Fix porting problem reported by Theodoros V. Kalamatianos.
11476         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
11477         Don't assume that futimes failing means we must fail.
11478
11479 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
11480
11481         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
11482         variables to suggest the intended function of the PATH_MAX check.
11483
11484 2005-10-30  Kean Johnston  <jkj@sco.com>
11485
11486         Trivial changes to support SCO systems.
11487         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
11488         as PATH_MAX.
11489         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
11490         where __ptr is null when no I/O is pending.
11491
11492 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
11493
11494         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
11495         leave errno alone.  Problem reported by Dmitry V. Levin.
11496
11497 2005-10-28  Simon Josefsson  <jas@extundo.com>
11498
11499         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
11500         Test more.
11501
11502         * tests/test-gc-md2.c, tests/test-md2.c: New files.
11503
11504         * modules/md2, modules/md2-tests: New files.
11505
11506 2005-10-28  Simon Josefsson  <jas@extundo.com>
11507
11508         * m4/inet_ntop.m4: More tests.
11509
11510         * m4/gc-md2.m4, md2.m4: New file.
11511
11512 2005-10-28  Simon Josefsson  <jas@extundo.com>
11513
11514         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
11515         "restrict" keywords, as per POSIX.  Protect the function
11516         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
11517         Don't use K&R prototypes.  Check the sprintf return values.
11518         Re-define EAFNOSUPPORT if not present.  Indent.
11519
11520         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
11521         suggested by Bruno Haible <bruno@clisp.org>.
11522
11523         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
11524
11525         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
11526
11527         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
11528         libgcrypt).
11529
11530         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
11531
11532         * lib/md2.h, lib/md2.c: New files.
11533
11534 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
11535
11536         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
11537         errno alone.  Problem reported by Frederic Jolliton.
11538
11539 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
11540
11541         * modules/verify (License): Change from GPL to LGPL.  This is a
11542         tiny module and there are apparently near-equivalents that are
11543         under the BSD license.
11544
11545 2005-10-24  Simon Josefsson  <jas@extundo.com>
11546
11547         * modules/sha1: Relicense to LGPL.
11548
11549 2005-10-24  Simon Josefsson  <jas@extundo.com>
11550
11551         * lib/md4.h: Shrink buffer size, now that we changed the type.
11552
11553 2005-10-23  Simon Josefsson  <jas@extundo.com>
11554
11555         * gnulib-tool (func_import): Fix --tests-base.
11556
11557 2005-10-22  Simon Josefsson  <jas@extundo.com>
11558
11559         * modules/arcfour (Depends-on): Need stdint.
11560
11561 2005-10-22  Simon Josefsson  <jas@extundo.com>
11562
11563         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
11564         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
11565
11566 2005-10-22  Simon Josefsson  <jas@extundo.com>
11567
11568         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
11569         suggested by Bruno Haible <bruno@clisp.org>.
11570
11571 2005-10-22  Simon Josefsson  <jas@extundo.com>
11572
11573         * lib/crc.h: Include stddef.h, for size_t.
11574
11575 2005-10-22  Simon Josefsson  <jas@extundo.com>
11576
11577         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
11578         arcfour_context struct (simplify test vector testing in GNU
11579         Shishi).
11580
11581 2005-10-21  Simon Josefsson  <jas@extundo.com>
11582
11583         * modules/des, modules/des-tests: New files.
11584
11585         * modules/gc-des, modules/gc-des-tests: New files.
11586
11587         * tests/test-des.c, tests/test-gc-des.c: New file.
11588
11589 2005-10-21  Simon Josefsson  <jas@extundo.com>
11590
11591         * modules/arctwo, modules/arctwo-tests: New files.
11592
11593         * tests/test-arctwo.c: New file.
11594
11595         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
11596
11597         * tests/test-gc-arctwo.c: New file.
11598
11599 2005-10-21  Simon Josefsson  <jas@extundo.com>
11600
11601         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
11602         Bruno Haible <bruno@clisp.org>.
11603
11604         * m4/gc-des.m4: New file.
11605
11606 2005-10-21  Simon Josefsson  <jas@extundo.com>
11607
11608         * m4/arctwo.m4: New file.
11609
11610         * m4/gc-arctwo.m4: New file.
11611
11612 2005-10-21  Simon Josefsson  <jas@extundo.com>
11613
11614         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
11615         block.
11616
11617 2005-10-21  Simon Josefsson  <jas@extundo.com>
11618
11619         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
11620         <bruno@clisp.org>.
11621
11622         * lib/hmac-sha1.c (hmac_sha1): Likewise.
11623
11624         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
11625         Bruno Haible <bruno@clisp.org>.
11626
11627         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
11628         <bruno@clisp.org>.
11629
11630 2005-10-21  Simon Josefsson  <jas@extundo.com>
11631
11632         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
11633
11634 2005-10-21  Simon Josefsson  <jas@extundo.com>
11635
11636         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
11637
11638 2005-10-21  Simon Josefsson  <jas@extundo.com>
11639
11640         * lib/des.h, lib/des.c: New files.
11641
11642         * lib/gc-gnulib.c: Support DES.c
11643
11644 2005-10-21  Simon Josefsson  <jas@extundo.com>
11645
11646         * lib/arctwo.h, lib/arctwo.c: New files.
11647
11648         * lib/gc-gnulib.c: Support ARCTWO.
11649
11650 2005-10-21  Simon Josefsson  <jas@extundo.com>
11651
11652         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
11653         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
11654
11655 2005-10-21  Simon Josefsson  <jas@extundo.com>
11656
11657         * gnulib-tool (func_import, func_create_testdir): Define automake
11658         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
11659         Makefile.am snippet),
11660         suggested by Bruno Haible <bruno@clisp.org>.
11661
11662         * modules/gc (Makefile.am): Use it.
11663
11664 2005-10-21  Bruno Haible  <bruno@clisp.org>
11665
11666         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
11667         patch.
11668
11669 2005-10-19  Simon Josefsson  <jas@extundo.com>
11670
11671         * tests/test-gc-rijndael.c: New file.
11672
11673         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
11674
11675 2005-10-19  Simon Josefsson  <jas@extundo.com>
11676
11677         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
11678         interface too.
11679
11680 2005-10-19  Simon Josefsson  <jas@extundo.com>
11681
11682         * tests/test-gc-arcfour.c: New file.
11683
11684         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
11685
11686 2005-10-19  Simon Josefsson  <jas@extundo.com>
11687
11688         * modules/gc-md4, modules/gc-md4-tests: New file.
11689
11690         * tests/test-gc-md4.c: New file.
11691
11692 2005-10-19  Simon Josefsson  <jas@extundo.com>
11693
11694         * m4/gc-md4.m4: New file.
11695
11696 2005-10-19  Simon Josefsson  <jas@extundo.com>
11697
11698         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
11699         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
11700         <kasal@ucw.cz>.
11701
11702 2005-10-19  Simon Josefsson  <jas@extundo.com>
11703
11704         * m4/gc-arcfour.m4: New file.
11705
11706         * m4/gc-rijndael.m4: New file.
11707
11708 2005-10-19  Simon Josefsson  <jas@extundo.com>
11709
11710         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
11711
11712 2005-10-19  Simon Josefsson  <jas@extundo.com>
11713
11714         * lib/gc-gnulib.c: Support ARCFOUR.
11715
11716 2005-10-19  Simon Josefsson  <jas@extundo.com>
11717
11718         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
11719         support.
11720
11721         * lib/gc.h: Add ECB enum type.
11722
11723         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
11724
11725 2005-10-18  Simon Josefsson  <jas@extundo.com>
11726
11727         * tests/test-md5.c: New file.
11728
11729         * modules/md5-tests: New file.
11730
11731 2005-10-18  Simon Josefsson  <jas@extundo.com>
11732
11733         * tests/test-md4.c: New file.
11734
11735         * modules/md4, modules/md4-tests: New files.
11736
11737 2005-10-18  Simon Josefsson  <jas@extundo.com>
11738
11739         * m4/md4.m4: New file.
11740
11741 2005-10-18  Simon Josefsson  <jas@extundo.com>
11742
11743         * lib/md4.h, lib/md4.c: New files, based on md5.?.
11744
11745 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
11746
11747         * gnulib-tool (func_create_testdir): Omit the second check whether
11748         BUILT_SOURCES in nonempty.
11749
11750 2005-10-17  Simon Josefsson  <jas@extundo.com>
11751
11752         * tests/test-rijndael.c: New file.
11753
11754 2005-10-17  Simon Josefsson  <jas@extundo.com>
11755
11756         * modules/sha1: Depend on stdint instead of md5.
11757
11758         * modules/md5: Depend on stdint, remove uint32_t.
11759
11760 2005-10-17  Simon Josefsson  <jas@extundo.com>
11761
11762         * modules/gc-sha1-tests: New file.
11763
11764         * tests/test-gc-sha1.c: New file.
11765
11766 2005-10-17  Simon Josefsson  <jas@extundo.com>
11767
11768         * m4/md5.m4: Remove call to uint32_t.m4.
11769
11770 2005-10-17  Simon Josefsson  <jas@extundo.com>
11771
11772         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
11773
11774         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
11775         md5.h.
11776
11777         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
11778
11779         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
11780
11781 2005-10-17  Simon Josefsson  <jas@extundo.com>
11782
11783         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
11784
11785 2005-10-17  Simon Josefsson  <jas@extundo.com>
11786
11787         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
11788
11789 2005-10-17  Simon Josefsson  <jas@extundo.com>
11790
11791         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
11792
11793         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
11794
11795 2005-10-17  Bruno Haible  <bruno@clisp.org>
11796
11797         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
11798         that it can also be used in a test.
11799
11800 2005-10-16  Bruno Haible  <bruno@clisp.org>
11801
11802         * gnulib-tool (func_emit_tests_Makefile_am): Also define
11803         TESTS_ENVIRONMENT, so that individual tests can augment it.
11804
11805         * gnulib-tool (func_create_testdir): Use an intermediate target for
11806         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
11807         macros, like $(ALLOCA_H), which cannot be passed through the command
11808         line.
11809
11810 2005-10-15  Simon Josefsson  <jas@extundo.com>
11811
11812         * modules/rijndael-tests: New file.
11813
11814         * modules/rijndael: New file.
11815
11816 2005-10-15  Simon Josefsson  <jas@extundo.com>
11817
11818         * m4/rijndael.m4: New file.
11819
11820 2005-10-15  Simon Josefsson  <jas@extundo.com>
11821
11822         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
11823
11824         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
11825
11826 2005-10-14  Simon Josefsson  <jas@extundo.com>
11827
11828         * tests/test-arcfour.c: New file.
11829
11830         * modules/arcfour, modules/arcfour-tests: New files.
11831
11832 2005-10-14  Simon Josefsson  <jas@extundo.com>
11833
11834         * m4/arcfour.m4: New file.
11835
11836 2005-10-14  Simon Josefsson  <jas@extundo.com>
11837
11838         * lib/arcfour.h, lib/arcfour.c: New files.
11839
11840 2005-10-14  Roland McGrath  <roland@redhat.com>
11841
11842         Import from libc.  [BZ #1331]
11843         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
11844         macro argument.
11845         Reported by Matej Vela <vela@debian.org>.
11846
11847 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
11848
11849         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
11850         include <wchar.h>; no longer needed.
11851
11852 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
11853
11854         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
11855
11856 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
11857         and  Ulrich Drepper  <drepper@redhat.com>
11858
11859         Import from libc.
11860         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
11861         instead of inline stream orientation test and two separate
11862         function calls.  Pay no attention to USE_IN_LIBIO.
11863
11864 2005-10-13  Simon Josefsson  <jas@extundo.com>
11865
11866         * modules/gc-hmac-md5-tests: New file.
11867
11868         * tests/test-gc-hmac-sha1.c: New file.
11869
11870         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
11871
11872         * modules/gc-hmac-md5-tests: New file.
11873
11874         * tests/test-gc-md5.c: New file.
11875
11876         * modules/gc-md5-tests: New file.
11877
11878 2005-10-13  Simon Josefsson  <jas@extundo.com>
11879
11880         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
11881         Move memory allocation outside of loop.
11882
11883 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
11884
11885         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
11886         intermediate directory is in a read-only file system.  Problem
11887         reported by Eric Blake.
11888
11889 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
11890
11891         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
11892
11893 2005-10-12  Simon Josefsson  <jas@extundo.com>
11894
11895         * tests/test-hmac-sha1.c: New file.
11896
11897         * modules/hmac-sha1-tests: New file.
11898
11899         * modules/hmac-sha1: New file.
11900
11901 2005-10-12  Simon Josefsson  <jas@extundo.com>
11902
11903         * modules/gc-sha1: New file.
11904
11905 2005-10-12  Simon Josefsson  <jas@extundo.com>
11906
11907         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
11908
11909         * tests/test-gc-pbkdf2-sha1.c: New file.
11910
11911 2005-10-12  Simon Josefsson  <jas@extundo.com>
11912
11913         * modules/gc-md5, modules/gc-hmac-md5: New files.
11914
11915         * modules/gc (Files): Remove md5, memxor and hmac files.
11916
11917 2005-10-12  Simon Josefsson  <jas@extundo.com>
11918
11919         * m4/gc-pbkdf2-sha1.m4: New file.
11920
11921         * m4/gc-hmac-sha1.m4: New file.
11922
11923         * m4/gc-sha1: New file.
11924
11925         * m4/hmac-sha1.m4: New file.
11926
11927 2005-10-12  Simon Josefsson  <jas@extundo.com>
11928
11929         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
11930
11931         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
11932
11933 2005-10-12  Simon Josefsson  <jas@extundo.com>
11934
11935         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
11936         suggested by Bruno Haible <bruno@clisp.org>.
11937
11938 2005-10-12  Simon Josefsson  <jas@extundo.com>
11939
11940         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
11941
11942 2005-10-12  Simon Josefsson  <jas@extundo.com>
11943
11944         * lib/gc-pbkdf2-sha1.c: New file.
11945
11946         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
11947
11948 2005-10-12  Simon Josefsson  <jas@extundo.com>
11949
11950         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
11951
11952         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
11953
11954 2005-10-12  Simon Josefsson  <jas@extundo.com>
11955
11956         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
11957         GC_USE_HMAC_MD5, respectively.
11958
11959         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
11960         (gc_md5): Fix typo.
11961
11962         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
11963
11964         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
11965
11966         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
11967
11968 2005-10-12  Bruno Haible  <bruno@clisp.org>
11969
11970         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
11971         Reported by Stepan Kasal <kasal@ucw.cz>.
11972
11973 2005-10-11  Simon Josefsson  <jas@extundo.com>
11974
11975         * tests/test-crc.c: New file.
11976
11977         * modules/crc, modules/crc-tests: New files.
11978
11979 2005-10-11  Simon Josefsson  <jas@extundo.com>
11980
11981         * m4/crc.m4: New file.
11982
11983 2005-10-11  Simon Josefsson  <jas@extundo.com>
11984
11985         * lib/gc.h: Add gc_hash and gc_hash_buffer.
11986
11987         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
11988
11989         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
11990
11991 2005-10-11  Simon Josefsson  <jas@extundo.com>
11992
11993         * lib/crc.h, lib/crc.c: New files.
11994
11995         * lib/gc.h (gc_hash_buffer): Add doc.
11996
11997 2005-10-11  Bruno Haible  <bruno@clisp.org>
11998
11999         * modules/c-strcasestr: New file.
12000         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
12001
12002 2005-10-11  Bruno Haible  <bruno@clisp.org>
12003
12004         * modules/c-strcase: New file.
12005         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
12006
12007 2005-10-11  Bruno Haible  <bruno@clisp.org>
12008
12009         * lib/strcasecmp.c: Include limits.h.
12010         (strcasecmp): Avoid integer overflow on exotic platforms.
12011         * lib/strncasecmp.c: Include limits.h.
12012         (strncasecmp): Avoid integer overflow on exotic platforms.
12013         Reported by Paul Eggert.
12014
12015 2005-10-11  Bruno Haible  <bruno@clisp.org>
12016
12017         * lib/c-strcasestr.h: New file, from GNU gettext.
12018         * lib/c-strcasestr.c: New file, from GNU gettext.
12019
12020 2005-10-11  Bruno Haible  <bruno@clisp.org>
12021
12022         * lib/c-strcase.h: New file, from GNU gettext.
12023         * lib/c-strcasecmp.c: New file, from GNU gettext.
12024         * lib/c-strncasecmp.c: New file, from GNU gettext.
12025
12026 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
12027
12028         * modules/mempcpy (License): GPL -> LGPL.
12029         * modules/strchrnul (License): Likewise.
12030         * modules/sysexits (License): Likewise.
12031
12032 2005-10-08  Simon Josefsson  <jas@extundo.com>
12033
12034         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
12035
12036 2005-10-07  Simon Josefsson  <jas@extundo.com>
12037
12038         * m4/memxor.m4: Remove gl_C_RESTRICT call.
12039
12040 2005-10-06  Simon Josefsson  <jas@extundo.com>
12041
12042         * tests/test-hmac-md5.c: New file.
12043
12044         * modules/hmac-md5-tests: New file.
12045
12046         * modules/hmac-md5: New file.
12047
12048 2005-10-06  Simon Josefsson  <jas@extundo.com>
12049
12050         * m4/hmac-md5.m4: New file.
12051
12052         * m4/memxor.m4: Require gl_C_RESTRICT.
12053
12054 2005-10-06  Simon Josefsson  <jas@extundo.com>
12055
12056         * lib/memxor.c (memxor): Avoid casts and warnings.
12057
12058 2005-10-06  Simon Josefsson  <jas@extundo.com>
12059
12060         * lib/hmac-md5.c: New file.
12061
12062         * lib/hmac.h: New file.
12063
12064 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
12065
12066         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
12067         promotes to int, not unsigned int, to catch the AIX 5.3
12068         compiler bug.
12069
12070 2005-10-05  Simon Josefsson  <jas@extundo.com>
12071
12072         * modules/memxor: New file.
12073
12074         * modules/iconv (Files): Move config.rpath to havelib, it is used
12075         there.
12076
12077         * modules/havelib (Files): Add config.rpath.
12078
12079 2005-10-05  Simon Josefsson  <jas@extundo.com>
12080
12081         * m4/memxor.m4: New file.
12082
12083 2005-10-05  Simon Josefsson  <jas@extundo.com>
12084
12085         * lib/memxor.c (memxor): Fix compiler error.
12086
12087         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
12088         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
12089
12090         * lib/memxor.h, lib/memxor.c: New files.
12091
12092         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
12093         we assume all systems have it, suggested by Jim Meyering
12094         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
12095         any systems lack sys/socket.h; mingw32 is known to lack it, but we
12096         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
12097         same reasons.
12098
12099 2005-10-05  Simon Josefsson  <jas@extundo.com>
12100
12101         * config/srclist.txt: Add glibc bug 1423 for md5.h.
12102
12103 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
12104
12105         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
12106         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
12107         needed, since the source code now assumes these .h files.
12108
12109 2005-10-05  Derek Price  <derek@ximbiot.com>
12110
12111         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
12112
12113 2005-10-05  Bruno Haible  <bruno@clisp.org>
12114
12115         * modules/stdint (License): Change to LGPL.
12116
12117 2005-10-04  Simon Josefsson  <jas@extundo.com>
12118
12119         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
12120         D. Baushke" <mdb@gnu.org>.
12121
12122 2005-10-04  Bruno Haible  <bruno@clisp.org>
12123
12124         * lib/verify.h (verify_true): Provide alternative definition for C++.
12125
12126 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
12127
12128         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
12129         (SSIZE_MAX): New macro, if not already defined.
12130         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
12131         than 2 GiB.
12132
12133 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
12134
12135         Sync from coreutils.
12136         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
12137         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
12138         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
12139         ULLONG_MAX doesn't work with 2.7.2.1.
12140
12141 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
12142
12143         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
12144         From Ben Pfaff.
12145
12146         * modules/exclude (Depends-on): Depend on verify.
12147         * modules/strtoimax (Depends-on): Likewise.
12148         * modules/utimecmp (Depends-on): Likewise.
12149
12150 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
12151
12152         * lib/exclude.c: Include verify.h.
12153         (verify): Remove.  All callers changed to use verify.h's version.
12154         * lib/strtoimax.c: Likewise.
12155         * lib/utimecmp.c: Likewis.e
12156
12157         Sync from coreutils.
12158         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
12159         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
12160         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
12161         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
12162         bother returning ENOSYS if settimeofday or stime fails; just let
12163         them return whatever errno they want to return.
12164         * lib/utimens.c: Include unistd.h, for dup2.
12165         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
12166         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
12167
12168 2005-10-02  Jim Meyering  <jim@meyering.net>
12169
12170         Sync from coreutils.
12171         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
12172         from glibc-2.2.5 that fails for read-only files.
12173
12174 2005-10-02  Jim Meyering  <jim@meyering.net>
12175
12176         Sync from coreutils.
12177         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
12178         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
12179         `#if HAVE_CONFIG_H'.
12180         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
12181         Remove AT_FDCWD test.
12182         Do not consume the fd unless successful.
12183         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
12184         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
12185         block, so that we don't even try to compile it if settimeofday is
12186         available.  This works around a compilation failure on OSF1 V5.1,
12187         due to stime requiring a `long int*' while tv_sec is `int'.
12188
12189 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
12190
12191         Sync from coreutils.
12192         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
12193         against `yes', rather than just testing for nonempty.
12194
12195 2005-10-01  Simon Josefsson  <jas@extundo.com>
12196
12197         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
12198         and Darwin.
12199
12200         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
12201         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
12202         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
12203         freeaddrinfo and gai_strerror are declared by the POSIX headers.
12204         Check if struct addrinfo is declared.
12205
12206 2005-10-01  Simon Josefsson  <jas@extundo.com>
12207
12208         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
12209         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
12210         AI_* and EAI_* definitions.  Protect function declarations.
12211
12212 2005-10-01  Jim Meyering  <jim@meyering.net>
12213
12214         Sync from coreutils.
12215
12216         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
12217         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
12218         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
12219         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
12220         in the inet and nsl libraries.  Required on Solaris 5.7.
12221
12222 2005-10-01  Jim Meyering  <jim@meyering.net>
12223
12224         Sync from coreutils.
12225         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
12226         in the inet and nsl libraries.  Required on Solaris 5.7.
12227
12228 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
12229
12230         * lib/getdelim.c (getdelim): Remove unused variables.
12231
12232 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
12233
12234         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
12235         so that the code works even with ancient cpp.  Portability problem
12236         with GCC 2.7.2.1 reported by Thomas M.Ott.
12237
12238 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
12239
12240         * modules/regex (Depends-on): Add strcase.
12241
12242         * modules/gethostname (Licence): Change from GPL to LGPL, since
12243         gethostname.c is a trivial implementation of a standard library
12244         function.
12245         * modules/poll (License): Change from GPL to LGPL, since it's
12246         derived from LGPL code.
12247
12248 2005-09-27  Jim Meyering  <jim@meyering.net>
12249
12250         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
12251         HAVE_CONFIG_H.
12252
12253         * lib/intprops.h (signed_type_or_expr__): Define.
12254         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
12255         for unsigned types.
12256
12257 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
12258
12259         * lib/verify.h (verify_expr): Remove, replacing with:
12260         (verify_true): New macro that returns true instead of void.
12261         (verify_type__): Remove.
12262         (verify): Use verify_true rather than verify_type__.
12263
12264 2005-09-26  Bruno Haible  <bruno@clisp.org>
12265
12266         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
12267         is necessary.
12268         (lib_SOURCES): Remove mbchar.c.
12269         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
12270         (Files): Add m4/mbrtowc.m4.
12271         * modules/mbiter: Likewise.
12272         * modules/mbuiter: Likewise.
12273
12274 2005-09-26  Bruno Haible  <bruno@clisp.org>
12275
12276         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
12277         compile mbchar.c if they are not both present.
12278         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
12279         * m4/mbiter.m4 (gl_MBITER): Likewise.
12280         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
12281         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
12282         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
12283
12284 2005-09-25  Jim Meyering  <jim@meyering.net>
12285
12286         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
12287         also uses socklen_t.
12288
12289 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
12290
12291         * lib/utimens.c (ENOSYS): Define if not already defined.
12292         (futimens): Support having a null PATH if the file descriptor
12293         is nonnegative.
12294
12295         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
12296         Remove.
12297         (__attribute): Define to empty unless GCC 3.1 or later.
12298         This works around a core dump on OpenBSD 3.4, which has GCC
12299         2.95.3, which dumps core when given __attribute__(()).  It also
12300         simplifies other tests, since we really don't want to bother with
12301         worrying about which ancient version of GCC supported what.
12302         Original problem reported by Yoann Vandoorselaere, with part of
12303         the fix suggested by Derek Price.
12304
12305 2005-09-24  Jim Meyering  <jim@meyering.net>
12306
12307         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
12308         so we can once again use a positive bitfield width of 1 -- now we
12309         don't have to explain why we were using a bitfield width of 2.
12310
12311 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
12312
12313         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
12314         and similarly for the other external symbols.  Problem reported
12315         by James Gallager.
12316
12317         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
12318         bug reported by Jim Meyering.
12319
12320         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
12321         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
12322         not needed, since socklen is a prerequisite module.
12323
12324 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
12325
12326         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
12327         Problem reported by Eric Blake.
12328         (getaddrinfo): Initialize se so that it's not garbage.
12329         Redo internal storage allocation so that it doesn't make unportable
12330         assumptions about alignment.
12331         Fix a memory leak.
12332
12333         * lib/utimens.c (futimens): Use futimesat if available.
12334         Prefer it to futimes since it doesn't have the futimes bug.
12335
12336         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
12337         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
12338         Instead, declare a function that returns a pointer to an array,
12339         and use verify_type__ to declare the size of the array.
12340         Problem and germ of a solution reported by Bruno Haible.
12341         (verify_type__): Use 2, not 1, for bitfield size, to avoid
12342         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
12343
12344 2005-09-23  Jim Meyering  <jim@meyering.net>
12345
12346         Sync from coreutils.
12347         Correct build failure (socklen_t not defined) on at least
12348         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
12349         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
12350
12351 2005-09-23  Jim Meyering  <jim@meyering.net>
12352
12353         * modules/getaddrinfo (Depends-on): Add socklen.
12354
12355 2005-09-23  Bruno Haible  <bruno@clisp.org>
12356
12357         * tests/test-verify.c: New file.
12358
12359 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
12360
12361         Sync from coreutils.
12362
12363         * modules/argmatch (Depends-on): Add verify.
12364         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
12365         unistd-safer.
12366         * modules/save-cwd (Depends-on): Likewise.
12367
12368         * modules/openat (Files): Add lib/openat-die.c.
12369         (Depends-on): Remove error, exitfail.
12370         Add dirname.
12371
12372         * modules/verify: New file.
12373         * MODULES.html.sh (Diagnostics <assert.h>): New section,
12374         with "verify" module.
12375
12376 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
12377
12378         Sync from coreutils.
12379
12380         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
12381         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
12382         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
12383         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
12384         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
12385         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
12386         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
12387         Don't bother checking for string.h, stdlib.h, unistd.h.
12388         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
12389         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
12390         module's job.
12391         * m4/jm-macros.m4 (gl_MACROS): Likewise.
12392         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
12393
12394         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
12395         (gl_GETDATE): Use it.
12396
12397         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
12398
12399 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
12400
12401         Sync from coreutils.
12402
12403         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
12404         stat-time.h.
12405         * lib/argmatch.h: Include verify.h
12406         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
12407         (ARGMATCH_ASSERT): Remove; unused.
12408         * lib/canonicalize.c: Assume STDC_HEADERS.
12409         * lib/exclude.c: Include "strcase.h".
12410         * lib/regex_internal.h [!defined _LIBC]: Likewise.
12411         * lib/getusershell.c: Include stdio--.h rather than stdio.h
12412         and stdio-safer.h.
12413         (getusershell): Call fopen, not fopen_safer.
12414         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
12415         Do not include unistd-safer.h.
12416         (save_cwd): Don't call fd_safer; no longer needed
12417         now that we include fcntl--.h.
12418
12419         * lib/getdate.y (relative_time): New type.
12420         (RELATIVE_TIME_0): New constant.
12421         (parser_control): Use relative_time instead of doing it ourselves.
12422         (%union): Add new relative_time rel member.
12423         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
12424         Now typeless.
12425         (relunit, relunit_snumber): Now of type rel.
12426         (zone, rel, relunit, get_date): Adjust to above changes.
12427
12428         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
12429         Do not include unistd-safer.h.
12430         (getloadavg): Don't call fd_safer; no longer needed
12431         now that we include fcntl--.h.
12432
12433         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
12434         (make_dir_parents): Treat ENOSYS like EEXIST.
12435
12436         Improve quality of diagnostics on restore_cwd failure.
12437         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
12438         (make_dir_parents): Last arg is now int * (for errno), not bool *.
12439         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
12440         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
12441         each time through the loop.  Do not diagnose restore_cwd failure;
12442         that is the caller's job (and perhaps the caller does not care).
12443
12444         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
12445         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
12446         If the file already exists but is not a directory, don't bother
12447         to try to make its parents.
12448         Close potential file descriptor leak if we can't chdir("/") (!).
12449         Don't always return true if chdir($PWD) fails; return true only
12450         if the requested action was done successfully (except for the
12451         chdir($PWD)).
12452         Don't log final directory unless we actually made it.
12453         Refactor to avoid duplicate code to fix up permissions.
12454         Don't attempt to fix up parent permissions if chdir($PWD) fails.
12455
12456         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
12457         to make it a bit faster and (I hope) clearer.
12458         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
12459         Fix bug in formats like %2N.
12460
12461         * lib/verify.h: New file.
12462
12463 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
12464
12465         Sync from coreutils.
12466         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
12467
12468 2005-09-22  Jim Meyering  <jim@meyering.net>
12469
12470         Sync from coreutils.
12471
12472         * m4/lstat.m4 (gl_FUNC_LSTAT):
12473         Use AC_LIBSOURCES to require lstat.c and lstat.h.
12474         Remove obsolete comment.
12475         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
12476         * m4/xstrtod.m4: Likewise.
12477
12478         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
12479
12480 2005-09-22  Jim Meyering  <jim@meyering.net>
12481
12482         Sync from coreutils.
12483
12484         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
12485
12486         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
12487         the .tm_year member, since otherwise gcc-4.0 would now warn about
12488         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
12489
12490         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
12491         order to avoid an unsuppressible warning from gcc on 64-bit systems.
12492
12493         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
12494         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
12495         when run in a time zone for which daylight savings time is in effect
12496         for the starting date.
12497
12498         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
12499         stop us from restricting permissions of just-created absolute-named
12500         directories.
12501         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
12502         to restore initial working directory.
12503         * lib/mkdir-p.c (make_dir_parents): New parameter:
12504         different_working_dir, to tell caller if/when we change the working
12505         directory and are unable to return to the initial one.
12506         * lib/mkdir-p.h (make_dir_parents): Update prototype.
12507         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
12508         `return false'.  This fixes a bug introduced on 2004-07-30.
12509
12510         * lib/openat.c (fdopendir): Be sure to close the supplied
12511         file descriptor before returning.  This makes our replacement
12512         implementation a little closer to Solaris's, where fdopendir
12513         ties the file descriptor to the returned DIR* pointer.
12514         * lib/openat.c (unlinkat): New function.
12515         * lib/openat.h (unlinkat): Add prototype.
12516         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
12517         (openat_restore_fail): Rename from openat_restore_die.
12518         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
12519
12520         Provide an alternative to exiting immediately upon save_cwd or
12521         restore_cwd failure.  Now, an application can arrange e.g.,
12522         to perform a longjump in that case.
12523         * lib/openat.c: Include dirname.h.
12524         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
12525         (rpl_openat, fdopendir, fstatat): Call openat_save_die
12526         and openat_restore_die rather than calling error directly.
12527         Don't include "error.h" or "exitfail.h"; they're no longer needed.
12528
12529         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
12530         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
12531         define.
12532
12533         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
12534         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
12535                             int utc, int nanoseconds);
12536         Background:
12537         date should not have to allocate a megabyte of virtual memory to
12538         handle a format argument like +%1048575T.  When implemented with
12539         strftime, it must allocate such a buffer, use strftime to fill it
12540         in, print it, then free it.
12541         With fprintftime, it simply prints everything and exits.
12542         With no need for memory allocation, that's one fewer way to fail.
12543         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
12544         optional field width, not before, so we accept %9:z, not %:9z.
12545         (my_strftime): Be sure to use L_('x') for literals.
12546
12547         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
12548         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
12549         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
12550         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
12551         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
12552         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
12553         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
12554         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
12555         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
12556         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
12557         * lib/xgethostname.c, lib/xreadlink.c:
12558         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
12559
12560         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
12561         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
12562         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
12563         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
12564         and don't include <sys/file.h>).
12565
12566 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
12567
12568         Sync from coreutils.
12569
12570         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
12571         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
12572         [!LDAV_DONE]: Avoid unused variable warning.
12573
12574 2005-09-21  Bruno Haible  <bruno@clisp.org>
12575
12576         * lib/unicodeio.h (unicode_to_mb): New declaration.
12577
12578 2005-09-20  Derek Price  <derek@ximbiot.com>
12579
12580         * lib/getaddrinfo.c: Don't include <netdb.h> included from
12581         getaddrinfo.h.
12582
12583 2005-09-20  Bruno Haible  <bruno@clisp.org>
12584
12585         * gnulib-tool: Remove trailing slashes from the values specified for
12586         --source-base, --m4-base, --tests-base, --aux-dir.
12587         Suggested by Simon Josefsson <jas@extundo.com>.
12588
12589 2005-09-20  Bruno Haible  <bruno@clisp.org>
12590
12591         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
12592         func_modules_to_filelist, func_import, func_create_testdir): Make all
12593         sorting results locale-independent, so that gnulib-cache.m4 doesn't
12594         change when gnulib-tool is invoked in a different locale.
12595
12596 2005-09-19  Simon Josefsson  <jas@extundo.com>
12597
12598         * m4/socklen.m4: Fix typo.
12599
12600 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12601
12602         Use a consistent style for including <config.h>.
12603         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
12604         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
12605         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
12606         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
12607         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
12608         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
12609         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
12610         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
12611         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
12612         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
12613         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
12614         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
12615         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
12616         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
12617         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
12618         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
12619         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
12620         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
12621         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
12622         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
12623         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
12624         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
12625         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
12626         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
12627         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
12628         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
12629         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
12630         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
12631         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
12632         lib/xstrtoumax.c, lib/yesno.c:
12633         Standardize inclusion of config.h.
12634         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
12635         lib/inttostr.h:  Removed inclusion of config.h from header files.
12636         * lib/inttostr.c:  Adjusted in-tree users.
12637         * lib/timespec.h: Remove superfluous warning to include config.h.
12638         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
12639         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
12640         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
12641         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
12642         config.h with HAVE_CONFIG_H.
12643
12644 2005-09-19  Jim Meyering  <jim@meyering.net>
12645
12646         * modules/pathmax (License): Change to LGPL.
12647
12648 2005-09-19  Derek Price  <derek@ximbiot.com>
12649
12650         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
12651
12652 2005-09-19  Bruno Haible  <bruno@clisp.org>
12653
12654         * gnulib-tool (import): Provide default for --tests-base.
12655
12656 2005-09-19  Bruno Haible  <bruno@clisp.org>
12657
12658         * doc/quote.texi: New file, extracted from gnulib.texi.
12659         * doc/ctime.texi: New file, extracted from gnulib.texi.
12660         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
12661         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
12662         * doc/gnulib.texi: Include them.
12663
12664 2005-09-18  Bruno Haible  <bruno@clisp.org>
12665
12666         Portability fix.
12667         * gnulib-tool (func_readlink): New function.
12668         (func_ln_if_changed): Use it.
12669
12670 2005-09-18  Bruno Haible  <bruno@clisp.org>
12671
12672         * gnulib-tool: Support --with-tests also with --import.
12673         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
12674         (func_import): Use variables $testsbase and $inctests. Emit a
12675         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
12676         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
12677         SUBDIRS += $testsdir.
12678         (func_create_testdir): Update.
12679
12680 2005-09-18  Bruno Haible  <bruno@clisp.org>
12681
12682         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
12683         instead of $dry_run.
12684         (func_cp_if_changed, func_mv_if_changed): Remove functions.
12685         (func_ln_if_changed): Don't handle dry-run here.
12686         (func_import): In dry-run mode, detect more precisely which actions
12687         would be performed, and don't use "...ing" verbs.
12688
12689 2005-09-18  Bruno Haible  <bruno@clisp.org>
12690
12691         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
12692         (func_import): Use join on two temporary files instead of three nested
12693         loops, in order to determine which files are new or old.
12694
12695 2005-09-18  Bruno Haible  <bruno@clisp.org>
12696
12697         * gnulib-tool (func_import): Comment out code that spits out the
12698         new files with --dry-run.
12699
12700 2005-09-18  Bruno Haible  <bruno@clisp.org>
12701
12702         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
12703
12704 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
12705
12706         * lib/stat-time.h: New file.
12707         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
12708         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
12709         in a different way.
12710         (timespec_cmp): New function.
12711         * lib/utimecmp.c: Include stat-time.h.
12712         (SYSCALL_RESOLUTION): Depend on whether various struct stat
12713         members exist, not on the obsolescent ST_MTIM_NSEC.
12714         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
12715
12716 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
12717
12718         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
12719
12720 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
12721
12722         * MODULES.html.sh (File system functions): Add stat-time.
12723         * modules/stat-time: New file.
12724         * modules/timespec (Files): Remove m4/st_mtim.m4; this
12725         is now done in a different way, by the stat-time module.
12726         * modules/utimecmp (Depends-on): Add stat-time.
12727
12728 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
12729
12730         * m4/st_mtim.m4: Remove.  Superseded by...
12731         * m4/stat-time.m4: New file.
12732         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
12733         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
12734
12735 2005-09-15  Derek Price  <derek@ximbiot.com>
12736
12737         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
12738
12739 2005-09-15  Derek Price  <derek@ximbiot.com>
12740
12741         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
12742         * lib/regex_internal.c: Ditto, using this...
12743         (__GNUC_PREREQ): ...new macro.
12744         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
12745         using...
12746         (__GNUC_PREREQ): ...this new macro.
12747
12748         * lib/strstr.h: Include string.h. Define strstr as a macro here.
12749
12750 2005-09-15  Derek Price  <derek@ximbiot.com>
12751             Paul Eggert  <eggert@cs.ucla.edu>
12752
12753         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
12754         changes, consolidating in...
12755         * lib/regex_internal.h: ...this file.
12756
12757 2005-09-13  Jim Meyering  <jim@meyering.net>
12758
12759         * lib/canon-host.c: Filter through gnu indent and reword comments
12760         slightly.
12761         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
12762
12763 2005-09-13  Derek Price  <derek@ximbiot.com>
12764
12765         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
12766         failure.
12767         Reported by Jim Meyering  <jim@meyering.net>.
12768
12769 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
12770
12771         * lib/base64.c: Typo.
12772         (base64_encode): Put b64str in initialized data section.
12773
12774 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
12775
12776         Merge glibc and coreutils changes into gnulib, plus a few
12777         extra fixes.
12778         * lib/md5.c: Use #error rather than a string.
12779         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
12780         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
12781         (__attribute__): Define to empty for non recent-GCC.
12782         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
12783         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
12784         Renamed from their non-__ counterparts, with new macros replacing
12785         them if not _LIBC.  Add __THROW attribute.
12786         (rol): Remove.
12787         (struct md5_ctx): Align buffer if using GCC.
12788         * lib/sha1.h (struct sha1_ctx): Likewise.
12789         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
12790         The old name was backwards.
12791         (NOTSWAP): Remove; not used.
12792         (rol): New macro, moved here from md5.h.
12793         (sha1_process_block): Remove a FIXME that doesn't make sense.
12794
12795 2005-09-12  Derek Price  <derek@ximbiot.com>
12796
12797         Return usable errors from canon-host.
12798         * lib/canon-host.h: New file.
12799         * lib/canon-host.c (canon_host): Wrap...
12800         (canon_host_r): ...this new function, which now relies exclusively on
12801         getaddrinfo.
12802         (ch_strerror): New function.
12803         (last_cherror): New global.
12804         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
12805         interface.
12806         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
12807         void *.
12808         (freeaddrinfo): Free ai->ai_canonname when set.
12809
12810 2005-09-12  Derek Price  <derek@ximbiot.com>
12811
12812         Make canon-host require getaddrinfo.
12813         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
12814         AC_LIBSOURCE canon-host.h.  Call...
12815         (gl_PREREQ_CANON_HOST): ...this new function, which requires
12816         gl_GETADDRINFO.
12817         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
12818
12819 2005-09-12  Derek Price  <derek@ximbiot.com>
12820
12821         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
12822         LGPL.
12823         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
12824
12825 2005-09-12  Derek Price  <derek@ximbiot.com>
12826
12827         * lib/gai_strerror.c: Include config.h when available.  Include
12828         getaddrinfo.h before other headers to test interface.
12829         Reported by Larry Jones <lawrence.jones@ugs.com>.
12830
12831 2005-09-12  Derek Price  <derek@ximbiot.com>
12832             Paul Eggert  <eggert@cs.ucla.edu>
12833
12834         * modules/glob (Files): Add glob-libc.h.
12835
12836 2005-09-12  Derek Price  <derek@ximbiot.com>
12837             Paul Eggert  <eggert@cs.ucla.edu>
12838
12839         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
12840         glob_.h, glob-libc.h.
12841         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
12842
12843 2005-09-12  Derek Price  <derek@ximbiot.com>
12844             Paul Eggert  <eggert@cs.ucla.edu>
12845
12846         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
12847         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
12848         protecting things that should be done only in gnulib contexts.
12849         * lib/glob_.h: New file, containing only the glob things needed for
12850         gnulib.
12851         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
12852         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
12853         (glob, globfree, glob_pattern_p): Now defined simply in terms of
12854         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
12855         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
12856         and to respect the namespace rules better.
12857
12858 2005-09-08  Simon Josefsson  <jas@extundo.com>
12859
12860         * modules/socklen: New file.
12861
12862 2005-09-08  Simon Josefsson  <jas@extundo.com>
12863
12864         * m4/socklen.m4: New file.
12865
12866 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
12867
12868         * modules/utimens (Files): Add m4/utimbuf.m4, since
12869         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
12870         Reported by Sergey Poznyakoff.
12871
12872 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
12873
12874         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
12875         definitions, since that's the preferred style in glibc.
12876         Fix a minor spacing issue, and update copyright notice to match
12877         glibc's.
12878
12879 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
12880
12881         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
12882
12883 2005-09-06  Simon Josefsson  <jas@extundo.com>
12884
12885         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
12886         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
12887
12888 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
12889
12890         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
12891         warning.
12892
12893 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
12894
12895         * config/srclist.txt: Add glibc bug 1302.
12896
12897 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
12898
12899         Change bitset word type from unsigned int to unsigned long int,
12900         as this has better performance on typical 64-bit hosts.
12901         Port bitset code to hosts with unusual word sizes.
12902         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
12903         (build_collating_symbol):
12904         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
12905         argument is a bitset.  This is merely a style issue, but it makes
12906         it clearer that an entire array is expected.
12907         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
12908         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
12909         Port to the case where bitset_word is not the same as unsigned int.
12910         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
12911         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
12912         Likewise.
12913         * lib/regexec.c (check_dst_limits_calc_pos_1,
12914         check_subexp_matching_top):
12915         (build_trtable, group_nodes_into_DFAstates):
12916         Likewise.
12917         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
12918         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
12919         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
12920         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
12921         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
12922         * lib/regcomp.c (optimize_subexps, lower_subexp):
12923         Work even if bitset_word has holes in its bitwise representation.
12924         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
12925         * lib/regexec.c (check_dst_limits_calc_pos_1,
12926         check_subexp_matching_top):
12927         Likewise.
12928         * lib/regex_internal.c (re_string_reconstruct):
12929         Don't assume UCHAR_MAX == 255.
12930         * lib/regex_internal.h (bitset_set_all): Likewise.
12931         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
12932         All uses changed.
12933         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
12934         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
12935         All uses changed.
12936         (BITSET_WORD_MAX): New macro.
12937         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
12938         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
12939         (bitset_empty, bitset_copy):
12940         Prefer sizeof (bitset) to multiplying it out ourselves.
12941         (bitset_not_merge): Remove; unused.
12942         (bitset_contain): Return bool, not unsigned int with one bit on.
12943         All callers changed.
12944         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
12945         alignment than re_node_set; do this by defining a new internal
12946         type struct dests_alloc and using it to allocate memory.
12947
12948 2005-09-05  Bruno Haible  <bruno@clisp.org>
12949
12950         * gnulib-tool (func_import): Fix comparison in handling of symbolic
12951         links.
12952
12953 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
12954
12955         * modules/size_max (Makefile.am): Add size_max.h
12956
12957 2005-09-04  Derek Price  <derek@ximbiot.com>
12958
12959         * gnulib-tool (func_import): Fix reversed $symbolic logic.
12960
12961 2005-09-03  Simon Josefsson  <jas@extundo.com>
12962
12963         * gnulib-tool: Fix typo.
12964
12965 2005-09-03  Simon Josefsson  <jas@extundo.com>
12966
12967         * config/srclist.txt: Add glibc bug 1293.
12968
12969 2005-09-03  Derek Price  <derek@ximbiot.com>
12970
12971         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
12972         From Larry Jones <lawrence.jones@ugs.com>.
12973
12974 2005-09-02  Simon Josefsson  <jas@extundo.com>
12975
12976         * modules/socklen: New file.
12977
12978 2005-09-02  Simon Josefsson  <jas@extundo.com>
12979
12980         * modules/havelib: New module.
12981
12982         * modules/gettext, modules/iconv, modules/lock, modules/readline:
12983         Use havelib.
12984
12985 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
12986
12987         Check for arithmetic overflow when calculating sizes, to prevent
12988         some buffer-overflow issues.  These patches are conservative, in the
12989         sense that when I couldn't determine whether an overflow was possible,
12990         I inserted a run-time check.
12991         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
12992         macros.
12993         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
12994         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
12995         (re_xnrealloc, re_x2nrealloc): New inline functions.
12996         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
12997         parse_bracket_exp):
12998         (build_equiv_class, build_charclass): Check for arithmetic overflow
12999         in size expression calculations.
13000         * lib/regex_internal.c (re_string_realloc_buffers):
13001         (build_wcs_upper_buffer, re_node_set_add_intersect):
13002         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
13003         (re_dfa_add_node, register_state): Likewise.
13004         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
13005         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
13006         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
13007         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
13008
13009 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
13010
13011         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
13012         m4/ulonglong.m4.  Problem reported by Martin Lambers.
13013
13014 2005-09-02  Bruno Haible  <bruno@clisp.org>
13015
13016         Support for lib vs. lib64 distinction on biarch platforms.
13017         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
13018         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
13019         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
13020
13021 2005-09-02  Bruno Haible  <bruno@clisp.org>
13022
13023         * gnulib-tool (import): In the other first-use case, provide defaults
13024         as well.
13025
13026 2005-09-02  Bruno Haible  <bruno@clisp.org>
13027
13028         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
13029         patches not yet found in the latest gettext release.
13030
13031 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
13032
13033         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
13034         to avoid a collision with bits/local_lim.h in glibc.
13035         All uses changed.  Problem reported by Dmitry V. Levin in
13036         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
13037
13038         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
13039         bugs in int versus size_t comparisons.
13040         (re_string_context_at): Fix bug where the code assumed that
13041         Idx is signed.
13042
13043         Use bool where appropriate.
13044         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
13045         All callers changed.
13046         (calc_eclosure_iter): Likewise, for ROOT arg.
13047         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
13048         (build_charclass_op): Likewise, for NON_MATCH arg.
13049         * lib/regex_internal.c (re_string_allocate, re_string_construct):
13050         (re_string_construct_common): Likewise, for ICASE arg.
13051         * lib/regexec.c (re_search_2_stub, re_search_stub):
13052         Likewise, for RET_LEN arg.
13053         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
13054         (set_regs): Likewise, for FL_BACKTRACK arg.
13055         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
13056         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
13057         (calc_eclosure_iter, parse_bracket_exp):
13058         Use bool for internal variables that are booleans.
13059         * lib/regexec.c (re_search_internal, check_matching,
13060         proceed_next_node):
13061         (set_regs, build_sifted_states, sift_states_bkref):
13062         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
13063         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
13064         (find_collation_sequence_value):
13065         Likewise.
13066         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
13067         (re_node_set_compare):
13068         Return bool, not int. All callers changed.
13069         * lib/regexec.c (check_halt_node_context, check_dst_limits):
13070         (build_trtable, check_node_accept): Likewise.
13071         * lib/regex_internal.h: Include stdbool.h.
13072
13073         Fix bugs uncovered when converting to bool.
13074         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
13075         failure instead of charging ahead blindly.
13076         * lib/regex_internal.c (register_state): Likewise.
13077         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
13078         for freeing internal storage.
13079         (group_nodes_into_DFA_states): Use unsigned int, not int, for
13080         bitset pieces used as boolean, to avoid undefined behavior
13081         on hosts that do int overflow checking.
13082
13083 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
13084
13085         * config/srclist.txt: Add glibc bugs 1285-1287.
13086
13087 2005-09-01  Jim Meyering  <jim@meyering.net>
13088
13089         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
13090         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
13091         Require gl_STAT_MACROS, too.
13092
13093 2005-09-01  Bruno Haible  <bruno@clisp.org>
13094
13095         * gnulib-tool (import): In the first-use case, provide defaults.
13096
13097 2005-09-01  Bruno Haible  <bruno@clisp.org>
13098
13099         * gnulib-tool (func_import): Remove the .tmp files.
13100
13101 2005-09-01  Bruno Haible  <bruno@clisp.org>
13102
13103         * gnulib-tool (func_import): Fix handling of symbolic links.
13104
13105 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
13106
13107         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
13108         old glibc regex code mishandles strings longer than 2**31 bytes.
13109         This patch fixes this when the regex code is used in gnulib
13110         (i.e., outside glibc).
13111
13112         This patch should not affect the use of the regex code inside
13113         glibc.  No doubt this problem also needs to be handled for glibc
13114         as well, but the result will be an incompatible change to the
13115         glibc ABI, and the old ABI will have to be supported too.  That
13116         can be the the subject for another patch.
13117
13118         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
13119         governing whether the rest of this patch is active.  By default,
13120         the macro is disabled and the patch has no effect.
13121         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
13122         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
13123         (struct re_pattern_buffer, re_search, re_search_2, re_match):
13124         (re_match_2, re_set_registers): Use the new types.
13125         * lib/regex_internal.h (Idx, re_hashval_t): New types.
13126         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
13127         New macros.
13128         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
13129         (re_string_context_at, bin_tree_t, re_dfastate_t):
13130         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
13131         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
13132         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
13133         (re_string_char_size_at, re_string_wchar_at):
13134         (re_string_elem_size_at):
13135         Use the new types and macros to port to 64-bit hosts.
13136         Use unsigned types for internal values, so that the code
13137         mostly works even for arrays larger than SSIZE_MAX.
13138         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
13139         (search_duplicated_node, calc_eclosure_iter, fetch_number):
13140         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
13141         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
13142         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
13143         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
13144         (calc_inveclosure, parse_dup_op, build_range_exp):
13145         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
13146         (fetch_number, create_token_tree, mark_opt_subexp):
13147         Likewise.
13148         * lib/regex_internal.c (re_string_construct_common,
13149         create_ci_newstate):
13150         (create_cd_newstate, re_string_allocate, re_string_construct):
13151         (re_string_realloc_buffers, build_wcs_upper_buffer):
13152         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
13153         (re_string_reconstruct, re_string_peek_byte_case):
13154         (re_string_fetch_byte_case, re_string_context_at):
13155         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
13156         (re_node_set_init_copy, re_node_set_add_intersect):
13157         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
13158         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
13159         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
13160         (re_acquire_state, re_acquire_state_context, register_state):
13161         Likewise.
13162         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
13163         search_cur_bkref_entry):
13164         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
13165         (re_search_internal, re_search_2_stub, re_search_stub)
13166         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
13167         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
13168         (update_cur_sifted_state, check_dst_limits):
13169         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
13170         (check_subexp_limits, sift_states_bkref, merge_state_array):
13171         (check_subexp_matching_top, get_subexp, get_subexp_sub):
13172         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
13173         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
13174         (expand_bkref_cache, check_node_accept_bytes):
13175         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
13176         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
13177         (acquire_init_state_context, check_halt_node_context):
13178         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
13179         (sift_states_backward, clean_state_log_if_needed):
13180         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
13181         (find_recover_state, transit_state_sb, transit_state_mb):
13182         (transit_state_bkref, build_trtable, match_ctx_clean):
13183         Likewise.
13184         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
13185         to work around an assumption that REG_MISSING is negative.
13186
13187         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
13188         (seek_collating_symbol_entry) [defined _LIBC]:
13189         (lookup_collation_sequence_value) [defined _LIBC]:
13190         (build_range_exp, build_collating_symbol) [defined _LIBC]:
13191         Use prototypes rather than old-style function definitions.
13192         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
13193         (transit_state_sb) [0]:
13194         (find_collation_sequence_value) [defined _LIBC]: Likewise.
13195
13196         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
13197         rm_eo.
13198
13199         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
13200         (optimize_subexps, lower_subexp):
13201         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
13202         since the signed shift might overflow.  Use 1u<<31 instead.
13203         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
13204         Likewise.
13205         * lib/regexec.c (check_dst_limits_calc_pos_1,
13206         check_subexp_matching_top): Likewise.
13207
13208         * lib/regcomp.c (optimize_subexps, lower_subexp):
13209         Use CHAR_BIT rather than 8, for clarity.
13210         * lib/regexec.c (check_dst_limits_calc_pos_1):
13211         (check_subexp_matching_top): Likewise.
13212         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
13213         have to worry about portability issues when shifting it left.
13214         Remove no-longer-needed test for table_size > 0.
13215         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
13216         in a word, as the resulting behavior is undefined.
13217         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
13218         in one case, a <= should have been an <, and in another case the
13219         whole test was missing.
13220         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
13221         the standard name CHAR_BIT.
13222         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
13223         this is not true on one's complement and signed-magnitude hosts.
13224
13225         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
13226         next_last_offset.
13227         (struct re_dfa_t): Remove unused member states_alloc.
13228         * lib/regcomp.c (init_dfa): Don't initialize unused members.
13229
13230 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
13231
13232         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
13233         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
13234         and large-file glibc and in 32-bit large-file Solaris.
13235
13236 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
13237
13238         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
13239         lengths fit in regoff_t; this isn't true if regoff_t is the same
13240         width as size_t.
13241         * lib/regex.c (re_search_internal): 5th arg is LAST_START
13242         (= START + RANGE) instead of RANGE.  This avoids overflow
13243         problems when regoff_t is the same width as size_t.
13244         All callers changed.
13245         (re_search_2_stub): Check for overflow when adding the
13246         sizes of the two strings.
13247         (re_search_stub): Check for overflow when adding START
13248         to RANGE; if it occurs, substitute the extreme value.
13249
13250 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
13251
13252         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
13253
13254 2005-08-31  Jim Meyering  <jim@meyering.net>
13255
13256         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
13257         a pointer-to-const.
13258         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
13259         (register_state): Likewise.
13260         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
13261         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
13262         (group_nodes_into_DFAstates): Likewise.
13263
13264 2005-08-31  Jim Meyering  <jim@meyering.net>
13265
13266         * check-module: Add a FIXME comment.
13267
13268 2005-08-31  Eric Blake  <ebb9@byu.net>
13269
13270         * modules/unistd-safer (Files): Add unistd--.h.
13271         * modules/stdio-safer (Files): Add stdio--.h.
13272
13273 2005-08-31  Derek Price  <derek@ximbiot.com>
13274
13275         * lib/getdelim.c (getdelim): Return EOF on EOF.
13276         Reported by Larry Jones <lawrence.jones@ugs.com>.
13277
13278 2005-08-31  Bruno Haible  <bruno@clisp.org>
13279
13280         Avoid unnecessary diffs in the generated lib/Makefile.am.
13281         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
13282         the generated files.
13283         (func_import): Don't set cmd.
13284
13285 2005-08-31  Bruno Haible  <bruno@clisp.org>
13286
13287         * lib/strstr.c: Include <stddef.h>, for NULL.
13288         * lib/strcasestr.c: Likewise.
13289         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
13290
13291 2005-08-31  Bruno Haible  <bruno@clisp.org>
13292
13293         * gnulib-tool: New option --macro-prefix.
13294         (func_import): Use macro_prefix.
13295         (import): Handle option --macro-prefix.
13296
13297 2005-08-31  Bruno Haible  <bruno@clisp.org>
13298
13299         * gnulib-tool (import): Rename most ac_* variables to cached_*.
13300         Also use new variables cached_lgpl, cached_libtool.
13301
13302 2005-08-31  Bruno Haible  <bruno@clisp.org>
13303
13304         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
13305         always instantiating them.
13306
13307 2005-08-31  Bruno Haible  <bruno@clisp.org>
13308
13309         * gnulib-tool (func_import): Read the previous cached settings
13310         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
13311         earlier added by gnulib but are now dropped. Warn when a gnulib file
13312         overwrites a non-gnulib file.
13313
13314 2005-08-31  Bruno Haible  <bruno@clisp.org>
13315
13316         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
13317         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
13318         projects that don't keep autogenerated files in CVS. Put into
13319         actioncmd only the specified modules, not the transitive closure.
13320
13321 2005-08-31  Bruno Haible  <bruno@clisp.org>
13322
13323         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
13324         Create directories that shall be filled.
13325         (import): Don't look for gl_* macros in configure.ac. Recurse across
13326         all directories containing a gnulib-cache.m4 files, if meaningful.
13327
13328 2005-08-31  Bruno Haible  <bruno@clisp.org>
13329
13330         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
13331         (import): Set seen_libtool when we see gl_LIBTOOL.
13332
13333 2005-08-31  Bruno Haible  <bruno@clisp.org>
13334
13335         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
13336         declaration macro definitions from generated gnulib.m4.
13337
13338 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
13339
13340         * lib/iconvme.h: Add prototype for iconv_alloc.
13341
13342 2005-08-29  Simon Josefsson  <jas@extundo.com>
13343
13344         * lib/iconvme.c: Fix errno.
13345
13346 2005-08-29  Bruno Haible  <bruno@clisp.org>
13347
13348         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
13349         that it works when the directory contains spaces.
13350
13351 2005-08-29  Bruno Haible  <bruno@clisp.org>
13352
13353         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
13354
13355 2005-08-29  Bruno Haible  <bruno@clisp.org>
13356
13357         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
13358         Emit more advice.
13359
13360 2005-08-29  Bruno Haible  <bruno@clisp.org>
13361         and Stepan Kasal  <kasal@ucw.cz>
13362
13363         * check-module: If more parameters are given, check each of them
13364         separately; add more exceptions, as noted by Jim Meyering.
13365         (check_module): New procedure.
13366         (%exempt_header): Now contains all exceptions.
13367
13368 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
13369
13370         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
13371
13372 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
13373
13374         * lib/iconvme.c: Split iconv_string into iconv_alloc.
13375
13376 2005-08-28  Bruno Haible  <bruno@clisp.org>
13377
13378         * m4/gnulib-tool.m4: New file.
13379
13380 2005-08-27  Jim Meyering  <jim@meyering.net>
13381
13382         * modules/unistd-safer (Files): Add pipe-safer.c.
13383         * modules/fcntl-safer (Files): Add creat-safer.c.
13384
13385 2005-08-27  Jim Meyering  <jim@meyering.net>
13386
13387         * m4/stdlib-safer.m4: New file.  From coreutils.
13388         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
13389         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
13390         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
13391         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
13392         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
13393
13394 2005-08-27  Jim Meyering  <jim@meyering.net>
13395
13396         * lib/fopen-safer.c: Merge minor changes from coreutils.
13397         * lib/dup-safer.c: Likewise.
13398         * lib/fd-safer.c: Likewise.
13399
13400         Merge from coreutils.
13401         * lib/stdio--.h: New file.
13402         * lib/stdlib--.h: New file.
13403         * lib/mkstemp-safer.c: New file.
13404
13405         GNU tar needs these.
13406         * lib/pipe-safer.c: New file.
13407         * lib/creat-safer.c: New file.
13408         * lib/fcntl--.h (creat): Define to creat_safer.
13409         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
13410         * lib/unistd--.h (pipe): Define to pipe_safer.
13411         * lib/unistd-safer.h: Declare pipe_safer.
13412
13413 2005-08-26  Simon Josefsson  <jas@extundo.com>
13414
13415         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
13416         Haible <bruno@clisp.org>.
13417
13418 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
13419
13420         * lib/regex_internal.h: Remove all references to
13421         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
13422         or better.
13423         (bitset_not, bitset_merge, bitset_not_merge):
13424         (bitset_mask, re_string_allocate, re_string_construct):
13425         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
13426         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
13427         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
13428         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
13429         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
13430         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
13431         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
13432         (re_acquire_state_context):
13433         Remove unnecessary forward decls.
13434         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
13435         Put __attribute at function definition,
13436         now that the function decl has been removed.
13437         * lib/regex_internal.c (re_string_peek_byte_case):
13438         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
13439         Likewise.
13440
13441 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
13442
13443         * m4/regex.m4: Add AC_PREREQ(2.50).
13444         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
13445
13446 2005-08-25  Simon Josefsson  <jas@extundo.com>
13447
13448         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
13449         __fsetlocking.
13450
13451 2005-08-25  Simon Josefsson  <jas@extundo.com>
13452
13453         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
13454         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
13455         GLIBC specific code.
13456
13457 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
13458
13459         Make regex safe for g++.  This fixes one real bug (an "err"
13460         that should have been "*err").  g++ problem reported by
13461         Sam Steingold.
13462         * lib/regex_internal.h (re_calloc): New macro, consistent with
13463         re_malloc etc.  All callers of calloc changed to use re_calloc.
13464         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
13465         not int.  All callers changed.
13466         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
13467         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
13468         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
13469         (find_recover_state): Change "err" to "*err"; this fixes what
13470         appears to be a real bug.
13471         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
13472         versus int.
13473
13474 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
13475
13476         * modules/regex (Depends-on): Add malloc, since the code
13477         assumes that !malloc(0) means failure.
13478
13479 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
13480
13481         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
13482
13483         alloca modernization/simplification for regex.
13484         * lib/regex.c: Remove portability cruft for alloca.  This no longer
13485         needs to be at the start of the file, and can be moved into
13486         regex_internal.h and simplified.
13487         * lib/regex_internal.h: Include <alloca.h>.
13488         (__libc_use_alloca) [!defined _LIBC]: New macro.
13489         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
13490         now works outside glibc.
13491
13492 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
13493
13494         * config/srclist.txt: Add glibc bugs 1241, 1245.
13495
13496 2005-08-25  Jim Meyering  <jim@meyering.net>
13497
13498         * lib/open-safer.c: Include <config.h>.
13499         Otherwise, we'd lose LARGEFILE support in any file using
13500         e.g. "fcntl--.h"
13501
13502 2005-08-25  Bruno Haible  <bruno@clisp.org>
13503
13504         * m4/minmax.m4: Require autoconf 2.52.
13505         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
13506         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
13507         alternatives of translit over the alphabet.
13508         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
13509
13510 2005-08-24  Simon Josefsson  <jas@extundo.com>
13511
13512         * tests/test-getpass.c: New file.
13513
13514 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
13515
13516         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
13517         for GNU regex features.
13518
13519 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
13520
13521         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
13522         * lib/regex.h (regerror): Likewise.
13523
13524         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
13525         requires this.  (The code never needed it.)
13526
13527         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
13528         All uses of recently-renamed identifiers changed to use the new,
13529         POSIX-compliant names.  The code will build and run just fine
13530         without these changes, but it's better to eat our own dog food
13531         and use the standard-conforming names.
13532
13533         * lib/regex.h: Fix a multitude of POSIX name space violations.
13534         These changes have an effect only for programs that define
13535         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
13536         do not change anything for programs compiled in the normal way.
13537         Also, there is no effect on the ABI.
13538
13539         (_REGEX_SOURCE): New macro.
13540         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
13541         defined and _GNU_SOURCE is not; this fixes a name space violation.
13542
13543         Rename the following macros to obey POSIX requirements.
13544         The old names are still visible as macros if _REGEX_SOURCE is defined.
13545         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
13546         RE_BACKSLASH_ESCAPE_IN_LISTS.
13547         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
13548         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
13549         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
13550         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
13551         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
13552         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
13553         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
13554         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
13555         (REG_INTERVALS): renamed from RE_INTERVALS.
13556         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
13557         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
13558         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
13559         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
13560         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
13561         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
13562         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
13563         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
13564         RE_UNMATCHED_RIGHT_PAREN_ORD.
13565         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
13566         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
13567         (REG_DEBUG): renamed from RE_DEBUG.
13568         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
13569         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
13570         unusual, since we can't clash with the POSIX REG_ICASE.
13571         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
13572         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
13573         (REG_NO_SUB): renamed from RE_NO_SUB.
13574         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
13575         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
13576         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
13577         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
13578         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
13579         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
13580         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
13581         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
13582         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
13583         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
13584         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
13585         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
13586         RE_SYNTAX_POSIX_MINIMAL_BASIC.
13587         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
13588         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
13589         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
13590         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
13591         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
13592         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
13593         (REG_FIXED): Renamed from REGS_FIXED.
13594         (REG_NREGS): Renamed from RE_NREGS.
13595
13596         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
13597         of other REG_* macros, since POSIX says the user is allowed to
13598         #undef these macros selectively.
13599
13600         (reg_errcode_t): Update comment stating what other tables need
13601         to be consistent.
13602
13603         Rename the following enum values to obey POSIX requirements.
13604         The old names are still visible as macros.
13605         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
13606         is not defined, since GNU is supposed to be a superset of POSIX as
13607         much as possible, and since we want reg_errcode_t to be a signed
13608         type for implementation consistency.
13609         (_REG_NOERROR): Renamed from REG_NOERROR.
13610         (_REG_NOMATCH): Renamed from REG_NOMATCH.
13611         (_REG_BADPAT): Renamed from REG_BADPAT.
13612         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
13613         (_REG_ECTYPE): Renamed from REG_ECTYPE.
13614         (_REG_EESCAPE): Renamed from REG_EESCAPE.
13615         (_REG_ESUBREG): Renamed from REG_ESUBREG.
13616         (_REG_EBRACK): Renamed from REG_EBRACK.
13617         (_REG_EPAREN): Renamed from REG_EPAREN.
13618         (_REG_EBRACE): Renamed from REG_EBRACE.
13619         (_REG_BADBR): Renamed from REG_BADBR.
13620         (_REG_ERANGE): Renamed from REG_ERANGE.
13621         (_REG_ESPACE): Renamed from REG_ESPACE.
13622         (_REG_BADRPT): Renamed from REG_BADRPT.
13623         (_REG_EEND): Renamed from REG_EEND.
13624         (_REG_ESIZE): Renamed from REG_ESIZE.
13625         (_REG_ERPAREN): Renamed from REG_ERPAREN.
13626         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
13627         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
13628         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
13629         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
13630
13631         (_REG_RE_NAME, _REG_RM_NAME): New macros.
13632         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
13633         changed.  But support the old name if the new one is not defined
13634         and if _REGEX_SOURCE.
13635
13636         Change the following member names in struct re_pattern_buffer.
13637         The old names are still supported if !_REGEX_SOURCE.
13638         The new names are always supported, regardless of _REGEX_SOURCE.
13639         (re_buffer): Renamed from buffer.
13640         (re_allocated): Renamed from allocated.
13641         (re_used): Renamed from used.
13642         (re_syntax): Renamed from syntax.
13643         (re_fastmap): Renamed from fastmap.
13644         (re_translate): Renamed from translate.
13645         (re_can_be_null): Renamed from can_be_null.
13646         (re_regs_allocated): Renamed from regs_allocated.
13647         (re_fastmap_accurate): Renamed from fastmap_accurate.
13648         (re_no_sub): Renamed from no_sub.
13649         (re_not_bol): Renamed from not_bol.
13650         (re_not_eol): Renamed from not_eol.
13651         (re_newline_anchor): Renamed from newline_anchor.
13652
13653         Change the following member names in struct re_registers.
13654         The old names are still supported if !_REGEX_SOURCE.
13655         The new names are always supported, regardless of _REGEX_SOURCE.
13656         (rm_num_regs): Renamed from num_regs.
13657         (rm_start): Renamed from start.
13658         (rm_end): Renamed from end.
13659
13660         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
13661         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
13662         Prepend __ to parameter names.
13663
13664         Undo yesterday's changes.
13665
13666 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
13667
13668         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
13669         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
13670         lib/regex.c.
13671
13672 2005-08-24  Jim Meyering  <jim@meyering.net>
13673
13674         Sync from coreutils.
13675         * m4/fcntl-safer.m4: New file.
13676
13677         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
13678         and object files for this module.
13679
13680 2005-08-24  Jim Meyering  <jim@meyering.net>
13681
13682         Sync from coreutils.
13683         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
13684
13685 2005-08-24  Jim Meyering  <jim@meyering.net>
13686
13687         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
13688         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
13689
13690 2005-08-24  Jim Meyering  <jim@meyering.net>
13691
13692         * modules/fcntl-safer: New module.
13693         * modules/fts (Depends-on): Add fcntl-safer.
13694         * MODULES.html.sh (File descriptor based Input/Output):
13695         Add fcntl-safer.
13696
13697 2005-08-24  Bruno Haible  <bruno@clisp.org>
13698
13699         Support for unit test modules.
13700         * modules/README: Mention tests modules.
13701         * modules/TEMPLATE-TESTS: New file.
13702         * gnulib-tool: New options --extract-tests-module, --with-tests and
13703         --tests-base (unused for the moment).
13704         (testsbase, inctests): New variables.
13705         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
13706         (func_verify_module): Exclude TEMPLATE-TESTS.
13707         (func_verify_nontests_module, func_verify_tests_module): New functions.
13708         (func_get_dependencies): Add implicit dependency for tests modules.
13709         (func_get_tests_module): New function.
13710         (func_modules_transitive_closure): When --with-tests was specified,
13711         include the unit tests as well, unless explicitly avoided.
13712         (func_emit_lib_Makefile_am): Ignore the tests modules here.
13713         (func_emit_tests_Makefile_am): New function.
13714         (func_create_testdir): When --with-tests was specified, emit a
13715         tests/ directory.
13716         * MODULES.html.sh (Future developments): Update.
13717
13718 2005-08-24  Bruno Haible  <bruno@clisp.org>
13719
13720         * modules/tls-tests: New file.
13721         * tests/test-tls.c: New file, from GNU gettext.
13722
13723 2005-08-24  Bruno Haible  <bruno@clisp.org>
13724
13725         * modules/lock-tests: New file.
13726         * tests/test-lock.c: New file, from GNU gettext.
13727
13728 2005-08-24  Bruno Haible  <bruno@clisp.org>
13729
13730         * lib/lock.h: Add multiple inclusion guard.
13731         * lib/tls.h: Add multiple inclusion guard.
13732
13733 2005-08-24  Bruno Haible  <bruno@clisp.org>
13734
13735         * gnulib-tool: Add support for the --aux-dir option to
13736         --create-testdir, --create-megatestdir, --test, --megatest.
13737         (func_create_testdir, func_create_megatestdir): Optionally emit a
13738         AC_CONFIG_AUX_DIR directive.
13739         (create-testdir, create-megatestdir, test, megatest): Provide a
13740         default value for $auxdir.
13741
13742 2005-08-24  Bruno Haible  <bruno@clisp.org>
13743
13744         * gnulib-tool (import): Use compound statement instead of subshell
13745         where possible.
13746
13747 2005-08-24  Bruno Haible  <bruno@clisp.org>
13748
13749         * gnulib-tool (import): Change --aux-dir default to "build-aux".
13750
13751 2005-08-24  Bruno Haible  <bruno@clisp.org>
13752
13753         * gnulib-tool (func_version): Update.
13754
13755 2005-08-24  Bruno Haible  <bruno@clisp.org>
13756
13757         * gnulib-tool (func_import, func_create_testdir,
13758         func_create_megatestdir): Quote all autoconf macro arguments.
13759
13760 2005-08-24  Bruno Haible  <bruno@clisp.org>
13761
13762         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
13763         option --force, because --force causes the aclocal.m4 of each
13764         subdirectory to be newer than the corresponding config.h.in.
13765
13766 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
13767
13768         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
13769         All contents moved to gl_REGEX.
13770         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
13771         assume that it does.
13772
13773 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
13774
13775         * lib/regex.h (REG_NOSYS)
13776         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
13777         Define, since POSIX requires it as of 2001.
13778         (_REG_ENOSYS)
13779         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
13780         New private symbol, used to keep the enum signed in all cases.
13781         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
13782         Youngman in
13783         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
13784
13785         * lib/regex_internal.c (re_string_skip_chars, register_state):
13786         (calc_state_hash):
13787         Remove forward decls; no longer needed now that we use prototypes.
13788         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
13789         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
13790         (clean_state_log_if_needed): Likewise.
13791
13792 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
13793
13794         * config/srclist.txt: Add glibc bugs 1231-1233.
13795
13796 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
13797
13798         Fix problems reported by Sam Steingold in
13799         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
13800         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
13801         assumed that reg_errcode_t is a signed type, which is not
13802         necessarily true if _XOPEN_SOURCE is not defined.
13803         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
13804         since some compilers warn about it otherwise.
13805
13806 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
13807
13808         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
13809         (init_word_char, create_initial_state, duplicate_node_closure):
13810         (fetch_token, peek_token_bracket, build_range_exp):
13811         (build_collating_symbol): Remove forward decls; no longer needed
13812         now that we use prototypes.
13813
13814         * lib/regcomp.c:
13815         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
13816         (re_compile_fastmap_iter, regcomp, regerror, regfree):
13817         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
13818         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
13819         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
13820         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
13821         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
13822         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
13823         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
13824         (build_range_exp, build_collating_symbol, parse_bracket_exp):
13825         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
13826         (build_charclass, build_charclass_op, fetch_number, create_tree):
13827         (create_token_tree, mark_opt_subexp, duplicate_tree):
13828         Use prototypes rather than old-style definitions.
13829
13830         * lib/regex_internal.c:
13831         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
13832         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
13833         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
13834         (re_string_reconstruct, re_string_peek_byte_case):
13835         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
13836         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
13837         (re_node_set_init_copy, re_node_set_add_intersect):
13838         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
13839         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
13840         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
13841         (re_acquire_state, re_acquire_state_context, register_state):
13842         (create_ci_newstate, create_cd_newstate, free_state):
13843         Likewise.
13844         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
13845         re_search_2):
13846         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
13847         (re_search_internal, prune_impossible_nodes):
13848         (acquire_init_state_context, check_matching, static):
13849         (check_halt_node_context, check_halt_state_context, proceed_next_node):
13850         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
13851         (update_regs, sift_states_backward, build_sifted_states):
13852         (clean_state_log_if_needed, merge_state_array):
13853         (update_cur_sifted_state, add_epsilon_src_nodes):
13854         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
13855         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
13856         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
13857         (find_recover_state, check_subexp_matching_top, transit_state_mb):
13858         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
13859         (check_arrival, check_arrival_add_next_nodes):
13860         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
13861         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
13862         (check_node_accept_bytes, check_node_accept, extend_buffers):
13863         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
13864         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
13865         (sift_ctx_init):
13866         Likewise.
13867
13868         * lib/regex_internal.h:
13869         (re_string_allocate, re_string_construct, re_string_reconstruct):
13870         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
13871         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
13872         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
13873         (re_string_context_at, re_string_peek_byte_case):
13874         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
13875         is defined, since we now use prototypes always.
13876
13877         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
13878         C89 or better.  All uses removed.
13879
13880 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
13881
13882         * config/srclist.txt: Add glibc bugs 1220-1227.
13883
13884 2005-08-20  Jim Meyering  <jim@meyering.net>
13885
13886         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
13887         of unused local, dfa.
13888
13889 2005-08-20  Bruno Haible  <bruno@clisp.org>
13890
13891         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
13892
13893 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
13894
13895         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
13896         (re_node_set_insert_last, re_dfa_add_node):
13897         Rename local variables to avoid GCC shadowing warnings.
13898
13899 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
13900
13901         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
13902         [defined lint]: Suppress bogus uninitialized-variable warnings.
13903
13904         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
13905         and let the caller return REG_ESPACE if out of space.  This
13906         removes an uninitialied-variable warning with GCC 4.0.1, and also
13907         avoids taking the address of a local variable.  All callers
13908         changed.
13909
13910 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
13911
13912         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
13913         $LIBCSRC/posix/regexec.c.
13914         Add glibc bug 1217 for regcomp.c.
13915
13916 2005-08-19  Jim Meyering  <jim@meyering.net>
13917
13918         * lib/regexec.c (proceed_next_node): Redo local variables to
13919         avoid GCC shadowing warnings.
13920
13921 2005-08-18  Bruno Haible  <bruno@clisp.org>
13922
13923         * lib/strstr.c (strstr): Fix return value in multibyte case.
13924         * lib/strcasestr.c (strcasestr): Likewise.
13925
13926 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
13927
13928         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
13929
13930 2005-08-17  Jim Meyering  <jim@meyering.net>
13931
13932         Make the %s format (seconds since the epoch) work for a negative
13933         number and when used with a zero-padded field width, e.g. %015s.
13934
13935         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
13936         label so that it precedes the code to set `digits'.  Otherwise,
13937         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
13938         print `00-22'.  Now, it prints `-0022', as it should.
13939
13940 2005-08-17  Bruno Haible  <bruno@clisp.org>
13941
13942         * modules/strstr (Files): Add m4/mbrtowc.m4.
13943         (Depends-on): Add mbuiter.
13944
13945 2005-08-17  Bruno Haible  <bruno@clisp.org>
13946
13947         * modules/strcasestr: New file.
13948         * MODULES.html.sh (String handling, based on ANSI C 89): Add
13949         strcasestr.
13950
13951 2005-08-17  Bruno Haible  <bruno@clisp.org>
13952
13953         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
13954
13955 2005-08-17  Bruno Haible  <bruno@clisp.org>
13956
13957         * modules/mbuiter: New file.
13958         * MODULES.html.sh (Extended multibyte and wide character utilities):
13959         Add mbuiter.
13960
13961 2005-08-17  Bruno Haible  <bruno@clisp.org>
13962
13963         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
13964         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
13965
13966 2005-08-17  Bruno Haible  <bruno@clisp.org>
13967
13968         * m4/strcasestr.m4: New file.
13969
13970 2005-08-17  Bruno Haible  <bruno@clisp.org>
13971
13972         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
13973         * lib/strstr.c: Completely rewritten, with multibyte locale support.
13974
13975 2005-08-17  Bruno Haible  <bruno@clisp.org>
13976
13977         * lib/strcasestr.h: New file.
13978         * lib/strcasestr.c: New file.
13979
13980 2005-08-17  Bruno Haible  <bruno@clisp.org>
13981
13982         * lib/strcasecmp.c: Use mbuiter.h.
13983
13984 2005-08-17  Bruno Haible  <bruno@clisp.org>
13985
13986         * lib/mbuiter.h: New file.
13987
13988 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
13989
13990         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
13991         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
13992         and gl_GETOPT are both invoked via different paths (as happens
13993         with GNU tar CVS because it uses both argp and getopt), the former
13994         wins.
13995
13996 2005-08-16  Bruno Haible  <bruno@clisp.org>
13997
13998         * modules/tls: New file.
13999         * MODULES.html.sh (Multithreading): Add tls.
14000
14001 2005-08-16  Bruno Haible  <bruno@clisp.org>
14002
14003         * modules/strnlen1: New file.
14004         * MODULES.html.sh (String handling): Add strnlen1.
14005
14006 2005-08-16  Bruno Haible  <bruno@clisp.org>
14007
14008         * modules/strcase (Files): Add m4/mbrtowc.m4.
14009         (Depends-on): Add strnlen1, mbchar.
14010
14011 2005-08-16  Bruno Haible  <bruno@clisp.org>
14012
14013         * modules/mbiter: New file.
14014         * MODULES.html.sh (Extended multibyte and wide character utilities):
14015         Add mbiter.
14016
14017 2005-08-16  Bruno Haible  <bruno@clisp.org>
14018
14019         * modules/mbfile: New file.
14020         * MODULES.html.sh (Extended multibyte and wide character utilities):
14021         Add mbfile.
14022
14023 2005-08-16  Bruno Haible  <bruno@clisp.org>
14024
14025         * modules/mbchar: New file.
14026         * MODULES.html.sh (Extended multibyte and wide character utilities):
14027         New section.
14028
14029 2005-08-16  Bruno Haible  <bruno@clisp.org>
14030
14031         * m4/tls.m4: New file, from GNU gettext.
14032
14033 2005-08-16  Bruno Haible  <bruno@clisp.org>
14034
14035         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
14036         always.
14037         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
14038
14039 2005-08-16  Bruno Haible  <bruno@clisp.org>
14040
14041         * m4/mbiter.m4: New file.
14042
14043 2005-08-16  Bruno Haible  <bruno@clisp.org>
14044
14045         * m4/mbfile.m4: New file.
14046
14047 2005-08-16  Bruno Haible  <bruno@clisp.org>
14048
14049         * m4/mbchar.m4: New file.
14050
14051 2005-08-16  Bruno Haible  <bruno@clisp.org>
14052
14053         * lib/tls.h: New file, from GNU gettext.
14054         * lib/tls.c: New file, from GNU gettext.
14055
14056 2005-08-16  Bruno Haible  <bruno@clisp.org>
14057
14058         * lib/strnlen1.h: New file.
14059         * lib/strnlen1.c: New file.
14060
14061 2005-08-16  Bruno Haible  <bruno@clisp.org>
14062
14063         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
14064         (mbi_init): Update.
14065         (mbi_avail, mbi_advance): Let the iteration end before the terminating
14066         NUL byte, not after it.
14067
14068 2005-08-16  Bruno Haible  <bruno@clisp.org>
14069
14070         * lib/strcase.h (strcasecmp): Add note in comments.
14071         * lib/strncasecmp.c: Use code from strcasecmp.c.
14072         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
14073         (strcasecmp): Work correctly in multibyte locales.
14074
14075 2005-08-16  Bruno Haible  <bruno@clisp.org>
14076
14077         * lib/mbiter.h: New file.
14078
14079 2005-08-16  Bruno Haible  <bruno@clisp.org>
14080
14081         * lib/mbfile.h: New file.
14082
14083 2005-08-16  Bruno Haible  <bruno@clisp.org>
14084
14085         * lib/mbchar.h: New file.
14086         * lib/mbchar.c: New file.
14087
14088 2005-08-16  Bruno Haible  <bruno@clisp.org>
14089
14090         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
14091         the valid ones. Makes the comparison operations transitive:
14092         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
14093         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
14094
14095 2005-08-15  Simon Josefsson  <jas@extundo.com>
14096
14097         * modules/ssize_t (License): Change to 'unlimited'.
14098
14099         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
14100
14101 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
14102
14103         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
14104         Add comments for each pending glibc patch.
14105
14106 2005-08-15  Bruno Haible  <bruno@clisp.org>
14107
14108         * lib/regex.h (__restrict_arr): Don't define to __restrict if
14109         __cplusplus is defined.
14110
14111 2005-08-14  Jim Meyering  <jim@meyering.net>
14112
14113         Sync from coreutils.
14114
14115         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
14116         Use the hash-table-based cycle-detection code not just when
14117         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
14118         Reported by James Youngman in
14119         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
14120         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
14121         FTS_TIGHT_CYCLE_CHECK.
14122         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
14123         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
14124         once again.
14125         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
14126         * lib/fts.c (fd_safer): Remove decl.
14127         Include fcntl--.h rather than unistd-safer.h
14128         (fts_safe_changedir): Don't call fd_safer; no longer needed
14129         now that we include fcntl--.h.
14130
14131 2005-08-12  Simon Josefsson  <jas@extundo.com>
14132
14133         * modules/getndelim2: Use ssize_t module.
14134         * modules/getnline: Likewise.
14135         * modules/safe-read: Likewise.
14136         * modules/xreadlink: Likewise.
14137
14138         * modules/ssize_t: New file.
14139
14140 2005-08-12  Simon Josefsson  <jas@extundo.com>
14141
14142         * m4/readline.m4: Look for termcap, curses or ncurses if required.
14143
14144 2005-08-12  Simon Josefsson  <jas@extundo.com>
14145
14146         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
14147         ssize_t.
14148
14149 2005-08-12  Simon Josefsson  <jas@extundo.com>
14150
14151         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
14152         readline, getdelim and check_version.
14153         (Support for systems lacking ISO C 99: Sizes of integer types):
14154         Add size_max.
14155
14156 2005-08-12  Bruno Haible  <bruno@clisp.org>
14157
14158         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
14159
14160 2005-08-11  Simon Josefsson  <jas@extundo.com>
14161
14162         * modules/readline: New file.
14163
14164         * modules/strnlen (Files): Add strnlen.h.
14165
14166 2005-08-11  Simon Josefsson  <jas@extundo.com>
14167
14168         * m4/readline.m4: New file.
14169
14170 2005-08-11  Simon Josefsson  <jas@extundo.com>
14171
14172         * lib/readline.h, readline.c: New file.
14173
14174 2005-08-11  Simon Josefsson  <jas@extundo.com>
14175
14176         * doc/gnulib.texi (Initial import, Finishing touches): Mention
14177         gl_AVOID.
14178
14179 2005-08-11  Bruno Haible  <bruno@clisp.org>
14180
14181         * lib/strnlen.h (strnlen): Change parameter name to match comment.
14182
14183 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
14184
14185         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
14186
14187 2005-08-10  Simon Josefsson  <jas@extundo.com>
14188
14189         * tests/test-iconvme.c: New file.
14190
14191 2005-08-10  Simon Josefsson  <jas@extundo.com>
14192
14193         * m4/strnlen.m4: New file.
14194
14195         * m4/strndup.m4: Don't check for strnlen declaration, done in
14196         strnlen.m4.
14197
14198 2005-08-10  Simon Josefsson  <jas@extundo.com>
14199
14200         * lib/strndup.c: Use strnlen.h.
14201
14202         * lib/strnlen.h: New file.
14203
14204 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
14205
14206         * README: Typos.
14207
14208 2005-08-02  Simon Josefsson  <jas@extundo.com>
14209
14210         * modules/readline: New file.
14211
14212 2005-08-02  Simon Josefsson  <jas@extundo.com>
14213
14214         * modules/getdelim: New file.
14215
14216         * modules/getline: Rewrite, don't use getndelim2.
14217
14218 2005-08-02  Simon Josefsson  <jas@extundo.com>
14219
14220         * m4/getline.m4: Separate out getdelim stuff into separate module.
14221
14222         * m4/getdelim.m4: New file.
14223
14224 2005-08-02  Simon Josefsson  <jas@extundo.com>
14225
14226         * lib/getline.h, getline.c: Rewrite.
14227
14228         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
14229
14230 2005-07-31  Bruno Haible  <bruno@clisp.org>
14231
14232         * lib/lock.h (gl_lock_initializer): New macro.
14233         (gl_lock_define_initialized): Use it.
14234         (gl_rwlock_initializer): New macro.
14235         (gl_rwlock_define_initialized): Use it.
14236         (gl_recursive_lock_initializer): New macro.
14237         (gl_recursive_lock_define_initialized): Use it.
14238
14239 2005-07-30  Karl Berry  <karl@gnu.org>
14240
14241         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
14242         Report from Ben Pfaff, regarding getopt.
14243
14244 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
14245
14246         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
14247         normal way.
14248         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
14249         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
14250         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
14251         (gl_GETOPT): Use the new macros.  Most of the implementation
14252         is moved to the new macros.  This is for programs like Emacs
14253         that don't want all the functionality of gl_GETOPT.
14254
14255 2005-07-26  Bruno Haible  <bruno@clisp.org>
14256
14257         * m4/lock.m4: Update from GNU gettext.
14258
14259 2005-07-26  Bruno Haible  <bruno@clisp.org>
14260
14261         * lib/lock.h: Update from GNU gettext.
14262         * lib/lock.c: Update from GNU gettext.
14263
14264 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
14265
14266         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
14267         obsolescent AC_TRY_RUN.  Include the default includes files, for
14268         'exit'.
14269
14270 2005-07-24  Bruno Haible  <bruno@clisp.org>
14271
14272         * modules/visibility: New file.
14273         * MODULES.html.sh (Misc): Add visibility.
14274
14275 2005-07-24  Bruno Haible  <bruno@clisp.org>
14276
14277         * m4/visibility.m4: New file.
14278
14279 2005-07-24  Bruno Haible  <bruno@clisp.org>
14280
14281         * doc/visibility.texi: New file.
14282
14283 2005-07-22  Bruno Haible  <bruno@clisp.org>
14284
14285         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
14286         $(ALLOCA_H), redundant through BUILT_SOURCES.
14287         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
14288         redundant through BUILT_SOURCES.
14289         * modules/byteswap (Makefile.am): Remove explicit dependency on
14290         $(BYTESWAP_H), redundant through BUILT_SOURCES.
14291         * modules/fnmatch (Makefile.am): Remove explicit dependency on
14292         $(FNMATCH_H), redundant through BUILT_SOURCES.
14293         * modules/getopt (Makefile.am): Remove explicit dependency on
14294         $(GETOPT_H), redundant through BUILT_SOURCES.
14295         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
14296         redundant through BUILT_SOURCES.
14297         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
14298         redundant through BUILT_SOURCES.
14299         * modules/stdbool (Makefile.am): Remove explicit dependency on
14300         $(STDBOOL_H), redundant through BUILT_SOURCES.
14301         * modules/stdint (Makefile.am): Remove explicit dependency on
14302         $(STDINT_H), redundant through BUILT_SOURCES.
14303         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
14304         Remove explicit dependency on $(SYSEXITS_H).
14305         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
14306
14307 2005-07-18  Simon Josefsson  <jas@extundo.com>
14308
14309         * lib/check-version.c (check_version): Accept identical versions too.
14310
14311 2005-07-18  Bruno Haible  <bruno@clisp.org>
14312
14313         * modules/lock: New file.
14314         * MODULES.html.sh (Multithreading): New section.
14315
14316 2005-07-18  Bruno Haible  <bruno@clisp.org>
14317
14318         * m4/lock.m4: New file, from GNU gettext.
14319
14320 2005-07-18  Bruno Haible  <bruno@clisp.org>
14321
14322         * lib/lock.h: New file, from GNU gettext.
14323         * lib/lock.c: New file, from GNU gettext.
14324
14325 2005-07-18  Bruno Haible  <bruno@clisp.org>
14326
14327         * lib/lock.h (gl_once_t): New type.
14328         (gl_once_define, gl_once): New macros.
14329         * lib/lock.c (fresh_once): New variable.
14330         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
14331         functions.
14332
14333 2005-07-16  Simon Josefsson  <jas@extundo.com>
14334
14335         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
14336         workaround, suggested by Bruno.
14337
14338 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
14339
14340         * modules/xalloc (Depends-on): Add xalloc-die.
14341         * modules/xvasprintf (Depends-on): Add xalloc-die.
14342
14343 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
14344
14345         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
14346         with a minor change.
14347
14348 2005-07-15  Bruno Haible  <bruno@clisp.org>
14349
14350         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
14351         When using lib/poll.c, define poll as rpl_poll.
14352
14353 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
14354
14355         * modules/argp (Depends-on): Remove unlocked-io.
14356
14357 2005-07-14  Derek Price  <derek@ximbiot.com>
14358
14359         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
14360         for glob symlink bug.
14361
14362 2005-07-14  Bruno Haible  <bruno@clisp.org>
14363
14364         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
14365         Instead, test for *_unlocked function declarations directly.
14366
14367 2005-07-11  Simon Josefsson  <jas@extundo.com>
14368
14369         * modules/size_max: New file.
14370
14371         * modules/xsize: Depend on size_max module for size_max.m4.
14372
14373 2005-07-11  Simon Josefsson  <jas@extundo.com>
14374
14375         * lib/size_max.h: New file.
14376
14377 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
14378
14379         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
14380         copyright symbol and the year.
14381         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
14382         (version_etc_va): Use parameterized copyright notice.
14383         Reword to conform to the current GNU coding standards.
14384
14385 2005-07-11  Karl Berry  <karl@gnu.org>
14386
14387         * doc/gnulib.texi (Quoting): new node.
14388         (Initial import): more info, from Patrice.
14389
14390 2005-07-11  Bruno Haible  <bruno@clisp.org>
14391
14392         * gnulib-tool (func_usage): Document option --avoid.
14393         (Command line options): Handle --avoid.
14394         (func_acceptable): New function.
14395         (func_modules_transitive_closure): Use it.
14396
14397 2005-07-11  Bruno Haible  <bruno@clisp.org>
14398
14399         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
14400         Reported by Jim Meyering.
14401
14402 2005-07-10  Bruno Haible  <bruno@clisp.org>
14403
14404         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
14405         Needed when size_t is smaller than 'unsigned int'.
14406         Reported by Paul Eggert.
14407
14408 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
14409
14410         * modules/argp (Depends-on): Add unlocked-io
14411
14412 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
14413
14414         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
14415         block of defines.
14416
14417 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
14418
14419         * config/srclist.txt: Comment out regcomp.c, since we have a porting
14420         fix now.
14421
14422 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
14423         and Paul Eggert  <eggert@cs.ucla.edu>
14424
14425         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
14426         in wint_t, not wchar_t.  Remove now-unnecessary cast.
14427
14428 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
14429
14430         * modules/regex (Files): Add lib/regex_internal.c,
14431         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
14432         (Depends-on): Add extensions.
14433         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
14434
14435 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
14436
14437         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
14438         pathconf.
14439         * m4/same.m4 (gl_SAME): Likewise.
14440         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
14441
14442         * m4/regex.m4: Adjust to new libc regex implementation.
14443         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
14444         all the .c and .h parts of (the new) regex.
14445         Quote the m4 stuff better.
14446         Check for RE_ICASE bug of old gnulib.
14447         Check for REG_STARTEND of recent libc.
14448         Rename local variables from jm_* to gl_*.
14449         Quote operand of "test -f".
14450         Say "recent enough" version of libc, not "version 2".
14451         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
14452         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
14453         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
14454         Remove check for btowc, isascii.
14455         Require AM_LANGINFO_CODESET.
14456
14457 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
14458
14459         * lib/regex.c, regex.h: Sync from libc.
14460         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
14461         * lib/regexec.c:
14462         New files, synced from libc, except that regex_internal.h
14463         currently has a small porting fix.
14464
14465 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
14466
14467         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
14468         regex_internal.c, regexec.c.
14469         Add regex_internal.h too, but as a comment, since the libc version
14470         is currently broken in gnulib mode.
14471
14472 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
14473
14474         Support programs like Emacs that use gnulib but not gettext.
14475         * MODULES.html.sh (Internationalization functions): Add gettext-h.
14476         * modules/gettext-h: New file.
14477         * modules/gettext (Files): Remove lib/gettext.h.
14478         (Depends-on): Add gettext-h.
14479         (Makefile.am): Remove lib_SOURCES.
14480         * modules/argmatch, modules/c-stack, modules/closeout:
14481         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
14482         * modules/execute, modules/file-type, modules/getaddrinfo:
14483         * modules/getopt, modules/human, modules/javacomp:
14484         * modules/javaexec, modules/mkdir-p, modules/obstack:
14485         * modules/openat, modules/pagealign_alloc, modules/pipe:
14486         * modules/quotearg, modules/regex, modules/rpmatch:
14487         * modules/unicodeio, modules/userspec, modules/version-etc:
14488         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
14489         * modules/xsetenv:
14490         Depend on gettext-h, not gettext.
14491
14492 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
14493
14494         * gnulib-tool (func_import): Add support for 'public domain' license.
14495         * modules/alloca, modules/atexit, modules/memmove:
14496         Now public domain, not GPL.
14497         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
14498         * modules/realloc, modules/strerror, modules/strtod:
14499         Now LGPL, not GPL.
14500
14501 2005-07-05  Bruno Haible  <bruno@clisp.org>
14502
14503         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
14504         autoconf CVS. Needed for mingw.
14505
14506 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
14507
14508         Remove the dependency of the strftime module on the tzset module.
14509         * modules/strftime (Depends-on): Remove dependency on tzset.
14510
14511 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
14512
14513         Remove the dependency of the strftime module on the tzset module.
14514         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
14515         gl_FUNC_TZSET_CLOBBER.
14516
14517 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
14518
14519         Remove the dependency of the strftime module on the tzset module.
14520         * lib/strftime.c (my_strftime)
14521         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
14522         Copy the input structure, to work around some of the bug with
14523         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
14524         Solaris releases, you should also use the tzset module, but we won't
14525         require it as a dependency any more since we don't want LGPLed code
14526         to depend on GPLed code.
14527
14528 2005-07-02  Jim Meyering  <jim@meyering.net>
14529
14530         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
14531         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
14532         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
14533         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
14534
14535 2005-07-02  Jim Meyering  <jim@meyering.net>
14536
14537         * lib/backupfile.c (backup_args): Change a `0' to NULL.
14538
14539 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
14540
14541         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
14542         declares only 'struct timespec;' (!).
14543
14544 2005-07-01  Jim Meyering  <jim@meyering.net>
14545
14546         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
14547         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
14548         * lib/save-cwd.c, tempname.c:
14549         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
14550         and don't include <sys/file.h>).
14551
14552 2005-06-29  Jim Meyering  <jim@meyering.net>
14553
14554         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
14555         type name.  Use the variable name instead.
14556         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
14557         Likewise.
14558
14559 2005-06-28  Simon Josefsson  <jas@extundo.com>
14560
14561         * modules/check-version (Files): Add check-version.m4.
14562
14563 2005-06-28  Simon Josefsson  <jas@extundo.com>
14564
14565         * m4/check-version.m4: New file, suggested by Jim Meyering
14566         <jim@meyering.net>.
14567
14568 2005-06-28  Simon Josefsson  <jas@extundo.com>
14569
14570         * lib/check-version.h, lib/check-version.c: New files.
14571
14572 2005-06-28  Simon Josefsson  <jas@extundo.com>
14573
14574         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
14575         collision with global variable.  Better indentation.  Don't
14576         increment buffer pointer beyond buffer end.  Based on comments
14577         from Paul Eggert <eggert@cs.ucla.edu>.
14578
14579         * lib/base64.h: Indent.
14580
14581 2005-06-28  Simon Josefsson  <jas@extundo.com>
14582
14583         * doc/gnulib.texi (Library version handling): New section.
14584
14585 2005-06-28  Jim Meyering  <jim@meyering.net>
14586
14587         * check-module (find_included_lib_files): Hard-code another
14588         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
14589         but modules/fts-lgpl (correctly) does not list those files.
14590
14591         * modules/canonicalize (Files): Add lib/pathmax.h.
14592
14593 2005-06-25  Simon Josefsson  <jas@extundo.com>
14594
14595         * modules/check-version: New file.
14596
14597 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
14598
14599         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
14600         initializer of struct addrinfo, as an indication that we don't
14601         care how many members the structure has.
14602
14603 2005-06-24  Derek Price  <derek@ximbiot.com>
14604         and Bruno Haible  <bruno@clisp.org>
14605
14606         Remove stat module & update lstat.
14607         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
14608         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
14609         * m4/stat.m4: Remove this file.
14610
14611 2005-06-24  Derek Price  <derek@ximbiot.com>
14612         and Bruno Haible  <bruno@clisp.org>
14613
14614         Remove stat module & update lstat.
14615         * lib/stat.c: Remove this file...
14616         (slash_aware_lstat): ...moving this content and its support...
14617         * lib/lstat.c (rpl_lstat): ...into here.
14618         * lib/lstat.h: New file.
14619
14620 2005-06-24  Derek Price  <derek@ximbiot.com>
14621         and Bruno Haible  <bruno@clisp.org>
14622
14623         Remove stat module & update lstat.
14624         * config/srclist.txt (libc sources): Remove stat.
14625
14626 2005-06-24  Derek Price  <derek@ximbiot.com>
14627         and Bruno Haible  <bruno@clisp.org>
14628
14629         Remove stat module & update lstat.
14630         * MODULES.html.sh (stat): Remove.
14631         * MODULES.html: Regenerated.
14632         * modules/lstat (Description): Correct function name.
14633         (Files): Add "lstat.h".
14634         (Depends-on): Remove stat, add xalloc, stat-macros.
14635         * modules/stat: Remove this file.
14636         (Include): Add "lstat.h", remove <sys/stat.h>.
14637
14638 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
14639
14640         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
14641         (ranged_convert): Don't save conversion in a temporary struct.
14642         This causes a warning with GCC 4.0.0, and anyway in the typical
14643         case it's not worth the extra 100 bytes or so of code.
14644         (ranged_convert, __mktime_internal): When calling a function via a
14645         pointer P, use P () rather than (*P) (), as we now assume C89 or
14646         better.
14647
14648 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
14649
14650         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
14651         "who -r" failed to give output.  Problem reported by Tim Waugh.
14652
14653         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
14654         (xcalloc): Use it to avoid needless tests.
14655         Problem reported by Jim Meyering.
14656
14657 2005-06-20  Derek Price  <derek@ximbiot.com>
14658
14659         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
14660         unnecessary for Autoconfs > 2.59c.
14661
14662 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14663
14664         * lib/argp.h (__option_is_short): Check upper limit of
14665         __key. Isprint() requires its argument to have the value
14666         of an unsigned char or EOF.
14667
14668 2005-06-16  Jim Meyering  <jim@meyering.net>
14669
14670         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
14671         when either N or S is zero.
14672
14673 2005-06-16  Derek Price  <derek@ximbiot.com>
14674
14675         * m4/bison.m4: Declare YACC & YFLAGS precious.
14676
14677 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
14678
14679         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
14680         multibyte string or pattern, fall back on unibyte matching.
14681         Problem reported by James Youngman.
14682
14683 2005-06-08  Bruno Haible  <bruno@clisp.org>
14684
14685         * modules/csharpcomp: New file.
14686         * MODULES.html.sh (C#): Add csharpcomp.
14687
14688 2005-06-08  Bruno Haible  <bruno@clisp.org>
14689
14690         * m4/csharpcomp.m4: New file, from GNU gettext.
14691
14692 2005-06-08  Bruno Haible  <bruno@clisp.org>
14693
14694         * lib/csharpcomp.h: New file, from GNU gettext.
14695         * lib/csharpcomp.c: New file, from GNU gettext.
14696         * lib/csharpcomp.sh.in: New file, from GNU gettext.
14697
14698 2005-06-08  Bruno Haible  <bruno@clisp.org>
14699
14700         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
14701         warning on mingw.
14702
14703 2005-06-07  Derek Price  <derek@ximbiot.com>
14704
14705         Sync from CVS.
14706         * lib/glob_.h: Indent nested #ifdef.
14707
14708 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
14709
14710         Sync from coreutils.
14711         Use "file name" when talking about file names, instead of "filename"
14712         or "path", as per the GNU coding standards.
14713         * lib/mkdir-p.c: Renamed from makepath.c.
14714         (make_dir_parents): Renamed from make_path.  All callers changed.
14715         * lib/mkdir-p.h: Likewise.  All includers changed.
14716         * lib/filenamecat.c: Renamed from path-concat.c.
14717         (file_name_concat): Renamed from path_concat.  All callers changed.
14718         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
14719         * lib/filenamecat.h: Likewise.  All includers changed.
14720         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
14721         in comments or local variable names.
14722         * lib/basename.c: Likewise.
14723         * lib/canonicalize.c, canonicalize.h: Likewise.
14724         * lib/dirname.c, dirname.h: Likewise.
14725         * lib/euidaccess.c: Likewise.
14726         * lib/exclude.c: Likewise
14727         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
14728         * lib/fsusage.c, fsuage.h: Likewise.
14729         * lib/fts.c, fts_.h: Likewise.
14730         * lib/getcwd.c: Likewise.
14731         * lib/getloadavg.c: Likewise.
14732         * lib/mkstemp.c: Likewise.
14733         * lib/mountlist.c, mountlist.h: Likewise.
14734         * lib/openat.c, openat.h: Likewise.
14735         * lib/readlink-stub.c: Likewise.
14736         * lib/readutmp.c, readutmp.h: Likewise.
14737         * lib/rename.c: Likewise.
14738         * lib/rmdir.c: Likewise.
14739         * lib/same.c: Likewise.
14740         * lib/savedir.c: Likewise.
14741         * lib/stripslash.c: Likewise.
14742         * lib/tempname.c: Likewise.
14743         * lib/xreadlink.c: Likewise.
14744         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
14745         All uses changed.
14746         * lib/exclude.h: Likewise.
14747
14748         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
14749         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
14750         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
14751         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
14752         * lib/pathmax.h: Include <limits.h> unconditionally, since other
14753         files have been getting away with it for years (MORE/BSD 4.3
14754         is extinct now).
14755         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
14756         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
14757
14758         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
14759         Define to 256, not 255, as per modern POSIX.
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         * MODULES.html.sh: mkdir-p renamed from makepath.
14767         filenamecat renamed from path-concat.
14768         * modules/filenamecat: Renamed from modules/path-concat.
14769         (Files): filenamecat.h and filenamecat.c renamed from
14770         path-concat.h and path-concat.c.
14771         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
14772         (Include): filenamecat.h, not path-concat.h.
14773         * modules/mkdir-p: Renamed from modules/makepath.
14774         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
14775         makepath.c.
14776         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
14777         (Include): mkdir-p.h, not makepath.h.
14778
14779 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
14780
14781         Sync from coreutils.
14782         * m4/mkdir-p.m4: Renamed from makepath.m4.
14783         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
14784         Rename files from makepath.c to mkdir-p.c, and from
14785         makepath.h to mkdir-p.h.
14786         * m4/filenamecat.m4: Renamed from path-concat.m4.
14787         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
14788         Rename files from path-concat.c to filenamecat.c,
14789         and from path-concat.h to filenamecat.h.
14790         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
14791         "file name" in local variables or comments.
14792         * m4/rename.m4: Likewise.
14793
14794 2005-06-01  Bruno Haible  <bruno@clisp.org>
14795
14796         * modules/csharpexec: New file.
14797         * MODULES.html.sh (C#): New section.
14798
14799 2005-06-01  Bruno Haible  <bruno@clisp.org>
14800
14801         * m4/csharp.m4: New file, from GNU gettext.
14802         * m4/csharpexec.m4: New file, from GNU gettext.
14803
14804 2005-06-01  Bruno Haible  <bruno@clisp.org>
14805
14806         * lib/csharpexec.h: New file, from GNU gettext.
14807         * lib/csharpexec.c: New file, from GNU gettext.
14808         * lib/csharpexec.sh.in: New file, from GNU gettext.
14809
14810 2005-05-31  Derek Price  <derek@ximbiot.com>
14811             Paul Eggert  <eggert@cs.ucla.edu>
14812
14813         Sync from cvs.
14814         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
14815
14816 2005-05-31  Derek Price  <derek@ximbiot.com>
14817             Paul Eggert  <eggert@cs.ucla.edu>
14818
14819         Sync from cvs.
14820         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
14821
14822 2005-05-29  Derek Price  <derek@ximbiot.com>
14823
14824         * config/srclist.txt (glob_.h, glob.c): Add these files.
14825
14826 2005-05-29  Derek Price  <derek@ximbiot.com>
14827
14828         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
14829         * modules/glob: New file.
14830         * modules/getlogin_r: Add link to POSIX spec in description.
14831
14832 2005-05-29  Derek Price  <derek@ximbiot.com>
14833             Paul Eggert  <eggert@cs.ucla.edu>
14834
14835         * m4/glob.m4: New file.
14836
14837 2005-05-29  Derek Price  <derek@ximbiot.com>
14838             Paul Eggert  <eggert@cs.ucla.edu>
14839
14840         * lib/glob_.h, lib/glob.c: New files.
14841
14842 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
14843
14844         * modules/fts (Files): Remove m4/inttypes-pri.m4.
14845         * modules/fts-lgpl (Depends-on): Remove gettext.
14846
14847 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
14848
14849         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
14850         and don't require gt_INTTYPES_PRI.
14851
14852 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
14853
14854         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
14855
14856         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
14857         the configuration hassle isn't worth it.
14858         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
14859         (LONGEST_MODIFIER, PRIuMAX): Remove.
14860
14861 2005-05-27  Bruno Haible  <bruno@clisp.org>
14862
14863         * lib/getlogin_r.h: Remove second include of <stddef.h>.
14864
14865 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
14866
14867         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
14868         _POSIX_PTHREAD_SEMANTICS for Solaris.
14869
14870 2005-05-25  Derek Price  <derek@ximbiot.com>
14871
14872         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
14873
14874 2005-05-25  Derek Price  <derek@ximbiot.com>
14875             Paul Eggert  <eggert@cs.ucla.edu>
14876
14877         * modules/getlogin_r, m4/getlogin_r.m4: New files.
14878         * lib/getlogin_r.c, getlogin_r.h: New files.
14879
14880 2005-05-25  Bruno Haible  <bruno@clisp.org>
14881             Derek Price  <derek@ximbiot.com>
14882
14883         * lib/getlogin_r.h: Simplify API documentation.
14884
14885 2005-05-23  Derek Price  <derek@ximbiot.com>
14886
14887         * modules/minmax (Files): Add m4/minmax.m4.
14888         (configure.ac): Add gl_MINMAX.
14889
14890 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
14891
14892         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
14893         so that unistd-safer.h (GPL'ed code) need not be included.
14894
14895 2005-05-22  Bruno Haible  <bruno@clisp.org>
14896
14897         * m4/minmax.m4: New file.
14898         Based on a patch by Derek Price <derek@ximbiot.com>.
14899
14900 2005-05-22  Bruno Haible  <bruno@clisp.org>
14901
14902         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
14903         (INT64_MIN): Fix definition.
14904         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
14905
14906         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
14907         NEED_SIGNED_INT_TYPES.
14908
14909         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
14910         HAVE_SYSTEM_INTTYPES.
14911
14912 2005-05-22  Bruno Haible  <bruno@clisp.org>
14913
14914         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
14915         Also include <sys/param.h> if it defines MIN, MAX.
14916         Based on a patch by Derek Price <derek@ximbiot.com>.
14917
14918 2005-05-21  Jim Meyering  <jim@meyering.net>
14919
14920         * modules/fts (Files): Add m4/inttypes-pri.m4.
14921         (Depends-on): Add lstat and remove gettext.  Alphabetize.
14922
14923 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
14924
14925         New fts module.
14926         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
14927         (setup_dir, free_dir): New functions.
14928         (enter_dir, leave_dir): Define trivial
14929         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
14930         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
14931         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
14932         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
14933         Move to fts-cycle.c.
14934         (fts_open): Use setup_dir.
14935         (fts_close): Use free_dir.
14936         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
14937         This adds a label and some gotos, but the alternatives were messier.
14938         Check for memory allocation failure when entering a dir.
14939         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
14940         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
14941         (FTS): New member fts_cycle, that is a union that contains the
14942         old active_dir_ht and cycle_state.  All uses changed to mention
14943         fts_cycle.ht and fts_cycle.state.
14944         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
14945         fts.c, with the following changes:
14946         (setup_dir, free_dir): New functions.
14947         (enter_dir): Now returns bool.  Return true if successful, false
14948         if memory exhausted.  All callers changed.
14949         Do not bother partly cleaning up on
14950         memory allocation failure; that is free_dir's job.
14951         However, free ad if hash_insert fails, to avoid memory leak.
14952         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
14953         fts->fts_options to see which union member to use.
14954
14955 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
14956
14957         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
14958         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
14959
14960 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
14961
14962         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
14963
14964 2005-05-20  Jim Meyering  <jim@meyering.net>
14965
14966         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
14967         Now a macro, to pacify GCC.
14968
14969 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
14970
14971         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
14972         of -1.
14973
14974 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
14975
14976         * lib/chown.c (rpl_chown): Return -1 on failure.
14977
14978 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
14979
14980         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
14981         Don't check for stddef.h.
14982         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
14983         don't use its results.
14984         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
14985         since we include them unconditionally.  Don't require
14986         AM_STDBOOL_H, since stdbool is a prerequisite.
14987         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
14988         since we assume C89 or better.
14989         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
14990         as we don't use their results.
14991         Don't check for fchdir, memmove, memset, strrchr, as we use
14992         them unconditionally.
14993         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
14994         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
14995
14996 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
14997
14998         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
14999         Include <stddef.h> unconditionally, since we assume C89 now.
15000         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
15001         * lib/fts.c: Include fts_.h first, to check interface.
15002         Do not include intprops.h; no longer needed.
15003         Include cycle-check.h and hash.h, since fts_.h no longer does.
15004         Remove unnecessary casts of closedir to void.
15005         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
15006         decide whether to decrement nlinks.
15007         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
15008         (FTS): Use struct hash_table * instead of Hash_table, so that
15009         we no longer need to include hash.h here.
15010
15011 2005-05-18  Jim Meyering  <jim@meyering.net>
15012
15013         * modules/dirfd (License): Change to LGPL.  Most of the code
15014         is already in the public domain.
15015
15016 2005-05-18  Jim Meyering  <jim@meyering.net>
15017
15018         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
15019         Reported by Yoann Vandoorselaere.
15020
15021 2005-05-17  Jim Meyering  <jim@meyering.net>
15022
15023         * m4/fts.m4: New file, from coreutils.
15024
15025 2005-05-17  Jim Meyering  <jim@meyering.net>
15026
15027         * lib/fts.c, lib/fts_.h: New files, from coreutils.
15028
15029 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
15030
15031         Sync from coreutils.
15032         * m4/unlinkdir.m4: New file.
15033
15034 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
15035
15036         Sync from coreutils.
15037         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
15038         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
15039         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
15040         White space changes only.
15041         * lib/makepath.c (make_path): Port to hosts where leading "//" is
15042         special.
15043         * lib/yesno.c: Include getline.h, not ctype.h.
15044         (yesno): Don't remove leading white space; POSIX doesn't allow it.
15045         Use getline to remove arbitrary restriction on response length.
15046
15047 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
15048
15049         * config/srclist-update: Spell out "Street" in FSF postal
15050         mail address; this is the style the FSF seems to prefer.
15051
15052         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
15053         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
15054         this updates FSF postal mail address.
15055
15056         Sync from coreutils.
15057         * modules/unlinkdir: New file.
15058         * modules/yesno (Depends-on): Add getline.
15059         * MODULES.html.sh (File system functions): Add unlinkdir.
15060
15061 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
15062
15063         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
15064         lib/strsep.h:
15065         Change the initial comment to refer to GPL, not LGPL.
15066         gnulib-tool will change it to LGPL as needed.
15067
15068         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
15069         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
15070         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
15071         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
15072         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
15073         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
15074         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
15075         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
15076         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
15077         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
15078         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
15079         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
15080         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
15081         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
15082         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
15083         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
15084         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
15085         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
15086         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
15087         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
15088         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
15089         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
15090         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
15091         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
15092         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
15093         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
15094         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
15095         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
15096         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
15097         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
15098         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
15099         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
15100         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
15101         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
15102         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
15103         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
15104         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
15105         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
15106         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
15107         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
15108         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
15109         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
15110         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
15111         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
15112         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
15113         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
15114         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
15115         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
15116         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
15117         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
15118         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
15119         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
15120         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
15121         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
15122         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
15123         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
15124         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
15125         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
15126         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
15127         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
15128         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
15129         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
15130         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
15131         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
15132         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
15133         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
15134         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
15135         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
15136         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
15137         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
15138         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
15139         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
15140         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
15141         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
15142         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
15143         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
15144         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
15145         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
15146         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
15147         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
15148         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
15149         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
15150         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
15151         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
15152         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
15153         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
15154         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
15155         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
15156         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
15157         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
15158         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
15159         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
15160         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
15161         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
15162         lib/yesno.c, lib/yesno.h:
15163         Update FSF postal mail address.
15164
15165 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
15166
15167         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
15168         tests/test-memmem.c, tests/test-stpncpy.c:
15169         Update FSF postal mail address.
15170
15171 2005-05-13  Bruno Haible  <bruno@clisp.org>
15172
15173         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
15174         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
15175         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
15176         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
15177         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
15178         Add support for 64-bit integers in the MSVC compiler.
15179
15180 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15181
15182         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
15183
15184 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
15185
15186         * gnulib-tool (func_import): Sort and uniquify recommended includes.
15187
15188 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
15189
15190         * doc/getdate.texi (General date syntax): Don't say that date
15191         date --iso-8601=ns generates acceptable dates; it doesn't yet.
15192         Problem reported by Nic Ferrier.
15193
15194 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
15195
15196         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
15197         specified in ai_socktype. Fix invalid ai_protocol
15198         check. ai_protocol is usually set to 0 or depending on
15199         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
15200         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
15201         ai_socktype / ai_protocol in the returned addrinfo structure.
15202
15203 2005-05-10  Simon Josefsson  <jas@extundo.com>
15204
15205         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
15206         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
15207
15208 2005-05-10  Karl Berry  <karl@gnu.org>
15209
15210         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
15211         (from http://www.gnu.org/licenses).
15212         * doc/COPYING.LIB: also rename to COPYING.LESSER.
15213         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
15214         fdl.texi suffices.
15215
15216 2005-05-10  Karl Berry  <karl@gnu.org>
15217
15218         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
15219         (COPYING.DOC): remove.
15220
15221         * config/srclist-update: new FSF address.
15222
15223 2005-05-10  Derek Price  <derek@ximbiot.com>
15224
15225         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
15226         possible.
15227
15228 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
15229             Bruno Haible  <bruno@clisp.org>
15230
15231         * modules/inet_ntop: New file.
15232         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
15233         inet_ntop.
15234
15235 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
15236             Bruno Haible  <bruno@clisp.org>
15237
15238         * m4/inet_ntop.m4: New file.
15239
15240 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
15241             Bruno Haible  <bruno@clisp.org>
15242
15243         * lib/inet_ntop.h: New file.
15244         * lib/inet_ntop.c: New file, from glibc with modifications.
15245
15246 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
15247
15248         * modules/time_r (License): Change to LGPL.
15249         * modules/extensions (License): Change to LGPL.  Actually,
15250         the license is more permissive than that, but currently gnulib-tool
15251         doesn't know how to handle more-permissive licenses.
15252
15253         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
15254         Problem reported by Dave Love.
15255
15256 2005-05-08  Jim Meyering  <jim@meyering.net>
15257
15258         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
15259         blank.
15260
15261 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
15262
15263         * modules/argmatch (Depends-on): Add stdbool.
15264         * modules/backupfile (Depends-on): Likewise.
15265         * modules/chdir-long (Depends-on): Likewise.
15266         * modules/closeout (Depends-on): Likewise.
15267         * modules/cycle-check (Depends-on): Likewise.
15268         * modules/dirname (Depends-on): Likewise.
15269         * modules/fnmatch (Depends-on): Likewise.
15270         * modules/fsusage (Depends-on): Likewise.
15271         * modules/fwriteerror (Depends-on): Likewise.
15272         * modules/getcwd (Depends-on): Likewise.
15273         * modules/getloadavg (Depends-on): Likewise.
15274         * modules/hard-locale (Depends-on): Likewise.
15275         * modules/makepath (Depends-on): Likewise.
15276         * modules/mountlist (Depends-on): Likewise.
15277         * modules/nanosleep (Depends-on): Likewise.
15278         * modules/posixtm (Depends-on): Likewise.
15279         * modules/quotearg (Depends-on): Likewise.
15280         * modules/readtokens (Depends-on): Likewise.
15281         * modules/readtokens0 (Depends-on): Likewise.
15282         * modules/readutmp (Depends-on): Likewise.
15283         * modules/save-cwd (Depends-on): Likewise.
15284         * modules/strftime (Depends-on): Likewise.
15285         * modules/userspec (Depends-on): Likewise.
15286         * modules/utimecmp (Depends-on): Likewise.
15287         * modules/xgetcwd (Depends-on): Likewise.
15288         * modules/xnanosleep (Depends-on): Likewise.
15289         * modules/xstrtod (Depends-on): Likewise.
15290         * modules/yesno (Depends-on): Likewise.
15291
15292 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
15293
15294         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
15295         needless checks.
15296
15297 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
15298
15299         Merge from coreutils.  Among other things,
15300         add bulletproofing for cases where stdin, stdout, or stderr are closed.
15301         * lib/fd-safer.c: New file.
15302         * lib/fcntl-safer.h, open-safer.c: Remove.
15303         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
15304         * lib/dup-safer.c: Include unistd-safer.h first.
15305         Don't include errno.h.
15306         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
15307         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
15308         * lib/file-type.c: Rely on file-type.h change.
15309         * lib/getloadavg.c: Include unistd-safer.h.
15310         (getloadavg): Use safer open.
15311         * lib/getusershell.c: Include "stdio-safer.h".
15312         (getusershell): Use safer fopen.
15313         * lib/long-options.c (long_options): Use NULL rather than 0.
15314         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
15315         'free'.
15316         * lib/modechange.c: Likewise.
15317         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
15318         (MODE_DONE): New constant.
15319         (struct mode_change): Remove 'next' member.
15320         (make_node_op_equals): New function; like the old one of the
15321         same name, except it allocates an array.
15322         (mode_compile, mode_create_from_ref): Use it.
15323         (mode_compile): Allocate result as an array, not a linked list.
15324         Parse octal string ourself, so that we catch mistakes like "+0".
15325         (mode_adjust): Arg is an array, not a linked list.
15326         * lib/modechange.c: Include stat-macros.h, xalloc.h.
15327         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
15328         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
15329         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
15330         Remove.  This is now stat-macros.h's job.
15331         (talloc): Remove.  All callers replaced by xalloc, so that
15332         our invokers don't have to worry about reporting memory failures.
15333         (make_node_op_equals): Remove.
15334         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
15335         New constants.
15336         (struct mode_change): Moved here from modechange.h.
15337         (mode_append_entry): Remove.
15338         (mode_compile): Remove MASKED_OPS arg, since it encouraged
15339         apps to have incorrect behavior.  Use simpler algorithm for head
15340         and tail.  Don't futz with umask; that's now the job of mode_adjust.
15341         Detect more invalid usages rather than having somewhat-random behavior.
15342         Don't insert an "a=" action, as that leads to incorrect behavior.
15343         (mode_compile, mode_create_from_ref): Return NULL on error instead
15344         of an enum, since now there's only one way to have an error.  All
15345         callers changed.
15346         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
15347         at the correct time.  Simplify calculation of "+u" and its ilk.
15348         Don't mishandle "+X".
15349         (mode_free): Remove "register" and localize decls.
15350         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
15351         (struct mode_change): Move to modechange.c; callers don't
15352         need to see this stuff.
15353         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
15354         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
15355         (mode_change, mode_adjust): Reflect the new signatures noted above.
15356         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
15357         that might redefine system include files.
15358         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
15359         (my_usleep): Use NULL rather than (void *) 0.
15360         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
15361         Use siginterrupt to specify that system calls should be interrupted.
15362         (rpl_nanosleep): Move initialization of suspended closer to call of
15363         my_usleep.
15364         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
15365         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
15366         (desirable_utmp_entry): New function.
15367         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
15368         using x2nrealloc, to simplify logic.
15369         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
15370         size calculation.  Do not assume utmp file is a regular file.
15371         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
15372         (READ_UTMP_CHECK_PIDS): New constant.
15373         * lib/save-cwd.c: Include unistd-safer.h.
15374         (save_cwd): Use fd_safer.
15375         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
15376         [!_LIBC] Include "stat-macros.h" instead.
15377         * lib/unistd-safer.h (fd_safer): New decl.
15378
15379 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
15380
15381         * modules/getloadavg (Depends-on): Add unistd-safer.
15382         * modules/getusershell (Depends-on): Add stdio-safer.
15383         * modules/lstat (Depends-on): Remove xalloc.
15384         * modules/mkstemp (Depends-on): Add stat-macros.
15385         * modules/modechange (Depends-on): Remove xstrtol.
15386         Add stat-macros, xalloc.
15387         * modules/save-cwd (Depends-on): Add unistd-safer.
15388         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
15389         * modules/unistd-safer (Files): Add lib/fd-safer.c
15390         (Makefile.am): Remove lib_SOURCES.
15391
15392         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
15393         Remove fcntl-safer; unistd-safer supersedes it.
15394
15395 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
15396
15397         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
15398         AC_HEADER_STAT.
15399         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
15400         (gl_PREREQ_CHOWN): Remove.
15401         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
15402         it.  Don't require AC_HEADER_STAT.
15403         (gl_PREREQ_LSTAT): Remove.
15404         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
15405         Don't require AC_HEADER_STAT.
15406         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
15407         (gl_PREREQ_RMDIR): Remove.
15408         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
15409         mention stat-macros.h or AC_HEADER_STAT, since we'll make
15410         the stat-macros module a prerequisite.
15411         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
15412         * m4/filemode.m4 (gl_FILEMODE): Likewise.
15413         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
15414         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
15415         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
15416         variable names.
15417         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
15418         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
15419         variable prefixes.
15420         * m4/fcntl-safer.m4: Remove.
15421         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
15422         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
15423         Invoke gl_PREREQ_FD_SAFER.
15424         (gl_PREREQ_FD_SAFER): New macro.
15425         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
15426         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
15427         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
15428         Remove duplicate call to AC_LIBOBJ(readutmp).
15429         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
15430
15431         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
15432         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
15433
15434 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
15435
15436         * MODULES.html.sh (Misc): Add byteswap.
15437
15438 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
15439
15440         * modules/getcwd (Depends-on): Add extensions.
15441         * modules/openat (Depends-on): Likewise.
15442
15443 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
15444
15445         * modules/byteswap: New file.
15446
15447 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
15448
15449         * m4/byteswap.m4: New file.
15450
15451 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
15452
15453         * lib/byteswap_.h: New file.
15454
15455 2005-04-25  Karl Berry  <karl@gnu.org>
15456
15457         * m4/gettext.m4: Update from GNU gettext 0.14.4.
15458
15459 2005-04-25  Albert Chin  <china@thewrittenword.com>
15460
15461         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
15462         Toolkit C bug.
15463
15464 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
15465
15466         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
15467         (func_ln_if_changed) Remove forcibly for no error message
15468         in case file does not exist.
15469
15470 2005-04-19  Simon Josefsson  <jas@extundo.com>
15471
15472         * gnulib-tool (Options): Make --symlink mean --symbolic.
15473
15474 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
15475
15476         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
15477
15478 2005-04-16  Simon Josefsson  <jas@extundo.com>
15479
15480         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
15481
15482 2005-04-15  Simon Josefsson  <jas@extundo.com>
15483
15484         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
15485
15486 2005-04-15  Simon Josefsson  <jas@extundo.com>
15487
15488         * gnulib-tool: Rename --symlink to --symbolic.
15489
15490 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
15491
15492         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
15493         symbolic links to files instead of copying/moving.  Add --aux-dir,
15494         specifying directory relative --dir where auxiliary build tools
15495         are placed.
15496
15497 2005-04-14  Bruno Haible  <bruno@clisp.org>
15498
15499         * modules/allocsa (License): Change to LGPL.
15500         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
15501
15502 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
15503
15504         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
15505         that "UTC +1 second" continues to work.  Problem reported
15506         by Dmitry V. Levin.
15507         (relunit_snumber): New rule.
15508         (relunit): Use it.
15509
15510 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
15511
15512         * lib/getdate.y (universal_time_zone_table): New constant.
15513         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
15514         universal_time_zone_table.
15515         (lookup_zone): Prefer universal_time_zone_table to
15516         local_time_zone_table, so that "GMT" time stamps are allowed in
15517         London during the summer.  Problem reported by Ian Abbott.
15518
15519 2005-04-12  Jim Meyering  <jim@meyering.net>
15520
15521         * lib/human.c (humblock): Set *options even when returning due to
15522         xstrtoumax conversion failure.  Thanks to a used-uninitialized
15523         warning from gcc-4.
15524
15525 2005-04-09  Jim Meyering  <jim@meyering.net>
15526
15527         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
15528         -Wuninitialized: initialize tm0.tm_year.
15529
15530 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
15531
15532         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
15533         count, since there's no maximum.  All uses changed.
15534         Add member dsts_seen.
15535         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
15536         not being INT_MAX.
15537         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
15538         Use pc_rels_seen to decide whther a date is absolute.
15539
15540         * lib/getdate.y (number): Don't overwrite year.
15541         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
15542         check.
15543
15544 2005-04-02  Simon Josefsson  <jas@extundo.com>
15545
15546         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
15547         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
15548
15549 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
15550
15551         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
15552         where no absolute path name can be longer than PATH_MAX.
15553
15554 2005-03-27  Jim Meyering  <jim@meyering.net>
15555
15556         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
15557
15558 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
15559
15560         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
15561         "one's complement" -> "ones' complement" in comment, as per Knuth.
15562         "value of type" -> "type or expression" in comment.
15563         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
15564
15565 2005-03-26  Jim Meyering  <jim@meyering.net>
15566
15567         Comment nits.
15568         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
15569         Correct typos: s/or/of/.
15570
15571 2005-03-26  Jim Meyering  <jim@meyering.net>
15572
15573         * modules/check-include-files: Move to ../ and rename to...
15574         * check-module: ...this.
15575
15576 2005-03-25  Jim Meyering  <jim@meyering.net>
15577
15578         * modules/xvasprintf (Files): Add xalloc.h.
15579
15580 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
15581
15582         * modules/gettext (Files): config/config.rpath ->
15583         build-aux/config.rpath
15584         * modules/iconv (Files): Likewise.
15585         Problem reported by Oskar Liljeblad.
15586
15587 2005-03-23  Jim Meyering  <jim@meyering.net>
15588
15589         * modules/check-include-files: New script to check for
15590         missing dependencies, multiple includes, etc.
15591
15592         * modules/c-strtold (Depends-on): Add xalloc.
15593         * modules/c-strtod (Depends-on): Add xalloc.
15594         * modules/hash (Depends-on): Add xalloc.
15595         (Files): Remove lib/xalloc.h.
15596
15597         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
15598         * modules/userspec (Files): Add lib/inttostr.h.
15599
15600 2005-03-23  Jim Meyering  <jim@meyering.net>
15601
15602         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
15603
15604 2005-03-22  Jim Meyering  <jim@meyering.net>
15605
15606         * modules/stat-macros: New module.
15607         * modules/canonicalize, modules/euidaccess, modules/file-type,
15608         * modules/filemode, modules/lchown, modules/makepath,
15609         * modules/rmdir, modules/stat: Depend on new stat-macros module
15610         rather than listing lib/stat-macros.h manually.
15611         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
15612
15613 2005-03-22  Jim Meyering  <jim@meyering.net>
15614
15615         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
15616
15617 2005-03-22  Bruno Haible  <bruno@clisp.org>
15618
15619         * config/srclist.txt: Replace target directory 'config' with
15620         'build-aux'.
15621         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
15622         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
15623         ../build-aux/.
15624
15625 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
15626
15627         * modules/chdir-long (Depends-on): Add mempcpy.
15628
15629         * modules/acl, modules/backupfile, modules/c-strtod,
15630         modules/c-strtold, modules/canon-host, modules/canonicalize,
15631         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
15632         modules/exclude, modules/exitfail, modules/file-type,
15633         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
15634         modules/getdate, modules/getline, modules/getpagesize,
15635         modules/getpass, modules/getugroups, modules/group-member,
15636         modules/hard-locale, modules/hash, modules/human, modules/idcache,
15637         modules/inttostr, modules/long-options, modules/makepath,
15638         modules/md5, modules/memcasecmp, modules/memcoll,
15639         modules/modechange, modules/mountlist, modules/path-concat,
15640         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
15641         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
15642         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
15643         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
15644         modules/strftime, modules/strndup, modules/strverscmp,
15645         modules/timespec, modules/unlocked-io, modules/userspec,
15646         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
15647         modules/yesno:
15648         Remove lib_SOURCES line from Makefile.am section, as this is now
15649         done automatically by the corresponding Autoconf macro.
15650
15651 2005-03-21  Jim Meyering  <jim@meyering.net>
15652
15653         Changes imported from coreutils.
15654
15655         * lib/cycle-check.c: Don't include xalloc.h.
15656
15657         * lib/path-concat.c: Don't include assert.h.
15658         (path_concat): Remove assertion that would have triggered
15659         for ABASE starting with more than one slash.
15660         Reported by Andreas Schwab.
15661
15662         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
15663         properly when ABASE is an absolute file name.
15664         Correct the description of this function.
15665         Include <assert.h>.
15666         Add an assertion and a test driver.
15667         This fixes a bug introduced on 2004-07-02.
15668         Andreas Schwab reported the resulting failure of cp --parents:
15669         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
15670
15671 2005-03-21  Jim Meyering  <jim@meyering.net>
15672
15673         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
15674         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
15675
15676 2005-03-21  Jim Meyering  <jim@meyering.net>
15677         and  Paul Eggert  <eggert@cs.ucla.edu>
15678
15679         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
15680         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
15681         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
15682         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
15683         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
15684         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
15685         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
15686         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
15687         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
15688         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
15689         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
15690         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
15691         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
15692         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
15693         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
15694         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
15695         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
15696         for these modules.
15697
15698 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
15699
15700         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
15701         (which shouldn't happen), generate nothing instead of returning 0
15702         immediately, so that nstrftime (NULL, ...) doesn't return 0.
15703
15704 2005-03-16  Bruno Haible  <bruno@clisp.org>
15705
15706         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
15707         HAVE_LONGLONG_64BIT.
15708
15709 2005-03-16  Bruno Haible  <bruno@clisp.org>
15710
15711         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
15712         HAVE_LONGLONG_64BIT.
15713
15714 2005-03-16  Bruno Haible  <bruno@clisp.org>
15715
15716         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
15717         HAVE_LONGLONG_64BIT.
15718
15719 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
15720
15721         * lib/strftime.c (my_strftime): Prepend space to format so that we can
15722         reliably distinguish strftime failure from empty output on POSIX
15723         hosts.
15724
15725 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
15726
15727         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
15728         (iconv_string): Don't guess a size-zero buffer, as that might cause
15729         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
15730         result would be 'too large', where 'too large' is (heuristically)
15731         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
15732         overflow concerns.  This will prevent some unwanted malloc failures
15733         when the inputs are very large.
15734
15735 2005-03-15  Karl Berry  <karl@gnu.org>
15736
15737         * config/srclist.txt (config.rpath): from gettext.
15738         * config/config.rpath: update.
15739
15740 2005-03-15  Bruno Haible  <bruno@clisp.org>
15741
15742         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
15743         to 'negate'.
15744
15745         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
15746         variable.
15747
15748         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
15749         results.
15750
15751 2005-03-14  Simon Josefsson  <jas@extundo.com>
15752
15753         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
15754         <fx@gnu.org>.
15755
15756 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
15757
15758         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
15759         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
15760         intprops.h.
15761         * lib/strtol.c: Likewise.
15762
15763 2005-03-14  Jim Meyering  <jim@meyering.net>
15764
15765         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
15766         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
15767         to be nonzero so that we (and caller) can detect the difference
15768         between a valid zero-length expansion and an error return, even
15769         when the underlying strftime fails before writing anything into
15770         that location.
15771
15772 2005-03-14  Bruno Haible  <bruno@clisp.org>
15773
15774         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
15775         Update from GNU gettext 0.14.3.
15776
15777 2005-03-10  Jim Meyering  <jim@meyering.net>
15778
15779         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
15780
15781 2005-03-10  Jim Meyering  <jim@meyering.net>
15782
15783         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
15784         so that this module works on systems without fchdir.
15785
15786 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
15787
15788         Factor int-properties macros into a single file, except for
15789         glibc-related files.
15790         * lib/intprops.h: New file.
15791         * lib/getloadavg.c: Include it instead of limits.h.
15792         (INT_STRLEN_BOUND): Remove.
15793         * lib/human.c: Include intprops.h.
15794         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
15795         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
15796         302/1000.
15797         * lib/inttostr.h: Include intprops.h instead of limits.h.
15798         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
15799         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
15800         for consistency with intprops.h.
15801         (time_t_is_integer, twos_complement_arithmetic): Use them.
15802         * lib/sig2str.h: Include <signal.h>, intprops.h.
15803         (INT_STRLEN_BOUND): Remove.
15804         * lib/strftime.c (TYPE_SIGNED): Remove.
15805         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
15806         * lib/strtol.c: Adjust comments to match intprops.h.
15807         * lib/userspec.c: Include intprops.h.
15808         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
15809         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
15810         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
15811         instead of rolling our own expressions.
15812         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
15813
15814         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
15815         instead of int.
15816         (my_strftime): Do not mishandle years close to INT_MAX, by doing
15817         the right thing even if adding 1900 would overflow.  Similarly
15818         for tm_mon + 1 and tm_yday + 1.
15819         Make %Y always equivalent to %C%y, and similarly for %G and %g.
15820         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
15821         (DO_SIGNED_NUMBER): New macro.
15822         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
15823
15824 2005-03-07  Bruno Haible  <bruno@clisp.org>
15825
15826         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
15827
15828 2005-03-07  Bruno Haible  <bruno@clisp.org>
15829
15830         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
15831
15832 2005-03-04  Derek R. Price  <derek@ximbiot.com>
15833
15834         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
15835         (func_import): Only replace files via --import when they have actually
15836         changed.
15837
15838 2005-03-03  Derek R. Price  <derek@ximbiot.com>
15839
15840         * m4/mmap-anon.m4: New file.
15841         * m4/pagealign_alloc.m4: New file.
15842
15843 2005-03-03  Derek R. Price  <derek@ximbiot.com>
15844             Bruno Haible  <bruno@clisp.org>
15845
15846         * modules/pagealign_alloc: New file.
15847         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
15848
15849 2005-03-03  Derek R. Price  <derek@ximbiot.com>
15850             Bruno Haible  <bruno@clisp.org>
15851
15852         * lib/pagealign_alloc.h: New file.
15853         * lib/pagealign_alloc.c: New file.
15854
15855 2005-03-03  Bruno Haible  <bruno@clisp.org>
15856
15857         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
15858         Use an all-permissive copyright notice, recommended by RMS.
15859
15860 2005-03-02  Bruno Haible  <bruno@clisp.org>
15861
15862         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
15863         of AIX, the replacement has to be done only after <string.h> is
15864         included, therefore not in config.h. stpncpy.h does the replacement,
15865         and stpncpy.c uses it.
15866
15867 2005-03-02  Bruno Haible  <bruno@clisp.org>
15868
15869         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
15870         stpncpy.c uses it.
15871
15872 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15873
15874         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
15875         The workaround isn't strictly needed for POSIX conformance, and
15876         it's too much of a pain to configure and maintain.  We'll ask
15877         people to fix their kernels instead.
15878         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
15879         (NANOSLEEP_BUG_WORKAROUND): Remove.
15880         (xnanosleep): Remove the workaround.
15881
15882 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15883
15884         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
15885         Reported by Derek Price.
15886         (Include): Add "timespec.h".
15887
15888         * modules/xnanosleep (Depends-on): Remove gethrxtime.
15889
15890 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15891
15892         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
15893         to detect nanosleep bug.
15894
15895 2005-03-01  Bruno Haible  <bruno@clisp.org>
15896
15897         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
15898
15899 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
15900
15901         * modules/gethrxtime: New file.
15902         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
15903         (Depends-on): Add gethrxtime.
15904         (configure.ac): Add gl_XNANOSLEEP.
15905         (Makefile.am): Remove lib_SOURCES line.
15906
15907 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
15908
15909         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
15910         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
15911
15912 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
15913
15914         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
15915         * lib/timespec.h (gettime): Return void, since it always
15916         succeeds now.  All uses changed.
15917         * lib/gettime.c (gettime) Likewise.
15918         [HAVE_NANOTIME]: Prefer nanotime.
15919         Assume gettimeofday succeeds, as POSIX requires.
15920         Assime time () succeeds, since other code already does.
15921         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
15922         (timespec_subtract): Remove.
15923         (NANOSLEEP_BUG_WORKAROUND): New constant.
15924         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
15925         things considerably.  Use it only on GNU/Linux hosts, since the
15926         workaround shouldn't be needed elsewhere.
15927
15928 2005-02-24  Bruno Haible  <bruno@clisp.org>
15929
15930         * modules/gettext (Files): Add m4/glibc2.m4.
15931
15932 2005-02-24  Bruno Haible  <bruno@clisp.org>
15933
15934         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
15935         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
15936         * m4/progtest.m4:
15937         Update from GNU gettext 0.14.2.
15938         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
15939
15940 2005-02-24  Bruno Haible  <bruno@clisp.org>
15941
15942         * lib/localcharset.c: Update from GNU gettext 0.14.2.
15943         * lib/config.charset: Update from GNU gettext 0.14.2.
15944
15945 2005-02-24  Bruno Haible  <bruno@clisp.org>
15946
15947         * lib/gettext.h: Update from GNU gettext 0.14.2.
15948
15949 2005-02-23  Simon Josefsson  <jas@extundo.com>
15950
15951         * m4/iconvme.m4: New file.
15952
15953 2005-02-23  Jim Meyering  <jim@meyering.net>
15954
15955         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
15956         change.
15957         Thanks to Bruno Haible for catching it.
15958
15959 2005-02-22  Simon Josefsson  <jas@extundo.com>
15960
15961         * modules/iconvme: New file.
15962
15963         * MODULES.html.sh: Add iconvme.
15964
15965 2005-02-22  Simon Josefsson  <jas@extundo.com>
15966
15967         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
15968
15969 2005-02-22  Simon Josefsson  <jas@extundo.com>
15970
15971         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
15972
15973 2005-02-22  Jim Meyering  <jim@meyering.net>
15974
15975         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
15976         s/ifndef/ifdef/.
15977
15978 2005-02-20  Neil Conway  <neilc@samurai.com>
15979
15980         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
15981         returned by OSX/Darwin if the specified buffer is not large
15982         enough for the hostname.
15983
15984 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15985
15986         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
15987         pass it to _help, otherwise the latter coredumps trying to
15988         dereference state.root_argp.
15989
15990 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
15991
15992         * modules/chdir-long (Depends-on): Add memrchr.
15993         * modules/memrchr (Files): Add lib/memrchr.h.
15994         (Include): "memrchr.h".
15995
15996 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
15997
15998         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
15999
16000 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
16001
16002         * lib/memrchr.h: New file.
16003         * lib/chdir-long.c: Include it.
16004         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
16005         Don't bother including stddef.h.
16006
16007 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
16008
16009         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
16010         inclusion.
16011         Include <sys/types.h>, for dev_t.
16012         (ME_DUMMY, ME_REMOTE): Move from here....
16013         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
16014         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
16015         Dmitry V. Levin.
16016         Include mountlist.h first, to test the interface.
16017
16018 2005-01-29  Bruno Haible  <bruno@clisp.org>
16019
16020         * lib/progname.c (program_name): Initialize.
16021         Needed when linking statically on MacOS X.
16022
16023 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
16024
16025         Sync from coreutils.
16026         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
16027         (Depends-on): Add c-strtod.
16028         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
16029
16030 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
16031
16032         Sync from coreutils.
16033         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
16034
16035         Remove files that are specific to coreutils.
16036         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
16037
16038 2005-01-28  Bruno Haible  <bruno@clisp.org>
16039
16040         * modules/javacomp: New file.
16041         * MODULES.html.sh (Java): Add javacomp.
16042
16043 2005-01-28  Bruno Haible  <bruno@clisp.org>
16044
16045         * m4/javacomp.m4: New file, from GNU gettext.
16046
16047 2005-01-28  Bruno Haible  <bruno@clisp.org>
16048
16049         * lib/javacomp.sh.in: New file, from GNU gettext.
16050         * lib/javacomp.h: New file, from GNU gettext.
16051         * lib/javacomp.c: New file, from GNU gettext.
16052
16053 2005-01-26  Simon Josefsson  <jas@extundo.com>
16054
16055         * lib/gai_strerror.c: Use GPL in header.
16056
16057 2005-01-26  Bruno Haible  <bruno@clisp.org>
16058
16059         * modules/javaexec: New file.
16060         * MODULES.html.sh (Java): Add javaexec.
16061
16062 2005-01-26  Bruno Haible  <bruno@clisp.org>
16063
16064         * m4/javaexec.m4: New file, from GNU gettext.
16065
16066 2005-01-26  Bruno Haible  <bruno@clisp.org>
16067
16068         * lib/javaexec.sh.in: New file, from GNU gettext.
16069         * lib/javaexec.h: New file, from GNU gettext.
16070         * lib/javaexec.c: New file, from GNU gettext.
16071
16072 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16073
16074         * modules/lchown (Depends-on): Remove lchown.h
16075
16076 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16077
16078         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
16079         must be defined if the header file was not found, in order
16080         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
16081
16082 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16083
16084         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
16085         initializers for struct pentry_state.
16086         (__argp_error): Check return value of __asprintf
16087         (__argp_failure): Translate error message
16088
16089         * lib/argp-parse.c: Removed braces around the expansion of N_()
16090
16091 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
16092
16093         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
16094         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
16095         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
16096         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
16097         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
16098         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
16099         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
16100         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
16101         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
16102         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
16103         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
16104         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
16105         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
16106         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
16107         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
16108         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
16109         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
16110         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
16111         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
16112         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
16113         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
16114         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
16115         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
16116         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
16117         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
16118         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
16119         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
16120         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
16121         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
16122         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
16123         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
16124         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
16125         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
16126         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
16127         xstrtol.m4, xstrtoumax.m4, yesno.m4:
16128         Use an all-permissive copyright notice, recommended by RMS.
16129
16130 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
16131
16132         * modules/chdir-long (Depends-on): Remove mempcpy.
16133
16134 2005-01-21  Jim Meyering  <jim@meyering.net>
16135
16136         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
16137         same value as for Solaris 9.
16138
16139         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
16140         component length.  This included changing the parameter to be
16141         of type `char *' rather than `char const *'.
16142         * lib/chdir-long.h (chdir_long): Update prototype.
16143
16144         * lib/openat.c (fdopendir, fstatat): New functions.
16145         * lib/openat.h: Include headers required for use of DIR and struct
16146         stat.
16147         [AT_SYMLINK_NOFOLLOW]: Define.
16148         (fdopendir, fstatat): Add prototypes.
16149
16150 2005-01-21  Bruno Haible  <bruno@clisp.org>
16151
16152         * modules/classpath: New file.
16153         * MODULES.html.sh (Java): Add classpath.
16154
16155 2005-01-21  Bruno Haible  <bruno@clisp.org>
16156
16157         * lib/classpath.h: New file, from GNU gettext.
16158         * lib/classpath.c: New file, from GNU gettext.
16159
16160 2005-01-20  Simon Josefsson  <jas@extundo.com>
16161
16162         * modules/version-etc-fsf: New file.
16163
16164 2005-01-20  Simon Josefsson  <jas@extundo.com>
16165
16166         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
16167         * lib/version-etc.c: Remove version_etc_copyright.
16168         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
16169         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
16170
16171 2005-01-20  Simon Josefsson  <jas@extundo.com>
16172
16173         * lib/base64.h (isbase64): Add.
16174
16175         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
16176         using a unsigned prototype, don't inline.
16177         (base64_decode): Use it.
16178
16179 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
16180
16181         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
16182         it.
16183
16184 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
16185
16186         * lib/save-cwd.c (save_cwd): Remove code to support the case
16187         where fchdir is missing or flaky.
16188
16189 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
16190
16191         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
16192
16193 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
16194
16195         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
16196         AC_LIBSOURCES now does this.
16197         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
16198         with new ullong_max module.
16199
16200 2005-01-19  Bruno Haible  <bruno@clisp.org>
16201
16202         * modules/sh-quote: New file.
16203         * MODULES.html.sh (Executing programs): Add sh-quote.
16204
16205 2005-01-19  Bruno Haible  <bruno@clisp.org>
16206
16207         * lib/sh-quote.h: New file, from GNU gettext.
16208         * lib/sh-quote.c: New file, from GNU gettext.
16209
16210 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
16211
16212         Merge from coreutils.
16213         * m4/ullong_max.m4: New file.
16214         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
16215         (gl_MACROS): Assume localeconv exists.
16216
16217 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
16218
16219         Merge changes from coreutils, as described below in several
16220         changelogs dated today.
16221
16222         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
16223         (O_DIRECTORY): Remove; not needed here, since "." must be
16224         a directory.  All uses removed.
16225         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
16226         universal on Suns, and we also need to test for IRIX.
16227         Revamp code to use 'if' rather than '#if'.
16228         Avoid unnecessary comparison of cwd->desc to 0.
16229
16230         * lib/utimens.c (futimens): Robustify the previous patch, by checking
16231         for known valid error numbers rather than observed invalid ones.
16232
16233 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
16234
16235         * modules/ullong_max: New file.
16236
16237         * modules/chdir-long, modules/openat: New files.
16238         * modules/save-cwd (Depends-on): Depend on chdir-long.
16239         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
16240
16241 2005-01-18  Jim Meyering  <jim@meyering.net>
16242
16243         Merge from coreutils.
16244         * m4/chdir-long.m4, m4/openat.m4: New files.
16245         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
16246         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
16247         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
16248         is sane and DOES follow symlinks.  Besides, testing 20 different
16249         systems found no broken chown implementations.
16250         Prompted by a change in rsync's copy of this macro.
16251         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
16252
16253         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
16254
16255         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
16256         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
16257         NULL-means-set-to-current-time semantics.
16258         Remove temporary file immediately, rather than waiting
16259         for configure's at-exit trap code to do it.
16260
16261 2005-01-18  Jim Meyering  <jim@meyering.net>
16262
16263         * lib/version-etc.c (version_etc_copyright): Update copyright date.
16264
16265         * lib/utimens.c (futimens): Account for the fact that futimes
16266         can also fail with errno == ENOSYS or errno == ENOENT.
16267         Patch from Dmitry V. Levin.
16268
16269         Change the name of the robust chdir function from chdir to chdir_long.
16270         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
16271         (restore_cwd): Use chdir_long, not chdir.
16272         * lib/chdir-long.c: Renamed from chdir.c.
16273         * lib/chdir-long.h: Renamed from chdir.h.
16274         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
16275         Hurd.
16276
16277 2005-01-18  Bruno Haible  <bruno@clisp.org>
16278
16279         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
16280         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
16281         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
16282         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
16283         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
16284         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
16285         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
16286         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
16287         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
16288         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
16289         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
16290         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
16291         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
16292         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
16293         Use an all-permissive copyright notice, recommended by RMS.
16294
16295 2005-01-18  Bob Proulx  <bob@proulx.com>
16296
16297         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
16298         simplify offsetof() macro construct to avoid compile failure with
16299         native HP-UX 11.0 ANSI C compiler.
16300
16301 2005-01-17  Bruno Haible  <bruno@clisp.org>
16302
16303         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
16304         redundant because stpncpy.m4 takes care of it.
16305
16306 2005-01-17  Bruno Haible  <bruno@clisp.org>
16307
16308         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
16309
16310 2005-01-17  Bruno Haible  <bruno@clisp.org>
16311
16312         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
16313         used.
16314
16315 2005-01-17  Bruno Haible  <bruno@clisp.org>
16316
16317         * lib/fwriteerror.h (fwriteerror): Change specification to include
16318         fclose.
16319         * lib/fwriteerror.c: Include <stdbool.h>.
16320         (fwriteerror): At the end, close the file stream. Record whether
16321         stdout was already closed.
16322
16323 2005-01-17  Bruno Haible  <bruno@clisp.org>
16324
16325         * lib/execute.c (environ): Declare if needed.
16326         * lib/pipe.c (environ): Likewise.
16327         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
16328
16329 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16330
16331         * modules/argp: Depend on vsnprintf
16332
16333 2005-01-10  Jim Meyering  <jim@meyering.net>
16334
16335         * modules/closeout (Depends-on): Add atexit.
16336
16337 2005-01-06  Bruno Haible  <bruno@clisp.org>
16338
16339         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
16340
16341 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
16342
16343         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
16344         definitions to be after all include files, to avoid collisions.
16345         Problem reported by Bob Proulx.
16346
16347 2005-01-04  Jim Meyering  <jim@meyering.net>
16348
16349         Changes imported from coreutils.
16350         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
16351         as the mkstemp template, use a temporary directory and an
16352         8.3-friendly template to avoid trouble on systems like DJGPP.
16353         Reported by Juan M. Guerrero via Stepan Kasal.
16354         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
16355         close. Remove the temporary directory right away, rather than waiting
16356         for configure's at-exit trap code to do it.
16357         Suggestion from Stepan Kasal.
16358
16359 2005-01-01  Simon Josefsson  <jas@extundo.com>
16360
16361         * gnulib-tool: Print #include directives when --import'ing.
16362
16363 2004-12-28  Simon Josefsson  <jas@extundo.com>
16364
16365         * tests/test-base64.c: Include required header files.  Remove
16366         unused variables.
16367
16368 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
16369
16370         * modules/error (Depends-on): Remove gettext.
16371
16372 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
16373
16374         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
16375         not needed.  This removes a dependency on the gettext module.
16376         [defined _LIBC]: Do not include <libintl.h>; not needed.
16377
16378 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
16379
16380         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
16381         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
16382
16383 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
16384
16385         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
16386         HAVE_DECL_STRTOLD.
16387
16388 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
16389
16390         * modules/getdate (Depends-on): Remove alloca-opt.
16391
16392 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
16393
16394         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
16395
16396 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
16397
16398         * lib/argp-parse.c: Include <stddef.h>.
16399         (alignof, alignto): New macros.
16400         (parser_init): Don't assume that void * is aligned sufficiently
16401         for struct option.
16402
16403         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
16404         need to extend the stack.
16405         (YYINITDEPTH): New macro, so that the initial stack isn't overly
16406         large.
16407
16408 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16409
16410         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
16411
16412 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
16413
16414         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
16415         (2004-10-24) change.  Apparently this was a false alarm.
16416
16417         * modules/getdate: Depend on alloca-opt, not alloca.
16418
16419 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
16420
16421         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
16422         Remove now-obsolete comment about AIX.
16423         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
16424         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
16425         (YYMAXDEPTH): New macro.
16426
16427 2004-12-18  Simon Josefsson  <jas@extundo.com>
16428
16429         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
16430
16431 2004-12-18  Bruno Haible  <bruno@clisp.org>
16432
16433         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
16434
16435 2004-12-18  Bruno Haible  <bruno@clisp.org>
16436
16437         * lib/fatal-signal.c (fatal_signals): Make non-const.
16438         (init_fatal_signals): New function.
16439         (uninstall_handlers, install_handlers): Ignore signals that were set to
16440         SIG_IGN.
16441         (at_fatal_signal): Call init_fatal_signals.
16442         (init_fatal_signal_set): Likewise. Ignore signals that were set to
16443         SIG_IGN.
16444         Reported by Paul Eggert.
16445
16446 2004-12-18  Bruno Haible  <bruno@clisp.org>
16447
16448         * doc/alloca.texi: New file.
16449         * doc/alloca-opt.texi: New file.
16450
16451 2004-12-17  Jim Meyering  <jim@meyering.net>
16452
16453         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
16454         Otherwise, install-sh could exit with improper exit status when
16455         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
16456
16457 2004-12-16  Simon Josefsson  <jas@extundo.com>
16458
16459         * tests/test-base64.c: Add license.
16460
16461 2004-12-15  Stepan Kasal  <address@hidden>
16462
16463         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
16464
16465 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
16466
16467         * modules/getcwd (Files): Add m4/d-ino.m4.
16468         Suggested by Mark D. Baushke.
16469
16470 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
16471
16472         * lib/getdate.y (textint): New member "negative".
16473         (time_zone_hhmm): New function.
16474         Expect 14 shift-reduce conflicts, not 13.
16475         (o_colon_minutes): New rule.
16476         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
16477         (yylex): Set the "negative" member of signed numbers.
16478
16479 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
16480
16481         * doc/getdate.texi (Time of day items, Time zone items):
16482         Describe new formats +00:00, UTC+00:00.
16483
16484 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
16485
16486         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
16487         spurious "-l"s.  Problem reported by Stepan Kasal.
16488
16489 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
16490
16491         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
16492         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
16493
16494 2004-12-04  Simon Josefsson  <jas@extundo.com>
16495
16496         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
16497         Vandoorselaere <yoann@prelude-ids.org>.
16498
16499 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
16500
16501         Changes imported from coreutils.
16502         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
16503         exist.
16504         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
16505
16506 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
16507
16508         Changes imported from coreutils.
16509         * lib/hard-locale.c: Assume <locale.h> exists.
16510         Include "strdup.h".
16511         (GLIBC_VERSION): New macro.
16512         (hard_locale): Assume setlocale exists.
16513         Rewrite to avoid #ifdef.
16514         Use strdup rather than malloc + strcpy.
16515         * lib/human.c: Assume <locale.h> exists.
16516         (human_readable): Assume localeconv exists.
16517
16518 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
16519
16520         * modules/hard-locale (Depends-on): Add strdup.
16521
16522 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
16523
16524         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
16525         convert T2, not T.  (Imported from libc.)
16526
16527 2004-11-30  Simon Josefsson  <jas@extundo.com>
16528
16529         * modules/restrict (License): Change to LGPL.
16530
16531 2004-11-30  Simon Josefsson  <jas@extundo.com>
16532
16533         * m4/restrict.m4: Add copyright and copying conditions.
16534
16535 2004-11-30  Simon Josefsson  <jas@extundo.com>
16536
16537         * m4/base64.m4: New file.
16538
16539 2004-11-30  Simon Josefsson  <jas@extundo.com>
16540
16541         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
16542         base64.
16543
16544         * tests/test-base64.c: New file.
16545
16546         * modules/base64: New file.
16547
16548 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
16549
16550         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
16551         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
16552
16553         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
16554
16555 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
16556
16557         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
16558         (__getcwd.c): Don't restore errno; glibc doesn't.
16559         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
16560         first, falling back to our code only if its results look suspicious.
16561         Ensure that the resulting buffer is only as large as necessary.
16562
16563         * lib/readutmp.c: Include readutmp.h first.
16564         Include <errno.h>, since readutmp.h no longer does that.
16565         * lib/readutmp.h: Don't include <errno.h>,
16566         <sys/param.h>, <time.h>; not needed to establish interface.
16567         (errno): Remove decl.
16568         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
16569         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
16570         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
16571
16572 2004-11-28  Simon Josefsson  <jas@extundo.com>
16573
16574         * lib/base64.h, base64.c: New file.
16575
16576 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
16577
16578         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
16579
16580 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
16581
16582         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
16583         (Depends-on): Remove pathmax, same.  Add mempcpy.
16584         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
16585         (Makefile.am): Append getcwd.h to lib_SOURCES.
16586         (Include): Add getcwd.h.
16587         (Maintainer): Change from Jim Meyering to "all, glibc",
16588         since getdate now uses intended-for-glibc code.
16589         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
16590         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
16591
16592 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
16593
16594         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
16595         HP's ANSI C compiler.
16596         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
16597         Declaring int functions causes warnings on some modern systems and
16598         shouldn't be needed to compile on ancient ones.
16599         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
16600         defined.
16601
16602         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
16603         with the following changes.
16604         (__set_errno): Parenthesize properly.
16605         Include <stdbool.h>.
16606         (MIN, MAX, MATCHING_INO): New macros.
16607         (__getcwd): Define with prototype, not K&R form.
16608         Use heuristics to allocate default buffer on stack if possible.
16609         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
16610         behavior, and to avoid the PATH_MAX limit when computing
16611         ../../../../...
16612         Use MATCHING_INO to compare inode number to file.
16613         Check for arithmetic overflow in size calculations.
16614         Fix bug in reallocation of dot array that caused getcwd to fail
16615         on directories nested deeper than 75.
16616         Be more careful about saving errno on error.
16617         Do not use realloc; use only free+malloc, as this is a bit
16618         more flexible and avoids a needless copy operation.
16619         Do not inspect st_dev and st_ino for symbolic links; POSIX
16620         doesn't specify the latter.
16621         Check for closedir errors.
16622         Avoid needless casts.
16623         Use "#ifdef weak_alias" around weak_alias, to be like other
16624         glibc code.
16625         The following changes to getcwd.c have effect only when used in
16626         gnulib; they have no effect inside glibc proper.
16627         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
16628         as alloca isn't used.
16629         (alloca, __alloca): Likewise.
16630         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
16631         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
16632         unconditionally, as gnulib assumes C89 or better.
16633         Do not include <sys/param.h>.
16634         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
16635         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
16636         better.
16637         (NULL) [!defined NULL]: Remove; we assume C89 or better.
16638         Include <dirent.h> in a way that is compatible with modern Autoconf.
16639         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
16640         New macros, if not already defined.
16641         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
16642         Use "_LIBC", not "defined _LIBC", for consistency.
16643         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
16644         a mempcpy module.
16645         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
16646         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
16647         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
16648         credit only to Jim Meyering and adjust the copyright dates.
16649         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
16650         <stdlib.h>, <unistd.h>, "pathmax.h".
16651         Instead, include "xgetcwd.h" (first) and "getcwd.h".
16652         (INITIAL_BUFFER_SIZE): Remove.
16653         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
16654
16655 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
16656
16657         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
16658         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
16659         Use the _ONCE methods, for efficiency.
16660         Check for fcntl.h.  In test program, include <errno.h>
16661         and <fcntl.h> if available.  Remove old K&R cruft from
16662         test program.  Check for common errors in GNU/Linux,
16663         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
16664         don't do AC_LIBOBJ, as that's getcwd.m4's job.
16665         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
16666         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
16667         name accordingly.
16668         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
16669         accommodate new getcwd.c.
16670         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
16671         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
16672         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
16673         that's all we need now.
16674
16675 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16676
16677         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
16678         argp-parse.c depends on getopt internals, that means we should
16679         always use our getopt, to be on the safe side.
16680         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
16681         order not to spoil the result of an eventual previous invocation
16682         of gl_GETOPT_SUBSTITUTE.
16683
16684 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16685
16686         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
16687         redefinition warnings. To avoid them, include the defines
16688         in `#if !defined __need_getopt ... #endif'. The only place
16689         where __getopt_argv_const is used is in definitions
16690         of getopt_long and getopt_long_only below, which are as well
16691         protected by `#ifndef __need_getopt'.
16692         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
16693         __need_getopt after including <stdio.h> and <unistd.h> These
16694         headers might have defined it.
16695
16696 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
16697
16698         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
16699
16700 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
16701
16702         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
16703         (futimens): New function, which uses futimes if available.
16704         (futimens, utimens): Support timespec==NULL, with same semantics
16705         as utime and utimens.
16706         * lib/utimens.h (futimens): New decl.
16707
16708 2004-11-23  Jim Meyering  <jim@meyering.net>
16709
16710         * lib/getopt_.h: Remove trailing blanks.
16711
16712 2004-11-23  Jim Meyering  <jim@meyering.net>
16713
16714         * lib/__fpending.c: Add comment.
16715
16716 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
16717
16718         * modules/canonicalize (Depends-on): Add xreadlink.
16719         Problem reported by James Youngman.
16720
16721 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
16722
16723         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
16724         New macros.
16725         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
16726         optopt): Use them instead of invoking ## directly; otherwise, the
16727         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
16728
16729 2004-11-19  Bruno Haible  <bruno@clisp.org>
16730
16731         * lib/strtok_r.c: Move comments from here...
16732         * lib/strtok_r.h: ... to here.
16733
16734 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
16735
16736         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
16737         implementations that mishandle size_t overflow.
16738
16739 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
16740
16741         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
16742         might fail.  Problem reported by Yoann Vandoorselaere.
16743         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
16744         implementations that mishandle size_t overflow.
16745
16746 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
16747
16748         * modules/canon-host (Depends-on): Add strdup.
16749
16750 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
16751
16752         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
16753
16754 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
16755
16756         * lib/canon-host.c: Include "strdup.h".
16757         (canon_host): Use getaddrinfo if available, so that IPv6 works.
16758         Use strdup instead of malloc/strcpy to duplicate strings.
16759
16760         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
16761         (human_space_before_unit): New constant.
16762         * lib/human.c (human_readable): Support it.
16763
16764         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
16765         (xgetcwd): Set errno correctly when failing.
16766         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
16767         the failure is actually due to a PATH_MAX problem.
16768
16769         Further getopt changes to make it more likely that glibc will
16770         buy the changes back.
16771         * lib/getopt.c (POSIXLY_CORRECT): New constant.
16772         (getopt): Use it, so to preserve glibc semantic
16773         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
16774         when compiling for libc.
16775         * lib/getopt_.h (__getopt_argv_const): Bring it back.
16776         (getopt_long, getopt_long_only): Use it.
16777
16778         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
16779         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
16780         (getopt): Argv is now char * const *, as per standard.
16781         (_getopt_internal_r, _getopt_internal): Argv is now char **,
16782         not char *__getopt_argv_const *.
16783         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
16784         _getopt_long_only_r): Likewise.
16785         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
16786         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
16787         _getopt_long_r, _getopt_long_only_r): Likewise.
16788         * lib/getopt_.h (__getopt_argv_const): Remove.
16789         (getopt): Argv is now char * const *, as per standard.
16790
16791         * lib/getdate.y (tORDINAL): New token.
16792         (day, relunit): Allow it for relative times.
16793         (relative_time_table): Use tORDINAL for ordinals.
16794
16795 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
16796
16797         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
16798         Document that "second" isn't allowed as an ordinal number.
16799
16800 2004-11-16  Jim Meyering  <jim@meyering.net>
16801
16802         * modules/closeout (Depends-on): Add fpending.
16803
16804 2004-11-15  Jim Meyering  <jim@meyering.net>
16805
16806         * lib/closeout.c: Include "__fpending.h" once again.
16807         Include <stdbool.h>.
16808         (close_stdout): Don't fail just because stdout was closed initially,
16809         since some programs don't write to stdout in the normal course of
16810         operation (other than --version and --help), and we don't want this
16811         function to make e.g. `touch file >&-' fail.
16812         But do fail if it was closed and someone has tried to write to it.
16813         E.g., `printf foo >&-' must fail.
16814
16815 2004-11-13  Jim Meyering  <jim@meyering.net>
16816
16817         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
16818
16819 2004-11-12  Simon Josefsson  <jas@extundo.com>
16820
16821         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
16822         small doc fix is still pending.
16823
16824 2004-11-11  Simon Josefsson  <jas@extundo.com>
16825
16826         * modules/strtok_r: New file.
16827
16828         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
16829         strtok_r.
16830
16831 2004-11-11  Simon Josefsson  <jas@extundo.com>
16832
16833         * m4/strtok_r.m4: New file.
16834
16835         * m4/getopt.m4: Replace opterr.
16836
16837 2004-11-11  Simon Josefsson  <jas@extundo.com>
16838
16839         * lib/strtok_r.h, strtok_r.c: New file.
16840
16841 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
16842
16843         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
16844         of replacing opterr, getopt, etc.  This should handle the
16845         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
16846
16847 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
16848
16849         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
16850         we can stop lying to compilers about the constness of argv when we
16851         are compiled outside glibc.
16852         (getopt, getopt_long, getopt_long_only): Use it.
16853         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
16854         _getopt_internal, getopt): Likewise.
16855         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
16856         _getopt_long_only_r): Likewise.
16857         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
16858         _getopt_long_r, _getopt_long_only_r): Likewise.
16859
16860         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
16861         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
16862         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
16863         the other external symbols.
16864         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
16865         declaration, since the above renaming now works around collisions.
16866
16867 2004-11-11  Jim Meyering  <jim@meyering.net>
16868
16869         * lib/linebreak.c: Remove trailing blanks.
16870         * lib/alloca_.h: Likewise.
16871         * lib/acosl.c: Likewise.
16872         * lib/euidaccess.c: Likewise.
16873         * lib/allocsa.h: Likewise.
16874
16875 2004-11-10  Simon Josefsson  <jas@extundo.com>
16876
16877         * m4/getaddrinfo.m4: New file.
16878
16879 2004-11-10  Simon Josefsson  <jas@extundo.com>
16880
16881         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
16882
16883 2004-11-10  Simon Josefsson  <jas@extundo.com>
16884
16885         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
16886         getaddrinfo.
16887
16888         * modules/getaddrinfo: New file.
16889
16890 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
16891
16892         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
16893
16894 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
16895
16896         * lib/mktime.c (SHR): New macro, which is a portable
16897         substitute for >> that should work even on Crays.
16898         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
16899         Problem reported by Mark D. Baushke in
16900         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
16901         * lib/getdate.y (SHR): Likewise.
16902         (tm_diff): Use it.
16903         * lib/strftime.c (SHR): Likewise.
16904         (tm_diff): Use it.
16905         * lib/quotearg.c (struct quoting_options): Use unsigned int for
16906         quote_these_too, so that right shifts are well defined.  All uses
16907         changed.
16908
16909 2004-11-10  Jim Meyering  <jim@meyering.net>
16910
16911         Ensure that no close failure goes unreported.
16912         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
16913         return early when it seems there's nothing to flush.
16914         Don't include __fpending.h.
16915
16916 2004-11-10  Jim Meyering  <jim@meyering.net>
16917
16918         * modules/closeout (Depends-on): Remove fpending.
16919
16920 2004-11-10  Jim Meyering  <jim@meyering.net>
16921
16922         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
16923
16924 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
16925
16926         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
16927         gl_FUNC_STRFTIME.
16928         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
16929         and AC_REQUIRE when possible, to avoid duplicate checks.
16930         Check for <wchar.h>.
16931
16932 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
16933
16934         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
16935
16936 2004-11-09  Bruno Haible  <bruno@clisp.org>
16937
16938         * m4/sockpfaf.m4: New file.
16939
16940 2004-11-05  Bruno Haible  <bruno@clisp.org>
16941
16942         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
16943         Reported by Mark D. Baushke <mdb@cvshome.org>.
16944
16945 2004-11-04  Bruno Haible  <bruno@clisp.org>
16946
16947         2004-09-11  Bruno Haible  <bruno@clisp.org>
16948                 * allocsa.valgrind: New file.
16949         2004-02-06  Bruno Haible  <bruno@clisp.org>
16950                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
16951                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
16952                 Reported by Christopher Seip <chris.seip@hp.com>.
16953
16954 2004-11-04  Bruno Haible  <bruno@clisp.org>
16955
16956         * modules/allocsa (Files): Add lib/allocsa.valgrind.
16957         (Makefile.am): Distribute it.
16958
16959 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
16960
16961         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
16962         with errno == ERANGE if the buffer is too small.
16963         Problem reported by Mark D. Baushke.
16964
16965 2004-11-03  Albert Chin  <china@thewrittenword.com>
16966             Paul Eggert  <eggert@cs.ucla.edu>
16967
16968         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
16969         equivalent, substitute $ac_type for equivalent type rather than
16970         blindly using uint32_t *always* which won't work if uint32_t is not
16971         available.  Define _UINT32_T to work around typedef of uint32_t if
16972         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
16973         2.5.1.
16974
16975 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
16976
16977         * m4/jm-macros.m4: Sync from coreutils.
16978         (gl_MACROS): Check for mbrlen, for pathchk.
16979         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
16980
16981 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
16982
16983         * lib/xreadlink.c (MAXSIZE): New macro.
16984         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
16985         size does not exceed MAXSIZE.  Avoid cast.
16986         As suggested by Mark D. Baushke in
16987         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
16988         if readlink fails with buffer size just under MAXSIZE, try again
16989         with MAXSIZE.
16990
16991 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
16992
16993         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
16994
16995 2004-11-02  Derek R. Price  <derek@ximbiot.com>
16996         and  Paul Eggert  <eggert@cs.ucla.edu>
16997
16998         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
16999         (get_date): Overparenthesize to avoid GCC warning.
17000
17001 2004-11-02  Bruno Haible  <bruno@clisp.org>
17002
17003         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
17004         returns void.
17005
17006 2004-11-02  Bruno Haible  <bruno@clisp.org>
17007
17008         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
17009         function returns void.
17010
17011 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
17012
17013         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
17014         fflush_unlocked, flockfile, funlockfile, funlockfile,
17015         fputs_unlocked, putc_unlocked.
17016
17017 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
17018
17019         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
17020         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
17021         already declared.
17022
17023 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
17024
17025         * modules/getdate (Files): Add doc/getdate.texi.
17026         (Depends-on): Add setenv, xalloc.
17027
17028 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
17029
17030         * lib/getdate.y: Add support for TZ="foo" within a date string.
17031         Fix some bugs near time_t boundaries.  Reject dates with
17032         out-of-range components, e.g., "Sept 31".
17033         Include <stdlib.h>, "setenv.h", "xalloc.h".
17034         (ISDIGIT_LOCALE): Remove; unused.
17035         Note that the TZ and time functions used here are not reentrant.
17036         (mktime_ok, get_tz): New functions.
17037         (TZBUFSIZE): New constant.
17038         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
17039         This requires that we sometimes generate our own TZ="XXX..." setting.
17040
17041 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
17042
17043         * doc/getdate.texi: New file, from coreutils with modifications for
17044         the new TZ parsing.
17045
17046 2004-10-27  Derek R. Price  <derek@ximbiot.com>
17047
17048         * lib/mktime.c (not_equal_tm): Remove redundant check.
17049
17050 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
17051
17052         * modules/regex (lib_SOURCES): Add regex.c.
17053         Reported by James Youngman in
17054         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
17055
17056 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
17057
17058         * lib/getdate.y: Use Bison 1.875 features, and some minor
17059         code cleanups.  This change does not affect semantics.
17060         Don't include <stdlib.h>; no longer needed.
17061         Don't include unlocked-io.h; only the "#if TEST" code uses
17062         stdio, and performance isn't crucial there.
17063         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
17064         Bison 1.875 features as described below.
17065         All uses of "PC." replaced by "pc->".
17066         (YYSTYPE): Add a forward declaration.
17067         (yylex, yyerror): Use full prototypes in forward decls.
17068         Use "%pure-parser" rather than obsolescent "%pure_parser".
17069         Use %parse-param and %lex-param instead of obsolescent
17070         YYPARSE_PARAM and YYLEX_PARAM.
17071         (meridian_table, month_and_day_table, time_units_table,
17072         relative_time_table, time_zone_table, military_table,
17073         lookup_zone, lookup_word, get_date):
17074         Use NULL instead of 0 where appropriate.
17075         (to_hour): Avoid abort (), to avoid a dependency on
17076         stdlib.h.
17077         (yyerror, yylex): Now accepts parser_control * arg.
17078         (main) [TEST]: Use '\0' rather than 0 for char.
17079
17080 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
17081
17082         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
17083
17084 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
17085
17086         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
17087         It's now the caller's responsibility to handle the case where
17088         !HAVE_GETPAGESIZE && !defined getpagesize.
17089
17090         * lib/mktime.c (leapyear): Arg is long int, not int.
17091
17092 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
17093
17094         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
17095
17096 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
17097
17098         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
17099         missing.  Problem reported by James Youngman.
17100
17101 2004-10-16  Simon Josefsson  <jas@extundo.com>
17102
17103         * gnulib-tool: Fix comments.  Fix parse problem.
17104         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
17105
17106 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
17107
17108         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
17109         implementation of getopt_long.  Problem reported by Alexander Taler in:
17110         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
17111
17112 2004-10-15  Bruno Haible  <bruno@clisp.org>
17113
17114         * gnulib-tool: Untabify. Initialize supplied_libname.
17115         (func_usage): More homogenous output.
17116         (func_modules_transitive_closure, func_modules_to_filelist,
17117         func_emit_lib_Makefile_am): New functions.
17118         (func_import): New function, extracted from big case statement. Use
17119         func_get_license, func_modules_transitive_closure,
17120         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
17121         opt_lgpl. Don't use test -a, as it's not portable.
17122         (func_create_testdir): Use func_modules_transitive_closure,
17123         func_modules_to_filelist, func_emit_lib_Makefile_am.
17124
17125 2004-10-15  Bruno Haible  <bruno@clisp.org>
17126
17127         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
17128
17129 2004-10-15  Bruno Haible  <bruno@clisp.org>
17130
17131         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
17132         the portions belonging to each module.
17133         Suggested by Derek Robert Price <derek@ximbiot.com>.
17134
17135 2004-10-12  Simon Josefsson  <jas@extundo.com>
17136
17137         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
17138         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
17139         to real functions.
17140
17141 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
17142
17143         * modules/vsnprintf: New file.
17144
17145 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
17146
17147         * m4/vsnprintf.m4: New file.
17148
17149 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
17150
17151         * lib/vsnprintf.h: New file.
17152         * lib/vsnprintf.c: New file.
17153
17154 2004-10-11  Bruno Haible  <bruno@clisp.org>
17155
17156         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
17157         vsnprintf.
17158
17159 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
17160
17161         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
17162
17163 2004-10-07  Bruno Haible  <bruno@clisp.org>
17164
17165         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
17166         fits into the provided buffer.
17167
17168 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
17169
17170         * lib/diacrit.c, diacrit.h: Add GPL notice.
17171
17172         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
17173         notice.
17174         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
17175         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
17176         This avoids a potential constant-folding bug.
17177
17178 2004-10-05  Bruno Haible  <bruno@clisp.org>
17179
17180         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
17181         for the declaration of strsep.
17182
17183 2004-10-05  Bruno Haible  <bruno@clisp.org>
17184
17185         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
17186
17187 2004-10-04  Simon Josefsson  <jas@extundo.com>
17188
17189         * modules/memmem: New file.
17190         * tests/test-memmem.c: New file.
17191         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
17192
17193 2004-10-04  Simon Josefsson  <jas@extundo.com>
17194
17195         * m4/memmem.m4: New file.
17196
17197 2004-10-04  Simon Josefsson  <jas@extundo.com>
17198
17199         * lib/memmem.h: New file.
17200         * lib/memmem.c: New file, taken from glibc.
17201
17202 2004-10-04  Simon Josefsson  <jas@extundo.com>
17203
17204         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
17205         '#ifdef USE_UNLOCKED_IO'.
17206
17207 2004-10-04  Simon Josefsson  <jas@extundo.com>
17208
17209         * config/srclist.txt: Add memmem from glibc.
17210
17211 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
17212
17213         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
17214
17215         * modules/argmatch, modules/argp, modules/closeout, modules/error,
17216         modules/exclude, modules/getdate, modules/getline,
17217         modules/getndelim2, modules/getpass, modules/getpass-gnu,
17218         modules/getusershell, modules/linebuffer, modules/md5,
17219         modules/mountlist, modules/posixtm, modules/readtokens,
17220         modules/readutmp, modules/regex, modules/sha1,
17221         modules/version-etc, modules/yesno:
17222         Remove dependency on unlocked-io.
17223
17224 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
17225
17226         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
17227
17228         * m4/unlocked-io.m4: Add copyright notice.
17229         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
17230
17231 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
17232
17233         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
17234         * lib/xmalloc.c (xmemdup): Likewise.
17235         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
17236         XFREE): Remove these long-obsolescent macros.
17237         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
17238         * lib/xstrdup.c: Remove.
17239
17240         * lib/regex.c (re_comp): Cast gettext return value to char *,
17241         Problem reported by Martin Neitzel via Mark D. Baushke.
17242
17243 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
17244
17245         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
17246         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
17247         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
17248         regex.c, sha1.c, version-etc.c, yesno.c:
17249         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
17250         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
17251         the includer's responsibility.
17252
17253         Sync from coreutils.
17254
17255         * lib/modechange.c (mode_compile): Don't decrement a pointer that
17256         points to the start of a string, as the C Standard says the
17257         resulting behavior is undefined.
17258
17259         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
17260         simple -> simple_backups, numbered_existing ->
17261         numbered_existing_backups, numbered -> numbered_backups
17262         to avoid shadowing problems.  All uses changed.
17263         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
17264         * lib/backupfile.c (check_extension, numbered_backup):
17265         Rename locals to avoid shadowing 'basename'.
17266         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
17267         once.
17268
17269         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
17270         * lib/.cvsignore: Add getopt.h.
17271
17272 2004-10-04  Bruno Haible  <bruno@clisp.org>
17273
17274         * modules/README: New file.
17275         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
17276         not a module.
17277
17278 2004-10-02  Jim Meyering  <jim@meyering.net>
17279
17280         * lib/dirfd.h, getpagesize.h: Add copyright notice.
17281
17282 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
17283
17284         * modules/strsep: New file.
17285
17286 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
17287
17288         * m4/strsep.m4: New file.
17289
17290 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
17291
17292         * lib/strsep.h: New file.
17293         * lib/strsep.c: New file.
17294
17295 2004-10-01  Simon Josefsson  <jas@extundo.com>
17296
17297         * lib/snprintf.c (snprintf): Handle size==0.
17298
17299 2004-10-01  Simon Josefsson  <jas@extundo.com>
17300             Bruno Haible  <bruno@clisp.org>
17301
17302         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
17303         (snprintf): Declare 'args'.
17304
17305 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
17306
17307         * lib/snprintf.c: Remove comments as to why each header is needed.
17308
17309 2004-10-01  Bruno Haible  <bruno@clisp.org>
17310
17311         * MODULES.html.sh: Add strsep.
17312
17313 2004-09-30  Simon Josefsson  <jas@extundo.com>
17314
17315         * modules/snprintf: New file.
17316
17317 2004-09-30  Simon Josefsson  <jas@extundo.com>
17318
17319         * m4/snprintf.m4: New file.
17320
17321 2004-09-30  Simon Josefsson  <jas@extundo.com>
17322
17323         * lib/snprintf.h, lib/snprintf.c: New files.
17324
17325 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17326
17327         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
17328         (hol_entry_help): Never translate an empty string.
17329         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
17330         * lib/argp.h (OPTION_NO_TRANS): New option.
17331
17332 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
17333
17334         * modules/argp (Maintainer): Replace Simon Josefsson
17335         by Sergey Poznyakoff.
17336
17337 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
17338
17339         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
17340         changes merged back into glibc.
17341
17342 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
17343
17344         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
17345
17346 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
17347
17348         * lib/xvasprintf.c: Include xalloc.h.
17349         (xvasprintf): Use xalloc_die, not xmalloc_die.
17350
17351 2004-09-29  Bruno Haible  <bruno@clisp.org>
17352
17353         * modules/alloca-opt: New file, derived from modules/alloca.
17354         * modules/allocsa: Depend on alloca-opt instead of alloca.
17355         * modules/setenv: Likewise.
17356         * modules/vasnprintf: Likewise.
17357         * MODULES.html.sh: Add alloca-opt.
17358
17359 2004-09-28  Simon Josefsson  <jas@extundo.com>
17360
17361         * gnulib-tool: New parameter --lgpl, to asseert that modules are
17362         LGPL, and to replace license template from GPL to LGPL.
17363
17364 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
17365
17366         * modules/dummy: Change license to LGPL.
17367
17368 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
17369
17370         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
17371
17372 2004-09-24  Simon Josefsson  <jas@extundo.com>
17373
17374         * modules/minmax (License): Change from GPL to LGPL.
17375
17376 2004-09-23  Simon Josefsson  <jas@extundo.com>
17377
17378         * gnulib-tool (--import): Typo.
17379
17380 2004-09-23  Simon Josefsson  <jas@extundo.com>
17381
17382         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
17383
17384 2004-09-22  Bruno Haible  <bruno@clisp.org>
17385
17386         * modules/*: Add 'License' field.
17387         * gnulib-tool: Accept --extract-license option.
17388         (func_get_license): New function.
17389
17390 2004-09-21  Bruno Haible  <bruno@clisp.org>
17391
17392         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
17393         Reported by Simon Josefsson.
17394
17395 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
17396
17397         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
17398         gl_AC_TYPE_LONG_LONG.
17399
17400 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
17401
17402         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
17403
17404 2004-09-18  Simon Josefsson  <jas@extundo.com>
17405         and  Paul Eggert  <eggert@cs.ucla.edu>
17406
17407         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
17408         calls with autoreconf.  Define GL_LIB.
17409
17410 2004-09-14  Karl Berry  <karl@gnu.org>
17411
17412         * config/srclist.txt: unsync setenv.c, sigh.
17413
17414 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
17415
17416         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
17417         Problem reported by Bruno Haible in:
17418         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
17419
17420 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
17421
17422         * config/srclist.txt: Comment out argp-pvh.c.
17423
17424 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
17425
17426         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
17427         in case some system header has #define'd it.  Problem reported by
17428         Soeren D. Schulze in
17429         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
17430
17431 2004-09-09  Karl Berry  <karl@gnu.org>
17432
17433         * regex.[ch]: delete from the root.  These were supposed to be
17434                 synced with emacs cvs, but this has not happened for about
17435                 a year, and anyway nothing else uses emacs regex.[ch].
17436                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
17437                 lib/regex[.ch] is untouched.
17438
17439 2004-09-09  Bruno Haible  <bruno@clisp.org>
17440
17441         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
17442
17443 2004-09-09  Bruno Haible  <bruno@clisp.org>
17444
17445         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
17446         modifications.
17447         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
17448
17449 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
17450
17451         * modules/xvasprintf: New file.
17452         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
17453
17454 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
17455
17456         * lib/xvasprintf.h: New file.
17457         * lib/xvasprintf.c: New file.
17458         * lib/xasprintf.c: New file.
17459
17460 2004-09-08  Bruno Haible  <bruno@clisp.org>
17461
17462         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
17463
17464 2004-09-08  Bruno Haible  <bruno@clisp.org>
17465
17466         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
17467         length is > INT_MAX.
17468         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
17469         more.
17470
17471 2004-09-08  Bruno Haible  <bruno@clisp.org>
17472
17473         * lib/stdint_.h: New file, taken from GNU clisp.
17474
17475 2004-09-08  Bruno Haible  <bruno@clisp.org>
17476             Oskar Liljeblad  <oskar@osk.mine.nu>
17477
17478         * modules/stdint: New file.
17479         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
17480
17481 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
17482
17483         Import from coreutils.
17484         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
17485         strings on unbounded length.  alloca's performance benefits aren't
17486         that important here.
17487         (V_STRDUP): Remove.
17488         (parse_with_separator): New function, with most of the internals
17489         of the old parse_user_spec.  Allow user to omit both user and group,
17490         for compatibility with FreeBSD.
17491         Clone only the user name, not the entire spec.
17492         Do not set *uid, *gid unless entirely successful.
17493         Avoid memory leak in some failing cases.
17494         Fix regression for USER.GROUP reported by Dmitry V. Levin in
17495         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
17496         (parse_user_spec): Rewrite to use parse_with_separator.
17497
17498 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
17499
17500         * modules/userspec: Don't depend on alloca.
17501
17502 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
17503
17504         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
17505
17506 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
17507
17508         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
17509         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
17510         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
17511
17512 2004-08-16  Simon Josefsson  <jas@extundo.com>
17513
17514         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
17515         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
17516         Add --dry-run for --import.
17517         Let user provided command line parameters override configure.ac
17518         settings.
17519
17520 2004-08-12  Simon Josefsson  <jas@extundo.com>
17521
17522         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
17523         as discussed with Paul Eggert in threads rooted at
17524         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
17525         and
17526         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
17527         Before, the test was empty, and relied on ELIDE_CODE in source
17528         code.)
17529         (gl_PREREQ_GETOPT): New macro.
17530         (gl_GETOPT): Use them.
17531
17532 2004-08-12  Simon Josefsson  <jas@extundo.com>
17533
17534         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
17535         * lib/getopt_.h: Renamed from getopt.h.
17536
17537 2004-08-12  Simon Josefsson  <jas@extundo.com>
17538
17539         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
17540         Change default library name from libfoo to libgnu.
17541         Now, if you have a configure.ac that says:
17542                 gl_SOURCE_BASE(gl)
17543                 gl_M4_BASE(gl/m4)
17544                 gl_MODULES(error getopt etcetera)
17545                 gl_INIT
17546         you can import all you need by running:
17547                 ../gnulib/gnulib-tool --import
17548
17549         * modules/getopt (Files): Rename getopt.h to getopt_.h.
17550         (Makefile.am): Rewrite, use logic from argz.
17551         (Include): Use <getopt.h> instead of "getopt.h".
17552
17553 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
17554
17555         * modules/argp (Files): Add m4/unlocked-io.m4.
17556         (Depends-on): Add extensions.
17557
17558 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
17559
17560         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
17561         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
17562         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
17563         Check for program_invocation_name, program_invocation_short_name,
17564         flockfile, funlockfile, features.h, _getopt_long_only_r.
17565
17566 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
17567
17568         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
17569         its complicated substitute.
17570         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
17571         and program_invocation_name.
17572         (__argp_basename) [!_LIBC]: Remove; the only use was
17573         replaced by its body.
17574         (__argp_short_program_name): Change condition from
17575         !defined __argp_short_program_name to
17576         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
17577         to match argp-namefrob.h.
17578         (__argp_failure): Don't assume strerror_r returns char *.
17579         * lib/argp-parse.c (N_): Define unconditionally.
17580         (argp_default_options): Fill out initializers with 0 to avoid
17581         gcc warnings.
17582
17583 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
17584
17585         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
17586         getopt1.c.
17587
17588 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
17589
17590         Merge from coreutils.
17591
17592         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
17593
17594         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
17595         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
17596
17597 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
17598
17599         Merge from coreutils.
17600
17601         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
17602         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
17603         for Reliant Unix 5.43.
17604
17605         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
17606         (union fooround): Use uintmax_t, not long int.
17607         The rest is a merge from libc:
17608         [defined _LIBC]: Include <shlib-compat.h>.
17609         (_obstack) [defined _LIBC]: Remove after 2.3.4.
17610
17611         * lib/settime.c (settime): Recode to avoid warning with
17612         Sun Forte C 6U2.
17613
17614         * lib/strverscmp.c: Convert to UTF-8.
17615
17616 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
17617
17618         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
17619         m4/uintmax_t.m4.
17620
17621 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
17622
17623         * modules/xalloc-die: New file.
17624         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
17625
17626         * modules/md5 (Files): Add m4/uint32_t.m4.
17627         * modules/sha1: Renamed from modules/sha.
17628         (Files):
17629         Rename lib/sha.h to lib/sha1.h.
17630         Rename lib/sha.c to lib/sha1.c.
17631         Rename m4/sha.m4 to m4/sha1.m4.
17632         (lib_SOURCES): Likewise.
17633         (configure.ac): Rename gl_SHA to gl_SHA1.
17634         (Include): sha.h -> sha1.h.
17635
17636 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
17637
17638         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
17639         * m4/sha1.m4: Renamed from sha.m4.
17640         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
17641
17642 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
17643
17644         * lib/obstack.h (obstack_empty_p):
17645         Don't assume that chunk->contents is suitably aligned.
17646         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
17647         Likewise. Problem reported by Benno in
17648         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
17649
17650         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
17651         readable.  This could be improved further but it'd take some work.
17652
17653 2004-08-08  Simon Josefsson  <jas@extundo.com>
17654
17655         * modules/xgethostname (Depends-on): Remove exit and error (not
17656         used).
17657
17658         * modules/getpass-gnu: Add getpass.h.
17659         (Depends-on): Add stdbool.
17660         * modules/getpass: Add getpass.h.
17661
17662 2004-08-08  Simon Josefsson  <jas@extundo.com>
17663
17664         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
17665         Check getpass declaration.
17666
17667 2004-08-08  Simon Josefsson  <jas@extundo.com>
17668
17669         * lib/xgethostname.c: Don't include error.h (not used).
17670
17671         * lib/getpass.h: Add.
17672         * lib/getpass.c: Include getpass.h first.
17673
17674 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
17675
17676         * lib/xalloc-die.c: New file.
17677         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
17678         All uses removed.
17679         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
17680         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
17681         xalloc-die.c.
17682         (_, N_, xalloc_die): Move to xalloc-die.c.
17683         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
17684         so that we needn't mess with xalloc_msg_memory_exhausted.
17685
17686         * lib/sha1.h: Renamed from sha.h.
17687         (SHA1_H): Renamed from _SHA_H.
17688         (sha1_ctx): Renamed from sha_ctx.
17689         (sha1_init_ctx): Renamed from sha_init_ctx.
17690         (sha1_process_block): Renamed from sha_process_block.
17691         (sha1_process_bytes): Renamed from sha_process_bytes.
17692         (sha1_finish_ctx): Renamed from sha_finish_ctx.
17693         (sha1_read_ctx): Renamed from sha_read_ctx.
17694         (sha1_stream): Renamed from sha_stream.
17695         (sha1_buffer): Renamed from sha_buffer.
17696         * lib/sha1.c: Likewise; renamed from sha.c.
17697         Do not include <sys/types.h>.
17698         Include <stddef.h> rather than <stdlib.h>.
17699
17700 2004-08-08  Bruno Haible  <bruno@clisp.org>
17701
17702         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
17703         FILESYSTEM_PREFIX_LEN.
17704         * lib/progreloc.c: Likewise.
17705         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
17706
17707 2004-08-06  Simon Josefsson  <jas@extundo.com>
17708
17709         * modules/progname (Depends-on): Don't depend on stdbool.
17710
17711 2004-08-06  Simon Josefsson  <jas@extundo.com>
17712
17713         * modules/getsubopt: New file.
17714         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
17715         getsubopt.
17716
17717 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
17718
17719         More merge from coreutils.
17720
17721         * m4/utimens.m4, m4/utimecmp.m4: New files.
17722         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
17723         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
17724         prereq.m4, sha.m4: Import changes from coreutils.
17725
17726 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
17727
17728         More merge from coreutils.
17729         * modules/raise, modules/readtokens0, modules/utimens:
17730         * modules/utimecmp, module/xnanosleep: New files.
17731         * modules/strftime: Add lib/strftime.h.
17732         Change include from <time.h> to "strftime.h".
17733         * modules/yesno: Add lib/yesno.h.
17734         * modules/backupfile: Remove lib/addext.c.
17735         * modules/euidaccess: Add stat-macros.h.
17736         * modules/canonicalize, modules/euidaccess,
17737         modules/filemode, modules/lchown, modules/makepath,
17738         modules/rmdir, modules/stat: Likewise.
17739
17740 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
17741
17742         Merge from tar.
17743         * lib/argp-help.c (make_hol, hol_append): Don't assume that
17744         SIZE_MAX is a valid preprocessor constant.
17745         (__argp_basename): Change from "#ifndef _LIBC"
17746         to "#ifndef __argp_short_program_name", so that
17747         we don't compile these functions for tar.
17748
17749         More merges from coreutils.
17750         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
17751         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
17752         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
17753         * lib/addext.c: Remove; no longer needed.
17754         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
17755         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
17756         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
17757         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
17758         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
17759         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
17760         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
17761         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
17762         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
17763         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
17764         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
17765         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
17766         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
17767         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
17768         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
17769         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
17770         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
17771         Import changes from coreutils.
17772
17773 2004-08-05  Simon Josefsson  <jas@extundo.com>
17774
17775         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
17776
17777 2004-08-05  Simon Josefsson  <jas@extundo.com>
17778
17779         * m4/getsubopt.m4: New file.
17780
17781 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
17782
17783         Merge from coreutils.
17784
17785         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
17786         * m4/getcwd-path-max.m4: New files.
17787
17788         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
17789         FILESYSTEM_PREFIX_LEN ->
17790         FILE_SYSTEM_PREFIX_LEN.
17791         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
17792         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
17793         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
17794         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
17795
17796         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
17797         prerequisite modules now handle the DOS stuff.
17798         Don't check for unistd.h.
17799
17800 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
17801
17802         Merge from coreutils.
17803
17804         * lib/.gdb-history: Remove; this doesn't belong here.
17805
17806         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
17807         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
17808         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
17809         * lib/getcwd.c: New files.
17810
17811         * lib/dirname.h: Include <stdbool.h>.
17812         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
17813         for consistency with POSIX terminology.  All uses changed.
17814         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
17815         (strip_trailing_slashes): Use bool for booleans.
17816         * lib/stripslash.c (strip_trailing_slashes): Likewise.
17817
17818         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
17819         sometimes returns a positive errno value even when it succeeds.
17820         (print_errno_message) [!LIBC]: Fall back on strerror if
17821         __strerror_r fails.
17822
17823         * lib/path-concat.c (mempcpy): Don't define if a system header defines
17824         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
17825         (longest_relative_suffix): New function.
17826         (path_concat): Use it.  Assume first argument is not NULL.
17827         Port to DOS.  Omit redundant separators.
17828         Report an error instead of returning NULL.
17829         Use mempcpy instead of memcpy.
17830         (xpath_concat): Remove: not declared or used.
17831
17832         * lib/same.h: Include <stdbool.h>
17833         (same_name): Return bool, not int.
17834         * lib/same.c (same_name): Likewise.
17835         (errno): Don't declare; we assume C89 or better now.
17836
17837         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
17838         if not already defined.
17839
17840         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
17841         * lib/dup-safer.c (errno): Likewise.
17842
17843 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
17844
17845         Merge from coreutils.
17846         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
17847         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
17848         * modules/path-concat: Don't depend on strdup.
17849
17850 2004-08-03  Simon Josefsson  <jas@extundo.com>
17851
17852         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
17853         * lib/progname.h: Don't include stdbool.h.
17854
17855 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
17856
17857         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
17858         * MODULES.html.sh (func_all_modules): Remove fatal.
17859
17860 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
17861
17862         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
17863
17864 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
17865
17866         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
17867         working.
17868
17869 2004-08-02  Simon Josefsson  <jas@extundo.com>
17870
17871         * lib/getsubopt.h: New file, with comments from Bruno Haible.
17872         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
17873         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
17874
17875 2004-08-01  Simon Josefsson  <jas@extundo.com>
17876
17877         * lib/xgetdomainname.c: Include stdlib.h, for free().
17878
17879 2004-07-19  Bruno Haible  <bruno@clisp.org>
17880
17881         * MODULES.html.sh (func_all_modules): Add dummy.
17882
17883 2004-07-16  Simon Josefsson  <jas@extundo.com>
17884
17885         * modules/dummy: New file.
17886
17887 2004-07-16  Simon Josefsson  <jas@extundo.com>
17888
17889         * lib/dummy.c: New file.
17890
17891 2004-07-16  Bruno Haible  <bruno@clisp.org>
17892
17893         * lib/backupfile.h: Add extern "C" for C++.
17894         * lib/closeout.h: Likewise.
17895         * lib/copy-file.h: Likewise.
17896         * lib/findprog.h: Likewise.
17897         * lib/full-write.h: Likewise.
17898         * lib/pathname.h: Likewise.
17899         * lib/progname.h: Likewise.
17900         * lib/stpcpy.h: Likewise.
17901         * lib/stpncpy.h: Likewise.
17902         * lib/strcase.h: Likewise.
17903         * lib/strstr.h: Likewise.
17904         * lib/xalloc.h: Likewise.
17905
17906         * lib/mbswidth.h: Add extern "C" for C++.
17907         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
17908
17909 2004-07-13  Robert Millan  <robertmh@gnu.org>
17910
17911         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
17912
17913 2004-07-09  Simon Josefsson  <jas@extundo.com>
17914
17915         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
17916         failed without this.)
17917
17918 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
17919
17920         * modules/chown (Files): Add lib/fchown-stub.c, since
17921         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
17922
17923 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
17924
17925         * lib/fchown-stub.c: New file.
17926
17927 2004-06-24  Jim Meyering  <jim@meyering.net>
17928
17929         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
17930
17931 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17932
17933         * modules/argz: Omit "#include".
17934
17935         * MODULES.html.sh (func_all_modules): Add calloc, to match
17936         2004-06-01 addition of calloc module.
17937
17938 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17939
17940         * m4/argz.m4: New file, which is autoupdated from libtool.
17941
17942 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17943
17944         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
17945         libtool.
17946
17947 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17948
17949         * config/srclist-update: Don't insist on "USA." before the
17950         close-comment, as libtool omits the period and puts the */ on a
17951         separate line.
17952         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
17953         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
17954
17955 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
17956
17957         * modules/argz: New file.
17958         * MODULES.html.sh (func_all_modules): Add argz.
17959
17960 2004-06-12  Jim Meyering  <jim@meyering.net>
17961         and  Paul Eggert  <eggert@cs.ucla.edu>
17962
17963         * modules/hash (Files): Add lib/xalloc.h.
17964         * modules/pipe (Depends-on): Add wait-process.
17965         * modules/stat (Depends-on): Add xalloc.
17966         * modules/userspec (Files): Add lib/userspec.h.
17967         * modules/xstrto
17968
17969         Upgrade from gettext-0.13.
17970         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
17971         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
17972         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
17973
17974 2004-06-10  Jim Meyering  <jim@meyering.net>
17975
17976         * lib/calloc.c: New file.
17977
17978 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
17979
17980         * lib/getdate.y (yylex): Allow space between sign and number.
17981         Problem reported by Dan Jacobson.
17982
17983 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
17984
17985         Merge from coreutils CVS.
17986
17987         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
17988         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
17989         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
17990         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
17991         xstrtol.m4: Fix copyright date and/or serial number.
17992
17993         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
17994         See if we need an fchown replacement.
17995         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
17996         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
17997         and use the replacement function if we detect either defect.
17998
17999         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
18000         gl_UTIMECMP.
18001
18002 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
18003         and  Jim Meyering  <jim@meyering.net>
18004
18005         Merge from coreutils CVS.
18006
18007         * lib/stat-macros.h: New file, with contents from file-type.h
18008         and coreutils' system.h.
18009         * lib/file-type.c: Include "stat-macros.h".
18010         * lib/file-type.h (file_type): Move all macro definitions to new file,
18011         stat-macros.h.
18012
18013         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
18014         Wrap old code with this conditional.
18015         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
18016         function that does not dereference symlinks.
18017         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
18018
18019         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
18020         dependency problems.
18021         (xreadlink): Accept new arg SIZE, for efficiency.
18022         All decls and uses changed.
18023         * lib/xreadlink.h: Include <stddef.h>, for size_t.
18024
18025         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
18026         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
18027
18028         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
18029         sysexits.h.
18030
18031 2004-06-01  Jim Meyering  <jim@meyering.net>
18032
18033         * m4/calloc.m4: New file.
18034
18035 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
18036
18037         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
18038         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
18039         Also, fix a typo in a diagnostic.
18040
18041 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
18042
18043         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
18044         or AC_FUNC_REALLOC.
18045
18046 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
18047
18048         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
18049         macros to be defined.
18050         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
18051         the allocator returns NULL because the requested size is zero.
18052
18053 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
18054
18055         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
18056         var.  Add comment explaining why libc still defines it.  This
18057         merges the following patch from glibc:
18058         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
18059
18060 2004-05-20  Andreas Schwab  <schwab@suse.de>
18061
18062         * m4/free.m4: Replace free if it not known to work, not the other
18063         way round.
18064
18065 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
18066
18067         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
18068         present in glibc since revision 1.1 of this file.
18069         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
18070         obstack_alignment_mask, obstack_alloc, obstack_base,
18071         obstack_blank, obstack_blank_fast, obstack_chunk_size,
18072         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
18073         obstack_grow0, obstack_init, obstack_int_grow,
18074         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
18075         obstack_next_free, obstack_object_size, obstack_ptr_grow,
18076         obstack_ptr_grow_fast, obstack_room): Remove declarations of
18077         nonexistent functions.
18078
18079 2004-05-18  Karl Berry  <karl@gnu.org>
18080
18081         * config/srclist.txt: break link for vasnprintf.c.
18082
18083 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
18084
18085         Port obstack to the AS/400, where pointers are 16 bytes wide and
18086         you cannot cast an integer to a valid pointer.  This patch is
18087         currently waiting to be integrated into glibc; see
18088         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
18089
18090         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
18091         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
18092         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
18093         (struct obstack): temp member is now a union of a pointer and
18094         an integer, instead of an integer.  All integer uses changed.
18095         This does not affect the physical layout of struct obstack,
18096         except on hosts (like the AS/400) where the size or alignment of
18097         void * is greater than that of ptrdiff_t.
18098         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
18099         __STDC__)]: Store temporary in pointer member of union, not
18100         integer member.
18101         * lib/obstack.c: Include <stddef.h>, for offsetof.
18102         (struct fooalign): Remove; it doesn't need a name.
18103         (union fooround): Change double to long double, and add void *.
18104         (DEFAULT_ALIGNMENT): Use offsetof to compute.
18105         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
18106         not a macro.  Hence the values are always int; so remove all
18107         casts-to-int in uses.
18108
18109 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
18110
18111         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
18112         we can get this patch merged into glibc.
18113
18114 2004-05-17  Derek R. Price  <derek@ximbiot.com>
18115             Paul Eggert  <eggert@cs.ucla.edu>
18116
18117         * m4/argp: Depend on alloca.
18118
18119 2004-05-17  Derek R. Price  <derek@ximbiot.com>
18120             Paul Eggert  <eggert@cs.ucla.edu>
18121
18122         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
18123         freecoding.
18124
18125 2004-05-17  Bruno Haible  <bruno@clisp.org>
18126
18127         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
18128         precision that consists of a '.' followed by an empty digit string.
18129         Patch by Tor Lillqvist <tml@iki.fi>.
18130
18131 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
18132
18133         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
18134         for backward compatibility with older code.  We need our own
18135         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
18136         it under some other name, and our alloca.h will define it.
18137
18138 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
18139             Derek Price  <derek@ximbiot.com>
18140
18141         * lib/alloca.c: Include <alloca.h>, to get our interface.
18142         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
18143         include <alloca.h> first.  Use C89 prototype for alloca; this
18144         requires including <stddef.h> for size_t.  Use extern "C" if C++.
18145         Use #elif for simplicity, since we can assume C89 now.
18146         Don't try to source the system alloca.h since it will not be found
18147         and to prevent recursively including its replacement.
18148         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
18149         * lib/regex.c: Likewise.
18150
18151 2004-05-16  Derek Price  <derek@ximbiot.com>
18152             Paul Eggert  <eggert@cs.ucla.edu>
18153
18154         getline cleanup.  This changes the getndelim2 API: both order of
18155         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
18156         no delimiter).
18157
18158         * lib/getline.c: Don't include stddef.h or stdio.h, since our
18159         interface does that.
18160         (getline): Always use getdelim, so that we don't have two
18161         copies of this code.
18162         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
18163         if available.
18164         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
18165         (GETNDELIM2_MAXIMUM): New macro.
18166         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
18167         instead of the old practice of delim2==0.  All callers changed.
18168         Return -1 on overflow, instead of returning junk.
18169         Do not set *linesize unless allocation succeeds.
18170         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
18171         that we include sys/types.h.
18172         * lib/getnline.h: Likewise.
18173         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
18174         (getndelim2): Reorder arguments.
18175         * lib/getnline.c (getnline, getndelim):
18176         Don't discard the NMAX argument.
18177         (getnline): Invoke getndelim, to avoid code duplication.
18178         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
18179         of (size_t) -1 by callers of the getnline family.
18180
18181 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
18182
18183         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
18184         Check for gettimeofday.
18185         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
18186         Check for settimeofday, stime.
18187
18188 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
18189
18190         * lib/nanosleep.c (suspended): Change its type from int to
18191         sig_atomic_t volatile.
18192         (first_call): Make it private to rpl_nanosleep, and have it
18193         be zero initially as that's a bit faster.
18194         (my_usleep): Round up fractional times instead of truncating them,
18195         as this is the usual meaning for 'sleep'.
18196
18197         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
18198         doesn't work.
18199         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
18200         (ENOSYS): Define if not defined.
18201         (settime): Fall back on stime if it exists and settimeofday fails.
18202         But don't bother with fallbacks if a method fails with errno == EPERM.
18203
18204 2004-05-11  Jim Meyering  <jim@meyering.net>
18205
18206         Prior to this change, the save_cwd caller required read access to the
18207         current directory on most systems (ones with the fchdir function).
18208
18209         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
18210         fails, try write-only, and finally, resort to using xgetcwd.
18211
18212 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
18213
18214         * lib/obstack.c, obstack.h: Import changes from libc.
18215
18216 2004-04-28  Bruno Haible  <bruno@clisp.org>
18217
18218         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
18219         also implicitly appends .exe to executables.
18220         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
18221         accepts Windows pathnames.
18222         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
18223         Treat Cygwin like Windows, since it now accepts Windows pathnames.
18224         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
18225         Treat Cygwin like Windows, since it now accepts Windows pathnames.
18226         Reported by Derek Robert Price <derek@ximbiot.com>.
18227
18228 2004-04-21  Karl Berry  <karl@gnu.org>
18229
18230         * config/srclist.txt (localcharset.c): break sync.
18231
18232 2004-04-20  Paul Eggert  <eggert@twinsun.com>
18233
18234         * m4/host-os.m4: Add a copyright notice.
18235
18236 2004-04-20  Jim Meyering  <jim@meyering.net>
18237
18238         Change UTILS_ to gl_ in AC_DEFINE'd names.
18239         Change utils_- and jm_-prefixed variables, too.
18240         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
18241         UTILS_FUNC_MKDIR_TRAILING_SLASH.
18242         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
18243
18244         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
18245         Don't emit trailing blanks.
18246         Also rename jm_-prefixed variables to have gl_ prefix.
18247
18248         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
18249         Also rename jm_-prefixed variables to have gl_ prefix.
18250
18251         * m4/jm-macros.m4: Reflect the renamings.
18252         * m4/prereq.m4: Likewise.
18253
18254 2004-04-20  Jim Meyering  <jim@meyering.net>
18255
18256         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
18257         memory.
18258
18259 2004-04-20  Jim Meyering  <jim@meyering.net>
18260             Bruno Haible  <bruno@clisp.org>
18261
18262         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
18263         memory when realloc fails.
18264
18265 2004-04-19  Jim Meyering  <jim@meyering.net>
18266
18267         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
18268         now that readutmp.c may call `free (0)'.
18269
18270 2004-04-19  Bruno Haible  <bruno@clisp.org>
18271
18272         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
18273         * m4/inttypes_h.m4: Likewise.
18274         * m4/stdint_h.m4: Likewise.
18275         * m4/intmax_t.m4: Likewise.
18276         * m4/uintmax_t.m4: Likewise.
18277
18278 2004-04-18  Jim Meyering  <jim@meyering.net>
18279
18280         * m4/prereq.m4: Don't forbid jm_ prefix.
18281
18282         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
18283         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
18284         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
18285         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
18286         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
18287         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
18288         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
18289         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
18290         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
18291         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
18292         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
18293         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
18294         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
18295         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
18296         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
18297         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
18298         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
18299         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
18300         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
18301
18302 2004-04-18  Jim Meyering  <jim@meyering.net>
18303
18304         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
18305         failure, don't leak memory and do call END_UTMP_ENT.
18306
18307 2004-04-16  Jim Meyering  <jim@meyering.net>
18308
18309         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
18310         coreutils' stat program.
18311         (gl_PREREQ): Don't require jm_PREREQ_STAT.
18312
18313 2004-04-11  Paul Eggert  <eggert@twinsun.com>
18314
18315         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
18316         C89.
18317         (CHAR_BIT): Remove, since we assume C89.
18318         Include <stdint.h> if available, as per current Autoconf CVS advice.
18319
18320 2004-03-31  Jim Meyering  <jim@meyering.net>
18321
18322         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
18323         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
18324         * m4/xalloc.m4: Likewise.
18325
18326 2004-03-30  Paul Eggert  <eggert@twinsun.com>
18327
18328         Merge from coreutils.
18329
18330         * m4/inttostr.m4: New file.
18331         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
18332         Require AM_STDBOOL_H and gl_TIMESPEC instead.
18333         Require gl_CLOCK_TIME.
18334         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
18335
18336 2004-03-30  Paul Eggert  <eggert@twinsun.com>
18337
18338         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
18339         not bool, to be more consistent with Unix conventions.
18340         Suggested by Bruno Haible.
18341
18342         Merge from coreutils.
18343
18344         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
18345         * lib/umaxtostr.c: New files.
18346
18347         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
18348         the usual <time.h> dance.
18349         (get_date): Change signature to support fractional time stamps.
18350         All callers changed.
18351         * lib/getdate.y: Include "getdate.h" first, as we can now
18352         assume C89 and don't need to worry about 'const'.
18353         Similarly, include "unlocked-io.h" near start, not in middle.
18354         Include <limits.h>.
18355         (textint.value): Use long int rather than int.
18356         (textint.digits): Use size_t rather than int.
18357         (BILLION, LOG10_BILLION): New constants.
18358         (parser_control): New member rel_ns.  Members day_ordinal,
18359         time_zone, month, day, hour, minutes, rel_year, rel_month,
18360         rel_day, rel_hour, rel_minutes, rel_seconds
18361         are now long int, not int.  Member seconds is now struct timespec,
18362         not int.  New member timespec_seen.  Members dates_seen, days_seen,
18363         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
18364         not int.
18365         (%union.intval): Now long int, not int.
18366         New member timespec.
18367         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
18368         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
18369         (spec): Now is a timespec or an item list.
18370         (timespec, items): New nonterminals.
18371         (time, rel, relunit, number, get_date):
18372         Add support for fractional seconds.
18373         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
18374         (gmtime, localtime, mktime): Remove decls; not needed with C89.
18375         (to_hour): First arg is now long int, not int.
18376         (to_year): Returns long int, not int.
18377         Don't treat year -70 like 70.
18378         (tm_diff): Returns long int, not int.
18379         (lookup_word): Use bool instead of int when appropriate.
18380         (yylex): Use size_t for count, not int.
18381         Detect overflow when parsing large integer constants.
18382         Add support for fractions.
18383         (get_date): Make pointers 'const' if possible.
18384         Use more-portable code to detect integer overflow.
18385         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
18386         Don't use ctime; it's not reliable if the year has >4 digits.
18387
18388         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
18389         This is for compatibility with BSD.
18390
18391         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
18392         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
18393         From coreutils' system.h.
18394
18395         * lib/userspec.c: Don't include "posixver.h".
18396         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
18397         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
18398         compatible extension.  Simplify code by removing a boolean int
18399         that was always nonzero if a string was nonnull.
18400
18401 2004-03-30  Jim Meyering  <jim@meyering.net>
18402
18403         Merge from coreutils.
18404
18405         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
18406         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
18407         on some systems one must include <grp.h> before it.
18408         Reported by Christian Krackowizer.
18409
18410 2004-03-30  Jim Meyering  <jim@meyering.net>
18411
18412         Merge from coreutils.
18413
18414         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
18415
18416         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
18417         an empty input stream.
18418
18419         * lib/readtokens.c: Include <stdbool.h>.
18420         (readtoken): Use `size_t' rather than int/long.
18421         All callers adjusted.
18422         Use `bool' rather than `int' where appropriate.
18423         Use memset rather than an explicit loop.
18424         Use x2nrealloc rather than xrealloc.
18425         Allow the use of `\0' as a delimiter.
18426         (readtokens): Likewise.
18427         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
18428
18429 2004-03-30  Jim Meyering  <jim@meyering.net>
18430
18431         * m4/realloc.m4: Remove file, since now it does no more than
18432         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
18433         the `configure.ac' section of module/realloc.
18434         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
18435
18436 2004-03-30  Bruno Haible  <bruno@clisp.org>
18437
18438         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
18439         nonnull.
18440
18441 2004-03-29  Paul Eggert  <eggert@twinsun.com>
18442
18443         Merge changes to getloadavg.c from coreutils and Emacs.
18444
18445         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
18446         Define to an expression, not to the empty string.
18447         Include cloexec.h and xalloc.h.
18448         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
18449         Use set_cloexec_flag rather than rolling our own.
18450         * lib/cloexec.c, lib/cloexec.h: New files.
18451
18452 2004-03-29  Paul Eggert  <eggert@twinsun.com>
18453
18454         * m4/cloexec.m4: New file.
18455
18456 2004-03-18  Paul Eggert  <eggert@twinsun.com>
18457
18458         * lib/getopt.h: Sync with libc CVS.
18459
18460 2004-03-18  Paul Eggert  <eggert@twinsun.com>
18461             Bruno Haible  <bruno@clisp.org>
18462
18463         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
18464         mbswidth.
18465
18466 2004-03-18  Paul Eggert  <eggert@twinsun.com>
18467             Bruno Haible  <bruno@clisp.org>
18468
18469         * lib/mbswidth.h: Include <wchar.h> only if
18470         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
18471         <wchar.h>.
18472         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
18473
18474 2004-03-09  Paul Eggert  <eggert@twinsun.com>
18475
18476         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
18477         Sync with libc CVS.
18478         * lib/getopt_int.h: New file, also synced from libc.
18479
18480 2004-03-09  Paul Eggert  <eggert@twinsun.com>
18481
18482         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
18483         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
18484         Bring back getopt.c, getopt.h, getopt1.c.
18485
18486 2004-03-07  Paul Eggert  <eggert@twinsun.com>
18487
18488         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
18489         All uses changed.  Check for sa_sigaction member; this fixes
18490         a bug first reported by Jason Andrade in
18491         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
18492
18493 2004-03-07  Paul Eggert  <eggert@twinsun.com>
18494
18495         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
18496         '#if' expressions.  Unlike the code it replaces, it does not
18497         depend on (defined _SC_PAGESIZE).  However, it does depend on
18498         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
18499         first reported by Jason Andrade in
18500         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
18501
18502 2004-02-25  Simon Josefsson  <jas@extundo.com>
18503
18504         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
18505
18506 2004-02-25  Simon Josefsson  <jas@extundo.com>
18507
18508         * lib/strdup.h: New file.
18509         * lib/strdup.c: Include it.
18510         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
18511         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
18512
18513 2004-02-23  Karl Berry  <karl@gnu.org>
18514
18515         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
18516         (from fencepost.gnu.org:/gd/gnuorg).
18517
18518 2004-02-23  Karl Berry  <karl@gnu.org>
18519
18520         * config/srclistvars.sh (GNUORG) [karl]: redefine.
18521         * config/srclist.txt: add maintain/standards documents.
18522
18523 2004-02-18  Bruno Haible  <bruno@clisp.org>
18524
18525         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
18526         Reported by Derek Robert Price <derek@ximbiot.com>.
18527
18528 2004-02-16  Karl Berry  <karl@gnu.org>
18529
18530         * config/mkinstalldirs, install-sh: update from automake.
18531
18532 2004-02-06  Karl Berry  <karl@gnu.org>
18533
18534         * m4/po.m4: update from gettext 0.14.1.
18535
18536 2004-02-06  Karl Berry  <karl@gnu.org>
18537
18538         * lib/config.charset: update from gettext 0.14.1.
18539
18540 2004-02-05  Paul Eggert  <eggert@twinsun.com>
18541
18542         Add comments and code, prompted by suggestions from Bruno Haible
18543         for sh-quote.
18544         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
18545         describing the enum quoting_style values.
18546         * lib/quotearg.c (quotearg_alloc): New function.
18547         (quotearg_buffer_restyled): Treat lone { and } as special.
18548         Treat = as special.  Work around bug with older shells
18549         that "see" a '\' that is really the 2nd byte of a multibyte char.
18550         Quote empty string with shell_quoting_style.
18551
18552 2004-02-03  Bruno Haible  <bruno@clisp.org>
18553
18554         * m4/pipe.m4: New file, from GNU gettext.
18555
18556 2004-02-03  Bruno Haible  <bruno@clisp.org>
18557
18558         * lib/pipe.h: New file, from GNU gettext.
18559         * lib/pipe.c: New file, from GNU gettext.
18560
18561 2004-01-27  Bruno Haible  <bruno@clisp.org>
18562
18563         * m4/execute.m4: New file, from GNU gettext.
18564
18565 2004-01-27  Bruno Haible  <bruno@clisp.org>
18566
18567         * lib/execute.h: New file, from GNU gettext.
18568         * lib/execute.c: New file, from GNU gettext.
18569         * lib/w32spawn.h: New file, from GNU gettext.
18570
18571 2004-01-24  Paul Eggert  <eggert@twinsun.com>
18572
18573         Merge from diffutils.
18574
18575         * lib/file-type.c (file_type): Add typed memory objects.
18576         * lib/file-type.h (S_TYPEISTMO): New macro.
18577
18578         * lib/c-stack.h (c_stack_action): Remove argv argument.
18579         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
18580         (die): Don't calculate message unless segv_action returns.
18581         (get_stack_location, min_address_from_argv, max_address_from_argv,
18582         volatile stack_base, volatile_stack_size): Remove.
18583         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
18584         that every segmentation violation is a stack overflow.  (Ouch!)
18585         See Debian bug 136249 (still outstanding) for more info about why
18586         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
18587
18588 2004-01-24  Paul Eggert  <eggert@twinsun.com>
18589
18590         Exit-status fix from coreutils.
18591
18592         Use exit_failure consistently in place of EXIT_FAILURE,
18593         so that program exit statuses are consistent on failure.
18594
18595         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
18596         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
18597         * lib/argmatch.h: Comment fix to match the above.
18598         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
18599         Now a macro referring to exit_failure, instead of a separate
18600         variable.  Include "exitfail.h" to get it.
18601         * lib/xstrtol.h: Include "exitfail.h".
18602         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
18603
18604         * lib/long-options.c (parse_long_options): Use prototype
18605         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
18606         for clarity.
18607
18608 2004-01-21  Jim Meyering  <jim@meyering.net>
18609
18610         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
18611         so as not to conflict with a different-sized __mktime_internal
18612         function in GNU libc.
18613         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
18614         Problem building statically-linked `ls' reported by Michael Brunnbauer.
18615
18616 2004-01-20  Karl Berry  <karl@gnu.org>
18617
18618         * config/config.guess: update from config.
18619
18620         * config/srclistvars.sh: GNUWWWLICENSES for karl.
18621
18622 2004-01-20  Bruno Haible  <bruno@clisp.org>
18623
18624         Safer stack allocation.
18625         * lib/setenv.c: Include allocsa.h.
18626         (alloca): Remove fallback definition.
18627         (freea): Remove macro.
18628         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
18629         instead of freea.
18630
18631 2004-01-20  Bruno Haible  <bruno@clisp.org>
18632
18633         * m4/eealloc.m4: New file, from GNU gettext.
18634
18635 2004-01-20  Bruno Haible  <bruno@clisp.org>
18636
18637         * m4/allocsa.m4: New file, from GNU gettext.
18638
18639 2004-01-20  Bruno Haible  <bruno@clisp.org>
18640
18641         * lib/xallocsa.h: New file, from GNU gettext.
18642         * lib/xallocsa.c: New file, from GNU gettext.
18643
18644 2004-01-20  Bruno Haible  <bruno@clisp.org>
18645
18646         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
18647
18648 2004-01-20  Bruno Haible  <bruno@clisp.org>
18649
18650         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
18651         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
18652         specially.
18653
18654 2004-01-20  Bruno Haible  <bruno@clisp.org>
18655
18656         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
18657         patch.
18658
18659 2004-01-20  Bruno Haible  <bruno@clisp.org>
18660
18661         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
18662
18663 2004-01-20  Bruno Haible  <bruno@clisp.org>
18664
18665         * lib/eealloc.h: New file.
18666
18667 2004-01-20  Bruno Haible  <bruno@clisp.org>
18668
18669         * lib/binary-io.h: Avoid warnings on Cygwin.
18670
18671 2004-01-20  Bruno Haible  <bruno@clisp.org>
18672
18673         * lib/allocsa.h: New file, from GNU gettext.
18674         * lib/allocsa.c: New file, from GNU gettext.
18675
18676 2004-01-18  Karl Berry  <karl@gnu.org>
18677
18678         * doc/gpl.texi, doc/lgpl.texi: new files.
18679
18680 2004-01-18  Karl Berry  <karl@gnu.org>
18681
18682         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
18683         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
18684
18685 2004-01-15  Paul Eggert  <eggert@twinsun.com>
18686
18687         Merge from coreutils.
18688
18689         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
18690         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
18691         (gl_DEFAULT_POSIX2_VERSION): Move
18692         the documentation from 'configure' into 'config.hin',
18693         so that 'configure --help' isn't burdened by it and
18694         we don't have to worry about its formatting there.
18695         Reword the documentation so that it's more succinct
18696         and can be run together into a single paragraph.
18697         * m4/same.m4 (gl_SAME): Check for pathconf.
18698
18699 2004-01-15  Paul Eggert  <eggert@twinsun.com>
18700
18701         Merge from coreutils.
18702
18703         * lib/posixver.c: Include posixver.h.
18704
18705         * lib/same.c: Include <stdbool.h>, <limits.h>.
18706         (_POSIX_NAME_MAX): Define if not defined.
18707         (MIN): New macro.
18708         (same_name): If file names are silently truncated, report
18709         that the file names are the same if they are the same after
18710         the silent truncation.
18711
18712         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
18713         conversion function.
18714         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
18715         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
18716         longer needed.
18717
18718 2004-01-15  Jim Meyering  <jim@meyering.net>
18719
18720         Merge from coreutils.
18721
18722         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
18723         if no library is required.
18724         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
18725         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
18726         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
18727         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
18728         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
18729         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
18730         value, $ac_cv_search_crypt, if it's "none required".
18731         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
18732         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
18733         not gl_FUNC_GETLOADAVG.
18734         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
18735         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
18736
18737 2004-01-15  Jim Meyering  <jim@meyering.net>
18738
18739         Merge from coreutils.
18740
18741         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
18742         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
18743         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
18744
18745         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
18746         optional configure-time default.
18747
18748         * lib/version-etc.c (version_etc_copyright): Update copyright date.
18749
18750         * lib/xreadlink.c (xreadlink): Correct outdated comment.
18751
18752 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
18753
18754         Merge from coreutils.
18755
18756         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
18757         value, $ac_cv_search_nanosleep, if it's "none required".
18758
18759 2004-01-14  Paul Eggert  <eggert@twinsun.com>
18760
18761         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
18762         with like-named macro in fnmatch.c.
18763         (EXT): Use an internal constant instead.
18764
18765         Merge fnmatch patches from glibc.
18766         * lib/fnmatch.c (mbsinit): Remove define.
18767         Add libc_hidden_ver (__fnmatch, fnmatch).
18768         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
18769         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
18770
18771 2004-01-14  Karl Berry  <karl@gnu.org>
18772
18773         * config/install-sh: update from automake.
18774
18775 2004-01-13  Karl Berry  <karl@gnu.org>
18776
18777         * config/install-sh: update from automake.
18778
18779 2004-01-09  Karl Berry  <karl@gnu.org>
18780
18781         * config/install-sh: update from automake.
18782
18783 2004-01-05  Karl Berry  <karl@gnu.org>
18784
18785         * config/config.{sub,guess}: update from config.
18786
18787 2003-12-31  Karl Berry  <karl@gnu.org>
18788
18789         * config/depcomp: update from automake.
18790
18791 2003-12-14  Karl Berry  <karl@gnu.org>
18792
18793         * lib/config.charset: update from gettext-runtime.
18794
18795 2003-12-03  Paul Eggert  <eggert@twinsun.com>
18796
18797         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
18798         Bug reported by Alfred M. Szmidt.
18799
18800 2003-12-03  Bruno Haible  <bruno@clisp.org>
18801
18802         * m4/gettext.m4: Upgrade from gettext-0.13.
18803         * m4/po.m4: Upgrade from gettext-0.13.
18804         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
18805         * m4/intmax.m4: New file, from gettext-0.13.
18806         * m4/printf-posix.m4: New file, from gettext-0.13.
18807
18808 2003-11-29  Karl Berry  <karl@gnu.org>
18809
18810         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
18811
18812 2003-11-25  Paul Eggert  <eggert@twinsun.com>
18813             Bruno Haible  <bruno@clisp.org>
18814
18815         * lib/printf-parse.h: Don't include sys/types.h.
18816         (ARG_NONE): New macro.
18817         (char_directive): Change type of *arg_index fields to size_t.
18818         * lib/printf-parse.c: Don't include sys/types.h.
18819         (SSIZE_MAX): Remove macro.
18820         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
18821         Remove unnecessary overflow check.
18822         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
18823         fields.
18824
18825 2003-11-25  Bruno Haible  <bruno@clisp.org>
18826
18827         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
18828
18829 2003-11-25  Bruno Haible  <bruno@clisp.org>
18830
18831         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
18832         gt_TYPE_SSIZE_T.
18833
18834 2003-11-24  Paul Eggert  <eggert@twinsun.com>
18835
18836         * modules/alloca: Remove dependency on xalloc.
18837
18838 2003-11-24  Paul Eggert  <eggert@twinsun.com>
18839
18840         * lib/alloca.c: Remove dependency on xalloc module.
18841         (xalloc_die): Remove.
18842         (memory_full) [!defined emacs]: New macro.
18843         [!defined emacs]: Don't include xalloc.h.
18844         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
18845         address arithmetic overflows.  Change datatypes a bit to avoid
18846         unnecessary casts.
18847
18848 2003-11-22  Jim Meyering  <jim@meyering.net>
18849
18850         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
18851         s/size/size_t/.
18852
18853 2003-11-21  Karl Berry  <karl@gnu.org>
18854
18855         * config/config.{sub,guess}: update from config.
18856
18857 2003-11-18  Karl Berry  <karl@gnu.org>
18858
18859         * config/config.{sub,guess}: update from config.
18860
18861         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
18862
18863 2003-11-17  Paul Eggert  <eggert@twinsun.com>
18864
18865         * README: Mention that S+T cannot overflow if S is the size of
18866         an existing object and T is sufficiently small.
18867
18868 2003-11-17  Jim Meyering  <jim@meyering.net>
18869
18870         On systems without utime and without a utimes function capable of
18871         dealing with a NULL struct utimbuf* argument, this utime replacement
18872         could -- in unusual circumstances -- leak a file descriptor.
18873         * lib/utime.c: Include <unistd.h> and <errno.h>.
18874         (utime_null): Be sure to close `fd' and to preserve errno.
18875         Reported by Geoff Collyer via Arnold Robbins.
18876
18877 2003-11-17  Bruno Haible  <bruno@clisp.org>
18878
18879         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
18880         (Depends-on): Add xsize.
18881
18882 2003-11-17  Bruno Haible  <bruno@clisp.org>
18883
18884         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
18885
18886 2003-11-17  Bruno Haible  <bruno@clisp.org>
18887
18888         * lib/vasnprintf.c (alloca): Remove fallback definition.
18889         (freea): Remove definition.
18890         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
18891         Reported by Paul Eggert.
18892
18893 2003-11-16  Paul Eggert  <eggert@twinsun.com>
18894             Bruno Haible  <bruno@clisp.org>
18895
18896         Protect against address arithmetic overflow.
18897         * lib/printf-args.h: Include stddef.h.
18898         (arguments): Change type of field 'count' to size_t.
18899         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
18900         'unsigned int' where appropriate.
18901         * lib/printf-parse.h: Include sys/types.h.
18902         (char_directive): Change type of *arg_index fields to ssize_t.
18903         (char_directives): Change type of fields 'count', max_*_length to
18904         size_t.
18905         * lib/printf-parse.c: Include sys/types.h and xsize.h.
18906         (SSIZE_MAX): Define fallback value.
18907         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
18908         instead of 'int' where appropriate. Check a_allocated, d_allocated
18909         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
18910         * lib/vasnprintf.c: Include xsize.h.
18911         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
18912         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
18913         overflow. Avoid wraparound when converting a width or precision from
18914         decimal to binary.
18915
18916 2003-11-16  Bruno Haible  <bruno@clisp.org>
18917
18918         Update from GNU gettext.
18919         * lib/printf-parse.c: Generalize to it can be compiled for wide
18920         strings.
18921         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
18922         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
18923         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
18924         SNPRINTF): New macros.
18925         Don't include <alloca.h> if the file is used inside libintl.
18926         (local_wcslen): New function, for Solaris 2.5.1.
18927         (VASNPRINTF): Use it instead of wcslen.
18928
18929 2003-11-16  Bruno Haible  <bruno@clisp.org>
18930
18931         * lib/xsize.h (xmax): New function.
18932         (xsum, xsum3, xsum4): Declare as "pure" functions.
18933
18934 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18935
18936         * modules/xalloc (Files): Undo latest change, since xalloc.h
18937         no longer needs SIZE_MAX or PTRDIFF_MAX.
18938
18939 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18940
18941         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
18942         gl_PTRDIFF_MAX.
18943
18944 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18945
18946         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
18947         "return", to pacify some unknown compiler.  Problem reported
18948         by Joerg Schilling.
18949
18950 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18951
18952         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
18953         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
18954         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
18955         heuristic is just as accurate as far as we know, and it removes a
18956         dependency on size_max.m4 and ptrdiff_max.m4.
18957
18958 2003-11-11  Bruno Haible  <bruno@clisp.org>
18959
18960         * modules/xsize (Files): Add m4/size_max.m4.
18961         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
18962
18963 2003-11-11  Bruno Haible  <bruno@clisp.org>
18964
18965         * m4/size_max.m4: New file.
18966         * m4/ptrdiff_max.m4: New file.
18967         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
18968         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
18969         (gl_XALLOC): Invoke it.
18970
18971 2003-11-11  Bruno Haible  <bruno@clisp.org>
18972
18973         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
18974         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
18975         defined.
18976
18977 2003-11-10  Paul Eggert  <eggert@twinsun.com>
18978
18979         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
18980         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
18981         rejected some allocations of exactly SIZE_MAX - 2 bytes.
18982         From Bruno Haible.
18983         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
18984         not (size_t) -1, since it's defined here.
18985
18986 2003-11-09  Karl Berry  <karl@gnu.org>
18987
18988         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
18989
18990 2003-11-06  Paul Eggert  <eggert@twinsun.com>
18991
18992         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
18993         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
18994         Reject sizes of exactly SIZE_MAX bytes.
18995         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
18996         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
18997
18998 2003-11-05  Bruno Haible  <bruno@clisp.org>
18999
19000         * lib/xsize.h: Include limits.h, to avoid a possible collision with
19001         SIZE_MAX defined in <limits.h> on Solaris.
19002
19003 2003-11-04  Jim Meyering  <jim@meyering.net>
19004
19005         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
19006         variable names, rather than @VAR@.
19007         * modules/poll: Likewise.
19008
19009 2003-11-04  Bruno Haible  <bruno@clisp.org>
19010
19011         * modules/xsize: New file.
19012         * modules/linebreak: Depend on xsize.
19013         * MODULES.html.sh (func_all_modules): Add xsize.
19014
19015 2003-11-04  Bruno Haible  <bruno@clisp.org>
19016
19017         * m4/xsize.m4: New file.
19018
19019 2003-11-04  Bruno Haible  <bruno@clisp.org>
19020
19021         * lib/xsize.h: New file.
19022         * lib/linebreak.c: Include xsize.h.
19023         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
19024         argument for overflow.
19025         Suggested by Paul Eggert.
19026
19027 2003-11-03  Karl Berry  <karl@gnu.org>
19028
19029         * config/config.{guess,sub}: update from config.
19030
19031 2003-11-03  Jim Meyering  <jim@meyering.net>
19032
19033         * modules/userspec (lib_SOURCES): Add userspec.h.
19034         (Include): Add "userspec.h".
19035         Improve description.
19036
19037 2003-11-03  Jim Meyering  <jim@meyering.net>
19038
19039         * lib/userspec.c: Include "userspec.h".
19040         * lib/userspec.h: New file.
19041
19042 2003-11-03  Bruno Haible  <bruno@clisp.org>
19043
19044         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
19045
19046 2003-11-03  Bruno Haible  <bruno@clisp.org>
19047
19048         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
19049         available, to avoid (extremely rare) race condition.
19050         Suggested by Paul Eggert.
19051
19052 2003-11-02  Karl Berry  <karl@gnu.org>
19053
19054         * config/srclist.txt (vasprintf.c): sync broken, sigh.
19055
19056 2003-10-31  Paul Eggert  <eggert@twinsun.com>
19057
19058         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
19059         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
19060         (read_filesystem_list): Set and use me_type_malloced.
19061         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
19062         whatever the type happens to be), for brevity and consistency.
19063         Check for size calculation overflow on Alphas running OSF/1.
19064
19065 2003-10-31  Jim Meyering  <jim@meyering.net>
19066
19067         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
19068
19069         * lib/linebuffer.c: Include <string.h> for declaration of memset.
19070
19071 2003-10-30  Paul Eggert  <eggert@twinsun.com>
19072             Bruno Haible  <bruno@clisp.org>
19073
19074         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
19075         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
19076
19077 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
19078
19079         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
19080         netbsd*-gnu*.  Suggested by Robert Millan.
19081
19082 2003-10-29  Paul Eggert  <eggert@twinsun.com>
19083
19084         * modules/group-member: Depend on stdbool.
19085
19086 2003-10-29  Paul Eggert  <eggert@twinsun.com>
19087
19088         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
19089
19090 2003-10-29  Paul Eggert  <eggert@twinsun.com>
19091
19092         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
19093         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
19094         after the 'gnu' in these cases.  This fixes some bugs in the
19095         previous change, and is based on suggestions by Robert Millan.
19096
19097 2003-10-29  Paul Eggert  <eggert@twinsun.com>
19098
19099         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
19100         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
19101         no longer needed.
19102         * lib/quotearg.c (quotearg_n_options): Use it.
19103         * lib/group-member.c: Include <stdbool.h>.
19104         (free_group_info): Arg is now const *; don't free arg.
19105         (get_group_info): Now returns bool and accepts struct group_info *,
19106         rather than returning a malloc'ed struct group_info *.
19107         All uses changed.  Check for overflow in internal size calculation.
19108
19109         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
19110         rather than xmalloc/xrealloc.
19111         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
19112         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
19113         conformance bug: the old code used a pointer after freeing the
19114         storage that it addressed.
19115         * lib/hash.c (hash_initialize): Simplify the code by using
19116         xalloc_oversized rather than doing it by hand.
19117         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
19118         the buffer preserved.  Use free and xmalloc instead.
19119         * lib/quotearg.c (quotearg_n_options): Likewise.
19120         Use a simpler test for size overflow.  Don't use xalloc_oversized
19121         because unsigned int might be wider than size_t (!); this suggests
19122         that we should switch from unsigned int to size_t for slot numbers.
19123
19124 2003-10-28  Paul Eggert  <eggert@twinsun.com>
19125
19126         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
19127         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
19128         NetBSD kernels.  Requested by Richard Stallman.
19129
19130 2003-10-27  Paul Eggert  <eggert@twinsun.com>
19131
19132         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
19133         to allocate the returned structure.  Do not allocate a subarray,
19134         as x2nrealloc will do that.
19135         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
19136         instead of xnrealloc.
19137         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
19138
19139 2003-10-27  Bruno Haible  <bruno@clisp.org>
19140
19141         * lib/stdbool_.h: Better support for BeOS.
19142
19143 2003-10-26  Paul Eggert  <eggert@twinsun.com>
19144
19145         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
19146         now uses inline.
19147
19148 2003-10-26  Paul Eggert  <eggert@twinsun.com>
19149
19150         * lib/xalloc.h (xalloc_oversized): New static inline function, for
19151         callers that want to do their own size-overflow checking.  Include
19152         <stdbool.h>, since xalloc_oversized returns bool.
19153         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
19154         to use xalloc_oversized.
19155
19156         Add two functions x2realloc, x2nrealloc, for programs that grow
19157         arrays dynamically by doubling their sizes.
19158         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
19159         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
19160         New functions.
19161
19162         Port to C99 semantics for 'inline' of external functions.
19163         Bug reported by Bruno Haible.
19164         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
19165         with the old contents of xnmalloc.
19166         (xnmalloc, xmalloc): Use it.
19167         (xnrealloc_inline): New static inline function,
19168         with the old contents of xnrealloc.
19169         (xnrealloc, xrealloc): Use it.
19170
19171         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
19172         that.
19173
19174 2003-10-26  Karl Berry  <karl@gnu.org>
19175
19176         * config/srclist.txt (COPYING.DOC): no longer available from
19177         /gd/gnuorg; don't know where the ultimate source is.
19178
19179 2003-10-25  Paul Eggert  <eggert@twinsun.com>
19180
19181         Fix several address-calculation bugs in the hash modules,
19182         plus some minor code cleanup.
19183
19184         * lib/hash.h: Include <stdbool.h>, for bool.
19185         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
19186         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
19187         hash_get_n_entries, hash_get_max_bucket_length,
19188         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
19189         hash_rehash): Use size_t rather than unsigned.
19190         * lib/hash.c (struct hash_table, hash_get_n_buckets,
19191         hash_get_n_buckets_used, hash_get_n_entries,
19192         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
19193         hash_get_entries, hash_do_for_each, hash_string, is_prime,
19194         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
19195         Likewise.
19196         (SIZE_MAX): Define if not defined.
19197         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
19198         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
19199         hash_print):
19200         Use const * when possible.
19201         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
19202         (check_tuning): Fix bug: if tuning parameters were very close to
19203         0 or 1, rounding errors could have caused subscript violations.
19204         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
19205         (hash_initialize): Add 'fail:' label
19206         to free table and return NULL, and use it to simplify code.
19207         Use calloc rather than clearing the storage ourself.
19208         (hash_initialize, hash_rehash): Check for arithmetic overflow in
19209         buffer size calculations.
19210         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
19211         Include <stddef.h>, for size_t.
19212         * lib/hash-pjw.c (hash_pjw): Likewise.
19213         Switch to method described by Bruno Haible.
19214         Include <limits.h>, for CHAR_BIT.
19215         (SIZE_BITS): New macro.
19216
19217 2003-10-23  Paul Eggert  <eggert@twinsun.com>
19218
19219         * m4/getline.m4 (AM_FUNC_GETLINE):
19220         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
19221         hosts.  Problem reported by Derek Robert Price in
19222         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
19223         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
19224         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
19225
19226 2003-10-21  Paul Eggert  <eggert@twinsun.com>
19227
19228         * lib/getndelim2.c (getndelim2): When size calculation overflows,
19229         ceiling the allocation at NMAX bytes rather than silently
19230         discarding input bytes before NMAX is reached.  This makes
19231         a difference only if NMAX exceeds SIZE_MAX / 2.
19232
19233         * lib/obstack.c: Merge from glibc.
19234         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
19235         Add libc_hidden_def (_obstack_newchunk).
19236         (_obstack_free) [! defined _LIBC]: Remove.
19237         [defined _LIBC]: Make a strong alias from obstack_free, rather than
19238         a clone of the function body.
19239         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
19240         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
19241
19242         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
19243         glibc.
19244         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
19245         arg to memcpy.
19246
19247         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
19248         (obstack_ptr_grow_fast, obstack_int_grow_fast):
19249         Don't use lvalue casts, as GCC plans to remove support for them
19250         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
19251         was also present in the non-GCC version, indicating that this
19252         code had always been buggy and had never been widely used.
19253         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
19254         Use the fast variant of each macro, rather than copying the
19255         definiens of the fast variant; that way, we'll be more likely to
19256         catch future bugs in the fast variants.
19257
19258 2003-10-20  Bruno Haible  <bruno@clisp.org>
19259
19260         * modules/wait-process: New file.
19261         * MODULES.html.sh (func_all_modules): Add wait-process.
19262
19263 2003-10-20  Bruno Haible  <bruno@clisp.org>
19264
19265         * m4/wait-process.m4: New file.
19266
19267 2003-10-20  Bruno Haible  <bruno@clisp.org>
19268
19269         * lib/wait-process.h: New file, from GNU gettext.
19270         * lib/wait-process.c: New file, from GNU gettext.
19271
19272 2003-10-19  Jim Meyering  <jim@meyering.net>
19273
19274         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
19275         HPUX 10.20.
19276
19277 2003-10-18  Karl Berry  <karl@gnu.org>
19278
19279         * config/config.guess: update from config.
19280
19281 2003-10-16  Paul Eggert  <eggert@twinsun.com>
19282
19283         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
19284         (getgroups): First arg is int, not size_t.
19285         Don't let 'free' mangle errno.
19286
19287 2003-10-16  Paul Eggert  <eggert@twinsun.com>
19288
19289         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
19290
19291 2003-10-16  Karl Berry  <karl@gnu.org>
19292
19293         * config/config.{guess,sub}: update from config.
19294
19295 2003-10-16  Jim Meyering  <jim@meyering.net>
19296
19297         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
19298         memcpy.
19299
19300 2003-10-15  Paul Eggert  <eggert@twinsun.com>
19301
19302         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
19303         (SIZE_MAX): Remove.
19304         (new_exclude, add_exclude_file): Initial size no longer needs to
19305         be a power of 2.
19306         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
19307         our own address arithmetic overflow checking.
19308
19309         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
19310         (fnmatch): Do not alloca more than 2000 wide characters;
19311         instead, use malloc for large buffers.
19312         Check for address arithmetic overflow, and return -1
19313         with errno set to ENOMEM in that case.
19314         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
19315         (NEW_PATTERN): Do not alloca more than 8000 bytes;
19316         instead, return -1.  Check for address arithmetic overflow.
19317
19318 2003-10-14  Paul Eggert  <eggert@twinsun.com>
19319
19320         Handle invalid suffixes and overflow independently, so that
19321         callers can treat them independently as needed.  Fix some bugs in
19322         suffix handling, e.g., "100k@" was not diagnosed as an invalid
19323         suffix for a human-readable blocksize.  The major caller-visible
19324         change is the addition of a new
19325         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
19326         that both overflow and suffix chars were found.
19327
19328         * lib/human.c (humblock): Don't check separately for invalid suffix
19329         char; that is xstrtoumax's job (now that its bug is fixed).
19330         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
19331         INTMAX_MAX]: New macros.
19332         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
19333         TYPE_MAXIMUM): New macros.
19334         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
19335         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
19336         if overflow occurs, as it's what __strtol does and it's more useful
19337         in practice.
19338         (__xstrtol): If __strtol reports some error other than ERANGE,
19339         reflect it to the caller as LONGINT_INVALID.  If it reports
19340         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
19341         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
19342         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
19343         value.
19344         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
19345         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
19346         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
19347         [defined UINTMAX_MAX]: New macros.
19348
19349 2003-10-14  Bruno Haible  <bruno@clisp.org>
19350
19351         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
19352
19353 2003-10-14  Bruno Haible  <bruno@clisp.org>
19354
19355         * m4/sig_atomic_t: New file, from GNU gettext.
19356         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
19357
19358 2003-10-14  Bruno Haible  <bruno@clisp.org>
19359
19360         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
19361         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
19362         Also use volatile where needed.
19363
19364 2003-10-12  Paul Eggert  <eggert@twinsun.com>
19365
19366         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
19367         Change maintainer from Bruno Haible to 'all'.
19368
19369 2003-10-12  Paul Eggert  <eggert@twinsun.com>
19370
19371         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
19372
19373 2003-10-12  Paul Eggert  <eggert@twinsun.com>
19374
19375         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
19376         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
19377         and define in terms of the other primitives.
19378         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
19379         (SIZE_MAX): Define if not already defined.
19380         (array_size_overflow): New function.
19381         (xalloc_die): Abort instead of exiting if 'error' returns.
19382         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
19383         (xmalloc, xrealloc): Use them.
19384         (xcalloc): Check for address arithmetic overflow.
19385         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
19386         a bit faster than strcpy.
19387
19388 2003-10-10  Simon Josefsson  <jas@extundo.com>
19389
19390         * modules/argp (Depends-on): Add restrict and strcase.
19391
19392 2003-10-10  Simon Josefsson  <jas@extundo.com>
19393
19394         * m4/argp.m4: Add AC_C_INLINE.
19395
19396 2003-10-08  Paul Eggert  <eggert@twinsun.com>
19397
19398         Merge getpass from libc, plus a few fixes.
19399
19400         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
19401         Include <stdbool.h>.
19402         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
19403         __fsetlocking to empty.
19404         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
19405         do include <bits/libc-lock.h>.
19406         Do not include <fcntl.h>; not needed.
19407         [_LIBC]: Include <wchar.h>.
19408         (NOTCANCEL_MODE): New macro.
19409         (flockfile, funlockfile) [_LIBC]: New macros.
19410         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
19411         [!_LIBC]: New macros.
19412         (call_fclose): New function.
19413         (getpass): Use it.  Save tty stream separately; this simplifies the
19414         code and makes it more reliable if stdin happens to equal stdout.
19415         Invoke __fsetlocking on tty.
19416         Handle thread cancellation if needed.
19417         Namespace cleanup (use __tcgetattr, __getline).
19418         Use bool for Booleans.
19419         [USE_IN_LIBIO]: Handle wide streams.
19420         [!_LIBC]: Unconditionally do the fseek, since we don't know what
19421         stream might go where.
19422
19423         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
19424         doesn't have to include <stdio.h> before us.
19425         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
19426         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
19427         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
19428         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
19429         if not declared, so that we can use getpass.c code from libc without
19430         rewriting it.
19431         (flockfile, ftrylockfile, funlockfile): New macros.
19432
19433 2003-10-08  Paul Eggert  <eggert@twinsun.com>
19434
19435         * modules/getpass: Depend on stdbool.
19436
19437 2003-10-08  Paul Eggert  <eggert@twinsun.com>
19438
19439         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
19440
19441 2003-10-07  Karl Berry  <karl@gnu.org>
19442
19443         * config/config.{guess,sub}: update from config.
19444
19445 2003-10-06  Jim Meyering  <jim@meyering.net>
19446             Bruno Haible  <bruno@clisp.org>
19447
19448         This lets translators provide better translations for the
19449         "Written by ..." part of --version output.
19450         * lib/version-etc.h: Include stdarg.h.
19451         (version_etc_copyright): Declare as readonly.
19452         (version_etc): Make this function variadic with a NULL-terminated list
19453         of author name strings.
19454         (version_etc_va): New declaration.
19455         * lib/version-etc.c: Include stdarg.h, stdlib.h.
19456         (version_etc_copyright): Declare as readonly.
19457         (version_etc_va): New function. Provide a different translatable string
19458         for each possible number of authors < 10. Abbreviate when there are 10
19459         authors or more.
19460         (version_etc): Make this function variadic. Call version_etc_va.
19461         Suggestion from Gary V. Vaughan.
19462
19463         * lib/long-options.h (parse_long_options): Change prototype: the
19464         authors string is moved to the end and becomes variadic.
19465         * lib/long-options.c: Include stdarg.h.
19466         (parse_long_options): Make this function variadic, too.
19467         Call version_etc_va, not version_etc.
19468
19469 2003-10-06  Bruno Haible  <bruno@clisp.org>
19470
19471         * modules/version-etc-2: Remove file.
19472         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
19473
19474 2003-10-06  Bruno Haible  <bruno@clisp.org>
19475
19476         * modules/fatal-signal: New file.
19477         * MODULES.html.sh (func_all_modules): Add fatal-signal.
19478
19479 2003-10-06  Bruno Haible  <bruno@clisp.org>
19480
19481         * m4/fatal-signal.m4: New file.
19482         * m4/signalblocking.m4: New file, from GNU gettext.
19483
19484 2003-10-06  Bruno Haible  <bruno@clisp.org>
19485
19486         * lib/version-etc-2.h: Remove file.
19487         * lib/version-etc-2.c: Remove file.
19488
19489 2003-10-06  Bruno Haible  <bruno@clisp.org>
19490
19491         * lib/fatal-signal.h: New file, from GNU gettext.
19492         * lib/fatal-signal.c: New file, from GNU gettext.
19493
19494 2003-10-05  Paul Eggert  <eggert@twinsun.com>
19495
19496         * README: Rework advice for preventing empty .o files.
19497         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
19498         not <sys/types.h>.
19499
19500 2003-10-04  Karl Berry  <karl@gnu.org>
19501
19502         * lib/argp*: update from libc.
19503
19504 2003-10-04  Karl Berry  <karl@gnu.org>
19505
19506         * config/config.{guess,sub}: update from config.
19507
19508 2003-10-02  Bruno Haible  <bruno@clisp.org>
19509
19510         * modules/lchown (Include): Add lchown.h.
19511         * modules/time_r (Include): Use "..." syntax.
19512         * modules/xgetdomainname (Include): Add xgetdomainname.h.
19513
19514 2003-10-01  Simon Josefsson  <jas@extundo.com>
19515
19516         * MODULES.html.sh (func_all_modules): Move gethostname from section
19517         'based on' to section 'lacking' POSIX:2001.
19518
19519 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
19520
19521         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
19522         to output mode on the same stream.
19523
19524 2003-09-29  Paul Eggert  <eggert@twinsun.com>
19525
19526         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
19527         Fix arg typo in previous patch.
19528
19529 2003-09-28  Jim Meyering  <jim@meyering.net>
19530
19531         * lib/error.c: Correct cpp indentation.
19532
19533 2003-09-27  Paul Eggert  <eggert@twinsun.com>
19534
19535         * modules/free: New file.
19536
19537 2003-09-27  Paul Eggert  <eggert@twinsun.com>
19538
19539         * m4/free.m4: New file.
19540
19541 2003-09-27  Paul Eggert  <eggert@twinsun.com>
19542
19543         * lib/minmax.h (MIN, MAX)
19544         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
19545         Omit the special code that used __typeof__, since we worry that
19546         it could be more trouble than it's worth.  See:
19547         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
19548         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
19549
19550         * lib/free.c: New file.
19551
19552 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
19553
19554         Trivial fixes to Makefile.am parts of module listings.
19555         * modules/strstr: Append strstr.h to lib_SOURCES.
19556         * modules/strcase: Likewise, for strcase.h.
19557
19558 2003-09-27  Karl Berry  <karl@gnu.org>
19559
19560         * config/mkinstalldirs: update from automake.
19561
19562 2003-09-26  Paul Eggert  <eggert@twinsun.com>
19563
19564         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
19565         (error_tail): Do not loop, reallocating temporary buffer, since
19566         the output cannot contain more wide characters than the input
19567         contains bytes, the size must be big enough already.  This avoids
19568         one potential size overflow calculation.  Check for size overflow
19569         when calculating temporary buffer size.  Free temporary buffer
19570         when done, if it was allocated with malloc; this plugs a memory
19571         leak.  Remove casts from void * to pointers, that are no longer
19572         needed now that we're assuming C89 or better.
19573
19574         Merge error changes from glibc.
19575
19576         * lib/error.c, error.h: Update copyright notice header to match glibc.
19577         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
19578         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
19579         Disable cancellation while printing error.
19580         * lib/error.h: Prepend __ to parameter names.
19581
19582 2003-09-26  Jim Meyering  <jim@meyering.net>
19583
19584         * lib/error.c (error_tail): Move some declarations
19585         into inner scope where the local variables are used.
19586
19587 2003-09-26  Bruno Haible  <bruno@clisp.org>
19588
19589         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
19590         stpncpy().
19591         Don't define stpncpy through config.h; it's now done through stpncpy.h.
19592
19593 2003-09-26  Bruno Haible  <bruno@clisp.org>
19594
19595         * lib/stpncpy.h (gnu_stpncpy): New declaration.
19596         (stpncpy): Define as alias for gnu_stpncpy.
19597         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
19598
19599 2003-09-25  Simon Josefsson  <jas@extundo.com>
19600
19601         * lib/xgetdomainname.h: New file.
19602         * lib/xgetdomainname.c: New file.
19603
19604 2003-09-25  Simon Josefsson  <jas@extundo.com>
19605             Bruno Haible  <bruno@clisp.org>
19606
19607         * modules/getdomainname: New file.
19608         * modules/xgetdomainname: New file.
19609         * MODULES.html.sh (func_all_modules): Add getdomainname,
19610         xgetdomainname.
19611
19612 2003-09-25  Simon Josefsson  <jas@extundo.com>
19613             Bruno Haible  <bruno@clisp.org>
19614
19615         * m4/getdomainname.m4: New file.
19616
19617 2003-09-25  Simon Josefsson  <jas@extundo.com>
19618             Bruno Haible  <bruno@clisp.org>
19619
19620         * lib/getdomainname.h: New file.
19621         * lib/getdomainname.c: New file.
19622
19623 2003-09-25  Karl Berry  <karl@gnu.org>
19624
19625         * lib/argp-fmtstream.c, argp-help.c: update from libc.
19626
19627 2003-09-25  Karl Berry  <karl@gnu.org>
19628
19629         * config/install-sh: update from automake.
19630
19631 2003-09-25  Bruno Haible  <bruno@clisp.org>
19632
19633         * modules/version-etc-2: New file, from modules/version-etc with
19634         modifications.
19635         * MODULES.html.sh (func_all_modules): Add version-etc-2.
19636
19637 2003-09-25  Bruno Haible  <bruno@clisp.org>
19638
19639         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
19640         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
19641
19642 2003-09-24  Simon Josefsson  <jas@extundo.com>
19643
19644         * modules/xgethostname: Add xgethostname.h.
19645
19646 2003-09-24  Paul Eggert  <eggert@twinsun.com>
19647
19648         * lib/linebuffer.c (freebuffer): Don't free the argument, just
19649         the buffer associated with the argument.  Bug reported by
19650         Simon Josefsson.
19651
19652 2003-09-24  Paul Eggert  <eggert@twinsun.com>
19653
19654         * README: Document assumptions that 'int' is at least 32 bits
19655         wide, that integer arithmetic is 2's complement without overflow,
19656         that there are no holes in integer values, that adding sizes of
19657         two nonoverlapping objects can't overflow, and that all-bits-zero
19658         yields scalar zero.  Fix spelling and capitalization typos.
19659
19660 2003-09-19  Karl Berry  <karl@gnu.org>
19661
19662         * lib/argp.h: update from libc.
19663
19664 2003-09-17  Paul Eggert  <eggert@twinsun.com>
19665
19666         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
19667         to avoid spurious warnings like "AC_RUN_IFELSE was called before
19668         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
19669
19670 2003-09-17  Paul Eggert  <eggert@twinsun.com>
19671
19672         * gnulib-tool: Use "test -h", not "test -L", for portability
19673         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
19674         (tags_regexp): Remove, since \| doesn't conform to POSIX.
19675         (sed_extract_prog): Issue s commands one-by-one, rather than
19676         using \| in one s command.
19677
19678 2003-09-16  Paul Eggert  <eggert@twinsun.com>
19679
19680         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
19681         input error, instead of returning NULL the next time we are called
19682         (and therefore losing track of errno).
19683
19684 2003-09-16  Bruno Haible  <bruno@clisp.org>
19685
19686         * gnulib-tool (func_create_testdir): Warn about duplicated
19687         dependencies.
19688
19689 2003-09-15  Paul Eggert  <eggert@twinsun.com>
19690
19691         * modules/argmatch, modules/fatal, modules/obstack,
19692         modules/xalloc, modules/xgethostname: Sort dependencies by
19693         importance, not alphabetically.
19694
19695 2003-09-15  Paul Eggert  <eggert@twinsun.com>
19696
19697         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
19698         fails, so that the caller gets the proper errno.
19699
19700         * lib/readutmp.c (read_utmp): Likewise.
19701         Check for fstat error.  Close stream and free storage
19702         when failing.
19703
19704 2003-09-14  Karl Berry  <karl@gnu.org>
19705
19706         * config/srclist.txt (strdup.c): disable for c89 changes.
19707
19708 2003-09-14  Jim Meyering  <jim@meyering.net>
19709
19710         * lib/getloadavg.c: Correct cpp indentation.
19711         * lib/strdup.c: Likewise.
19712         * lib/vasnprintf.c: Likewise.
19713
19714 2003-09-14  Bruno Haible  <bruno@clisp.org>
19715
19716         * modules/fwriteerror: New file.
19717         * MODULES.html.sh (func_all_modules): Add fwriteerror.
19718
19719 2003-09-14  Bruno Haible  <bruno@clisp.org>
19720
19721         * lib/fwriteerror.h: New file.
19722         * lib/fwriteerror.c: New file.
19723
19724 2003-09-12  Paul Eggert  <eggert@twinsun.com>
19725
19726         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
19727         modules/xgethostname, modules/xalloc: Depend on exit.
19728
19729 2003-09-12  Paul Eggert  <eggert@twinsun.com>
19730
19731         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
19732
19733         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
19734         and AC_MINIX, too, so that their extensions are available.
19735
19736         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
19737         This macro has been superseded by gl_BACKUPFILE.
19738
19739         More patches to assume C89 or better.
19740
19741         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
19742
19743         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
19744         unconditionally.
19745         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
19746         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
19747         Include <string.h>, <stdlib.h> unconditionally.
19748         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
19749         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
19750         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
19751         headers or for string.h.
19752         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
19753         or strtoul.
19754
19755         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
19756         headers.
19757         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
19758         * m4/userspec.m4 (gl_USERSPEC): Likewise.
19759         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
19760         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
19761         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
19762         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
19763         memcpy, memset.
19764         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
19765         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
19766         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
19767         strtol.
19768         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
19769         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
19770         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
19771         strtoul.
19772
19773 2003-09-12  Paul Eggert  <eggert@twinsun.com>
19774
19775         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
19776         * lib/obstack.c [!defined _LIBC]: Likewise.
19777         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
19778         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
19779         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
19780
19781         More changes to assume C89 or better.
19782
19783         * lib/error.c (error_tail): Assume vprintf.
19784
19785         * lib/argmatch.c (getenv): Remove decl.
19786         * lib/progreloc.c (get_full_program_name): Define via prototype.
19787         * lib/setenv.c (clearenv): Likewise.
19788         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
19789         needed.
19790         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
19791         (malloc, memcpy): Remove decls.
19792         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
19793         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
19794         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
19795         (memcpy): Remove macro.
19796         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
19797         (__P): Remove.  All uses removed.
19798         (PTR): Remove.  All uses changed to void *.
19799         (CHAR_BIT, NULL): Remove.
19800         (spaces, zeros, memset_space, memset_zero)
19801         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
19802         Remove.
19803         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
19804         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
19805         Define with prototype.
19806         Remove now-unnecessary prototype decl.
19807         (extra_args_spec): Assume ANSI C.  All uses changed.
19808         (extra_args_spec_iso): Remove.
19809         (my_strftime, emacs_strftimeu): Define via prototype.
19810         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
19811         unconditionally.
19812         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
19813         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
19814         (strtoul, strtol): Remove decls.
19815         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
19816         LONG_MAX): Remove.
19817         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
19818         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
19819         (LOCALE_PARAM_PROTO): New macro.
19820         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
19821         (INTERNAL (strtol), strtol): Define with a prototype.
19822         (PARAMS): Remove.  All uses removed.
19823         * lib/tempname.c: Include <string.h> unconditionally.
19824         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
19825         * lib/xgethostname.c (main): Define with a prototype.
19826         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
19827         Include <stdlib.h> unconditionally.
19828         (calloc, malloc, realloc, free): Remove decls.
19829         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
19830         Include <stdlib.h> unconditionally.  Sort include file names.
19831         (strtod): Remove.
19832         (xstrtod): Define with a prototype.
19833         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
19834         (strtol, strtoul): Remove decls.
19835
19836 2003-09-11  Paul Eggert  <eggert@twinsun.com>
19837
19838         More patches to assume C89 or better.
19839         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
19840         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
19841         string.h, memchr, STDC_HEADERS.
19842
19843 2003-09-11  Paul Eggert  <eggert@twinsun.com>
19844
19845         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
19846         Include <stdlib.h>, <string.h> unconditionally.
19847         Remove now-unnecessary cast to char *.
19848         * lib/strnlen.c: Include <string.h> unconditionally.
19849         * lib/yesno.c (yesno): Define with a prototype.
19850
19851 2003-09-11  Bruno Haible  <bruno@clisp.org>
19852
19853         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
19854
19855 2003-09-10  Jim Meyering  <jim@meyering.net>
19856
19857         * lib/error.c: Correct indentation of cpp directives.
19858
19859 2003-09-10  Bruno Haible  <bruno@clisp.org>
19860
19861         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
19862         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
19863         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
19864         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
19865         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
19866         <stdlib.h> and <string.h> checks.
19867         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
19868         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
19869
19870 2003-09-10  Bruno Haible  <bruno@clisp.org>
19871
19872         * lib/strcspn.c: Include <string.h> unconditionally.
19873         * lib/strpbrk.c: Include <string.h> unconditionally.
19874         * lib/strstr.c: Include <string.h> unconditionally.
19875         * lib/unicodeio.c: Include <string.h> unconditionally.
19876         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
19877         * lib/unsetenv.c: Likewise.
19878         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
19879         * lib/yesno.c: Include <stdlib.h> unconditionally.
19880         (rpmatch): Add prototype.
19881
19882 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19883
19884         More patches to assume C89 or better.
19885         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
19886         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
19887         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
19888         or for string.h.
19889         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
19890         stdlib.h.
19891         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
19892         C headers.
19893         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
19894         string.h.
19895         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
19896         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
19897         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
19898         or for string.h.
19899         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
19900         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
19901         C headers.
19902         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
19903         memcpy.
19904         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
19905         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
19906         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
19907         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
19908         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
19909         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
19910         string.h, free.
19911         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
19912         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
19913         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
19914         C headers, or for string.h.
19915         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
19916         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
19917         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
19918         headers, memory.h, stdlib.h, string.h, strings.h.
19919         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
19920         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
19921         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
19922         strchr.
19923         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
19924         headers, memory.h, string.h.
19925         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
19926         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
19927         free.
19928         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
19929         headers.
19930         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
19931         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
19932         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
19933         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
19934         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
19935
19936 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19937
19938         More K&R removal.
19939
19940         * lib/acosl.c (main): Use a prototype.
19941         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
19942         tanl.c: Likewise.
19943
19944         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
19945
19946         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
19947         (getopt, etopt_long, getopt_long_only, _getopt_internal)
19948         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
19949         with a prototype.
19950         * lib/getopt.c (const): Remove macro.
19951         Include <string.h> unconditionally.
19952         (my_index): Remove; all uses changed to strchr.
19953         (strlen): Remove decl.
19954         (exchange): Remove forward decl; no longer needed.
19955         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
19956         Define with prototype.
19957         * lib/getopt1.c (const): Remove macro.
19958         (getopt_long, getopt_long_only, main): Define with prototype.
19959
19960         * lib/getugroups.c: Include <string.h> unconditionally.
19961
19962         * lib/getusershell.c: Include <stdlib.h> unconditionally.
19963         (getusershell, setusershell, endusershell, readname, main):
19964         Define with prototypes.
19965
19966         * lib/group-member.c: Include group-member.h first.
19967         Include <stdlib.h> unconditionally.
19968
19969         * lib/hard-locale.c: Include hard-locale.h first.
19970         Include <stdlib.h>, <string.h> unconditionally.
19971
19972         * lib/hash.c (free, malloc): Remove decls.
19973         Include <stdlib.h> unconditionally.
19974
19975         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
19976         (getenv): Do not declare.
19977
19978         * lib/idcache.c: Include <string.h> unconditionally.
19979
19980         * lib/long-options.c: Include long-options.h first, to test interface.
19981         Include <stdlib.h> unconditionally.
19982
19983         * lib/makepath.c: Include makepath.h first, to test interface.
19984         Include <stdlib.h> and <string.h> unconditionally.
19985
19986         * lib/linebuffer.c: Include <stdlib.h>.
19987         (free): Remove decl.
19988
19989         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
19990         stddef.h. rpl_malloc returns void *, not char *.
19991         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
19992         prototype.
19993
19994         * lib/md5.h: Include <limits.h> unconditionally.
19995         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
19996         (__P): Remove; all uses removed.
19997         * lib/md5.c: Include "md5.h" first.
19998         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
19999         md5_buffer, md5_process_bytes, md5_process_block):
20000         Define with prototypes.
20001         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
20002         * lib/sha.c: Include "sha.h" first.
20003         Include <stdlib.h>, <string.h> unconditionally.
20004
20005         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
20006         * lib/memcmp.c (__ptr_t): Likewise.
20007         * lib/memrchr.c (__ptr_t): Likewise.
20008         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
20009         Include <string.h> unconditionally.
20010         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
20011         * lib/memchr.c: Include <stdlib.h> unconditionally.
20012         * lib/memchr.c (LONG_MAX): Remove.
20013         * lib/memrchr.c (LONG_MAX): Likewise.
20014         * lib/memchr.c (__memchr): Define via a prototype.
20015         * lib/memrchr.c (__memrchr): Likewise.
20016         * lib/memcmp.c (__P): Remove, and remove all uses.
20017         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
20018         Remove forward decls; no longer needed.
20019         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
20020         Use types required by C89 in prototype.
20021
20022         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
20023         * lib/savedir.c: Likewise.
20024         * lib/mkdir.c (free): Remove decl.
20025         * lib/rmdir.c (rmdir): Define with a prototype.
20026         * lib/savedir.c: Include savedir.h first, to test interface.
20027
20028         * lib/mktime.c (STDC_HEADERS): Remove.
20029         Include <stdlib.h>, <string.h> unconditionally.
20030
20031         * lib/modechange.c: Include <stdlib.h> unconditionally.
20032         (malloc): Remove decl.
20033
20034         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
20035         (free): Remove decl.
20036
20037         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
20038         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
20039         (This type really should be intptr_t, but that's a C99ism.)
20040         (_obstack_memcpy): Remove: all uses changed to memcpy.
20041         Include <string.h> unconditionally.
20042         (struct obstack): Assume __STDC__ for types of members
20043         chunkfun, freefun, extra_arg.
20044         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
20045         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
20046         obstack_begin, obstack_specify_allocation,
20047         obstack_specify_allocation_with_arg, obstack_chunkfun,
20048         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
20049         Remove unprototyped decls and the macros that use them.
20050         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
20051         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
20052         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
20053         (defined __STDC__ && __STDC__)]:
20054         Remove nonprototyped code.
20055         Include <stdlib.h> unconditionally.
20056         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
20057         _obstack_allocated_p, _obstack_free, obstack_free,
20058         _obstack_memory_used, print_and_abort):
20059         Define using prototypes.
20060         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
20061         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
20062         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
20063         obstack_next_free, obstack_object_size, obstack_room) [0]:
20064         Remove unused, unprototyped code.
20065
20066         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
20067
20068         * lib/physmem.c (physmem_total, physmem_available, main): Define
20069         with prototypes.
20070
20071         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
20072         (main): Define with a prototype.
20073
20074         * lib/posixver.c (getenv): Remove decl.
20075
20076         * lib/putenv.c (malloc): Returns void *, not char *.
20077         Include <string.h> unconditionally.
20078         (strchr, memcpy, NULL): Do not define.
20079
20080         * lib/readtokens.c: Include readtokens.h first, to test interface.
20081         Include <stdlib.h>, <string.h> unconditionally.
20082         (init_tokenbuffer): Define with a prototype.
20083
20084         * lib/regex.c (PARAMS): Remove.  All uses removed.
20085         All uses of _RE_ARGS removed, too.
20086         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
20087         unconditionally.
20088         (bzero): Assume memset exists.
20089         (memcmp, memcpy, NULL): Remove.
20090         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
20091         char, or assignments to local vars of type signed char.
20092         (init_syntax_once, PREFIX(extract_number_and_incr),
20093         PREFIX(print_partial_compiled_pattern),
20094         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
20095         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
20096         PREFIX(regex_grow_registers), PREFIX(regex_compile),
20097         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
20098         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
20099         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
20100         wcs_compile_range, byte_compile_range, truncate_wchar,
20101         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
20102         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
20103         count_mbs_length, wcs_re_match_2_internal,
20104         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
20105         PREFIX(alt_match_null_string_p),
20106         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
20107         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
20108         regfree, PREFIX(extract_number)): Define with prototype.  Remove
20109         now-unnecessary declaration, if any.
20110         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
20111         regcomp, regexec):
20112         Remove now-unnecessary casts among pointer types.
20113         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
20114
20115         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
20116         (free): Remove decl.
20117
20118         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
20119
20120         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
20121         (free): Remove decl.
20122
20123         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
20124         * lib/xgetcwd.c: Likewise.
20125
20126         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
20127         (free): Remove decl.
20128
20129         * lib/strchrnul.c (strchrnul): Define with a prototype.
20130         Fix bug: c_in was not converted to char before searching.
20131
20132         The following changes are not K&R related:
20133
20134         * lib/group-member.h: Include <sys/types.h>, so that this file is
20135         self-contained.
20136         * lib/makepath.h: Likewise.
20137
20138         * lib/getusershell.c (readname, default_index, line_size, readname):
20139         Use size_t, not int, for sizes.
20140         (readname): If the size overflows, report an error instead of
20141         looping forever.
20142
20143 2003-09-09  Paul Eggert  <eggert@twinsun.com>
20144
20145         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
20146         libc.
20147
20148 2003-09-09  Paul Eggert  <eggert@twinsun.com>
20149
20150         * README: New section: portability guidelines.
20151
20152 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
20153
20154         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
20155         C89 spec.
20156
20157 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
20158
20159         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
20160
20161 2003-09-08  Paul Eggert  <eggert@twinsun.com>
20162
20163         Assume C89 or better; remove K&R cruft.
20164         A few of these changes were first proposed by Derek Robert Price
20165         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
20166
20167         * lib/addext.c: Include <string.h> unconditionally.
20168         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
20169         Don't declare getenv or malloc.
20170
20171         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
20172         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
20173         (NULL): Remove.
20174         (find_stack_direction, alloca): Use prototypes.
20175
20176         * lib/atexit.c (atexit): Define using a prototype.
20177
20178         * lib/basename.c, dirname.c, stripslash.c:
20179         Include <string.h> unconditionally.
20180
20181         * lib/bcopy.c: Include <stddef.h>.
20182         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
20183
20184         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
20185
20186         * lib/error.h (error, error_at_line, error_print_progname)
20187         [! (defined (__STDC__) && __STDC__)]: Remove decls.
20188         * lib/error.c: Include error.h first, to check interface.
20189         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
20190         (VA_START): Remove; all uses changeed to va_start.
20191         (exit, strerror): Remove decls.
20192         (error_print_progname): Prototype uncondionally.
20193         Don't include <errno.h>; no longer needed.
20194         (private_strerror): Remove.
20195         (error_tail): Always define.
20196         (error, error_at_line): Assume C89 or better; always use prototypes.
20197         * lib/fatal.c: Include "fatal.h" first, to test interface.
20198         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
20199         (VA_START): Remove; all uses changed to va_start.
20200         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
20201         this case.
20202         (exit): Remove decl.
20203         (fatal): Prototype unconditionally.  Assume va_start works.
20204         Abort at end, to pacify gcc.
20205
20206         * lib/euidaccess.c (main): Define with a prototype.
20207
20208         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
20209
20210         * lib/exitfail.c: Include <stdlib.h> unconditionally.
20211
20212         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
20213         prototypes.
20214         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
20215         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
20216         (getenv): Remove decl.
20217         (fnmatch): Define using a prototype.
20218         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
20219         (FCT): Define using a prototype.
20220
20221         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
20222
20223         * lib/gethostname.c: Include <stddef.h>.
20224         (gethostname): Define with prototype.  Length is size_t, not int.
20225
20226 2003-09-08  Paul Eggert  <eggert@twinsun.com>
20227
20228         Assume C89 or better; remove K&R cruft.
20229         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
20230         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
20231         string.h, getenv, malloc.
20232         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
20233         headers.
20234         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
20235         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
20236         do not check for strerror.
20237         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
20238         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
20239         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
20240         do not check for doprnt or vprintf.
20241         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
20242         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
20243
20244 2003-09-08  Paul Eggert  <eggert@twinsun.com>
20245
20246         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
20247         getversion.c should have been removed then, but was accidentally
20248         preserved.
20249
20250         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
20251         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
20252
20253 2003-09-08  Karl Berry  <karl@gnu.org>
20254
20255         * config/config.sub, config.guess, srclistvars.sh: update from savannah
20256                 config, forget about prep.
20257
20258         * config/depcomp, missing: update from automake.
20259
20260 2003-09-07  Paul Eggert  <eggert@twinsun.com>
20261
20262         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
20263         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
20264
20265 2003-09-07  Paul Eggert  <eggert@twinsun.com>
20266
20267         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
20268         copy_tm_result.  Bug reported by Simon Josefsson in
20269         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
20270
20271 2003-09-06  Paul Eggert  <eggert@twinsun.com>
20272
20273         * m4/time_r.m4: New file.
20274         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
20275         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
20276         is. Check for timegm declaration.
20277         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
20278         Do not check for gmtime_r.
20279         Replace mktime if __mktime_internal does not exist and if mktime
20280         hasn't been replaced already.
20281
20282 2003-09-06  Paul Eggert  <eggert@twinsun.com>
20283
20284         * lib/time_r.c, lib/time_r.h: New files.
20285
20286         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
20287         __localtime_r.
20288         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
20289         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
20290
20291         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
20292         __gmtime_r.
20293         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
20294         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
20295         Include <time_r.h>.
20296
20297         * lib/timegm.c: Switch to glibc implementation, with the following
20298         changes:
20299         [defined HAVE_CONFIG_H]: Include <config.h>.
20300         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
20301         (__mktime_internal) [!defined _LIBC]: New decl.
20302         (__gmtime_r) [!defined _LIBC]: New macro and function.
20303         (timegm): Use a prototype, since gnulib assumes C89.
20304         Do not bother declaring tmp to be const, as it's not really usefu.
20305         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
20306         (timegm): Declare only if HAVE_DECL_TIMEGM.
20307
20308 2003-09-06  Paul Eggert  <eggert@twinsun.com>
20309
20310         * MODULES.html.sh (func_all_modules): Add time_r.
20311         * modules/time_r: New file.
20312         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
20313         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
20314
20315 2003-09-03  Paul Eggert  <eggert@twinsun.com>
20316
20317         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
20318         Bug reported by Lute Kamstra in
20319         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
20320
20321         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
20322         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
20323         course with correspondingly smaller numbers for tomorrow and
20324         yesterday.  From Tadayoshi Funaba.  Originally installed into
20325         sh-utils on 1999-08-07, but the patch got lost (I guess during the
20326         coreutils merge?).
20327
20328 2003-08-31  Simon Josefsson  <jas@extundo.com>
20329
20330         * modules/timegm: New file.
20331         * MODULES.html.sh (func_all_modules): Add timegm.
20332
20333 2003-08-31  Simon Josefsson  <jas@extundo.com>
20334
20335         * m4/timegm.m4: New file.
20336
20337 2003-08-31  Simon Josefsson  <jas@extundo.com>
20338
20339         * lib/timegm.h: New file.
20340         * lib/timegm.c: New file.  Based on
20341         wget-1.8.2/src/http.c:mktime_from_utc.
20342
20343 2003-08-31  Karl Berry  <karl@gnu.org>
20344
20345         * lib/argp.h: update from libc.
20346
20347 2003-08-28  Bruno Haible  <bruno@clisp.org>
20348
20349         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
20350         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
20351         followed by '#define fnmatch fnmatch_posix' gives an error.
20352
20353 2003-08-28  Bruno Haible  <bruno@clisp.org>
20354
20355         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
20356         warning on QNX, which defines O_BINARY to 000000.
20357
20358 2003-08-27  Jim Meyering  <jim@meyering.net>
20359
20360         * m4/mkstemp.m4: Require that the system mkstemp be able to create
20361         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
20362         would fail after 32.  Reported by Danny Levinson.  Details here:
20363         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
20364
20365 2003-08-24  Bruno Haible  <bruno@clisp.org>
20366
20367         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
20368         MSVC7 <stdio.h> is included later.
20369
20370 2003-08-22  Simon Josefsson  <jas@extundo.com>
20371
20372         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
20373
20374 2003-08-20  Karl Berry  <karl@gnu.org>
20375
20376         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
20377
20378 2003-08-20  Bruno Haible  <bruno@clisp.org>
20379
20380         * modules/progname: New file.
20381         * MODULES.html.sh (func_all_modules): Add progname.
20382
20383 2003-08-20  Bruno Haible  <bruno@clisp.org>
20384
20385         * lib/progname.h: New file, from GNU gettext.
20386         * lib/progname.c: New file, from GNU gettext.
20387         * lib/progreloc.c: New file, from GNU gettext.
20388
20389 2003-08-19  Jim Meyering  <jim@meyering.net>
20390
20391         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
20392         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
20393
20394 2003-08-19  Bruno Haible  <bruno@clisp.org>
20395
20396         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
20397         more.
20398
20399 2003-08-19  Bruno Haible  <bruno@clisp.org>
20400
20401         * lib/xstrdup.c: Assume <string.h> exists.
20402
20403 2003-08-18  Paul Eggert  <eggert@twinsun.com>
20404
20405         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
20406         in makefile rules.
20407
20408 2003-08-18  Jim Meyering  <jim@meyering.net>
20409
20410         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
20411         * m4/lib-ld.m4: Likewise.
20412
20413 2003-08-18  Jim Meyering  <jim@meyering.net>
20414
20415         * lib/setenv.h: Indent nested cpp directive.
20416         * lib/vasnprintf.c: Remove trailing blanks.
20417
20418 2003-08-17  Simon Josefsson  <jas@extundo.com>
20419
20420         * modules/xstrndup: New file.
20421         * MODULES.html.sh (func_all_modules): Add xstrndup.
20422
20423 2003-08-17  Simon Josefsson  <jas@extundo.com>
20424
20425         * modules/argp: Fix autoconf macro name. Add more dependencies.
20426
20427 2003-08-17  Simon Josefsson  <jas@extundo.com>
20428
20429         * m4/xstrndup.m4: New file.
20430
20431 2003-08-17  Simon Josefsson  <jas@extundo.com>
20432
20433         * m4/argp.m4: New file.
20434
20435 2003-08-17  Simon Josefsson  <jas@extundo.com>
20436             Bruno Haible  <bruno@clisp.org>
20437
20438         * lib/xstrndup.h: New file.
20439         * lib/xstrndup.c: New file.
20440
20441 2003-08-17  Bruno Haible  <bruno@clisp.org>
20442
20443         * modules/strndup (Files, Include): Add lib/strndup.h.
20444
20445 2003-08-17  Bruno Haible  <bruno@clisp.org>
20446
20447         * modules/euidaccess (Files): Add lib/euidaccess.h.
20448
20449 2003-08-17  Bruno Haible  <bruno@clisp.org>
20450
20451         * lib/strndup.h: New file.
20452
20453 2003-08-17  Bruno Haible  <bruno@clisp.org>
20454
20455         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
20456         like AC_GNU_SOURCE.
20457         * modules/extensions (configure.ac): Comment out the invocation of
20458         gl_USE_SYSTEM_EXTENSIONS.
20459
20460 2003-08-16  Paul Eggert  <eggert@twinsun.com>
20461
20462         Merges from coreutils, etc.
20463         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
20464         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
20465         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
20466         fixing a typo.
20467         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
20468         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
20469
20470 2003-08-16  Paul Eggert  <eggert@twinsun.com>
20471
20472         Document merge from coreutils.
20473         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
20474         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
20475         * modules/utime: Add m4/utimes-null.m4.
20476
20477 2003-08-16  Paul Eggert  <eggert@twinsun.com>
20478
20479         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
20480         space, undoing this 2003-08-12 change:
20481         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
20482
20483 2003-08-16  Paul Eggert  <eggert@twinsun.com>
20484
20485         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
20486         strtoul.c from libc, undoing this 2003-08-12 change:
20487         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
20488
20489 2003-08-16  Jim Meyering  <jim@meyering.net>
20490
20491         Merges from coreutils.
20492         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
20493         prefix.  Adjust cache variables similarly.  Create 500 rather than
20494         just 300 files, to exercise bug on Darwin6.5, too.
20495         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
20496         $missing_dir.
20497         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
20498         AM_SYS_POSIX_TERMIOS.
20499         Reported by mkc@mathdogs.com.
20500         Also change use of $am_cv_sys_posix_termios
20501         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
20502         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
20503         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
20504         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
20505         in /proc/mounts until it finds one with matching device number.  This
20506         is unnecessary when the FILE argument *is* a mount point.  No stat call
20507         is necessary in that case.  So, disable the statvfs-testing code on
20508         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
20509         as RedHat bug# 84846.
20510         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
20511         to 1MB, so as not to render systems with no stack size limit (e.g.,
20512         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
20513         Include <unistd.h>.  On some systems,
20514         it is required for the definition of _SC_PAGESIZE.
20515
20516 2003-08-16  Jim Meyering  <jim@meyering.net>
20517
20518         Merge from coreutils.
20519         * lib/xstrtoimax.c: #else #if -> #elif.
20520         * lib/xstrtoumax.c: Likewise.
20521
20522 2003-08-16  Jim Meyering  <jim@meyering.net>
20523
20524         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
20525         * m4/utimes.m4: Removed.
20526         * m4/utimes-null.m4: Renamed from utimes.m4.
20527
20528         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
20529         to 1MB, so as not to render systems with no stack size limit (e.g.,
20530         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
20531         Include <unistd.h>.  On some systems,
20532         it is required for the definition of _SC_PAGESIZE.
20533
20534 2003-08-16  Jim Meyering  <jim@meyering.net>
20535         and Paul Eggert  <eggert@cs.ucla.edu>
20536
20537         Merges from coreutils, etc.
20538
20539         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
20540         using the latest version from cvs.  This avoids problems with #line
20541         directives using a vendor (Sun) compiler.
20542         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
20543         Don't set GETGROUPS_LIB here; now it's
20544         done via getgroups.m4's wrapper function.
20545         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
20546         rather than just in sh-util/configure.in, so that the
20547         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
20548         same.
20549         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
20550         AC_FUNC_GETLOADAVG where to find getloadavg.c.
20551         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
20552         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
20553         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
20554         Remove code that is now done by the newly-required macros.
20555         Append $(EXEEXT) to DF_PROG.
20556         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
20557         Do not invoke or require the following here,
20558         since prereq.m4 or some gnulib .m4 now does this for us:
20559         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
20560         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
20561         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
20562         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
20563         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
20564         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
20565         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
20566         AC_FUNC_OBSTACK.
20567         Do not replace the following functions, as this is now the job
20568         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
20569         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
20570         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
20571         atexit getpass, strdup, getpagesize.
20572         Replace 'raise'.
20573         Do not check for the following functions, as this is now the job
20574         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
20575         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
20576         setregid.
20577         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
20578         Check for sys/sysctl.h.
20579         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
20580         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
20581         of checking for ssize_t ourselves.
20582
20583         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
20584         Require every macro that gnulib/modules/* suggests for us.
20585         (jm_PREREQ_ADDEXT): New macro.
20586         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
20587         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
20588
20589         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
20590         (gl_PHYSMEM): Use it.
20591         Also check for `table' function.
20592         Check for new headers and functions.
20593         Add check for sys/sysmp.h.
20594         With suggestions from Kaveh Ghazi.
20595         Ignore headers that are present but cannot be compiled.  This
20596         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
20597         C 5.4.
20598
20599 2003-08-15  Paul Eggert  <eggert@twinsun.com>
20600
20601         Document merge from coreutils.
20602         * modules/userspec: Depend on posixver.
20603         * modules/strftime: Depend on tzset.
20604
20605 2003-08-15  Paul Eggert  <eggert@twinsun.com>
20606
20607         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
20608         rather than tab, after '#' in shell-script copyright notices.
20609         Suggested by Bruno Haible.
20610
20611 2003-08-15  Paul Eggert  <eggert@twinsun.com>
20612
20613         * config/srclist-update: Use three spaces, rather than tab, after '#'
20614         in shell-script copyright notices.  Suggested by Bruno Haible.
20615         Remove unnecessary parenthesization in regular expression.
20616
20617 2003-08-15  Jim Meyering  <jim@meyering.net>
20618
20619         Merge from coreutils.
20620         * lib/xgethostname.c: Include <stdlib.h>.
20621         (xghostname): Don't exit for anything other than memory-related
20622         failure; just return NULL.
20623         * lib/userspec.c: Include "posixver.h".
20624         (parse_user_spec): Accept `.' as a separator only
20625         in pre-POSIX-200112 mode.
20626         * lib/strtoimax.c: Use #elif rather than #else #if.
20627         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
20628         Remove function, now that we can rely on a working tzset function.
20629         [!_LIBC]: Ensure that the required autoconf test has been run.
20630         [!defined _NL_CURRENT && HAVE_STRFTIME]:
20631         Use underlying_strftime for %r.
20632         * lib/sha.c: Merge in some clean-up and optimization changes from
20633         glibc.
20634         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
20635         Ensure that it is a multiple of 64.
20636         Rearrange loop exit tests so as to avoid performing an
20637         additional fread after encountering an error or EOF.
20638         * lib/realloc.c: Update copyright date.
20639
20640 2003-08-15  Jim Meyering  <jim@meyering.net>
20641         and Paul Eggert  <eggert@twinsun.com>
20642
20643         Merge from coreutils.
20644         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
20645         member but strut utmpx does not.  Needed for AIX 4.3.3.
20646         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
20647
20648 2003-08-15  Jim Meyering  <jim@meyering.net>
20649         and Paul Eggert  <eggert@cs.ucla.edu>
20650
20651         Merges from coreutils, etc.
20652         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
20653         Require gl_FUNC_TZSET_CLOBBER.
20654         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
20655         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
20656         members.
20657
20658 2003-08-14  Paul Eggert  <eggert@twinsun.com>
20659
20660         Help the merge from coreutils.
20661         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
20662         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
20663         * m4/tzset.m4: Use it too.
20664
20665 2003-08-14  Paul Eggert  <eggert@twinsun.com>
20666
20667         * modules/tzset: New file.
20668
20669 2003-08-14  Jim Meyering  <jim@meyering.net>
20670
20671         Merges from coreutils.
20672         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
20673         variable names, rather than @FNMATCH_H@.
20674         * modules/alloca: Likewise for $(ALLOCA_H).
20675
20676         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
20677         the three copies of the literal target, `fnmatch.h'.
20678         * modules/alloca (alloca.h): Likewise.
20679
20680 2003-08-14  Jim Meyering  <jim@meyering.net>
20681
20682         Merge from coreutils.
20683         * m4/tzset.m4: New file.
20684         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
20685         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
20686         otherwise, AIX 5.1 systems would end up using the latter.
20687         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
20688         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
20689         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
20690         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
20691
20692 2003-08-14  Jim Meyering  <jim@meyering.net>
20693
20694         Merge from coreutils.
20695         * lib/obstack.h: Whitespace changes.
20696         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
20697         and xcalloc return values.
20698         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
20699         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
20700         hang on OSF/1 5.1 for DIR on both local and remote file systems.
20701         Reported by (and fix confirmed by) Nelson H. F. Beebe.
20702         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
20703         error from mntctl.
20704         Use mntctl's return value to drive the entry-processing loop, since
20705         we can't rely on the value of the vmt_length member in the last
20706         entry.  On some systems doing so could result in exhausting
20707         virtual memory.  Based in part on a patch from Mike Jetzer.
20708
20709 2003-08-14  Jim Meyering  <jim@meyering.net>
20710         and Paul Eggert  <eggert@twinsun.com>
20711
20712         Merges from coreutils, plus other fixes.
20713         * lib/physmem.c: Merge in portability changes from gcc/libiberty
20714         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
20715         for credits and details.  Thanks to Kaveh Ghazi for helping
20716         to keep these files in sync.
20717         (ARRAY_SIZE): Define it.
20718         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
20719         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
20720         (memcasecmp): Don't assume size_t fits in unsigned int.
20721         Remove casts and duplicate code.
20722         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
20723         (memcpy): Remove definition.
20724         Merge in some clean-up and optimization changes from glibc.
20725         [BLOCKSIZE]: Move definition to top of file.
20726         Ensure that it is a multiple of 64.
20727         Rearrange loop exit tests so as to avoid performing an
20728         additional fread after encountering an error or EOF.
20729         * lib/md5.h (md5_uintptr): Define.
20730         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
20731         return to the initial working directory.  Preserve errno
20732         for caller.
20733         * lib/idcache.c: Include "xalloc.h".
20734         (xmalloc, xrealloc): Remove decls.
20735         (getuser): Remove casts no longer required in C89.
20736         * lib/human.c: Include stdio.h, for sprintf.
20737         * lib/group-member.c: Include "xalloc.h".
20738         (xmalloc, xrealloc): Remove decls.
20739         (get_group_info): Remove casts no longer required in C89.
20740         * lib/getusershell.c (readname): Remove casts no longer required in
20741         C89.
20742         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
20743         * lib/getline.c: Whitespace fix, from coreutils.
20744
20745 2003-08-13  Paul Eggert  <eggert@twinsun.com>
20746
20747         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
20748         Check for isascii.
20749
20750         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
20751         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
20752         Undo previous (whitespace-only) change.
20753
20754 2003-08-13  Paul Eggert  <eggert@twinsun.com>
20755
20756         * lib/exclude.c: Include <ctype.h>
20757         (IN_CTYPE_DOMAIN): New macro.
20758         (is_space): New fn.
20759         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
20760         and empty lines.
20761
20762         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
20763         Undo previous (whitespace-only) change.
20764
20765 2003-08-13  Paul Eggert  <eggert@twinsun.com>
20766
20767         * config/srclist-update: Change update back to the old behavior,
20768         leaving whitespace alone.  Use one 'sed' command rather than a
20769         pipeline.
20770         (fixlicense): Now a variable, not a function.
20771         (remove_trailing_blanks): Remove.
20772         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
20773         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
20774         Undo previous (whitespace-only) change.
20775
20776 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20777
20778         Merge from coreutils.
20779         * modules/euidaccess: Add lib_SOURCES, include for new
20780         file euidaccess.h
20781
20782 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20783
20784         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
20785         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
20786         Normalize leading white space and remove trailing white space.
20787
20788         Merge from coreutils
20789         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
20790
20791         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
20792         0.12.1.  These files are now being upgraded automatically by
20793         ../config/srclist-update.
20794
20795 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20796
20797         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
20798         Normalize leading white space and remove trailing white space.
20799         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
20800         notice, as per ../config/srclist-update.
20801
20802         Merge from coreutils.
20803         * lib/euidaccess.h: New file.
20804         * lib/euidaccess.c: Include it.
20805         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
20806         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
20807         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
20808
20809 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20810
20811         * config/srclist-update: Add copyright notice.
20812         (remove_id_lines, remove_trailing_blanks): New constants.
20813         (fixfile): Use them to normalize spacing a bit in copied files.
20814         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
20815         Normalize leading white space and remove trailing white space.
20816
20817         * config/texinfo.tex: Sync with texinfo.
20818
20819         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
20820         strtoul.c from libc, to merge coreutils whitespace changes.
20821
20822         * config/srclist.txt: Get the following m4 files from gettext:
20823         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
20824         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
20825         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
20826         wint_t.m4.
20827
20828 2003-08-12  Karl Berry  <karl@gnu.org>
20829
20830         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
20831         been made.
20832
20833 2003-08-11  Paul Eggert  <eggert@twinsun.com>
20834
20835         * modules/gnu-source, m4/gnu-source.m4:
20836         Remove; we're assuming Autoconf 2.54 or later now.
20837         Suggested by Bruno Haible.
20838         * MODULES.html.sh (func_all_modules): Remove gnu-source.
20839
20840 2003-08-11  Bruno Haible  <bruno@clisp.org>
20841
20842         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
20843
20844 2003-08-11  Bruno Haible  <bruno@clisp.org>
20845
20846         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
20847         (vasnprintf): Use it instead of wcslen.
20848
20849 2003-08-11  Bruno Haible  <bruno@clisp.org>
20850
20851         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
20852         value to ensure that _Bool promotes to int. Use #define for _Bool when
20853         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
20854
20855 2003-08-10  Karl Berry  <karl@gnu.org>
20856
20857         * lib/regex.h: update from libc (whitespace fix).
20858
20859 2003-08-09  Paul Eggert  <eggert@twinsun.com>
20860
20861         Merge some files from coreutils.  These changes were
20862         originally made by Jim Meyering.
20863         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
20864         many older Unixes require this.
20865         * lib/alloca.c (alloca): Remove cast to argument of free;
20866         no longer needed in C89.
20867         * lib/alloca_.h, regex.h: Fix white space to match
20868         what GNU indent does.
20869
20870 2003-08-09  Paul Eggert  <eggert@twinsun.com>
20871
20872         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
20873         apparently Emacs's Unicode mode got confused before my 2003-08-05
20874         checkin.
20875
20876 2003-08-08  Paul Eggert  <eggert@twinsun.com>
20877
20878         * m4/extensions.m4: New file.
20879         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
20880         Require gl_USE_SYSTEM_EXTENSIONS.
20881         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
20882         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
20883
20884 2003-08-08  Paul Eggert  <eggert@twinsun.com>
20885
20886         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
20887         * modules/extensions, modules/gnu-source: New files.
20888         * modules/timespec, modules/unlocked-io: Depend on extensions.
20889
20890 2003-08-07  Paul Eggert  <eggert@twinsun.com>
20891
20892         * modules/restrict: New file.
20893         * MODULES.html.sh (func_all_modules): Add restrict.
20894         * modules/regex: Depend on restrict.
20895
20896 2003-08-07  Paul Eggert  <eggert@twinsun.com>
20897
20898         * m4/restrict.m4: New file.
20899         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
20900
20901 2003-08-07  Bruno Haible  <bruno@clisp.org>
20902
20903         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
20904         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
20905
20906 2003-08-07  Bruno Haible  <bruno@clisp.org>
20907
20908         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
20909         makes the module 'getndelim2' compatible with the module 'getline'.
20910
20911 2003-08-05  Paul Eggert  <eggert@twinsun.com>
20912
20913         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
20914         byte with "\201" to avoid glitches when editing that source file
20915         with multi-gnome-terminal.
20916
20917 2003-08-05  Paul Eggert  <eggert@twinsun.com>
20918
20919         * lib/bumpalloc.h: Remove.
20920
20921 2003-08-05  Paul Eggert  <eggert@twinsun.com>
20922
20923         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
20924         * modules/bumpalloc: Remove.
20925
20926 2003-08-04  Paul Eggert  <eggert@twinsun.com>
20927
20928         * lib/getloadavg.c: Change copyright notice and spacing to conform to
20929         GNU coding style.
20930
20931         Merge from coreutils.
20932         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
20933         1. From glibc.
20934         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
20935         from Karl Berry, implemented by Jim Meyering.
20936         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
20937         from Dmitry V. Levin.
20938         Remove anachronistic cast of xrealloc.
20939         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
20940         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
20941         type. Otherwise, it wouldn't compile with at least /bin/cc on
20942         ymp-cray-unicos9.0.2.X.
20943         Combine two mostly-identical uses of alloca into one.
20944         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
20945
20946 2003-08-04  Dave Love  <d.love@dl.ac.uk>
20947
20948         [From Emacs.]
20949
20950         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
20951         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
20952         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
20953         obsolete NLIST_NAME_UNION.
20954         [__GNU__]: Undef BSD and FSCALE.
20955         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
20956
20957 2003-08-03  Paul Eggert  <eggert@twinsun.com>
20958
20959         * lib/stdbool_.h (_Bool): Make it signed char, instead of
20960         an enum type, so that it's guaranteed to promote to int.  See:
20961         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
20962
20963 2003-08-03  Karl Berry  <karl@gnu.org>
20964
20965         * config/depcomp: update from automake.
20966
20967 2003-07-31  Paul Eggert  <eggert@twinsun.com>
20968
20969         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
20970         (strerror): Don't assume that a printable int fits in 14 bytes.
20971
20972 2003-07-31  Bruno Haible  <bruno@clisp.org>
20973
20974         * modules/getpass-gnu: New file.
20975         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
20976
20977 2003-07-31  Bruno Haible  <bruno@clisp.org>
20978
20979         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
20980
20981 2003-07-24  Karl Berry  <karl@gnu.org>
20982
20983         * config/missing: update from automake.
20984
20985 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
20986             Bruno Haible  <bruno@clisp.org>
20987
20988         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
20989         * lib/getline.c (getline, getdelim): Likewise.
20990         Remove _GNU_SOURCE define; now it's defined in config.h through
20991         m4/getline.m4.
20992
20993 2003-07-23  Karl Berry  <karl@gnu.org>
20994
20995         * config/config.sub: update from prep.
20996
20997 2003-07-22  Paul Eggert  <eggert@twinsun.com>
20998
20999         * modules/xalloc (Depends-on): Add exitfail.
21000         * modules/xmemcoll: Likewise.
21001
21002 2003-07-22  Paul Eggert  <eggert@twinsun.com>
21003
21004         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
21005         over-parenthesization in macros.
21006
21007         Sync with coreutils.
21008
21009         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
21010         required by C99.
21011
21012         Use `exit_failure' for xalloc and xmemcoll instead of their own
21013         private exit-failure variables.
21014         * lib/xalloc.h (xalloc_exit_failure): Remove.
21015         * lib/xmalloc.c: Likewise.  Include exitfail.h.
21016         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
21017         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
21018         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
21019         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
21020
21021 2003-07-20  Jim Meyering  <jim@meyering.net>
21022
21023         * modules/closeout (Depends-on): Add exitfail.
21024         Suggestion from Bruno Haible.
21025
21026 2003-07-19  Karl Berry  <karl@gnu.org>
21027
21028         * config/config.sub: update from prep.
21029
21030 2003-07-18  Paul Eggert  <eggert@twinsun.com>
21031
21032         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
21033         Remove.
21034         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
21035         to test that it can stand by itself.  Include "exitfail.h".
21036         Clients should set exit_failure instead.
21037         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
21038
21039 2003-07-18  Bruno Haible  <bruno@clisp.org>
21040
21041         * modules/getndelim2: New file.
21042         * modules/getline: Share files with module getndelim2.
21043         * modules/getnline: Depend on getndelim2 instead of sharing files with
21044         it. Add getnline.c to lib_SOURCES.
21045         * MODULES.html.sh (func_all_modules): Add getndelim2.
21046
21047 2003-07-18  Bruno Haible  <bruno@clisp.org>
21048
21049         * m4/getndelim2.m4: New file.
21050         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
21051         invoke gl_PREREQ_GETNDELIM2.
21052         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
21053         gl_PREREQ_GETNDELIM2.
21054         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
21055         gl_GETNDELIM2.
21056
21057 2003-07-18  Bruno Haible  <bruno@clisp.org>
21058
21059         * lib/getndelim2.h: New file.
21060         * lib/getndelim2.c: Make into a module of its own. Include config.h,
21061         getndelim2.h.
21062         (getndelim2): Make non-static. Change return type to ssize_t.
21063         * lib/getline.h: Change argument names.
21064         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
21065         * lib/getnline.c: Include getndelim2.h.
21066
21067 2003-07-18  Andreas Schwab  <schwab@suse.de>
21068
21069         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
21070
21071 2003-07-17  Karl Berry  <karl@gnu.org>
21072
21073         * config/config.sub: update from prep.
21074
21075 2003-07-17  Bruno Haible  <bruno@clisp.org>
21076
21077         * modules/getnline: New file.
21078         * modules/getline: Add lib/getndelim2.c to source file list.
21079         * MODULES.html.sh (func_all_modules): Add getnline.
21080
21081 2003-07-17  Bruno Haible  <bruno@clisp.org>
21082
21083         * m4/getnline.m4: New file.
21084
21085 2003-07-17  Bruno Haible  <bruno@clisp.org>
21086
21087         * m4/Makefile.am.in: Remove file.
21088         * m4/Makefile.am: Remove file.
21089         * m4/Makefile.in: Remove file.
21090
21091 2003-07-17  Bruno Haible  <bruno@clisp.org>
21092
21093         * lib/getnline.h: New file.
21094         * lib/getnline.c: New file.
21095         * lib/getndelim2.c: New file, extracted from getline.c.
21096         (getndelim2): Renamed from getdelim2, with added nmax argument.
21097         * lib/getline.c: Include getndelim2.c.
21098         (getdelim2): Moved out to getndelim2.c.
21099         (getline, getdelim): Update.
21100
21101 2003-07-17  Bruno Haible  <bruno@clisp.org>
21102
21103         * lib/Makefile.am: Remove file.
21104         * lib/Makefile.in: Remove file.
21105
21106 2003-07-17  Bruno Haible  <bruno@clisp.org>
21107
21108         * configure.in: Remove file.
21109         * Makefile.in: Remove file.
21110
21111 2003-07-17  Bruno Haible  <bruno@clisp.org>
21112
21113         * MODULES.html.sh: Put the </BODY> right before </HTML>.
21114
21115 2003-07-16  Karl Berry  <karl@gnu.org>
21116
21117         * config/srclist-update: was running fixlicense twice, which caused
21118                 texinfo.tex to be nullified for some reason.  Simplify,
21119                 $gplsrc is no longer needed as far as I can see?
21120
21121 2003-07-16  Jim Meyering  <jim@meyering.net>
21122
21123         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
21124
21125 2003-07-15  Paul Eggert  <eggert@twinsun.com>
21126
21127         * config/srclist.txt: Get the following files from gettext-runtime/intl
21128         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
21129         ref-del.sin.  From Bruno Haible.
21130         * config/srclist-update (fixfile): Change grep pattern again, since the
21131         previous fix didn't work (there was another trailing $).  Use
21132         '[$]' to escape the $s.
21133
21134 2003-07-15  Karl Berry  <karl@gnu.org>
21135
21136         * lib/vasnprintf.c: update from gettext.
21137
21138 2003-07-15  Karl Berry  <karl@gnu.org>
21139
21140         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
21141         gets expanded when surrounded by '$'.
21142
21143 2003-07-15  Jim Meyering  <jim@meyering.net>
21144
21145         * modules/save-cwd: Don't depend on error.  From Derek Price.
21146
21147 2003-07-15  Jim Meyering  <jim@meyering.net>
21148
21149         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
21150
21151 2003-07-14  Simon Josefsson  <jas@extundo.com>
21152
21153         * modules/mempcpy: New file.
21154         * MODULES.html.sh (func_all_modules): Add mempcpy.
21155
21156 2003-07-14  Simon Josefsson  <jas@extundo.com>
21157
21158         * m4/mempcpy.m4: New file.
21159
21160 2003-07-14  Simon Josefsson  <jas@extundo.com>
21161
21162         * lib/mempcpy.h: New file.
21163         * lib/mempcpy.c: New file.
21164
21165 2003-07-14  Paul Eggert  <eggert@twinsun.com>
21166
21167         * modules/getdate, modules/posixtm: Depend on mktime.
21168
21169 2003-07-14  Paul Eggert  <eggert@twinsun.com>
21170
21171         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
21172         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
21173         unicodeio.c, unicodeio.h, unlocked-io.h:
21174         Switch from LGPL to GPL.
21175
21176 2003-07-14  Paul Eggert  <eggert@twinsun.com>
21177
21178         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
21179         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
21180         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
21181         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
21182         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
21183         updated automatically by ../config/srclist-update.  This changes
21184         their license from LPGL to GPL.
21185
21186 2003-07-14  Paul Eggert  <eggert@twinsun.com>
21187
21188         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
21189         assumed to refer to the root of the most recent stable gettext version.
21190         * config/srclistvars.sh: Add defaults for eggert.
21191         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
21192         Match "This program" as well as "The program".  This is needed
21193         for gettext.
21194
21195 2003-07-14  Jim Meyering  <jim@meyering.net>
21196
21197         Don't emit diagnostics.  Let callers do that.
21198         * lib/save-cwd.c: Don't include "error.h".
21199         (save_cwd): Don't call error.  Ensure that errno is valid
21200         when returning nonzero.
21201
21202         * lib/save-cwd.h (restore_cwd): Update prototype.
21203         * lib/save-cwd.c (restore_cwd): Remove two parameters.
21204         Simplify.  Don't call error upon failure.  Let callers do that.
21205         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
21206         when auditing is enabled.  But don't bother updating the #if.
21207
21208 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
21209
21210         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
21211         it breaks C++ compilation.
21212         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
21213
21214 2003-07-10  Simon Josefsson  <jas@extundo.com>
21215
21216         * modules/strchrnul (Makefile.am): Add strchrnul.h.
21217
21218 2003-07-10  Jim Meyering  <jim@meyering.net>
21219
21220         * m4/clock_time.m4: Remove trailing blank.
21221         * m4/intmax_t.m4: Likewise.
21222
21223 2003-07-10  Jim Meyering  <jim@meyering.net>
21224
21225         * lib/vasnprintf.c: Remove trailing blanks.
21226         Make cpp indentation consistent.
21227
21228 2003-07-09  Paul Eggert  <eggert@twinsun.com>
21229
21230         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
21231         posixver.c, strftime.c, strnlen.c, strverscmp.c:
21232         Switch from LGPL to GPL.
21233
21234 2003-07-09  Paul Eggert  <eggert@twinsun.com>
21235
21236         * config/srclist.txt: Sort sublists.  Add
21237         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
21238         that differ from gnulib for one reason or another; we'd like this list
21239         to be smaller but for now let's document what we have.
21240
21241 2003-07-08  Paul Eggert  <eggert@twinsun.com>
21242
21243         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
21244         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
21245         and sweeter "eval x=$x".
21246         * config/srclist.txt: Get lib/argp* from glibc.
21247
21248 2003-07-07  Paul Eggert  <eggert@twinsun.com>
21249
21250         * lib/mktime.c: Fix some boundary cases and remove need for floating
21251         point.
21252
21253         Issue a compile-time diagnostic if time_t is floating point, or if
21254         two's complement arithmetic is not in effect, or if arithmetic
21255         right shift does not propagate the sign.  These assumptions were
21256         all in the original code but they weren't checked.
21257
21258         (TIME_T_MIDPOINT, verify): New macros.
21259         (__isleap): Remove; it has integer overflow problems.
21260         (leapyear): New function, without those problems.
21261         (ydhms_tm_diff): Remove; splitting into two parts.
21262         (ydhms_diff): New function, containing the arithmetic part of
21263         the old ydhms_tm_diff function.  Issue a compile-time
21264         diagnostic if we are not using C99 integer division.
21265         Avoid casts when possible.
21266         (guess_time_tm): New function, containing the checking part of
21267         the old ydhms_tm_diff function.  Return the new value, rather than
21268         the difference between it and the old.  Accept a new argument T
21269         so that *T specifies the old value.  Check for overflow in the result.
21270
21271         (__mktime_internal): Use a time_t offset, not a long int offset.
21272         This undoes the 2003-06-04 change, which is no longer needed now
21273         that we have better overflow checking.
21274         (localtime_offset): Likewise.
21275
21276         (__mktime_internal): Avoid harmful overflow on hosts where time_t
21277         and long are 64-bit but int is only 32-bit.
21278         (ydhms_diff): Use long int to store year1 and yday1.
21279         Issue a compile-time diagnostic if long int is not wide enough.
21280
21281         (__mktime_internal): Use long int to store adjusted year and yday.
21282         Use plain C rather than preprocessor commands, if that doesn't
21283         affect efficiency.
21284         Check for overflow (and try to repair) after each probe
21285         rather than checking only at the very end.  This avoids some bugs
21286         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
21287         does not equal GMT offset at maximum time).
21288         Use integer to check for overflow rather than floating point; this
21289         is more portable to non-IEEE hosts, and is a tad faster.
21290         When we detect that we are oscillating between two values,
21291         don't check whether tm_isdst has the requested value, since
21292         we already know the answer.  When tm_isdst has the wrong value,
21293         use a different heuristic to find the right one, based on the
21294         extreme values actually observed in practice in tz2003a,
21295         rather than the (overly optimistic) "previous 3 calendar quarters".
21296
21297         (not_equal_tm, print_tm, check_result): Use "const T" rather than
21298         "T const" to accommodate glibc style.
21299         (check_result): Use less-confusing report format.  "long" -> "long int.
21300         (main): Likewise.
21301         Don't loop if the iteration overflows time_t.
21302         Allow a negative step in the iteration.
21303
21304 2003-07-06  Karl Berry  <karl@gnu.org>
21305
21306         * config/depcomp: update from automake.
21307         * config/config.sub: update from prep.
21308
21309 2003-07-03  Karl Berry  <karl@gnu.org>
21310
21311         * config/config.guess: update from prep.
21312
21313 2003-07-01  Paul Eggert  <eggert@twinsun.com>
21314
21315         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
21316         xreadlink.c now includes it unconditionally.
21317
21318 2003-07-01  Paul Eggert  <eggert@twinsun.com>
21319
21320         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
21321         having it depend on HAVE_SYS_TYPES_H.
21322
21323 2003-07-01  Bruno Haible  <bruno@clisp.org>
21324
21325         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
21326         <sys/types.h> should be sufficient.
21327         Reported by Paul Eggert.
21328
21329 2003-06-26  Karl Berry  <karl@gnu.org>
21330
21331         * config/depcomp: update from automake.
21332
21333 2003-06-26  Bruno Haible  <bruno@clisp.org>
21334
21335         * modules/human: Depend on module stdbool.
21336
21337 2003-06-25  Bruno Haible  <bruno@clisp.org>
21338
21339         * modules/readlink: New file.
21340         * modules/xreadlink: Depend on it.
21341         * MODULES.html.sh (func_all_modules): Add readlink.
21342
21343 2003-06-25  Bruno Haible  <bruno@clisp.org>
21344
21345         * m4/readlink.m4: New file.
21346
21347 2003-06-25  Bruno Haible  <bruno@clisp.org>
21348
21349         * lib/readlink.c: New file.
21350
21351 2003-06-22  Karl Berry  <karl@gnu.org>
21352
21353         * config/srclist.txt: update mkinstalldirs from automake.
21354         * config/mkinstalldirs: update.
21355
21356 2003-06-22  Bruno Haible  <bruno@clisp.org>
21357
21358         Portability to mingw32.
21359         * m4/ssize_t.m4: New file, from GNU gettext.
21360         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
21361         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
21362
21363 2003-06-22  Bruno Haible  <bruno@clisp.org>
21364
21365         * modules/safe-read: Add m4/ssize_t.m4.
21366         * modules/xreadlink: Add m4/ssize_t.m4.
21367
21368 2003-06-20  Bruno Haible  <bruno@clisp.org>
21369
21370         Assume C89, so PARAMS isn't needed.
21371         * lib/unicodeio.h (PARAMS): Remove.
21372         * lib/unicodeio.c: Don't use PARAMS.
21373
21374 2003-06-18  Karl Berry  <karl@gnu.org>
21375
21376         * config/config.{guess,sub}: update from prep.
21377
21378 2003-06-18  Jim Meyering  <jim@meyering.net>
21379
21380         Merge changes from coreutils.
21381         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
21382         Remove explicit declarations of xmalloc and realloc.
21383         Include xalloc.h.
21384         (read_utmp): Remove anachronistic cast of xmalloc.
21385
21386 2003-06-17  Paul Eggert  <eggert@twinsun.com>
21387
21388         Assume C89, so PARAMS isn't needed.
21389         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
21390         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
21391         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
21392         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
21393         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
21394         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
21395         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
21396         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
21397         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
21398         lib/xstrtod.h, lib/xstrtol.h: Likewise.
21399         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
21400         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
21401         no longer needed. Anyway, config.h should always be included before any
21402         other file.
21403
21404 2003-06-11  Simon Josefsson  <jas@extundo.com>
21405
21406         * modules/sysexits: New file.
21407         * MODULES.html.sh (func_all_modules): Add sysexits.
21408
21409 2003-06-11  Simon Josefsson  <jas@extundo.com>
21410
21411         * lib/sysexit_.h: New file.
21412
21413 2003-06-11  Derek Price  <derek@ximbiot.com>
21414
21415         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
21416         necessary.
21417
21418 2003-06-11  Bruno Haible  <bruno@clisp.org>
21419
21420         * m4/sysexits.m4: New file.
21421
21422 2003-06-10  Simon Josefsson  <jas@extundo.com>
21423
21424         * lib/argp.h: New file, from glibc.
21425         * lib/argp-ba.c: New file, from glibc.
21426         * lib/argp-eexst.c: New file, from glibc.
21427         * lib/argp-fmtstream.c: New file, from glibc.
21428         * lib/argp-fmtstream.h: New file, from glibc.
21429         * lib/argp-fs-xinl.c: New file, from glibc.
21430         * lib/argp-help.c: New file, from glibc.
21431         * lib/argp-namefrob.h: New file, from glibc.
21432         * lib/argp-parse.c: New file, from glibc.
21433         * lib/argp-pv.c: New file, from glibc.
21434         * lib/argp-pvh.c: New file, from glibc.
21435         * lib/argp-xinl.c: New file, from glibc.
21436
21437 2003-06-10  Simon Josefsson  <jas@extundo.com>
21438
21439         * modules/strchrnul: New file.
21440
21441 2003-06-10  Simon Josefsson  <jas@extundo.com>
21442
21443         * modules/argp: New file.
21444
21445 2003-06-10  Simon Josefsson  <jas@extundo.com>
21446
21447         * m4/strchrnul.m4: New file.
21448
21449 2003-06-10  Simon Josefsson  <jas@extundo.com>
21450
21451         * lib/strchrnul.h: New file.
21452         * lib/strchrnul.c: New file.
21453
21454 2003-06-10  Bruno Haible  <bruno@clisp.org>
21455
21456         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
21457
21458 2003-06-07  Karl Berry  <karl@gnu.org>
21459
21460         * config/config.{guess,sub}: update from prep.
21461
21462 2003-06-07  Jim Meyering  <jim@meyering.net>
21463
21464         * modules/strtod: Use $(...) notation, not @...@ for
21465         AC_REPLACE'd variables.
21466         * modules/localcharset: Likewise.
21467
21468 2003-06-07  Jim Meyering  <jim@meyering.net>
21469
21470         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
21471         in place of my name in the copyright comment.
21472         Remove definition and uses of __P.
21473
21474         From coreutils.
21475         * lib/stat.c: Don't declare xmalloc explicitly.
21476         Instead, include "xalloc.h".
21477         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
21478         xrealloc, and xcalloc return values.
21479         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
21480         Improve comment.
21481         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
21482
21483 2003-06-07  Bruno Haible  <bruno@clisp.org>
21484
21485         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
21486         avoid AC_CONFIG_LINKS.
21487         * modules/fnmatch (Makefile.am): Use explicit creation rule for
21488         fnmatch.h, to avoid AC_CONFIG_LINKS.
21489         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
21490
21491 2003-06-07  Bruno Haible  <bruno@clisp.org>
21492
21493         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
21494         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
21495         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
21496         directory.
21497         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
21498         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
21499         directory.
21500
21501 2003-06-06  Jim Meyering  <jim@meyering.net>
21502
21503         Merge from coreutils.
21504         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
21505         Consolidate declarations and initializations of *_base* locals.
21506
21507         Merge from coreutils.
21508         This avoids a core dump on systems without GNU putenv,
21509         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
21510         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
21511         (unsetenv): New static function, from GNU libc.
21512         (rpl_putenv): Use it.
21513
21514         * lib/modechange.c: Remove trailing blanks.
21515
21516         Merge from coreutils.
21517         * lib/fsusage.c: Remove declaration of statfs.
21518         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
21519
21520         * lib/posixtm.c: Include <stdbool.h> unconditionally.
21521
21522 2003-06-06  Jim Meyering  <jim@meyering.net>
21523
21524         * lib/stdbool_.h: Renamed from stdbool.h.in.
21525
21526 2003-06-06  Jim Meyering  <jim@meyering.net>
21527             Bruno Haible  <bruno@clisp.org>
21528
21529         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
21530         Adjust Makefile.am snippet not to redirect directly to target.
21531         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
21532
21533 2003-06-05  Paul Eggert  <eggert@twinsun.com>
21534
21535         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
21536         mismatch, look in future quarters as well as past.  This fixes a
21537         bug when processing fall-backwards gaps immediately after a long
21538         period of daylight-saving time.
21539
21540         * lib/mktime.c: Assume freestanding C89 or better.
21541         (HAVE_LIMITS_H): Remove.  Assume it's 1.
21542         (__P): Remove; not used.
21543         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
21544         (mktime, not_equal_tm, print_tm, check_result,
21545         main): Use prototypes.  Use const * where appropriate.
21546         (main): Fix typo in testing code that uncovered by above changes.
21547         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
21548
21549 2003-06-04  Paul Eggert  <eggert@twinsun.com>
21550
21551         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
21552         locale.h, localeconv.  This merges changes from coreutils.
21553
21554         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
21555         It can be removed after the next Autoconf is released.
21556         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
21557         needed.
21558
21559 2003-06-04  Paul Eggert  <eggert@twinsun.com>
21560
21561         * lib/mktime.c: Fix Debian bug 177940
21562         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
21563         (localtime_offset): Now long int, not time_t, because we want it
21564         to be guaranteed to be signed.  All uses changed.
21565         (__mktime_internal): If overflow would occur when adding offset,
21566         don't add it.
21567
21568         Merge 'human' changes from coreutils.  Rewrite to support
21569         locale-specific notations like thousands separators.
21570         * lib/human.c: Simplify authorship notice.
21571         Include human.h immediately after config.h.
21572         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
21573         <limits.h>: Do not include, since human.h does.
21574         (SIZE_MAX, UINTMAX_MAX): New macros.
21575         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
21576         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
21577         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
21578         (power_letter): Renamed from suffixes.
21579         (generate_suffix_backwards): Remove.
21580         (adjust_value): Now takes int style (because of human.h changes)
21581         and long double value (for greater precision on some platforms).
21582         (group_number): New function.
21583         (human_readable): Use it.  Use integer options, not enum.
21584         Put the options before the sizes in the arg list.
21585         Support all the new options.
21586         The old human_readable function has been removed;
21587         use inttostr.h instead.
21588         (human_readable, default_block_size, humblock):
21589         Use uintmax_t, not int, for block sizes.
21590         (human_readable_inexact, block_size_types): Remove.
21591         (block_size_opts): New constant.
21592         (human_options): Renamed from human_block_size, with new signature
21593         that allows block sizes up to UINTMAX_MAX.  All callers changed.
21594         * lib/human.h: Add copyright and authorship notice.
21595         Include <limits.h> and <stdbool.h> unconditionally.
21596         (PARAMS): Remove.  All uses removed.
21597         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
21598         (enum human_inexact_style): Remove tag; now a nameless enum.
21599         (human_floor, human_ceiling, human_round_to_even): Now have
21600         values 2, 0, 1 rather than -1, 1, 0.
21601         (human_group_digits, human_suppress_point_zero, human_autoscale,
21602         human_base_1024, human_SI, human_B): New constants.
21603         (human_readable_inexact, human_block_size): Remove.
21604         (human_readable): Size args are now uintmax_t, not int.
21605         (human_options): New decl.
21606
21607         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
21608         unnecessary now that we assume C89 or better.  This change
21609         imported from coreutils.
21610
21611         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
21612         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
21613         in the 2003-05-30 sync from glibc.
21614
21615         .h files should stand alone, but we shouldn't include <sys/types.h>
21616         if we can get away with just <stddef.h>.
21617
21618         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
21619         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
21620         rather than <sys/types.h>, as we merely need size_t.
21621         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
21622         to get size_t.
21623         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
21624         Include <stdio.h>, to get FILE.
21625         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
21626         memcasecmp.h has included <stddef.h> and all we need is size_t.
21627         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
21628         our interface, instead of including <sys/types.h>
21629
21630 2003-06-04  Paul Eggert  <eggert@twinsun.com>
21631
21632         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
21633         now, as glibc mktime is buggy on non-glibc systems.
21634
21635 2003-06-03  Karl Berry  <karl@gnu.org>
21636
21637         * config/config.sub: update from prep.
21638
21639 2003-06-02  Paul Eggert  <eggert@twinsun.com>
21640
21641         [from coreutils]
21642         Fix some minor time-related bugs with POSIX time arguments.
21643         Some valid time stamps were being rejected (notably -1, and
21644         time stamps before 1900 on 64-bit hosts).  And some invalid
21645         time stamps were being accepted, e.g. September 31.
21646
21647         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
21648         that we can return (time_t) -1 successfully.
21649         * lib/posixtm.c: Likewise.
21650         [HAVE_STDBOOL_H]: Include <stdbool.h>.
21651         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
21652         (t): Remove static var.
21653         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
21654         of static var.  All uses changed.
21655         (year): Do not reject years before 1900; they can occur with
21656         64-bit time_t.
21657         (posix_time_parse): Do not check for out-of-range components;
21658         that is now the caller's responsibility, since our checks were
21659         only approximations.
21660         (posixtime): Use mktime to check for out-of-range components,
21661         since it knows them exactly.
21662         If mktime returns (time_t) -1, check whether an error actually occurred
21663         by invoking localtime on -1.
21664         (main) [TEST_POSIXTIME]: Check for input data errors, and report
21665         posixtime failures better.
21666         Improve the test data (in comments only).
21667
21668 2003-06-02  Karl Berry  <karl@gnu.org>
21669
21670         * config/mkinstalldirs (version): new variable.
21671         (--version): new option.
21672         (usage): improve message.
21673
21674 2003-05-30  Karl Berry  <karl@gnu.org>
21675
21676         * lib/mktime.c: update from libc.
21677
21678 2003-05-30  Bruno Haible  <bruno@clisp.org>
21679
21680         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
21681         * config/config.rpath: Upgrade to gettext-0.12.1.
21682
21683 2003-05-30  Bruno Haible  <bruno@clisp.org>
21684
21685         * m4/gettext.m4: Upgrade to gettext-0.12.1.
21686         * m4/nls.m4: New file, from gettext-0.12.1.
21687         * m4/po.m4: New file, from gettext-0.12.1.
21688         * m4/progtest.m4: Upgrade to gettext-0.12.1.
21689
21690 2003-05-30  Bruno Haible  <bruno@clisp.org>
21691
21692         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
21693         * lib/localcharset.h: Likewise.
21694         * lib/localcharset.c: Likewise.
21695
21696 2003-05-29  Karl Berry  <karl@gnu.org>
21697
21698         * config/config.rpath: update from gettext.
21699
21700 2003-05-28  Paul Eggert  <eggert@twinsun.com>
21701
21702         Assume the headers required for C89 freestanding compilers.
21703         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
21704         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
21705         * m4/human.m4 (gl_HUMAN): Likewise.
21706         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
21707         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
21708         * m4/userspec.m4 (gl_USERSPEC): Likewise.
21709         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
21710         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
21711         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
21712
21713 2003-05-28  Paul Eggert  <eggert@twinsun.com>
21714
21715         Assume the headers required for C89 freestanding compilers.
21716         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
21717         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
21718         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
21719         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
21720         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
21721         define, since <limits.h> is guaranteed to do that.
21722         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
21723         * lib/exclude.c: Include <stdbool.h> unconditionally.
21724         * lib/tempname.c: Include <stddef.h> unconditionally.
21725         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
21726         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
21727         <stddef.h> does that.
21728         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
21729         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
21730         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
21731         needed.
21732         * lib/xstrtol.c: Likewise.
21733         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
21734         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
21735
21736         * lib/addext.c (addext): Use assignment rather than cast, to avoid
21737         warnings on some platforms.
21738
21739         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
21740         arbitrarily.
21741
21742 2003-05-26  Jim Meyering  <jim@meyering.net>
21743
21744         Merge in a change from coreutils:
21745         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
21746         that is guaranteed to be `no'.  Use `no_such_member' to indicate
21747         that condition, rather than `-1' which is slightly misleading.
21748         Change the name of the cache variable to have the gl_ prefix.
21749         Prompted by a patch from Richard Dawe for DJGPP.
21750
21751 2003-05-24  Karl Berry  <karl@gnu.org>
21752
21753         * config/config.guess: update from prep.
21754
21755 2003-05-22  Karl Berry  <karl@gnu.org>
21756
21757         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
21758
21759 2003-05-20  Karl Berry  <karl@gnu.org>
21760
21761         * config/config.guess: update from prep.
21762
21763 2003-05-18  Karl Berry  <karl@gnu.org>
21764
21765         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
21766         might actually be set by the user.
21767
21768         * config/depcomp, install-sh, mdate-sh: update from automake.
21769
21770 2003-05-17  Bruno Haible  <bruno@clisp.org>
21771
21772         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
21773         invalid expansion for AC_EGREP_CPP.
21774         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
21775         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
21776         Suggested by Akim Demaille <akim@epita.fr> in
21777         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
21778
21779 2003-05-12  Jim Meyering  <jim@meyering.net>
21780
21781         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
21782         the space-padded-by-default conversion specifiers, %e, %k, %l.
21783
21784 2003-05-12  Bruno Haible  <bruno@clisp.org>
21785
21786         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
21787         the string is longer than 4 KB.
21788
21789 2003-05-11  Karl Berry  <karl@gnu.org>
21790
21791         * config/config.{guess,sub}: update from prep.
21792
21793 2003-05-09  Bruno Haible  <bruno@clisp.org>
21794
21795         * modules/error: Add m4/strerror_r.m4 to file list.
21796
21797 2003-05-03  Bruno Haible  <bruno@clisp.org>
21798
21799         Upgrade to Unicode-4.0.
21800         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
21801         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
21802         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
21803         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
21804         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
21805         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
21806         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
21807         Change width of U+E0100..U+E01EF from 1 to 0.
21808
21809 2003-04-25  Jim Meyering  <jim@meyering.net>
21810
21811         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
21812         of type size_t, not int.
21813
21814 2003-04-25  Bruno Haible  <bruno@clisp.org>
21815
21816         * lib/copy-file.c: Include <stddef.h>, for size_t.
21817
21818 2003-04-21  Paul Eggert  <eggert@twinsun.com>
21819
21820         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
21821         code which expansion is under static control.  Patch imported from
21822         Akim Demaille's patch to Bison; see
21823         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
21824
21825 2003-04-14  Bruno Haible  <bruno@clisp.org>
21826
21827         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
21828
21829 2003-04-11  Jim Meyering  <jim@meyering.net>
21830
21831         Merge changes from Coreutils.
21832
21833         2003-03-22  Jim Meyering  <jim@meyering.net>
21834
21835         * lib/strftime.c (widen): Cast alloca return value to proper type.
21836
21837         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
21838
21839         From GNU libc.
21840         * lib/strftime.c (my_strftime): Handle very large width
21841         specifications for numeric values correctly.  Improve checks for
21842         overflow.
21843
21844         2003-01-19  Jim Meyering  <jim@meyering.net>
21845
21846         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
21847         definitions.
21848         (nl_get_alt_digit) [! defined my_strftime]: Define.
21849         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
21850         _nl_get_alt_digit and _nl_get_walt_digit.
21851
21852         * lib/strftime.c (my_strftime): Merge in locale-related changes from
21853         libc. These changes have no effect outside of _LIBC.
21854
21855 2003-04-10  Bruno Haible  <bruno@clisp.org>
21856
21857         * modules/findprog: New file.
21858         * MODULES.html.sh (func_all_modules): Add it.
21859
21860 2003-04-10  Bruno Haible  <bruno@clisp.org>
21861
21862         * m4/findprog.m4: New file.
21863         * m4/eaccess.m4: New file.
21864
21865 2003-04-10  Bruno Haible  <bruno@clisp.org>
21866
21867         * lib/findprog.h: New file, from GNU gettext.
21868         * lib/findprog.c: New file, from GNU gettext.
21869
21870 2003-04-05  Jim Meyering  <jim@meyering.net>
21871
21872         Merge changes from Coreutils.
21873
21874         * lib/exclude.h (PARAMS): Remove definition and uses.
21875         * lib/exclude.c: Remove uses of `PARAMS'.
21876
21877         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
21878         Add test-cases for DOS filenames. Declare program_name.
21879         (main): Set up program_name.  Patch by Rich Dawe.
21880
21881         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
21882         error from mntctl.
21883         Use mntctl's return value to drive the entry-processing loop, since
21884         we can't rely on the value of the vmt_length member in the last
21885         entry.  On some systems doing so could result in exhausting
21886         virtual memory.  Based in part on a patch from Mike Jetzer.
21887
21888 2003-04-04  Bruno Haible  <bruno@clisp.org>
21889
21890         * modules/linebreak: New file.
21891         * MODULES.html.sh (func_all_modules): Add it.
21892
21893 2003-04-04  Bruno Haible  <bruno@clisp.org>
21894
21895         * m4/linebreak.m4: New file.
21896
21897 2003-04-04  Bruno Haible  <bruno@clisp.org>
21898
21899         * lib/linebreak.h: New file, from GNU gettext.
21900         * lib/linebreak.c: New file, from GNU gettext with slight
21901         modifications.
21902         * lib/lbrkprop.h: New file, from GNU gettext.
21903
21904 2003-04-03  Bruno Haible  <bruno@clisp.org>
21905
21906         * modules/utf8-ucs4: New file.
21907         * modules/utf16-ucs4: New file.
21908         * modules/ucs4-utf8: New file.
21909         * modules/ucs4-utf16: New file.
21910         * MODULES.html.sh (func_all_modules): Add them.
21911
21912 2003-04-03  Bruno Haible  <bruno@clisp.org>
21913
21914         * m4/utf-ucs4.m4: New file.
21915         * m4/ucs4-utf.m4: New file.
21916
21917 2003-04-03  Bruno Haible  <bruno@clisp.org>
21918
21919         * lib/utf8-ucs4.h: New file, from GNU gettext.
21920         * lib/utf16-ucs4.h: New file, from GNU gettext.
21921         * lib/ucs4-utf8.h: New file, from GNU gettext.
21922         * lib/ucs4-utf16.h: New file, from GNU gettext.
21923
21924 2003-04-02  Bruno Haible  <bruno@clisp.org>
21925
21926         * modules/binary-io: New file.
21927         * MODULES.html.sh (func_all_modules): Add it.
21928
21929 2003-04-02  Bruno Haible  <bruno@clisp.org>
21930
21931         * lib/binary-io.h: New file, from GNU gettext.
21932
21933 2003-04-01  Bruno Haible  <bruno@clisp.org>
21934
21935         * modules/pathname: New file.
21936         * MODULES.html.sh (func_all_modules): Add it.
21937
21938 2003-04-01  Bruno Haible  <bruno@clisp.org>
21939
21940         * lib/pathname.h: New file, from GNU gettext.
21941         * lib/concatpath.c: New file, from GNU gettext.
21942
21943 2003-03-30  Bruno Haible  <bruno@clisp.org>
21944
21945         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
21946
21947 2003-03-30  Bruno Haible  <bruno@clisp.org>
21948
21949         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
21950         function chown() doesn't exist.
21951
21952 2003-03-28  Bruno Haible  <bruno@clisp.org>
21953
21954         * modules/copy-file: New file.
21955         * MODULES.html.sh (func_all_modules): Add it.
21956
21957 2003-03-28  Bruno Haible  <bruno@clisp.org>
21958
21959         * m4/copy-file.m4: New file.
21960
21961 2003-03-28  Bruno Haible  <bruno@clisp.org>
21962
21963         * lib/copy-file.h: New file, from GNU gettext.
21964         * lib/copy-file.c: New file, from GNU gettext.
21965
21966 2003-03-18  Jim Meyering  <jim@meyering.net>
21967
21968         * lib/quote.c (quote_n): Fix typo in comment.
21969
21970 2003-03-18  Bruno Haible  <bruno@clisp.org>
21971
21972         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
21973         checking.
21974         * m4/onceonly_2_57.m4: Likewise.
21975
21976 2003-03-17  Bruno Haible  <bruno@clisp.org>
21977
21978         * m4/onceonly.m4: Require autoconf 2.54 or newer.
21979         (m4_quote): Remove macro.
21980         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
21981
21982 2003-03-14  Jim Meyering  <jim@meyering.net>
21983
21984         Merge changes from Coreutils.
21985         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
21986         to be const, in order to avoid warnings.
21987         (obstack_room): Likewise.
21988         (obstack_empty_p): Likewise.
21989
21990 2003-03-14  Bruno Haible  <bruno@clisp.org>
21991
21992         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
21993         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
21994
21995 2003-03-13  Paul Eggert  <eggert@twinsun.com>
21996
21997         Merge changes from Bison.
21998         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
21999         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
22000         when compiling Bison 1.875's `bitset bset = obstack_alloc
22001         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
22002         * lib/hash.c: Include <stdbool.h> unconditionally.
22003
22004 2003-03-13  Paul Eggert  <eggert@twinsun.com>
22005
22006         * m4/onceonly.m4 (m4_quote): New macro.
22007         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
22008         Quote AC_FOREACH variable-expansions properly.
22009
22010 2003-03-13  Paul Eggert  <eggert@twinsun.com>
22011
22012         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
22013
22014 2003-03-09  Paul Eggert  <eggert@twinsun.com>
22015
22016         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
22017         Reported by Bruce Becker; see:
22018         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
22019
22020 2003-03-03  Paul Eggert  <eggert@twinsun.com>
22021             Bruno Haible  <bruno@clisp.org>
22022
22023         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
22024         Reported by John Hughes, see
22025         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
22026
22027 2003-02-20  Bruno Haible  <bruno@clisp.org>
22028
22029         * MODULES.html.sh (func_all_modules): Add poll.
22030
22031 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
22032
22033         * modules/poll: New file.
22034
22035 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
22036
22037         * lib/poll_.h: New file.
22038         * lib/poll.c: New file.
22039
22040 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
22041
22042         * m4/poll.m4: New file.
22043
22044 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
22045
22046         * modules/mathl: New file.
22047
22048 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
22049
22050         * lib/mathl.h: New file.
22051         * lib/acosl.c: New file.
22052         * lib/asinl.c: New file.
22053         * lib/atanl.c: New file.
22054         * lib/ceill.c: New file.
22055         * lib/cosl.c: New file.
22056         * lib/expl.c: New file.
22057         * lib/floorl.c: New file.
22058         * lib/frexpl.c: New file.
22059         * lib/ldexpl.c: New file.
22060         * lib/logl.c: New file.
22061         * lib/sincosl.c: New file.
22062         * lib/sinl.c: New file.
22063         * lib/sqrtl.c: New file.
22064         * lib/tanl.c: New file.
22065         * lib/trigl.c: New file.
22066         * lib/trigl.h: New file.
22067
22068 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
22069
22070         * m4/mathl.m4: New file.
22071
22072 2003-02-18  Bruno Haible  <bruno@clisp.org>
22073
22074         * MODULES.html.sh (func_all_modules): Add mathl.
22075
22076 2003-02-17  Bruno Haible  <bruno@clisp.org>
22077
22078         * modules/mkdtemp: New module.
22079         * MODULES.html.sh (func_all_modules): Add it.
22080
22081 2003-02-17  Bruno Haible  <bruno@clisp.org>
22082
22083         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
22084
22085 2003-02-17  Bruno Haible  <bruno@clisp.org>
22086
22087         * lib/mkdtemp.h: New file, from GNU gettext.
22088         * lib/mkdtemp.c: New file, from GNU gettext.
22089
22090 2003-02-02  Jim Meyering  <jim@meyering.net>
22091
22092         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
22093         e.g. glibc-2.2.93.
22094
22095 2003-01-31  Bruno Haible  <bruno@clisp.org>
22096
22097         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
22098         'rpl_rename'.
22099         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
22100         'rpl_strnlen'.
22101         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
22102         'rpl_strtod'.
22103         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
22104         'rpl_utime'.
22105
22106 2003-01-31  Bruno Haible  <bruno@clisp.org>
22107
22108         * lib/rename.c: #undef rename before defining rpl_rename.
22109         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
22110
22111 2003-01-30  Bruno Haible  <bruno@clisp.org>
22112
22113         * modules/vasnprintf, modules/vasprintf: New modules.
22114         * MODULES.html.sh (func_all_modules): Add them.
22115
22116 2003-01-30  Bruno Haible  <bruno@clisp.org>
22117
22118         * m4/signed.m4: New file, from GNU gettext.
22119         * m4/longdouble.m4: New file, from GNU gettext.
22120         * m4/wchar_t.m4: New file, from GNU gettext.
22121         * m4/wint_t.m4: New file, from GNU gettext.
22122         * m4/vasnprintf.m4: New file.
22123         * m4/vasprintf.m4: New file.
22124
22125 2003-01-30  Bruno Haible  <bruno@clisp.org>
22126
22127         * lib/printf-args.h: New file, from GNU gettext.
22128         * lib/printf-args.c: New file, from GNU gettext.
22129         * lib/printf-parse.h: New file, from GNU gettext.
22130         * lib/printf-parse.c: New file, from GNU gettext.
22131         * lib/vasnprintf.h: New file, from GNU gettext.
22132         * lib/vasnprintf.c: New file, from GNU gettext.
22133         * lib/asnprintf.c: New file, from GNU gettext.
22134         * lib/vasprintf.h: New file, from GNU gettext with modifications.
22135         * lib/vasprintf.c: New file, from GNU gettext.
22136         * lib/asprintf.c: New file, from GNU gettext.
22137
22138 2003-01-29  Bruno Haible  <bruno@clisp.org>
22139
22140         * modules/stpncpy: New module.
22141         * MODULES.html.sh (func_all_modules): Add it.
22142
22143 2003-01-29  Bruno Haible  <bruno@clisp.org>
22144
22145         * m4/stpncpy.m4: New file.
22146
22147 2003-01-29  Bruno Haible  <bruno@clisp.org>
22148
22149         * lib/stpncpy.h: New file, from GNU gettext with modifications.
22150         * lib/stpncpy.c: New file, from GNU gettext with modifications.
22151
22152 2003-01-28  Bruno Haible  <bruno@clisp.org>
22153
22154         * modules/c-ctype: New module.
22155         * MODULES.html.sh (func_all_modules): Add it.
22156
22157 2003-01-28  Bruno Haible  <bruno@clisp.org>
22158
22159         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
22160         Paul Eggert.
22161         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
22162         Paul Eggert.
22163
22164 2003-01-27  Bruno Haible  <bruno@clisp.org>
22165
22166         * modules/xsetenv: New module.
22167         * MODULES.html.sh (func_all_modules): Add it.
22168
22169 2003-01-27  Bruno Haible  <bruno@clisp.org>
22170
22171         * lib/xsetenv.h: New file, from GNU gettext.
22172         * lib/xsetenv.c: New file, from GNU gettext.
22173
22174 2003-01-23  Jim Meyering  <jim@meyering.net>
22175
22176         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
22177         from working on systems without dirfd (at least Irix and OSF1/Tru64).
22178
22179 2003-01-23  Bruno Haible  <bruno@clisp.org>
22180
22181         * modules/minmax: New module.
22182         * MODULES.html.sh (func_all_modules): Add it.
22183
22184 2003-01-23  Bruno Haible  <bruno@clisp.org>
22185
22186         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
22187         Eggert.
22188
22189 2003-01-22  Bruno Haible  <bruno@clisp.org>
22190
22191         * modules/exit: New module.
22192         * MODULES.html.sh (func_all_modules): Add it.
22193
22194 2003-01-22  Bruno Haible  <bruno@clisp.org>
22195
22196         * lib/exit.h: New file, from GNU gettext.
22197
22198 2003-01-19  Bruno Haible  <bruno@clisp.org>
22199
22200         * gnulib-tool: Recognize option --extract-maintainer.
22201         (func_get_maintainer): New function.
22202         * modules/*: Add Maintainer entry.
22203
22204 2003-01-16  Jim Meyering  <jim@meyering.net>
22205
22206         * m4/regex.m4: The `regex' struct is both input and output.
22207         Initialize it before each use.  Patch by Tim Waugh.
22208
22209 2003-01-16  Bruno Haible  <bruno@clisp.org>
22210
22211         * MODULES.html.sh: Add a table of contents. Add the module name as
22212         leftmost column. Add hyperlinks.
22213
22214 2003-01-15  Bruno Haible  <bruno@clisp.org>
22215
22216         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
22217
22218 2003-01-15  Bruno Haible  <bruno@clisp.org>
22219
22220         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
22221         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
22222         suffix.
22223
22224 2003-01-15  Bruno Haible  <bruno@clisp.org>
22225
22226         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
22227
22228 2003-01-15  Bruno Haible  <bruno@clisp.org>
22229
22230         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
22231         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
22232
22233 2003-01-14  Jim Meyering  <jim@meyering.net>
22234
22235         * lib/same.c (same_name): Tweak a comment.
22236
22237 2003-01-14  Bruno Haible  <bruno@clisp.org>
22238
22239         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
22240         when a string comparison is sufficient.
22241
22242 2003-01-14  Bruno Haible  <bruno@clisp.org>
22243
22244         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
22245         'unsigned int'.
22246
22247 2003-01-14  Bruno Haible  <bruno@clisp.org>
22248
22249         * lib/hash-pjw.c: Add comment about low quality of this function.
22250
22251 2003-01-13  Bruno Haible  <bruno@clisp.org>
22252
22253         * modules/stpcpy: Distribute lib/stpcpy.h.
22254         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
22255
22256 2003-01-13  Bruno Haible  <bruno@clisp.org>
22257
22258         * modules/*: Add a description.
22259         * modules/strpbrk: Fix Makefile.am snippet.
22260         * modules/strtoimax: Fix dependencies.
22261         * modules/strtoumax: Likewise.
22262
22263 2003-01-13  Bruno Haible  <bruno@clisp.org>
22264
22265         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
22266         * modules/alloca (Makefile.am): All object files depend on alloca.h.
22267         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
22268
22269 2003-01-13  Bruno Haible  <bruno@clisp.org>
22270
22271         * gnulib-tool (func_create_testdir): Store config/* files in the main
22272         directory.
22273         * config.rpath: Move to ...
22274         * config/config.rpath: ... here.
22275         * modules/gettext: Contains config/config.rpath, not config.rpath.
22276         * modules/iconv: Likewise.
22277
22278 2003-01-12  Paul Eggert  <eggert@twinsun.com>
22279
22280         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
22281         to avoid collisions with libcurses and libreadline.
22282
22283         * m4/getstr.m4: Remove.
22284         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
22285
22286 2003-01-12  Paul Eggert  <eggert@twinsun.com>
22287
22288         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
22289         to avoid collisions with libcurses and libreadline.
22290
22291         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
22292         * lib/getstr.h, getstr.c: Remove.
22293         * lib/getline.c: Include "getline.h", to check interface.
22294         Move body of old getstr.c here: this defines MIN_CHUNK and
22295         declares getdelim2, which is renamed from getstr.
22296         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
22297
22298         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
22299         All uses changed.
22300         * lib/linebuffer.h: Likewise.
22301         (readline): Remove backward-compatibility macro.
22302
22303 2003-01-12  Paul Eggert  <eggert@twinsun.com>
22304
22305         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
22306         to avoid collisions with libcurses and libreadline.
22307         * getstr: Remove.
22308         * MODULES.html.sh: Remove getstr.
22309         * modules/getline: Depend on unlocked-io, not getstr.
22310
22311 2003-01-12  Jim Meyering  <jim@meyering.net>
22312
22313         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
22314
22315 2003-01-10  Bruno Haible  <bruno@clisp.org>
22316
22317         * modules/alloca: Change Makefile.am requirements. Simplify Include
22318         requirements. Add lib/alloca_.h to file list.
22319
22320 2003-01-10  Bruno Haible  <bruno@clisp.org>
22321
22322         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
22323
22324 2003-01-10  Bruno Haible  <bruno@clisp.org>
22325
22326         * lib/alloca_.h: New file.
22327         * lib/getdate.y: Unconditionally include alloca.h.
22328         * lib/makepath.c: Likewise.
22329         * lib/setenv.c: Likewise.
22330         * lib/userspec.c: Likewise.
22331
22332 2003-01-09  Karl Berry  <karl@gnu.org>
22333
22334         * MODULES.html.sh: include `dirname $0` in PATH, to find
22335         gnulib-tool.
22336
22337 2003-01-09  Bruno Haible  <bruno@clisp.org>
22338
22339         * modules/stdbool: Change configure.ac, Makefile.am requirements.
22340         Simplify Include requirements. Add lib/stdbool.h.in to file list.
22341
22342 2003-01-09  Bruno Haible  <bruno@clisp.org>
22343
22344         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
22345
22346 2003-01-09  Bruno Haible  <bruno@clisp.org>
22347
22348         * lib/stdbool.h.in: New file.
22349
22350 2003-01-09  Bruno Haible  <bruno@clisp.org>
22351
22352         * gnulib-tool (func_all_modules): Ignore files ending in ~.
22353         * MODULES.html.sh: Likewise.
22354
22355 2003-01-08  Jim Meyering  <jim@meyering.net>
22356
22357         * lib/full-write.c: Undefine and define-away `const' after inclusion
22358         of errno.h, not before.  Suggestion from Bruno Haible.
22359
22360 2003-01-08  Bruno Haible  <bruno@clisp.org>
22361
22362         * modules/full-read: Depend on full-write.
22363
22364 2003-01-08  Bruno Haible  <bruno@clisp.org>
22365
22366         * lib/safe-read.c: Include specification header first, to ensure its
22367         selfcontainedness.
22368         * lib/full-write.c: Likewise.
22369
22370 2003-01-07  Jim Meyering  <jim@meyering.net>
22371
22372         * lib/full-write.c: Rework so that it may serve to define full_read,
22373         too.
22374         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
22375
22376 2003-01-07  Bruno Haible  <bruno@clisp.org>
22377
22378         * lib/strtoimax.c: Include <stdint.h> as an alternative to
22379         <inttypes.h>.
22380         * lib/xstrtol.h: Likewise.
22381         * lib/xstrtoimax.c: Likewise.
22382         * lib/xstrtoumax.c: Likewise.
22383         * lib/human.h: Likewise.
22384
22385         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
22386         on systems that have <inttypes.h> but not <stdint.h>.
22387
22388 2003-01-07  Bruno Haible  <bruno@clisp.org>
22389
22390         * MODULES.html.sh: Add copyright notice.
22391         (missed_files): Omit CVS directory entries.
22392         (func_module): Make it work with sed-3.02.
22393         * MODULES.txt: Remove file.
22394
22395 2003-01-06  Jim Meyering  <jim@meyering.net>
22396
22397         * lib/version-etc.c: Update year in translatable copyright string.
22398
22399 2003-01-03  Karl Berry  <karl@gnu.org>
22400
22401         * config/config.{guess,sub}: update from prep.
22402
22403 2003-01-02  Karl Berry  <karl@gnu.org>
22404
22405         * doc/COPYING.DOC: belatedly updated to 1.2.
22406
22407 2003-01-01  Karl Berry  <karl@gnu.org>
22408
22409         * gnulib-tool (func_verify_module): report module name $module in
22410         error message, not $1.
22411         * gnulib-tool (create-testdir): don't complain if destdir couldn't
22412         be created, only if it doesn't exist.
22413         * gnulib-tool (last_checkin_date): don't expand the $Date here.
22414
22415 2002-12-31  Paul Eggert  <eggert@twinsun.com>
22416
22417         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
22418
22419 2002-12-31  Paul Eggert  <eggert@twinsun.com>
22420
22421         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
22422         memcmp if strcoll doesn't work.
22423
22424 2002-12-31  Bruno Haible  <bruno@clisp.org>
22425
22426         * lib/utime.c (utime_null): No need to call ftruncate if the file was
22427         nonempty.
22428
22429 2002-12-31  Bruno Haible  <bruno@clisp.org>
22430
22431         * lib/memcoll.c (STRCOLL): New macro.
22432         (memcoll): Use it.
22433
22434 2002-12-31  Bruno Haible  <bruno@clisp.org>
22435
22436         * lib/localcharset.h: New file.
22437         * lib/localcharset.c: Include it.
22438         * lib/unicodeio.c: Likewise.
22439
22440 2002-12-31  Bruno Haible  <bruno@clisp.org>
22441
22442         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
22443         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
22444
22445 2002-12-31  Bruno Haible  <bruno@clisp.org>
22446
22447         * lib/getline.h: Include <stddef.h>, for size_t.
22448
22449         * lib/unicodeio.h: Include <stddef.h>, for size_t.
22450         * lib/unicodeio.c: Don't include <stddef.h>.
22451
22452 2002-12-31  Bruno Haible  <bruno@clisp.org>
22453
22454         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
22455         HAVE_TM_ZONE.
22456
22457 2002-12-24  Karl Berry  <karl@gnu.org>
22458
22459         * config/config.guess: update from prep.
22460
22461 2002-12-24  Bruno Haible  <bruno@clisp.org>
22462
22463         General infrasructure.
22464         * m4/README: Rewritten.
22465         * m4/onceonly.m4: New file.
22466         * m4/onceonly_2_57.m4: New file.
22467
22468         Module atexit.
22469         * m4/atexit.m4: New file.
22470
22471         Module strtod.
22472         * m4/strtod.m4: New file.
22473
22474         Module strtol.
22475         * m4/strtol.m4: New file.
22476
22477         Module strtoul.
22478         * m4/strtoul.m4: New file.
22479
22480         Module memchr.
22481         * m4/memchr.m4: New file.
22482
22483         Module memcmp.
22484         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
22485         (jm_FUNC_MEMCMP): Invoke it.
22486
22487         Module memcpy.
22488         * m4/memcpy.m4: New file.
22489
22490         Module memmove.
22491         * m4/memmove.m4: New file.
22492
22493         Module memset.
22494         * m4/memset.m4: New file.
22495
22496         Module strcspn.
22497         * m4/strcspn.m4: New file.
22498
22499         Module strpbrk.
22500         * m4/strpbrk.m4: New file.
22501
22502         Module strstr.
22503         * m4/strstr.m4: New file.
22504
22505         Module strerror.
22506         * m4/strerror.m4: New file.
22507
22508         Module mktime.
22509         * m4/mktime.m4: Renamed from jm-mktime.m4.
22510         (gl_PREREQ_MKTIME): New macro.
22511         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
22512
22513         Module malloc.
22514         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
22515         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
22516         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
22517
22518         Module realloc.
22519         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
22520         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
22521         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
22522
22523         Module strftime.
22524         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
22525         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
22526         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
22527         gl_TM_GMTOFF.
22528         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
22529
22530         Module xalloc.
22531         * m4/xalloc.m4: New file.
22532
22533         Module alloca.
22534         * m4/alloca.m4: New file.
22535
22536         Module putenv.
22537         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
22538         (jm_FUNC_PUTENV): Invoke it.
22539
22540         Module setenv.
22541         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
22542         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
22543         when invoked twice.
22544         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
22545         gt_FUNC_SETENV.
22546
22547         Module memrchr.
22548         * m4/memrchr.m4: New file.
22549
22550         Module stpcpy.
22551         * m4/stpcpy.m4: New file.
22552
22553         Module strcase.
22554         * m4/strcase.m4: New file.
22555
22556         Module strdup.
22557         * m4/strdup.m4: New file.
22558
22559         Module strnlen.
22560         * m4/strnlen.m4: New file.
22561
22562         Module strndup.
22563         * m4/strndup.m4: New file.
22564
22565         Module xstrtod.
22566         * m4/xstrtod.m4: New file.
22567
22568         Module xstrtol.
22569         * m4/xstrtol.m4: New file.
22570
22571         Module getdate.
22572         * m4/getdate.m4: New file.
22573
22574         Module unlocked-io.
22575         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
22576         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
22577         * m4/jm-glibc-io.m4n: Remove file.
22578
22579         Module long-options.
22580         * m4/long-options.m4: New file.
22581
22582         Module md5.
22583         * m4/md5.m4: New file.
22584
22585         Module sha.
22586         * m4/sha.m4: New file.
22587
22588         Module getstr.
22589         * m4/getstr.m4: New file.
22590
22591         Module getline.
22592         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
22593         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
22594         <sys/types.h>, for size_t. Use the function name gnu_getline, not
22595         simply getline. Infoke gl_PREREQ_GETLINE.
22596
22597         Module obstack.
22598         * m4/obstack.m4: New file.
22599
22600         Module hash.
22601         * m4/hash.m4: New file.
22602
22603         Module readtokens.
22604         * m4/readtokens.m4: New file.
22605
22606         Module strverscmp.
22607         * m4/strverscmp.m4: New file.
22608
22609         Module stdbool.
22610         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
22611         OSF/1.
22612
22613         Module strtoll.
22614         * m4/strtoll.m4: New file.
22615
22616         Module strtoull.
22617         * m4/strtoull.m4: New file.
22618
22619         Module strtoimax.
22620         * m4/strtoimax.m4: New file.
22621
22622         Module strtoumax.
22623         * m4/strtoumax.m4: New file.
22624
22625         Module xstrtoimax.
22626         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
22627         jm_AC_PREREQ_XSTRTOIMAX.
22628         Moved the strtol prerequisites to strtol.m4.
22629         Moved the strtoll prerequisites to strtoll.m4.
22630         Moved the strtoimax prerequisites to strtoimax.m4.
22631
22632         Module xstrtoumax.
22633         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
22634         jm_AC_PREREQ_XSTRTOUMAX.
22635         Moved the strtoul prerequisites to strtoul.m4.
22636         Moved the strtoull prerequisites to strtoull.m4.
22637         Moved the strtoumax prerequisites to strtoumax.m4.
22638
22639         Module chown.
22640         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
22641         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
22642
22643         Module dup2.
22644         * m4/dup2.m4: New file.
22645
22646         Module ftruncate.
22647         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
22648         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
22649
22650         Module getgroups.
22651         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
22652         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
22653
22654         Module gettimeofday.
22655         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
22656         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
22657         gl_PREREQ_GETTIMEOFDAY.
22658
22659         Module mkdir.
22660         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
22661         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
22662
22663         Module mkstemp.
22664         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
22665         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
22666         jm_AC_TYPE_UINTMAX_T.
22667         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
22668
22669         Module stat.
22670         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
22671         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
22672
22673         Module lstat.
22674         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
22675         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
22676
22677         Module timespec.
22678         * m4/timespec.m4 (gl_TIMESPEC): New macro.
22679         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
22680         * m4/st_mtim.m4: Indentation.
22681
22682         Module nanosleep.
22683         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
22684         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
22685         gl_PREREQ_NANOSLEEP.
22686
22687         Module regex.
22688         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
22689         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
22690         (gl_REGEX): New macro.
22691
22692         Module rename.
22693         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
22694         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
22695
22696         Module rmdir.
22697         * m4/rmdir.m4: New file.
22698
22699         Module utime.
22700         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
22701         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
22702         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
22703
22704         Module dirname.
22705         * m4/dirname.m4: New file.
22706
22707         Module getopt.
22708         * m4/getopt.m4: New file.
22709
22710         Module unistd-safer.
22711         * m4/unistd-safer.m4: New file.
22712
22713         Module fnmatch.
22714         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
22715         declaration.
22716         (gl_PREREQ_FNMATCH_EXTRA): New macro.
22717         (gl_FUNC_FNMATCH_POSIX): New macro.
22718         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
22719         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
22720         simply fnmatch.
22721
22722         Module exclude.
22723         * m4/exclude.m4: New file.
22724
22725         Module human.
22726         * m4/human.m4: New file.
22727
22728         Module acl.
22729         * m4/acl.m4: Nop.
22730
22731         Module backupfile.
22732         * m4/backupfile.m4: New file.
22733         * m4/d-ino.m4: Indentation.
22734
22735         Module fsusage.
22736         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
22737         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
22738         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
22739
22740         Module dirfd.
22741         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
22742         requirements.
22743
22744         Module euidaccess.
22745         * m4/euidaccess.m4: New file.
22746
22747         Module file-type.
22748         * m4/file-type.m4: New file.
22749
22750         Module fileblocks.
22751         * m4/fileblocks.m4: New file.
22752
22753         Module filemode.
22754         * m4/filemode.m4: New file.
22755
22756         Module isdir.
22757         * m4/isdir.m4: New file.
22758
22759         Module lchown.
22760         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
22761         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
22762
22763         Module makepath.
22764         * m4/makepath.m4: New file.
22765
22766         Module modechange.
22767         * m4/modechange.m4: New file.
22768
22769         Module mountlist.
22770         * m4/mountlist.m4: New file.
22771         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
22772         Indentation.
22773
22774         Module path-concat.
22775         * m4/path-concat.m4: New file.
22776
22777         Module pathmax.
22778         * m4/pathmax.m4: New file.
22779
22780         Module same.
22781         * m4/same.m4: New file.
22782
22783         Module save-cwd.
22784         * m4/save-cwd.m4: New file.
22785
22786         Module savedir.
22787         * m4/savedir.m4: New file.
22788
22789         Module xgetcwd.
22790         * m4/xgetcwd.m4: New file.
22791         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
22792
22793         Module xreadlink.
22794         * m4/xreadlink.m4: New file.
22795
22796         Module safe-read.
22797         * m4/safe-read.m4: New file.
22798
22799         Module safe-write.
22800         * m4/safe-write.m4: New file.
22801
22802         Module closeout.
22803         * m4/closeout.m4: New file.
22804
22805         Module stdio-safer.
22806         * m4/stdio-safer.m4: New file.
22807
22808         Module getpass.
22809         * m4/getpass.m4: New file.
22810
22811         Module getugroups.
22812         * m4/getugroups.m4: New file.
22813
22814         Module group-member.
22815         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
22816         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
22817
22818         Module idcache.
22819         * m4/idcache.m4: New file.
22820
22821         Module userspec.
22822         * m4/userspec.m4: New file.
22823
22824         Module gettime.
22825         * m4/clock_time.m4: New file.
22826         * m4/gettime.m4: New file.
22827
22828         Module settime.
22829         * m4/settime.m4: New file.
22830
22831         Module posixtm.
22832         * m4/posixtm.m4: New file.
22833
22834         Module gethostname.
22835         * m4/gethostname.m4: New file.
22836
22837         Module canon-host.
22838         * m4/canon-host.m4: New file.
22839
22840         Module gettext.
22841         * m4/codeset.m4: New file, from gettext-0.11.5.
22842         * m4/gettext.m4: New file, from gettext-0.11.5.
22843         * m4/glibc21.m4: New file, from gettext-0.11.5.
22844         * m4/iconv.m4: New file, from gettext-0.11.5.
22845         * m4/intdiv0.m4: New file, from gettext-0.11.5.
22846         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
22847         * m4/inttypes.m4: New file, from gettext-0.11.5.
22848         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
22849         * m4/isc-posix.m4: New file, from gettext-0.11.5.
22850         * m4/lcmessage.m4: New file, from gettext-0.11.5.
22851         * m4/lib-ld.m4: New file, from gettext-0.11.5.
22852         * m4/lib-link.m4: New file, from gettext-0.11.5.
22853         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
22854         * m4/progtest.m4: New file, from gettext-0.11.5.
22855         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
22856         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
22857         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
22858
22859         Module localcharset.
22860         * m4/localcharset.m4: New file.
22861
22862         Module hard-locale.
22863         * m4/hard-locale.m4: New file.
22864
22865         Module mbswidth.
22866         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
22867         onceonly macros.
22868         * m4/mbrtowc.m4: Add comment.
22869
22870         Module memcasecmp.
22871         * m4/memcasecmp.m4: New file.
22872
22873         Module memcoll.
22874         * m4/memcoll.m4: New file.
22875
22876         Module unicodeio.
22877         * m4/unicodeio.m4: New file.
22878
22879         Module rpmatch.
22880         * m4/rpmatch.m4: New file.
22881
22882         Module yesno.
22883         * m4/yesno.m4: New file.
22884
22885         Module exitfail.
22886         * m4/exitfail.m4: New file.
22887
22888         Module c-stack.
22889         * m4/c-stack.m4 (gl_C_STACK): New macro.
22890         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
22891
22892         Module error.
22893         * m4/error.m4 (gl_ERROR): New macro.
22894         (jm_PREREQ_ERROR): Use onceonly macros.
22895
22896         Module fatal.
22897         * m4/fatal.m4: New file.
22898
22899         Module getloadavg.
22900         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
22901         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
22902
22903         Module getpagesize.
22904         * m4/getpagesize.m4: New file.
22905
22906         Module getusershell.
22907         * m4/getusershell.m4: New file.
22908
22909         Module physmem.
22910         * m4/physmem.m4: New file.
22911
22912         Module posixver.
22913         * m4/posixver.m4: New file.
22914
22915         Module quotearg.
22916         * m4/quotearg.m4: New file.
22917
22918         Module quote.
22919         * m4/quote.m4: New file.
22920
22921         Module readutmp.
22922         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
22923
22924         Module sig2str.
22925         * m4/sig2str.m4: New file.
22926
22927         Other.
22928         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
22929         ulonglong.m4.
22930         * m4/intmax_t.m4: New file.
22931         * m4/d-type.m4: Indentation.
22932         * m4/jm-macros.m4: Update.
22933         * m4/prereq.m4 (jm_PREREQ): Update.
22934         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
22935         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
22936         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
22937         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
22938         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
22939         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
22940         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
22941         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
22942         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
22943         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
22944         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
22945         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
22946         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
22947         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
22948         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
22949         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
22950         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
22951         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
22952         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
22953
22954 2002-12-24  Bruno Haible  <bruno@clisp.org>
22955
22956         * MODULES.txt: Update according to m4/ changes.
22957
22958         Module gettext.
22959         * config.rpath: New file, from gettext-0.11.5.
22960
22961         * modules/*: New module descriptions.
22962         * gnulib-tool: New file.
22963         * MODULES.html.sh: New file.
22964
22965 2002-12-21  Karl Berry  <karl@gnu.org>
22966
22967         * doc/fdl.texi: update to version 1.2.
22968
22969 2002-12-19  Karl Berry  <karl@gnu.org>
22970
22971         * config/config.guess: update from prep.
22972
22973 2002-12-18  Bruno Haible  <bruno@clisp.org>
22974
22975         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
22976         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
22977
22978 2002-12-17  Bruno Haible  <bruno@clisp.org>
22979
22980         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
22981         stdlib.h, string.h.
22982
22983 2002-12-17  Bruno Haible  <bruno@clisp.org>
22984
22985         * lib/canon-host.c (strdup): Remove unused declaration.
22986
22987         * lib/fsusage.c: Include full_read.h.
22988         (get_fs_usage): Use full_read instead of safe_read.
22989
22990         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
22991
22992 2002-12-12  Karl Berry  <karl@gnu.org>
22993
22994         * config/config.guess: update from prep.
22995
22996 2002-12-11  Bruno Haible  <bruno@clisp.org>
22997
22998         * m4/setenv.m4: New file, from gettext-0.11.5.
22999
23000 2002-12-11  Bruno Haible  <bruno@clisp.org>
23001
23002         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
23003         not unsetenv().
23004         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
23005         modifications:
23006
23007         2002-12-11  Bruno Haible  <bruno@clisp.org>
23008
23009                 * setenv.c (alloca): Fall back to malloc.
23010                 (freea): New macro.
23011                 (setenv): Use freea() to free memory allocated with alloca().
23012
23013         2002-11-13  Bruno Haible  <bruno@clisp.org>
23014
23015                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
23016                 function declarations.
23017                 * unsetenv.c (unsetenv): Likewise.
23018
23019         2002-03-04  Bruno Haible  <bruno@clisp.org>
23020
23021                 Portability to AIX 4.3.3.
23022                 * unsetenv.c: New file, extracted from setenv.c.
23023                 * setenv.c: Move the unsetenv() function to unsetenv.c.
23024
23025         2001-12-20  Bruno Haible  <bruno@clisp.org>
23026
23027                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
23028                 use malloc instead. For SunOS 4.
23029
23030         2001-12-11  Bruno Haible  <bruno@clisp.org>
23031
23032                 * setenv.c: Declare alloca.
23033                 (compar_fn_t): New typedef.
23034                 (KNOWN_VALUE, STORE_VALUE): Use it.
23035
23036         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
23037         setenv.h.
23038
23039 2002-12-10  Paul Eggert  <eggert@twinsun.com>
23040
23041         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
23042         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
23043         Choose values that are less likely to collide with system fnmatch
23044         options.
23045         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
23046         defined (e.g., a pure POSIX system).
23047         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
23048         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
23049
23050 2002-12-06  Paul Eggert  <eggert@twinsun.com>
23051
23052         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
23053         a pain in practice to deal with generated m4 files.  This change
23054         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
23055
23056         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
23057         and jm-glibc-io.m4, as they are no longer a special case.
23058         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
23059         kludge and the auto-generation stuff.  Check only whether the
23060         functions are declared, not whether they exist, since older hosts
23061         that don't declare the functions can't use the optimization anyway.
23062
23063 2002-12-06  Jim Meyering  <jim@meyering.net>
23064
23065         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
23066
23067         Merge in changes from libc's misc/error.c, in preparation
23068         for the merge of gnulib's changes back into libc.
23069
23070         * lib/error.c (_): Define only if not already defined.
23071         Move definition to follow all #include directives.
23072         Include unlocked-io.h only if !_LIBC.
23073         [_LIBC]: Include <libio/libioP.h>.
23074         [USE_IN_LIBIO]: Include <libio/iolibio.h>
23075         (fflush): Tweak definition to use INTUSE.
23076         (putc): Define.
23077
23078 2002-12-05  Paul Eggert  <eggert@twinsun.com>
23079
23080         * lib/alloca.c [defined emacs]: Include "lisp.h".
23081         (xalloc_die) [defined emacs]: New macro.
23082         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
23083         [! defined emacs]: Include <xalloc.h>.
23084         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
23085         (pointer): Typedef to POINTER_TYPE *.
23086         (malloc): Remove decl; we now always use xmalloc.
23087         (alloca): Use old-style definition, since Emacs needs this.
23088         Check for arithmetic overflow when computing combined size.
23089
23090 2002-12-04  Paul Eggert  <eggert@twinsun.com>
23091
23092         Do not generate unlocked-io.h automatically, since it's easier to
23093         maintain it by hand.
23094
23095         * lib/unlocked-io.h: New file, from GNU diffutils,
23096         but with proper copyright notice and attribution.
23097         * lib/gen-uio: Remove.
23098         * lib/Makefile.am: Add copyright notice.
23099         (libfetish_a_SOURCES): Add unlocked-io.h.
23100         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
23101         (DISTCLEANFILES, io_functions): Remove macros.
23102         (EXTRA_DIST): Remove gen_uio.
23103         (unlocked-io.h): Remove rule.
23104
23105 2002-12-04  Jim Meyering  <jim@meyering.net>
23106
23107         Reflect the fact that stat.c and lstat.c are no longer generated.
23108         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
23109         (DISTCLEANFILES): Likewise.
23110         (EXTRA_DIST): Likewise.
23111         (all_local): Don't depend on stat.c or lstat.c.
23112         (stat.c, lstat.c): Remove rules.
23113         (EXTRA_DIST): Remove xstat.in.
23114
23115         * lib/xstat.in: Remove file.  Contents moved into stat.c.
23116         * lib/stat.c: New file.  Contents mostly from xstat.in.
23117         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
23118         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
23119
23120         * lib/safe-read.c: Rework so that it may serve to define safe_write,
23121         too.
23122         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
23123
23124 2002-12-03  Jim Meyering  <jim@meyering.net>
23125
23126         * lib/safe-read.c, safe-write.c: Change variable names and comments,
23127         but not semantics, to minimize the differences between these two files.
23128         (safe_read): Change comment to mention SAFE_READ_ERROR.
23129
23130         * lib/safe-read.c (IS_EINTR): Define.
23131         (safe_read): Use IS_EINTR in place of in-function cpp directives.
23132
23133 2002-12-02  Jim Meyering  <jim@meyering.net>
23134
23135         * lib/safe-read.c (EINTR): Define.
23136         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
23137         (INT_MAX): Provide fallback.
23138         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
23139
23140         * lib/safe-read.h (SAFE_READ_ERROR): Define.
23141
23142 2002-12-02  Bruno Haible  <bruno@clisp.org>
23143
23144         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
23145         Define, taken from safe-read.c.
23146         (INT_MAX): Provide fallback.
23147         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
23148         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
23149
23150         * lib/safe-read.c (EINTR): Remove definition.
23151         (safe_read): Don't use EINTR if it is absent.
23152
23153 2002-12-01  Jim Meyering  <jim@meyering.net>
23154
23155         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
23156         zero.
23157         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
23158
23159 2002-11-27  Paul Eggert  <eggert@twinsun.com>
23160
23161         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
23162         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
23163         with `if (! (value < limit)) abort ();', for readability.
23164
23165 2002-11-26  Karl Berry  <karl@gnu.org>
23166
23167         * lib/strdup.c: copy from libc again, with jim's ok.
23168         * lib/.cppi-disable: re-add strdup.c
23169
23170 2002-11-25  Karl Berry  <karl@gnu.org>
23171
23172         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
23173         instead of "strtol.c".
23174
23175 2002-11-25  Karl Berry  <karl@gnu.org>
23176
23177         * config/install-sh: update from automake for variable quoting, $0 in
23178         error msgs, etc.
23179
23180         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
23181         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
23182         entry.
23183
23184 2002-11-25  Jim Meyering  <jim@meyering.net>
23185
23186         * lib/mktime.c: Sync from libc, now that it has the latest fix.
23187
23188 2002-11-24  Karl Berry  <karl@gnu.org>
23189
23190         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
23191         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
23192
23193 2002-11-24  Jim Meyering  <jim@meyering.net>
23194
23195         Update from coreutils:
23196
23197         * lib/mktime.c: Merge in changes from libc.
23198
23199         Avoid a link-time failure on some Linux systems.
23200         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
23201         (otherwise).
23202         (__mon_yday): Declare with the STATIC attribute.
23203         (__mktime_internal): Likewise.
23204         Based on a report from Greg Schafer.
23205
23206 2002-11-23  Jim Meyering  <jim@meyering.net>
23207
23208         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
23209         Use `unsigned', not `int', as type of index.
23210
23211         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
23212
23213         * lib/fsusage.c: Remove unneeded parentheses around operands of
23214         `defined'.
23215
23216 2002-11-22  Paul Eggert  <eggert@twinsun.com>
23217
23218         * lib/quotearg.h: Allow multiple inclusion by surrounding with
23219         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
23220         so that we can be included first.
23221         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
23222         * lib/quotearg.c: Include quotearg.h immediately after config.h.
23223         No need to include stddef.h or sys/types.h any more.
23224         Surround local include files with "", not "<>".
23225         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
23226         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
23227         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
23228         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
23229         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
23230         (ISPRINT): Remove; no longer needed now that we assume C89.
23231
23232         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
23233         Preserve errno.
23234
23235         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
23236         quotearg_char): Use SIZE_MAX rather than
23237         (size_t) -1 when we are talking about "infinity".
23238
23239         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
23240
23241 2002-11-22  Paul Eggert  <eggert@twinsun.com>
23242
23243         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
23244         hint that one should use `if (! x) abort ();' rather than `assert
23245         (x);', and anyway it's one less thing to worry about configuring.
23246         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
23247         hash_rehash, hash_insert): Use abort rather than assert.
23248
23249 2002-11-22  Bruno Haible  <bruno@clisp.org>
23250
23251         * lib/safe-read.h: Assume C89. Add comments.
23252         (safe_read): Change return type to size_t.
23253         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
23254         byte counts > SSIZE_MAX correctly.
23255         * lib/safe-write.h: New file.
23256         * lib/safe-write.c: New file.
23257         * lib/full-read.h: New file.
23258         * lib/full-read.c: New file.
23259         * lib/full-write.h: Assume C89. Add comments.
23260         * lib/full-write.c: Include safe-write.h.
23261         (full_write): Rewritten to use safe_write.
23262         Suggested by Jim Meyering and Paul Eggert.
23263
23264 2002-11-21  Jim Meyering  <jim@meyering.net>
23265
23266         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
23267
23268         Merge in changes from the coreutils.
23269
23270         2002-09-25  Paul Eggert  <eggert@twinsun.com>
23271         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
23272         <stdint.h>.
23273         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
23274         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
23275         int.  Work more efficiently if X is the same width as uintmax_t.
23276         Do not compare X to -1, to avoid bogus compiler warning.
23277         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
23278         Don't assume that f_frsize and f_bsize are the same type.
23279
23280         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
23281         warning on FreeBSD.
23282
23283         * lib/makepath.c (make_path): Restore umask *before* creating the final
23284         component.
23285         (make_path): Minor reformatting.
23286
23287         * lib/xmalloc.c: Adjust to work with new autoconf macros,
23288         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
23289         HAVE_MALLOC/HAVE_REALLOC.
23290
23291         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
23292         dummy ones.  At least on GNU/Linux systems, `auto' means something
23293         else.
23294         From Michael Stone.
23295
23296 2002-11-21  Bruno Haible  <bruno@clisp.org>
23297
23298         Remove case insensitive option matching.
23299         * lib/argmatch.h (argcasematch): Remove declaration.
23300         (ARGCASEMATCH): Remove macro.
23301         (__xargmatch_internal): Remove case_sensitive argument.
23302         (XARGMATCH): Update.
23303         (XARGCASEMATCH): Remove macro.
23304         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
23305         case_sensitive argument.
23306         (argcasematch): Remove function.
23307         (__xargmatch_internal): Remove case_sensitive argument.
23308         (main): Use XARGMATCH instead of XARGCASEMATCH.
23309
23310         * lib/xmalloc.c: Change compile-time error message. Add comment about
23311         required autoconf version.
23312
23313 2002-11-20  Paul Eggert  <eggert@twinsun.com>
23314
23315         Merge argmatch cleanups from Bison.  Assume C89.
23316
23317         * lib/argmatch.c: Include config.h here, not in argmatch.h.
23318         Include stdlib.h, for EXIT_FAILURE.
23319         Always include <string.h>, since we assume C89.
23320         (EXIT_FAILURE): Remove pre-C89 bug workaround.
23321         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
23322         Include <stddef.h> instead, since it's all we need for size_t.
23323         (PARAMS): Remove.  All uses removed.
23324         (ARRAY_CARDINALITY): Do not bother to #undef.
23325         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
23326         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
23327         Remove unnecessary parentheses.
23328         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
23329         Insert necessary parentheses.
23330         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
23331         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
23332
23333 2002-11-19  Bruno Haible  <bruno@clisp.org>
23334
23335         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
23336         * lib/mbswidth.h: Include <stddef.h>, for size_t.
23337
23338         * lib/mbswidth.h (PARAMS): Remove macro.
23339         (mbswidth, mbsnwidth): Use ANSI C function declarations.
23340         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
23341
23342         * lib/gcd.h (PARAMS): Remove macro.
23343         (gcd): Use ANSI C function declarations.
23344         * lib/gcd.c (gcd): Likewise.
23345
23346 2002-11-15  Bruno Haible  <bruno@clisp.org>
23347
23348         * lib/strcspn.c: Include <stddef.h>.
23349         (strcspn): Use ANSI C function declaration. Change return type to
23350         size_t. Use NULL.
23351         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
23352         (strpbrk): Use NULL.
23353         * lib/strpbrk.h (PARAMS): Remove macro.
23354         (strpbrk): Use ANSI C function declaration.
23355         * lib/strstr.c: Don't include <sys/types.h>.
23356         * lib/strstr.h (PARAMS): Remove macro.
23357         (strstr): Use ANSI C function declarations.
23358
23359 2002-11-14  Karl Berry  <karl@gnu.org>
23360
23361         * config/mkinstalldirs: `do' on separate line, instead of
23362         `for var; do'.
23363
23364 2002-11-06  Bruno Haible  <bruno@clisp.org>
23365
23366         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
23367         * lib/gcd.c (gcd): Likewise.
23368
23369 2002-11-05  Bruno Haible  <bruno@clisp.org>
23370
23371         * lib/gcd.h: New file, from gettext-0.11.5.
23372         * lib/gcd.c: New file, from gettext-0.11.5.
23373
23374 2002-11-05  Bruno Haible  <bruno@clisp.org>
23375
23376         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
23377         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
23378         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
23379         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
23380
23381         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
23382         <libintl.h>.
23383         * lib/makepath.c: Include gettext.h instead of <locale.h> and
23384         <libintl.h>.
23385
23386         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
23387         * lib/human.c: Include gettext.h instead of <libintl.h>.
23388         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
23389         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
23390         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
23391         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
23392         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
23393         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
23394         (textdomain): Remove definition.
23395         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
23396
23397         * lib/long-options.c: Remove include of <libintl.h> and definition of
23398         _.
23399         * lib/same.c: Remove include of <libintl.h> and definition of _.
23400
23401 2002-11-04  Owen Taylor  <otaylor@redhat.com>
23402
23403         * lib/config.charset: A few additions for Solaris.
23404
23405 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
23406
23407         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
23408         * lib/localcharset.c (locale_charset): Declare as extern "C".
23409
23410 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
23411
23412         * lib/config.charset: msdos in uk_UA uses CP1125.
23413
23414 2002-11-04  Bruno Haible  <bruno@clisp.org>
23415
23416         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
23417         * lib/strcase.h: New file, from GNU gettext-0.11.5.
23418         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
23419         * lib/strstr.h: New file, from GNU gettext-0.11.5.
23420         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
23421
23422 2002-11-04  Bruno Haible  <bruno@clisp.org>
23423
23424         * lib/localcharset.c (locale_charset): Don't return an empty string.
23425
23426 2002-11-04  Bruno Haible  <bruno@clisp.org>
23427
23428         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
23429         aliases.
23430
23431 2002-11-04  Bruno Haible  <bruno@clisp.org>
23432
23433         * lib/config.charset: Update for newest glibc. Add canonical names
23434         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
23435
23436 2002-11-04  Bruno Haible  <bruno@clisp.org>
23437
23438         * lib/config.charset: Add support for NetBSD.
23439
23440 2002-11-04  Bruno Haible  <bruno@clisp.org>
23441
23442         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
23443
23444 2002-11-01  Bruno Haible  <bruno@clisp.org>
23445
23446         * configure.in: Add AC_CONFIG_AUX_DIR call.
23447         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
23448         test/Makefile.
23449         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
23450
23451 2002-09-28  Karl Berry  <karl@gnu.org>
23452
23453         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
23454         installed automake until the next release, since changes have been
23455         made.
23456
23457 2002-09-25  Karl Berry  <karl@gnu.org>
23458
23459         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
23460         * lib/getopt*: copy from libc/posix.
23461         * lib/gettext.h: copy from gettext.
23462         * lib/.cppi-disable: add strdup.c, gettext.h.
23463
23464 2002-09-25  Karl Berry  <karl@gnu.org>
23465
23466         * config/srclist.txt: enable gettext.h check.
23467         * config/config.{guess,sub}: update from prep.
23468         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
23469                 from automake 1.6.3.
23470         See srclist*.
23471
23472 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
23473
23474         * regex.c (PATFETCH): Remove the translating fetch.
23475         (PATFETCH_RAW): Rename to PATFETCH.
23476         (set_image_of_range): New fun.
23477         (SET_RANGE_TABLE_WORK_AREA): Use it.
23478         (regex_compile): Don't translate the pattern chars so eagerly.
23479         Only do it when inserting an `exactn' bytecode or when handling
23480         a char-range.
23481         (mutually_exclusive_p): Avoid empty statement.
23482
23483 2002-07-06  Jim Meyering  <meyering@lucent.com>
23484
23485         * m4/README: Don't mention Makefile.am.in.
23486         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
23487
23488 2002-07-01  Jim Meyering  <meyering@lucent.com>
23489
23490         * lib/c-stack.c: Include sys/time.h.
23491         From Volker Borchert.
23492
23493 2002-06-26  Paul Eggert  <eggert@twinsun.com>
23494
23495         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
23496
23497 2002-06-26  Paul Eggert  <eggert@twinsun.com>
23498
23499         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
23500         New macro.  Use it uniformly instead of
23501         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
23502         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
23503         reported by Vin Shelton.
23504
23505 2002-06-22  Paul Eggert  <eggert@twinsun.com>
23506
23507         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
23508         Do not assume SA_SIGINFO behavior.
23509         Bug reported by Jim Meyering on NetBSD 1.5.2.
23510
23511 2002-06-22  Jim Meyering  <meyering@lucent.com>
23512
23513         * m4/c-stack.m4: New file, from diffutils-2.8.2.
23514         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
23515
23516         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
23517         now that configure.ac uses AC_GNU_SOURCE.
23518         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
23519         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
23520
23521         Update to latest tools.  Suggestions from Paul Eggert.
23522         * m4/stdbool.m4: New file, from diffutils-2.8.2.
23523         * m4/gnu-source.m4: Update from diffutils-2.8.2.
23524         * m4/fnmatch.m4: Likewise.
23525         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
23526         to AC_HEADER_STDBOOL
23527
23528 2002-06-22  Jim Meyering  <meyering@lucent.com>
23529
23530         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
23531         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
23532
23533 2002-06-22  Jim Meyering  <meyering@lucent.com>
23534
23535         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
23536
23537         * lib/exitfail.c, exitfail.h: Likewise.
23538         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
23539
23540         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
23541         of fnmatch.h.
23542         (EXTRA_DIST): Add fnmatch_loop.c.
23543         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
23544
23545         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
23546         * lib/fnmatch.c: Update from diffutils-2.8.2.
23547         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
23548         * lib/fnmatch.h: Remove file.
23549
23550 2002-06-21  Jim Meyering  <meyering@lucent.com>
23551
23552         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
23553         * m4/mbrtowc.m4: Likewise.
23554
23555         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
23556         * m4/mbswidth.m4: Reflect name change:
23557         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
23558         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
23559
23560         * m4/lib-link.m4: Update from gettext-0.11.2.
23561         * m4/gettext.m4: Likewise.
23562
23563         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
23564         From Alfred M. Szmidt.
23565
23566 2002-06-18  Paul Eggert  <eggert@twinsun.com>
23567
23568         * lib/file-type.h: Report an error if neither S_ISREG nor
23569         S_IFREG is defined, instead of using a test specific to glibc
23570         2.2.  This should be safe, since POSIX requires S_ISREG and
23571         Unix Version 7 had S_IFREG.  We don't need to check for
23572         <sys/types.h> since we don't use any symbols that it defines.
23573
23574 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
23575
23576         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
23577         $@-t, so that each temporary file name is unique and valid in the first
23578         8 characters, for operation under DOS.
23579
23580 2002-06-15  Paul Eggert  <eggert@twinsun.com>
23581
23582         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
23583
23584 2002-06-15  Jim Meyering  <meyering@lucent.com>
23585
23586         Work even with DJGPP 2.03, which lacks support for symlinks.
23587         From Richard Dawe.
23588         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
23589         is defined.
23590         * lib/lchown.c (S_ISLNK): Likewise.
23591
23592 2002-06-15  Jim Meyering  <meyering@lucent.com>
23593
23594         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
23595         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
23596         have been included before this file.
23597
23598 2002-06-14  Jim Meyering  <meyering@lucent.com>
23599
23600         * lib/file-type.h: Use the version from diffutils-2.8.2.
23601         * lib/file-type.c: Likewise.
23602
23603 2002-06-07  Jim Meyering  <meyering@lucent.com>
23604
23605         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
23606         They're needed at least for NetBSD 1.5.2.
23607         ($statxfs_includes): Include those same headers.
23608         ($statxfs_includes): Include sys/vfs.h if available.
23609         ($statxfs_includes): Likewise for sys/statvfs.h.
23610         Check for the following members in both structs statfs and statvfs:
23611         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
23612
23613 2002-06-01  Jim Meyering  <meyering@lucent.com>
23614
23615         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
23616         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
23617
23618 2002-05-28  Jim Meyering  <meyering@lucent.com>
23619
23620         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
23621         Reported by Volker Borchert.
23622
23623 2002-05-27  Jim Meyering  <meyering@lucent.com>
23624
23625         Fix a problem seen only on nonconforming systems whereby ls.c's
23626         use of localtime, and then of gettimeofday would cause trouble:
23627         the localtime call used to initialize rpl_gettimeofday's save
23628         mechanism would clobber ls's current local time information so
23629         that in any long listing the first file would always be listed
23630         with date 1970-01-01.  Analysis by Volker Borchert.
23631
23632         * lib/gettimeofday.c (localtime): Undefine.
23633         (rpl_localtime): New function.
23634
23635 2002-05-27  Jim Meyering  <meyering@lucent.com>
23636
23637         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
23638         localtime.
23639
23640         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
23641         use the replacement function; it wouldn't resolve at link time.
23642         Reported by Volker Borchert.
23643
23644 2002-05-22  Jim Meyering  <meyering@lucent.com>
23645
23646         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
23647         file-type.h.
23648         * lib/file-type.h: New file.
23649         * lib/file-type.c (file_type): New file/function.  Extracted from
23650         diffutils.
23651
23652 2002-04-30  Jim Meyering  <meyering@lucent.com>
23653
23654         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
23655
23656 2002-04-29  Paul Eggert  <eggert@twinsun.com>
23657
23658         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
23659
23660 2002-04-29  Paul Eggert  <eggert@twinsun.com>
23661
23662         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
23663         Do not check for alloca.h (no longer used) or stdbool.h (was never
23664         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
23665
23666 2002-04-29  Paul Eggert  <eggert@twinsun.com>
23667
23668         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
23669
23670 2002-04-29  Jim Meyering  <meyering@lucent.com>
23671
23672         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
23673         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
23674         Use AC_FUNC_STRNLEN here instead.
23675
23676         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
23677         With autoconf-2.53a, it's part of AC_PROG_CC.
23678
23679 2002-04-28  Paul Eggert  <eggert@twinsun.com>
23680
23681         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
23682         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
23683
23684 2002-04-28  Paul Eggert  <eggert@twinsun.com>
23685
23686         * lib/sig2str.h, lib/sig2str.c: New files.
23687         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
23688
23689 2002-04-28  Paul Eggert  <eggert@twinsun.com>
23690
23691         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
23692         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
23693         of 127, since 64 is the largest conceivable number for ancient
23694         nonstandard hosts.
23695         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
23696
23697 2002-04-28  Jim Meyering  <meyering@lucent.com>
23698
23699         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
23700
23701 2002-04-24  Jim Meyering  <meyering@lucent.com>
23702
23703         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
23704         (jm_PREREQ): Use it.
23705
23706         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
23707         mach/mach.h fcntl.h.
23708         Check for this function: setlocale.
23709
23710 2002-04-24  Jim Meyering  <meyering@lucent.com>
23711
23712         * lib/gettext.h: New file, from Gettext.
23713         * lib/Makefile.am (INCLUDES): Remove -I../intl.
23714         (libfetish_a_SOURCES): Add gettext.h.
23715
23716 2002-04-16  Jim Meyering  <meyering@lucent.com>
23717
23718         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
23719         ut_pid, ut_id, ut_exit.
23720
23721 2002-04-16  Jim Meyering  <meyering@lucent.com>
23722
23723         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
23724         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
23725         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
23726
23727 2002-04-12  Jim Meyering  <meyering@lucent.com>
23728
23729         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
23730         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
23731         existence of the getmntinfo function.  Needed for Darwin 5.3.
23732
23733         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
23734         This is necessary at least on Darwin 5.3.
23735
23736         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
23737         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
23738         strnlen.o in the library, and that makes some versions of ranlib
23739         object.
23740
23741 2002-04-12  Jim Meyering  <meyering@lucent.com>
23742
23743         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
23744
23745 2002-04-09  Jim Meyering  <meyering@lucent.com>
23746
23747         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
23748         to be more precise.  Rather than saying we're checking whether the
23749         function `works', say what we're testing.
23750         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
23751         Reported by Bruno Haible.
23752
23753 2002-03-10  Jim Meyering  <meyering@lucent.com>
23754
23755         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
23756         Suggestion from Santiago Vila.
23757
23758 2002-03-08  Jim Meyering  <meyering@lucent.com>
23759
23760         * lib/rename.c: Mention that this wrapper is needed also on
23761         mips-dec-ultrix4.4 systems.
23762
23763 2002-03-02  Jim Meyering  <meyering@lucent.com>
23764
23765         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
23766         not HAVE_CLOCK_SETTIME.
23767
23768 2002-02-27  Paul Eggert  <eggert@twinsun.com>
23769
23770         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
23771         Check for clock_settime.
23772
23773 2002-02-27  Paul Eggert  <eggert@twinsun.com>
23774
23775         * lib/nanosleep.h: Rename to....
23776         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
23777
23778         * lib/gettime.c: New file.
23779         * lib/settime.c: New file.
23780         * lib/stime.c: Remove.
23781
23782         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
23783         timespec.h.  Remove nanosleep.h.
23784
23785 2002-02-25  Paul Eggert  <eggert@twinsun.com>
23786
23787         * m4/acl.m4: New file.
23788         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
23789         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
23790
23791 2002-02-25  Paul Eggert  <eggert@twinsun.com>
23792
23793         * lib/acl.c, lib/acl.h: New files.
23794         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
23795
23796 2002-02-24  Jim Meyering  <meyering@lucent.com>
23797
23798         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
23799         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
23800         cause trouble.  Reported by Nelson Beebe.
23801
23802 2002-02-23  Paul Eggert  <eggert@twinsun.com>
23803
23804         * lib/path-concat.c (xpath_concat): Reorder code to pacify
23805         compilers that don't know that xalloc_die never returns.
23806
23807 2002-02-20  Jim Meyering  <meyering@lucent.com>
23808
23809         * lib/getdate.c: Regenerate using bison-1.33.
23810
23811 2002-02-17  Jim Meyering  <meyering@lucent.com>
23812
23813         * config/config.guess (main): Don't use `head -1'; it's no longer
23814         portable. Use `sed 1q' instead.
23815
23816 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
23817
23818         * m4/codeset.m4: Upgrade to gettext-0.11.
23819         * m4/gettext.m4: Upgrade to gettext-0.11.
23820         * m4/glibc21.m4: Upgrade to gettext-0.11.
23821         * m4/iconv.m4: Upgrade to gettext-0.11.
23822         * m4/isc-posix.m4: Upgrade to gettext-0.11.
23823         * m4/lcmessage.m4: Upgrade to gettext-0.11.
23824         * m4/lib-ld.m4: New file, from gettext-0.11.
23825         * m4/lib-link.m4: New file, from gettext-0.11.
23826         * m4/lib-prefix.m4: New file, from gettext-0.11.
23827         * m4/progtest.m4: Upgrade to gettext-0.11.
23828
23829 2002-02-15  Paul Eggert  <eggert@twinsun.com>
23830
23831         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
23832         (jm_PREREQ): Use it.
23833
23834 2002-02-15  Paul Eggert  <eggert@twinsun.com>
23835
23836         * lib/posixver.c, lib/posixver.h: New files.
23837         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
23838
23839 2002-02-02  Paul Eggert  <eggert@twinsun.com>
23840             Bruno Haible  <bruno@clisp.org>
23841
23842         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
23843         (fwrite_success_callback): New declaration.
23844         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
23845         print_unicode_char. Call failure callback instead of error.
23846         (fwrite_success_callback): New function.
23847         (exit_failure_callback): New function.
23848         (fallback_failure_callback): New function.
23849         (print_unicode_char): Call unicode_to_mb.
23850
23851 2002-01-26  Jim Meyering  <meyering@lucent.com>
23852
23853         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
23854         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
23855
23856 2002-01-26  Jim Meyering  <meyering@lucent.com>
23857
23858         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
23859
23860 2002-01-22  Paul Eggert  <eggert@twinsun.com>
23861
23862         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
23863
23864 2002-01-22  Jim Meyering  <meyering@lucent.com>
23865
23866         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
23867         Otherwise, some versions of automake would omit the rule that makes
23868         Makefile from Makefile.in.
23869
23870 2002-01-21  Paul Eggert  <eggert@twinsun.com>
23871
23872         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
23873         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
23874         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
23875         (memcoll): Set errno to zero if there is no error.
23876
23877         * lib/quotearg.c (quotearg_buffer_restyled):
23878         Fix bug with quoting buffers containing NUL when backslashing escapes.
23879         This bug was exposed by the other changes in this patch.
23880         (quotearg_n_options): New arg ARGSIZE.
23881         All callers changed.
23882         (quoting_options_from_style): New function.
23883         (quotearg_n_style): Use it.
23884         (quotearg_n_style_mem): New function.
23885
23886         * lib/quotearg.h (quotearg_n_style_mem): New function.
23887
23888 2002-01-19  Jim Meyering  <meyering@lucent.com>
23889
23890         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
23891         Remove useless quotes: DF_PROG="df".
23892         * m4/strnlen.m4: New file.
23893
23894 2002-01-16  Paul Eggert  <eggert@twinsun.com>
23895
23896         * lib/backupfile.c (ISDIGIT): Comment fix.
23897         * lib/getdate.y (ISDIGIT): Likewise.
23898         * lib/posixtm.c (ISDIGIT, year): Likewise.
23899         * lib/strverscmp.c (ISDIGIT): Likewise.
23900         * lib/userspec.c (ISDIGIT): Likewise.
23901
23902 2002-01-16  Jim Meyering  <meyering@lucent.com>
23903
23904         * lib/getdate.y: Add three semicolons, each just before a closing
23905         brace. Bison (as of version 1.31) no longer papers over that mistake.
23906
23907 2002-01-05  Jim Meyering  <meyering@lucent.com>
23908
23909         * lib/version-etc.c (version_etc_copyright): Update copyright year.
23910
23911 2001-12-19  Paul Eggert  <eggert@twinsun.com>
23912
23913         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
23914         not silently exit merely because the output buffer happens to
23915         have nothing pending.
23916
23917 2001-12-18  Paul Eggert  <eggert@twinsun.com>
23918
23919         See the big note in ../ChangeLog.
23920         * lib/human.c (suffixes): Prefer K to k for 1024.
23921         (generate_suffix_backwards): New function.
23922         (human_readable_inexact): Use it.
23923         * lib/xstrtol.c (__xstrtol): If there is no number but there
23924         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
23925         Accept 'K' as well as 'k'.
23926
23927 2001-12-15  Jim Meyering  <meyering@lucent.com>
23928
23929         * lib/regex.h (__restrict_arr): Update from libc.
23930
23931         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
23932         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
23933         (STREQ): Define.
23934
23935 2001-12-14  Jim Meyering  <meyering@lucent.com>
23936
23937         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
23938         Suggestion from Bruno Haible.
23939
23940 2001-12-10  Jim Meyering  <meyering@lucent.com>
23941
23942         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
23943         xrealloc, Instead, include "xalloc.h".
23944         (initbuffer): Don't cast xmalloc return value to char*.
23945         (readline): Reword comment.
23946         Don't cast xrealloc return value to char*
23947         Return NULL, not 0.
23948
23949 2001-12-09  Jim Meyering  <meyering@lucent.com>
23950
23951         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
23952         about `signed and unsigned type in conditional expression'.
23953         * lib/posixtm.c (posix_time_parse): Likewise.
23954
23955         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
23956
23957         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
23958         to avoid a pedantic warning.
23959
23960         * lib/getstr.c: Don't include assert.h.
23961         (getstr): Remove warning-evoking assertions.
23962         Return -1 if offset parameter is out of bounds.
23963         Change the type of a local from int to size_t.
23964
23965         * lib/strftime.c (my_strftime_localtime_r): Include this function
23966         definition in the `#if ! HAVE_TM_GMTOFF' block.
23967
23968         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
23969         Include xalloc.h instead.
23970
23971 2001-12-02  Jim Meyering  <meyering@lucent.com>
23972
23973         * lib/tempname.c: Don't declare getenv, thus reverting the change of
23974         2001-11-18.  It's no longer necessary, now that stdlib.h is always
23975         included.
23976
23977         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
23978         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
23979
23980 2001-11-30  Akim Demaille  <akim@epita.fr>
23981
23982         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
23983         before being defined.
23984
23985 2001-11-27  Paul Eggert  <eggert@twinsun.com>
23986
23987         * lib/quotearg.h (quotearg_n, quotearg_n_style):
23988         First arg is int, not unsigned.
23989         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
23990         (SIZE_MAX, UINT_MAX): New macros.
23991         (quotearg_n_options): Abort if N is negative.
23992         Avoid overflow check on hosts where size_t is 64 bits and int
23993         is 32 bits, as overflow is impossible there.
23994         Fix off-by-one typo that caused unnecessary reallocation.
23995
23996 2001-11-27  Jim Meyering  <meyering@lucent.com>
23997
23998         * lib/tempname.c: Merge with version from libc.
23999         * lib/regex.c: Likewise.
24000
24001         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
24002         systems for which STDC_HEADERS is 0, it was not included, resulting in
24003         a warning about an integer-to-pointer conversion problem with getenv.
24004         Reported by Volker Borchert.
24005
24006 2001-11-26  Jim Meyering  <meyering@lucent.com>
24007
24008         * lib/gtod.h: Remove file.
24009         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
24010         * lib/gettimeofday.c: Don't include gtod.h.
24011         (GTOD_init): Remove function.
24012         (rpl_gettimeofday): Do its job here instead, rather than aborting.
24013         Suggestion from Volker Borchert.
24014
24015 2001-11-23  Jim Meyering  <meyering@lucent.com>
24016
24017         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
24018         it.
24019         * lib/hash.c (struct hash_table): Define it here instead.
24020
24021 2001-11-22  Jim Meyering  <meyering@lucent.com>
24022
24023         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
24024
24025 2001-11-20  Jim Meyering  <meyering@lucent.com>
24026
24027         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
24028         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
24029
24030 2001-11-19  Jim Meyering  <meyering@lucent.com>
24031
24032         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
24033         directory.  Use "conftestXXXXXX" as the template.
24034         Suggestion from Paul Eggert.
24035
24036         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
24037         immediately, so the test doesn't mistakenly hit the max-open-files
24038         limit.
24039
24040 2001-11-18  Paul Eggert  <eggert@twinsun.com>
24041
24042         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
24043         (TEMPORARIES): New macro.
24044         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
24045         removes an artificial limitation (e.g. HP-UX 10.20, where
24046         TMP_MAX is 17576).
24047
24048 2001-11-18  Jim Meyering  <meyering@lucent.com>
24049
24050         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
24051
24052 2001-11-18  Jim Meyering  <meyering@lucent.com>
24053
24054         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
24055         on SunOS 4.
24056
24057         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
24058         files will be created before anything else.
24059
24060 2001-11-17  Paul Eggert  <eggert@twinsun.com>
24061
24062         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
24063         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
24064
24065 2001-11-17  Jim Meyering  <meyering@lucent.com>
24066
24067         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
24068         Prompted by a report from Bob Proulx.
24069
24070         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
24071         Instead, require UTILS_FUNC_MKSTEMP.
24072
24073 2001-11-17  Jim Meyering  <meyering@lucent.com>
24074
24075         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
24076         Now, that's done as part of AC_FUNC_STRTOD.
24077
24078 2001-11-17  Jim Meyering  <meyering@lucent.com>
24079
24080         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
24081         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
24082         rather than group writable.  Patch by Juan F. Codagnone.
24083
24084         * lib/readtokens.c: Remove explicit declarations of xmalloc and
24085         xrealloc, Instead, include "xalloc.h".
24086
24087         * lib/mountlist.c: Include unlocked-io.h after all system headers.
24088         Remove explicit declarations of xmalloc, xrealloc,
24089         and xstrdup.  Instead, include "xalloc.h".
24090
24091         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
24092         unlocked-io.h.
24093         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
24094         Likewise.
24095         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
24096
24097         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
24098         Reported by Padraig Brady.
24099
24100         * lib/mkstemp.c: #undef mkstemp.
24101         Include config.h.
24102         (rpl_mkstemp): Rename from mkstemp.
24103         Protoize.
24104
24105 2001-11-16  Jim Meyering  <meyering@lucent.com>
24106
24107         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
24108         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
24109         determine the amount of total physical memory, use pstat_getstatic.
24110         HPUX-11 doesn't define _SC_PHYS_PAGES.
24111         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
24112         If sysconf couldn't be used to determine the amount of available
24113         physical memory, use both pstat_getstatic and pstat_getdynamic.
24114         Based on a patch from Bob Proulx.
24115
24116 2001-11-10  Jim Meyering  <meyering@lucent.com>
24117
24118         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
24119         (jm_PREREQ): Use it.
24120
24121 2001-11-09  Jim Meyering  <meyering@lucent.com>
24122
24123         * m4/jm-macros.m4: Require autoconf-2.52f.
24124         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
24125         Use these AC_-prefixed names, not the AM_-prefixed ones.
24126
24127         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
24128
24129 2001-11-05  Jim Meyering  <meyering@lucent.com>
24130
24131         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
24132
24133 2001-11-04  Jim Meyering  <meyering@lucent.com>
24134
24135         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
24136         $DEFS.
24137
24138 2001-11-03  Jim Meyering  <meyering@lucent.com>
24139
24140         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
24141         of AC_DEFUN.
24142
24143         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
24144         know the name of the variable in the macro definition.
24145
24146 2001-11-03  Jim Meyering  <meyering@lucent.com>
24147
24148         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
24149         in argmatch_to_argument call.
24150
24151         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
24152         argument.
24153
24154         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
24155         e.g., a fault due to an attempt to free a NULL pointer.
24156
24157 2001-11-01  Jim Meyering  <meyering@lucent.com>
24158
24159         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
24160         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
24161
24162 2001-11-01  Jim Meyering  <meyering@lucent.com>
24163
24164         * lib/dirfd.c, lib/dirfd.h: New files.
24165         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
24166
24167         * lib/hash.c (hash_print) [TESTING]: Clean up.
24168
24169 2001-10-22  Paul Eggert  <eggert@twinsun.com>
24170
24171         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
24172         to avoid a warning if -Wall.
24173
24174 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
24175
24176         * README: New file
24177         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
24178         (per RMS's instructions, this is now the canonical source)
24179         * lgpl/, gpl/: New directories.
24180
24181 2001-10-21  Paul Eggert  <eggert@twinsun.com>
24182
24183         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
24184
24185 2001-10-21  Jim Meyering  <meyering@lucent.com>
24186
24187         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
24188         this code would end up calling gettext even in packages built
24189         with --disable-nls.
24190         * lib/getopt.c (_): Likewise.
24191         * lib/regex.c (_): Likewise.
24192
24193 2001-10-20  Paul Eggert  <eggert@twinsun.com>
24194
24195         * m4/error.m4 (jm_PREREQ_ERROR):
24196         Do not invoke AC_CHECK_FUNCS with strerror_r, as
24197         AC_FUNC_STRERROR_R does that.
24198         Check for strerror declaration.
24199
24200         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
24201         are supposed to have them these days.
24202         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
24203         Merge changes from latest Autoconf CVS.
24204         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
24205         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
24206         POSIX decided to standardize on the int flavor of strerror_r.
24207
24208 2001-10-20  Paul Eggert  <eggert@twinsun.com>
24209
24210         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
24211         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
24212         Use strerror_r that is only a macro, even if it is not a function.
24213         (strerror): Check for HAVE_DECL_STRERROR before declaring.
24214         (private_strerror): Use prototypes, not old-style function definition.
24215         (print_errno_message): New function.
24216         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
24217         char*-flavored one.
24218         (error_tail, error, error_at_line): Use it.
24219
24220 2001-10-11  Jim Meyering  <meyering@lucent.com>
24221
24222         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
24223         and quote_n (1, ... to avoid clobbering a buffer.
24224
24225 2001-10-05  Jim Meyering  <meyering@lucent.com>
24226
24227         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
24228         hash-pjw.h.
24229         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
24230         * lib/hash-pjw.h: New file.
24231
24232 2001-09-30  Jim Meyering  <meyering@lucent.com>
24233
24234         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
24235         `struct fsstat' has the `f_fstypename' member.
24236         Use that to define FS_TYPE, which is now used to make
24237         the getfsstat link test tighter.
24238
24239 2001-09-30  Jim Meyering  <meyering@lucent.com>
24240
24241         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
24242         Include <sys/ucred.h>, for Apple Darwin.
24243         Include sys/mount.h and sys/fs_types.h only if available.
24244         (FS_TYPE): Define.
24245         (read_filesystem_list): Use FS_TYPE.
24246
24247 2001-09-29  Paul Eggert  <eggert@twinsun.com>
24248
24249         * lib/exclude.c (excluded_filename): 0 -> false, since it's
24250         a boolean context.
24251
24252 2001-09-29  Jim Meyering  <meyering@lucent.com>
24253
24254         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
24255         [one-argument getmntent function]): Include stdio.h before mntent.h.
24256         SunOS 4.1.x needs it for the declaration of `FILE'.
24257         Patch by Volker Borchert.
24258
24259         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
24260         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
24261         sys/fs_types.h, and make the link-test for getfsstat guard #include
24262         directives with appropriate #if HAVE_*_H tests so that we can
24263         detect getfsstat on Apple Darwin1.3.7 systems.
24264         Reported by Nelson Beebe.
24265         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
24266
24267 2001-09-28  Paul Eggert  <eggert@twinsun.com>
24268
24269         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
24270         #defines strtoimax.  Also treat the other strto* functions
24271         like strtoimax.
24272
24273         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
24274         Check for strtoul and strtoumax,
24275         as those declarations are made even in the signed case.
24276         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
24277         Likewise, for strtol and strtoimax.
24278
24279 2001-09-28  Paul Eggert  <eggert@twinsun.com>
24280
24281         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
24282         #defines strtoimax.  Also treat the other strto* functions
24283         like strtoimax.
24284
24285         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
24286         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
24287         (strtoimax, strtoumax): Do not declare if already defined as a macro.
24288
24289 2001-09-26  Jim Meyering  <meyering@lucent.com>
24290
24291         Most macros in unlocked-io.h had the wrong number of arguments.
24292         * lib/gen-uio: New script.
24293         (USE_UNLOCKED_IO): Define to 1 if not already defined.
24294         * lib/unlocked-io.hin: Remove file.
24295         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
24296         rather than trying to embed it here.
24297         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
24298         Reported by Padraig Brady.
24299
24300 2001-09-25  Volker Borchert  <bt@teknon.de>
24301
24302         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
24303         `result'.
24304
24305 2001-09-24  Jim Meyering  <meyering@lucent.com>
24306
24307         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
24308
24309 2001-09-23  Jim Meyering  <meyering@lucent.com>
24310
24311         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
24312         instead of the mere test for existence of mntent.h.  The latter
24313         would get a false-positive on AIX 3.4 systems.
24314         In the outer getmntent if-block, don't die if neither of the getmntent
24315         tests succeeds.  Instead, just fall through and continue with the
24316         remaining tests.
24317
24318 2001-09-23  Jim Meyering  <meyering@lucent.com>
24319
24320         * lib/mountlist.c: Remove useless parentheses in #if directives.
24321         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
24322         the deprecated MOUNTED symbol is no longer defined in mntent.h.
24323
24324 2001-09-22  Jim Meyering  <meyering@lucent.com>
24325
24326         * m4/gettext.m4: New file.  From gettext.
24327         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
24328         * m4/progtest.m4: Likewise
24329         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
24330         * m4/glibc21.m4: Likewise.
24331
24332         * m4/libintl.m4: Remove.  No longer used.
24333
24334 2001-09-22  Jim Meyering  <meyering@lucent.com>
24335
24336         * lib/localcharset.c: Update from latest gettext.
24337         * lib/config.charset: Likewise.
24338
24339 2001-09-20  Jim Meyering  <meyering@lucent.com>
24340
24341         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
24342         strtoimax.
24343         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
24344         strtoumax.
24345
24346 2001-09-20  Jim Meyering  <meyering@lucent.com>
24347
24348         * lib/xstrtol.c (strtoimax): Guard declaration with
24349         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
24350         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
24351         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
24352         (strtoumax): Likewise, for completeness (it wasn't necessary).
24353
24354 2001-09-17  Paul Eggert  <eggert@twinsun.com>
24355
24356         * lib/strtoimax.c (HAVE_LONG_LONG):
24357         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
24358         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
24359         to work around bug in IBM C compiler.
24360
24361 2001-09-17  Jim Meyering  <meyering@lucent.com>
24362
24363         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
24364         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
24365         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
24366         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
24367         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
24368         whenever the right hand side need not be expanded by the shell.
24369
24370 2001-09-16  Paul Eggert  <eggert@twinsun.com>
24371
24372         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
24373         library.  It's not correct, as some older glibcs are buggy.
24374         fnmatch wasn't fixed until glibc 2.2.
24375
24376         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
24377         special shell magic here.
24378
24379 2001-09-16  Jim Meyering  <meyering@lucent.com>
24380
24381         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
24382         * m4/jm-macros.m4: Require it.
24383
24384 2001-09-16  Jim Meyering  <meyering@lucent.com>
24385
24386         * lib/mkdir.c: New file.
24387
24388 2001-09-15  Jim Meyering  <meyering@lucent.com>
24389
24390         * m4/jm-macros.m4: Check for help2man.
24391
24392 2001-09-11  Jim Meyering  <meyering@lucent.com>
24393
24394         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
24395         The body, by Paul Eggert, was moved here from configure.in.
24396         * m4/jm-macros.m4: Require UTILS_HOST_OS.
24397
24398 2001-09-04  Paul Eggert  <eggert@twinsun.com>
24399
24400         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
24401         (jm_PREREQ): Use it.
24402
24403 2001-09-04  Paul Eggert  <eggert@twinsun.com>
24404
24405         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
24406         Use ssize_t, not int, to store result of readlink.
24407         Check for ssize_t overflow as well as size_t overflow,
24408         as POSIX says the result of readlink is implementation-defined
24409         when ssize_t overflows.
24410         Remove unnecessary cast to char*.
24411         Use free+malloc instead of realloc, as the storage doesn't need
24412         to be preserved and it's clearer and can be more efficient that way.
24413         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
24414         * lib/xreadlink.h (xreadlink): Update prototype.
24415
24416 2001-09-04  Paul Eggert  <eggert@twinsun.com>
24417
24418         * lib/xgetcwd.c: Revert some of the previous change; intead,
24419         fix the HAVE_GETCWD_NULL code to behave more like the
24420         !HAVE_GETCWD_NULL code used to.
24421
24422         Include "xalloc.h".
24423         (xgetcwd): Do not return NULL when memory is exhausted; instead,
24424         invoke xalloc_die.
24425
24426 2001-09-03  Paul Eggert  <eggert@twinsun.com>
24427
24428         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
24429         sys/param.h, as pathmax.h includes them.
24430
24431 2001-09-03  Paul Eggert  <eggert@twinsun.com>
24432
24433         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
24434         (jm_PREREQ_XGETCWD): New macro.
24435
24436         * m4/getcwd.m4: New file.
24437
24438 2001-09-03  Paul Eggert  <eggert@twinsun.com>
24439
24440         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
24441         like the HAVE_GETCWD_NULL code.
24442         Include pathmax.h if not HAVE_GETCWD.
24443         Do not include xalloc.h.
24444         (INITIAL_BUFFER_SIZE): New symbol.
24445         Do not use xmalloc / xrealloc, since the caller is responsible for
24446         handling errors.  Preserve errno around `free' during failure.
24447         Do not overrun buffer when using getwd.
24448
24449 2001-09-03  Paul Eggert  <eggert@twinsun.com>
24450
24451         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
24452         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
24453         getcwd (NULL, 0).
24454
24455 2001-09-03  Paul Eggert  <eggert@twinsun.com>
24456
24457         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
24458         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
24459         spotted by Jim Meyering.
24460
24461 2001-09-03  Jim Meyering  <meyering@lucent.com>
24462
24463         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
24464         failure.
24465
24466 2001-09-02  Jim Meyering  <meyering@lucent.com>
24467
24468         * lib/error.c: Update from GNU libc.
24469
24470 2001-09-01  Jim Meyering  <meyering@lucent.com>
24471
24472         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
24473         Used by df.
24474
24475 2001-09-01  Jim Meyering  <meyering@lucent.com>
24476
24477         * lib/xreadlink.c: New file.
24478         * lib/xreadlink.h: New file.
24479         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
24480         xreadlink.h.
24481
24482         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
24483         doesn't conflict with sparc Solaris 7's definition in
24484         /usr/include/sys/int_types.h.
24485
24486         * lib/exclude.c: Use `""', not `<>' to #include non-system header
24487         files.
24488         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
24489         and strncasecmp as r-values.  Unixware didn't have declarations.
24490
24491 2001-08-31  Paul Eggert  <eggert@twinsun.com>
24492
24493         * lib/xstrtol.h: Add copyright notice.
24494         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
24495         LONGINT_INVALID_SUFFIX_CHAR.
24496
24497 2001-08-31  Paul Eggert  <eggert@twinsun.com>
24498
24499         * lib/xstrtol.c (strtoimax): New decl.
24500
24501 2001-08-31  Paul Eggert  <eggert@twinsun.com>
24502
24503         * lib/xgetcwd.c: Don't include pathmax.h.
24504         Include stdlib.h and unistd.h if available.
24505         Include xalloc.h.
24506         (xmalloc, xstrdup, free): Remove decls.
24507         (xgetcwd): Don't assume sizes fit in unsigned.
24508         Check for overflow when computing sizes.
24509         Simplify reallocation code.
24510
24511 2001-08-31  Paul Eggert  <eggert@twinsun.com>
24512
24513         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
24514         a directory's st_size can have an arbitrary value, so the old
24515         usage could waste an arbitrary amount of memory.  All uses
24516         changed.
24517         * lib/savedir.h: Update prototype.
24518
24519 2001-08-31  Paul Eggert  <eggert@twinsun.com>
24520
24521         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
24522
24523         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
24524         old strtoimax.c.
24525
24526         Also, make the following further changes to make this file's
24527         configuration more similar to that of strtol.c:
24528         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
24529         (strtoumax, uintmax_t, strtoull, strtol): Remove.
24530         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
24531         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
24532         changed to signed values.
24533
24534         And make the following changes as well:
24535         Fix copyright notice, as 1999 was missing.
24536         (verify): New macro.
24537         (strtoimax): Check sizes at compile-time, not run-time.
24538         Prefer strtol to strtoll if both work.
24539         (main): Remove; it was not that useful and was a pain to maintain.
24540
24541         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
24542
24543 2001-08-31  Jim Meyering  <meyering@lucent.com>
24544
24545         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
24546         Use an initial, malloc'd, buffer of length 128 rather than
24547         a statically allocated one of length 1024.
24548
24549 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24550
24551         Simplify code, partly by assuming autoconf 2.52 semantics.
24552
24553         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
24554
24555         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
24556         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
24557         All uses removed.
24558         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
24559         Move AC_REQUIRE to next-to-top level, to avoid confusion.
24560         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
24561         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
24562         jm_AC_HEADER_INTTYPES_H.
24563         * m4/jm-macros.m4 (jm_MACROS): Likewise.
24564
24565         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
24566
24567         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
24568         Quote first arg of AC_DEFUN.
24569         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
24570         since they are needed to parse the include file even if we need
24571         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
24572         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
24573         but with opposite signedness.
24574
24575 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24576
24577         Merge 'exclude' changes from tar 1.13.22.
24578         This fixes one or two unlikely storage allocation overflow bugs,
24579         but doesn't change user-visible behavior otherwise.
24580
24581 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24582
24583         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
24584         (jm_PREREQ_EXCLUDE): New macro.
24585
24586 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24587
24588         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
24589         tm to be declared.
24590
24591 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24592
24593         * lib/hash.c: Remove '2001' from copyright notice.
24594
24595 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24596
24597         * lib/full-write.h: New file.
24598         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
24599         * lib/full-write.c: Correct credits, as cccp.c no longer
24600         exists and anyway it was so heavily changed from the old cccp
24601         code as to be unrecognizable.  Include full-write.h.
24602         (full_write) Return size_t, with short writes meaning failure.
24603         All callers changed.  This fixes a bug with large buffers
24604         on 64-bit hosts.
24605         * lib/utime.c: Include full-write.h.
24606
24607 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24608
24609         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
24610         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
24611         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
24612         Include if available.
24613         (<xalloc.h>): Include
24614         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
24615         (verify): New macro.  Use it to verify that EXCLUDE macros do not
24616         collide with FNM macros.
24617         (struct patopts): New struct.
24618         (struct exclude): Use it, as exclude patterns now come with options.
24619         (new_exclude): Support above changes.
24620         (new_exclude, add_exclude_file):
24621         Initial size must now be a power of two to simplify overflow checking.
24622         (free_exclude, fnmatch_no_wildcards): New function.
24623         (excluded_filename): No longer requires options arg, as the options
24624         are determined by add_exclude.  Now returns bool, not int.
24625         (excluded_filename, add_exclude):
24626         Add support for the fancy new exclusion options.
24627         (add_exclude, add_exclude_file): Now takes int options arg.
24628         Check for arithmetic overflow when computing sizes.
24629         (add_exclude_file): xrealloc might modify errno, so don't
24630         realloc until after errno might be used.
24631
24632         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
24633         New macros.
24634         (free_exclude): New decl.
24635         (add_exclude, add_exclude_file): Now takes int options arg.
24636         (excluded_filename): No longer requires options arg, as the options
24637         are determined by add_exclude.  Now returns bool, not int.
24638
24639 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24640
24641         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
24642
24643 2001-08-27  Jim Meyering  <meyering@lucent.com>
24644
24645         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
24646
24647         * lib/version-etc.c (N_): Remove definition.
24648         Revert most of last change.
24649         Instead, simply don't mark the `Copyright...' string for translation.
24650         Based on advice from Paul Eggert.
24651
24652         * lib/strtoxmax.c: Tweak comment.
24653
24654 2001-08-26  Jim Meyering  <meyering@lucent.com>
24655
24656         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
24657
24658         * m4/xstrtoimax.m4: New file.
24659         * m4/xstrtoumax.m4: Add comments explaining why we
24660         AC_REPLACE_FUNCS(strtol).
24661
24662 2001-08-26  Jim Meyering  <meyering@lucent.com>
24663
24664         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
24665         of copyright with `%s' so translators don't get an untranslated
24666         message in 2002.
24667         (COPYRIGHT_YEAR): Define.
24668         (version_etc): Use fprintf rather than fputs.
24669         Suggestion from Ulrich Drepper.
24670
24671         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
24672
24673         * lib/strtoll.c: New file, from GNU libc.
24674         * lib/xstrtoimax.c: New file.
24675
24676         * lib/xstrtol.h: Add xstrtoimax.
24677         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
24678         * lib/strtoimax.c: New file.  Likewise, but first define
24679         STRTOUXMAX_SIGNED.
24680
24681         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
24682         ...
24683         * lib/strtoxmax.c: ... then renamed to this.
24684
24685 2001-08-18  Paul Eggert  <eggert@twinsun.com>
24686
24687         * m4/inttypes.m4: Add AC_PREREQ(2.13).
24688         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
24689         (jm_AC_TYPE_INTMAX_T): New macro.
24690         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
24691
24692         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
24693
24694         * m4/longlong.m4: Renamed from ulonglong.m4.
24695         * m4/inttypes.m4: Renamed from inttypes_h.m4.
24696         * m4/uintmax_t.m4: Removed.
24697
24698 2001-08-13  Paul Eggert  <eggert@twinsun.com>
24699
24700         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
24701         Port to Solaris 8, where 'sed' requires a space after the 'r'
24702         command, and where sh dislikes "$/".  Clean up the spacing a bit.
24703         Redirect output to $tmp just once.
24704
24705 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
24706
24707         * lib/addext.c (<errno.h>): Include.
24708         (errno): Declare if not defined.
24709         (addext): Work correctly when pathconf returns -1 and leaves
24710         errno alone because there is no limit.  Also, work even if
24711         pathconf returns a value greater than SIZE_MAX.
24712
24713 2001-08-12  Jim Meyering  <meyering@lucent.com>
24714
24715         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
24716         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
24717         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
24718         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
24719         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
24720         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
24721         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
24722         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
24723         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
24724         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
24725         utime.m4, utimes.m4, xstrtoumax.m4:
24726         Quote the first argument in each use of AC_DEFUN.
24727
24728 2001-08-12  Jim Meyering  <meyering@lucent.com>
24729
24730         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
24731         Simply `return getcwd (NULL, 0);'.
24732         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
24733         Use 1300 as initial value for length, not PATH_MAX.
24734
24735         * lib/pathmax.h: Clean up cpp syntax.
24736
24737 2001-08-12  Jim Meyering  <meyering@lucent.com>
24738
24739         * lib/gettimeofday.c: New file.
24740         * lib/gtod.h: New file.
24741         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
24742
24743 2001-08-05  Jim Meyering  <meyering@lucent.com>
24744
24745         * m4/jm-macros.m4: Require autoconf-2.52.
24746
24747 2001-08-04  Jim Meyering  <meyering@lucent.com>
24748
24749         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
24750         stmt, to get in sync with glibc.
24751
24752 2001-08-03  Paul Eggert  <eggert@twinsun.com>
24753
24754         The following changes are from gettext 0.10.39 as maintained by
24755         Bruno Haible.
24756
24757         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
24758         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
24759         with inverted sense.  All uses changed.
24760
24761         * lib/mbswidth.c: Don't include <limits.h>.
24762         Include <stdlib.h> and <string.h> unconditionally.
24763         (iswcntrl, mbsinit, ISCNTRL): New macros.
24764         (mbsnwidth): Use K&R style function declarations.
24765         Don't bother checking for MB_LEN_MAX == 1, since the compiler
24766         can optimize it when MB_CUR_MAX == 1.
24767         The width of control characters is zero, not 1.
24768
24769 2001-08-03  Paul Eggert  <eggert@twinsun.com>
24770
24771         The following changes are from gettext 0.10.39 as maintained by
24772         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
24773
24774         * m4/codeset.m4: Upgrade to serial AM1.
24775         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
24776         all uses changed.  Quote first arg of AC_DEFUN.
24777         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
24778
24779         * m4/iconv.m4: Upgrade to serial AM2.
24780         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
24781         Add --with-libconv-prefix.
24782         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
24783         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
24784         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
24785         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
24786         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
24787
24788         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
24789         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
24790         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
24791         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
24792         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
24793         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
24794         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
24795         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
24796         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
24797
24798         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
24799         string.h any more.
24800
24801         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
24802         not the default value.
24803
24804         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
24805         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
24806         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
24807         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
24808         Also check for iswcntrl, used for wcwidth fallback.
24809         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
24810         to Autoconf 2.13.
24811
24812 2001-08-03  Jim Meyering  <meyering@lucent.com>
24813
24814         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
24815         as it was in the original.  Reported by Paul Eggert.
24816
24817 2001-07-16  Jim Meyering  <meyering@lucent.com>
24818
24819         * m4/gettimeofday.m4: New file.
24820         Prompted by a report from Bernhard Baehr.
24821
24822 2001-07-15  Jim Meyering  <meyering@lucent.com>
24823
24824         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
24825         stuff. Now it's in ../Makefile.cfg.
24826
24827 2001-07-15  Jim Meyering  <meyering@lucent.com>
24828
24829         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
24830         (BUILT_SOURCES): Add unlocked-io.h.
24831         (io_functions): Define.
24832         (unlocked-io.h): New rule.
24833         (DISTCLEANFILES): Add unlocked-io.h.
24834         (all-local): Depend on unlocked-io.h, to ensure it is created.
24835
24836         * lib/unlocked-io.hin: New file
24837
24838         * lib/regex.c: Update from glibc.
24839
24840 2001-07-05  Jim Meyering  <meyering@lucent.com>
24841
24842         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
24843         recommendation.
24844         (libfetish_a_SOURCES): Put all .h files here instead.
24845         Remove a thus-exposed (better checks in automake) duplicate and
24846         two unnecessary .h files.
24847
24848 2001-07-04  Jim Meyering  <meyering@lucent.com>
24849
24850         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
24851         that generates jm-glibc-io.m4 so that it doesn't trigger any make
24852         distcheck failure.
24853
24854 2001-07-02  Jim Meyering  <meyering@lucent.com>
24855
24856         The following changes were prompted by suggestions from Bruno Haible.
24857
24858         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
24859         is now generated.
24860         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
24861         definition of EXTRA_DIST.
24862         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
24863         ensure that the generated file is created/updated whenever the list
24864         of $(unlocked_functions) is changed.
24865         (jm-glibc-io.m4): New rule.
24866         (unlocked-io.h): New rule -- currently unused.
24867
24868 2001-06-24  Jim Meyering  <meyering@lucent.com>
24869
24870         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
24871         unmatched right bracket, rather than kludging it with an extra,
24872         falsely-matching quote in a comment.  Patch by Akim Demaille.
24873
24874 2001-06-11  Jim Meyering  <meyering@lucent.com>
24875
24876         * lib/regex.c: Update from GNU libc.
24877
24878 2001-05-27  Jim Meyering  <meyering@lucent.com>
24879
24880         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
24881         Check for ut_type in struct utmp.
24882
24883 2001-05-27  Jim Meyering  <meyering@lucent.com>
24884
24885         * lib/readutmp.h (UT_TYPE): Define.
24886
24887 2001-05-24  Jim Meyering  <meyering@lucent.com>
24888
24889         * lib/argmatch.c: Include "quote.h".
24890         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
24891         quote function.  Reported by Göran Uddeborg.
24892
24893 2001-05-22  Jim Meyering  <meyering@lucent.com>
24894
24895         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
24896         now that we use the package-supplied version unconditionally.
24897         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
24898
24899 2001-05-21  Jim Meyering  <meyering@lucent.com>
24900
24901         * m4/regex.m4: Change a couple backticks to single quotes to avoid
24902         shell syntax errors.
24903
24904 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
24905
24906         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
24907
24908 2001-05-20  Paul Eggert  <eggert@twinsun.com>
24909
24910         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
24911         Don't bother to check library strftime, since
24912         we'll be using our own my_strftime function anyway.
24913         Define my_strftime instead of strftime.
24914
24915 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
24916
24917         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
24918         which is not yet declared.
24919
24920 2001-05-15  Jim Meyering  <meyering@lucent.com>
24921
24922         * m4/regex.m4: Use proper quoting so brackets appear in the test
24923         program.
24924         Reported by, and with help from, Bruno Haible.
24925
24926 2001-05-13  Jim Meyering  <meyering@lucent.com>
24927
24928         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
24929         undefined.
24930
24931 2001-05-11  Paul Eggert  <eggert@twinsun.com>
24932
24933         dirname code cleanup.  base_name now behaves more compatibly
24934         with POSIX basename when given file names that have trailing
24935         slashes, and similarly for dir_name.  Add new primitives
24936         base_len and dir_len.  Put the directory-name-related decls
24937         into dirname.h.
24938
24939         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
24940         * lib/backupfile.c (base_name): Likewise.
24941         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
24942         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
24943         * lib/makepath.c (strip_trailing_slashes): Likewise.
24944         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
24945         ISSLASH): Likewise.
24946         * lib/rename.c (strip_trailing_slashes): Likewise.
24947         * lib/same.c (base_name): Likewise.
24948         * lib/stripslash.c (ISSLASH): Likewise.
24949
24950         * lib/addext.c: Include <dirname.h> after size_t is defined.
24951         * lib/backupfile.c: Likewise.
24952
24953         * lib/addext.c (addext): Use base_len to trim redundant
24954         trailing slashes instead of doing it ourselves.
24955         But do not trim the last slash if it is not redundant.
24956
24957         * lib/backupfile.c (find_backup_file_name,
24958         max_backup_version): Use base_len instead of rolling it ourselves.
24959         Handle the case of "" and (on DOS) "C:" correctly.
24960
24961         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
24962         needed. Include <string.h>, <dirname.h>.
24963         (base_name): Allow file names ending in slashes, other than names
24964         that are all slashes.  In this case, return the basename followed
24965         by the slashes.  This is more general, and can be used in places
24966         where the original base_name purposely had an assertion failure.
24967         (base_len): New function.
24968
24969         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
24970         Do not include <assert.h>; no longer needed.
24971         Include xalloc.h.
24972         (memrchr): Remove decl.
24973         (dir_name_r): Remove.
24974         (dir_len): Renamed from dirlen.  All callers changed.
24975         Rewrite in terms of base_name, for simplicity and consistency.
24976         (dir_name): Never return NULL.  All callers changed.
24977         Do not include <stdlib.h> in test program; no longer needed.
24978         return 0; is fine for test program.
24979
24980         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
24981         New macros.
24982         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
24983
24984         * lib/path-concat.c (path_concat): Use base_len to compute
24985         base length, not strlen; this means we cannot rely on memcpy
24986         to null-terminate.
24987
24988         * lib/same.c (STREQ): Remove.
24989         (same_name): Handle the case where the basename ends in trailing '/'.
24990
24991         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
24992         a slash was stripped.  Do not strip the last slash after a
24993         file system prefix.
24994
24995 2001-05-11  Paul Eggert  <eggert@twinsun.com>
24996
24997         * lib/Makefile.am (libfetish_a_SOURCES):
24998         Add strftime.c, since we now compile it on all hosts.
24999
25000         * lib/strftime.c (my_strftime):
25001         Define to nstrftime if emacs, but only if my_strftime is not defined.
25002         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
25003         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
25004         Add one more extra argument: a nanoseconds value.
25005         All uses changed.
25006         (ns): New macro.
25007         (my_strftime function): Add %N format.
25008         (emacs_strftimeu): Renamed from emacs_strftime,
25009         with extra ut argument.
25010
25011 2001-05-09  Paul Eggert  <eggert@twinsun.com>
25012
25013         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
25014
25015 2001-04-21  Jim Meyering  <meyering@lucent.com>
25016
25017         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
25018         doesn't interfere.
25019
25020 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
25021
25022         * m4/ftruncate.m4: Check for chsize.
25023         Link with ftruncate.o unconditionally if ftruncate is missing.
25024         This was required when cross-compiling to i586-mingw32msvc.
25025
25026 2001-04-08  Jim Meyering  <meyering@lucent.com>
25027
25028         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
25029         recomputed; that's necessary when the offset spans a DST transition.
25030         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
25031
25032 2001-04-02  Jim Meyering  <meyering@lucent.com>
25033
25034         * lib/regex.h, regex.c: Update from GNU libc.
25035
25036 2001-03-24  Jim Meyering  <meyering@lucent.com>
25037
25038         * m4/jm-macros.m4: Require autoconf-2.49d.
25039
25040 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
25041
25042         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
25043
25044 2001-03-19  Paul Eggert  <eggert@twinsun.com>
25045
25046         * lib/version-etc.c (version_etc_copyright): Update to 2001.
25047
25048 2001-03-17  Jim Meyering  <meyering@lucent.com>
25049
25050         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
25051         now that the version in autoconf is equivalent.
25052         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
25053
25054         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
25055         Suggestion from Akim Demaille.
25056
25057         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
25058         (jm_PREREQ_TEMPNAME): New function.
25059
25060 2001-03-16  Paul Eggert  <eggert@twinsun.com>
25061
25062         * lib/tempname.c (uint64_t): Define to uintmax_t if
25063         not defined, and if UINT64_MAX is not defined.
25064         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
25065         Reported by John David Anglin.
25066
25067 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
25068
25069         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
25070         resolve alias if codeset is empty.
25071         * lib/config.charset (BeOS): Use wildcard syntax.
25072
25073 2001-03-13  Jim Meyering  <meyering@lucent.com>
25074
25075         * lib/path-concat.c (path_concat)
25076         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
25077         concatenating e.g., `C:' and `foo'.
25078         From Bruno Haible.
25079
25080 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
25081
25082         * lib/localcharset.c (locale_charset): Don't use
25083         setlocale(LC_CTYPE,NULL). Don't return NULL.
25084         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
25085
25086 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
25087
25088         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
25089         support for DOS/DJGPP.
25090
25091 2001-03-01  Paul Eggert  <eggert@twinsun.com>
25092
25093         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
25094         lacks mkstemp.  Compile our own tempname.c if we compile our own
25095         mkstemp.c, as mkstemp relies on tempname.
25096
25097 2001-03-01  Jim Meyering  <meyering@lucent.com>
25098
25099         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
25100         AH_VERBATIM really does output its argument verbatim.
25101
25102 2001-02-28  Paul Eggert  <eggert@twinsun.com>
25103
25104         * lib/Makefile.am (libfetish_a_SOURCES):
25105         Add dup-safer.c, fopen-safer.c.
25106         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
25107
25108         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
25109         * lib/unistd-safer.h: New files.
25110
25111 2001-02-25  Paul Eggert  <eggert@twinsun.com>
25112
25113         The mkstemp replacement is taken from glibc 2.2.2, with some
25114         portability fixes for use outside glibc, as follows:
25115
25116         * lib/tempname.c (struct_stat64): New macro.
25117         (direxists, __gen_tempname): Use it.
25118         This avoids a portability problem with Solaris 8.
25119
25120         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
25121         (<stddef.h>, <stdint.h>, <string.h>):
25122         Include only if STDC_HEADERS || _LIBC.
25123         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
25124         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
25125         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
25126         (__set_errno): Define this macro if <errno.h> doesn't.
25127         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
25128         Define these macros if <stdio.h> doesn't.
25129         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
25130         Define these macros if <sys/stat.h>
25131         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
25132         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
25133         __xstat64): Define if not _LIBC.
25134         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
25135         (__gen_tempname): Invoke gettimeofday only if
25136         HAVE_GETTIMEOFDAY || _LIBC;
25137         otherwise, fall back on plain "time".
25138         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
25139
25140         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
25141
25142         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
25143
25144 2001-02-18  Paul Eggert  <eggert@twinsun.com>
25145
25146         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
25147
25148 2001-02-17  Paul Eggert  <eggert@twinsun.com>
25149
25150         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
25151         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
25152         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
25153         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
25154
25155 2001-02-17  Paul Eggert  <eggert@twinsun.com>
25156
25157         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
25158         Remove workaround macros for hosts that have mbrtowc but not
25159         mbstate_t, as we now insist on proper declarations for both
25160         before using mbrtowc.
25161
25162 2001-02-17  Jim Meyering  <meyering@lucent.com>
25163
25164         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
25165         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
25166         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
25167         UnixWare 7.1.1.
25168
25169         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
25170         rather than AC_CACHE_VAL.
25171
25172 2001-02-17  Jim Meyering  <meyering@lucent.com>
25173
25174         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
25175         around included file name.
25176
25177         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
25178
25179         * lib/strftime.c: Update from GNU libc (the only changes were to
25180         comments).
25181
25182 2001-02-17  Jim Meyering  <meyering@lucent.com>
25183
25184         * lib/regex.c: Update from libc.
25185
25186 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
25187
25188         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
25189         clash.
25190
25191 2001-02-16  Paul Eggert  <eggert@twinsun.com>
25192
25193         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
25194         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
25195         Reported by Mark Hounschell via Paul Eggert.
25196
25197 2001-02-07  Jim Meyering  <meyering@lucent.com>
25198
25199         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
25200
25201 2001-02-05  Jim Meyering  <meyering@lucent.com>
25202
25203         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
25204         it includes the patch required for `large file' support with at least
25205         HP-UX's 10.20 /bin/cc.
25206
25207 2001-02-03  Jim Meyering  <meyering@lucent.com>
25208
25209         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
25210         AS_IF, now that it works once again (mysteriously).
25211         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
25212
25213 2001-01-30  Jim Meyering  <meyering@lucent.com>
25214
25215         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
25216         * m4/chown.m4: Rename conftestchown to conftest.chown.
25217         * m4/rename.m4: s/conftestdir/conftest.d1/ and
25218         s/conftestdir2/conftest.d2/.
25219         * m4/utimes.m4: s/conftestdata/conftest.data/
25220         Inspired by Pavel Roskin's change in autoconf.
25221
25222 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
25223
25224         * lib/config.charset: Update for FreeBSD 4.2.
25225
25226 2001-01-27  Jim Meyering  <meyering@lucent.com>
25227
25228         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
25229         a use of AS_IF.
25230         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
25231
25232 2001-01-26  Jim Meyering  <meyering@lucent.com>
25233
25234         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
25235         quotearg.c includes it.
25236
25237 2001-01-26  Jim Meyering  <meyering@lucent.com>
25238
25239         * lib/quotearg.c: Include stddef.h.
25240         * lib/quote.c: Include stddef.h.
25241         Reported by Axel Kittenberger.
25242
25243         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
25244         line in double quotes so that it evokes a better diagnostic.
25245         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
25246         Reported by Axel Kittenberger.
25247
25248 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
25249
25250         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
25251         as if it was a `charset'.
25252
25253 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
25254
25255         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
25256         has const.
25257
25258 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
25259
25260         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
25261         to avoid a warning.  Add back 'const' to inptr.
25262
25263 2001-01-20  Jim Meyering  <meyering@lucent.com>
25264
25265         Be sure that headers are checked before used in code compiled
25266         for the type checks.
25267         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
25268         In place of that, invoke jm_CHECK_ALL_TYPES.
25269         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
25270         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
25271         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
25272         The check for ssize_t was mistakenly run before the test for unistd.h.
25273
25274         The configure-time check for stdbool.h was missing.
25275         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
25276         (jm_PREREQ_HASH): New function.
25277
25278 2001-01-17  Jim Meyering  <meyering@lucent.com>
25279
25280         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
25281         for autoconf-2.49c.
25282         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
25283
25284 2001-01-16  Jim Meyering  <meyering@lucent.com>
25285
25286         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
25287         From Bruno Haible.
25288
25289 2001-01-14  Jim Meyering  <meyering@lucent.com>
25290
25291         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
25292         foo and bar.  Create conftestdir/ in the script, not in the C code.
25293         Remove directories in the script, not in the C code.
25294         Remove conftestdir{,2} before trying to create the directory.
25295         Make the entire configure script fail if the mkdir fails.
25296
25297 2001-01-14  Jim Meyering  <meyering@lucent.com>
25298
25299         * lib/rename.c: New file.  From Volker Borchert.
25300         Include stdlib.h, string.h or strings.h, and xalloc.h.
25301         Use strip_trailing_slashes rather than open-coding it.
25302
25303 2001-01-03  Paul Eggert  <eggert@twinsun.com>
25304
25305         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
25306
25307 2001-01-03  Jim Meyering  <meyering@lucent.com>
25308
25309         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
25310         of local `inptr' to avoid warning with some system declarations of
25311         iconv.
25312
25313 2001-01-02  Volker Borchert  <bt@teknon.de>
25314
25315         * m4/rename.m4: New file.
25316         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
25317
25318 2001-01-01  Jim Meyering  <meyering@lucent.com>
25319
25320         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
25321         even on systems with utmpx.h.  It's necessary for the declaration of
25322         utmp's ut_user member.  Reported by Andreas Jaeger.
25323
25324         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
25325         available. They are required for the declarations of getgrgid and
25326         getpwuid resp.
25327         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
25328         Reported by Andreas Jaeger.
25329
25330 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
25331
25332         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
25333         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
25334         so `make install' also works in VPATH builds.
25335
25336 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
25337
25338         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
25339         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
25340         can be used in subdirectories.
25341
25342 2000-12-29  Paul Eggert  <eggert@twinsun.com>
25343
25344         * lib/modechange.c: Do not assume that mode_t uses the
25345         traditional octal encoding.  E.g. "chmod 1 FOO" should set
25346         the other-execute bit of FOO even if S_IXOTH != 1.
25347
25348         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
25349         WOTH, XOTH, ALLM): New macros.
25350         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
25351          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
25352         Use them.
25353         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
25354         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
25355         (mode_compile):
25356         No need to use uintmax_t; unsigned long is long enough.
25357         Don't bother to get suffix since we don't use it.
25358
25359 2000-12-26  Jim Meyering  <meyering@lucent.com>
25360
25361         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
25362         better with autoheader.
25363
25364 2000-12-24  Jim Meyering  <meyering@lucent.com>
25365
25366         * lib/hash.c (is_prime): Return explicit boolean values.
25367         (hash_get_first): Return NULL to appease Irix5.6's 89.
25368         Reported by Nelson Beebe.
25369
25370 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
25371
25372         * lib/localcharset.c (locale_charset): Add support for Win32.
25373
25374 2000-12-18  Paul Eggert  <eggert@twinsun.com>
25375
25376         * lib/physmem.h, lib/physmem.c: New files.
25377
25378         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
25379         (noinst_HEADERS): Add physmem.h.
25380
25381         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
25382         't' for compatibility with Solaris 8 sort.
25383
25384 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
25385
25386         * lib/config.charset: Add support for BeOS.
25387
25388 2000-12-17  Jim Meyering  <meyering@lucent.com>
25389
25390         * m4/dos.m4 (jm_AC_DOS): New file and macro.
25391         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
25392
25393 2000-12-16  Jim Meyering  <meyering@lucent.com>
25394
25395         This bug had a serious impact on chown: `chown N:M FILE' (for integer
25396         N and M) would have treated it like `chown N:N FILE'.
25397
25398         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
25399
25400 2000-12-16  Jim Meyering  <meyering@lucent.com>
25401
25402         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
25403         SHELLS_FILE to a file name that's useful on djgpp systems.
25404         Include stdlib.h.
25405         (ADDITIONAL_DEFAULT_SHELLS): Define.
25406         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
25407         Based mostly on a patch from Prashant TR.
25408
25409 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
25410
25411         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
25412         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
25413         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
25414
25415 2000-12-08  Andreas Schwab  <schwab@suse.de>
25416
25417         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
25418         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
25419
25420 2000-12-07  Jim Meyering  <meyering@lucent.com>
25421
25422         * lib/stripslash.c (ISSLASH): Define.
25423         (strip_trailing_slashes): Use ISSLASH rather than comparing against
25424         `/'.
25425         From Prashant TR.
25426
25427         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
25428         (dir_name_r): Declare this function as static.
25429         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
25430         manifest itself on a name containing a mix of slashes and
25431         backslashes.
25432         Make this function work with names starting with a DOS-style
25433         drive letter and colon prefix.
25434         (dir_name): Append `.' if necessary.
25435         Based mostly on patches from Prashant TR and Eli Zaretskii.
25436
25437         * lib/dirname.h (dir_name_r): Remove prototype.
25438
25439 2000-12-06  Paul Eggert  <eggert@twinsun.com>
25440
25441         * m4/off_t-format.m4: Remove this file.
25442         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
25443
25444 2000-12-06  Jim Meyering  <meyering@lucent.com>
25445
25446         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
25447         replacement strtoull, we may well need the replacement strtoul, too.
25448         Check for declarations of strtoul and strtoull.
25449         Check for strtol.  Mainly as a cue to cause automake to include
25450         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
25451         Check for limits.h -- strtol.c needs it.
25452
25453 2000-12-05  Jim Meyering  <meyering@lucent.com>
25454
25455         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
25456
25457 2000-12-04  Jim Meyering  <meyering@lucent.com>
25458
25459         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
25460         Also include memory.h, stdlib.h, unistd.h if appropriate.
25461         Reported by Andreas Jaeger (conflicting declaration of malloc).
25462
25463 2000-12-02  Jim Meyering  <meyering@lucent.com>
25464
25465         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
25466         * m4/jm-macros.m4 (jm_MACROS): require it.
25467
25468 2000-12-02  Jim Meyering  <meyering@lucent.com>
25469
25470         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
25471
25472 2000-12-01  Paul Eggert  <eggert@twinsun.com>
25473
25474         * lib/memrchr.c: Include <config.h> before any system include file.
25475
25476 2000-11-30  Jim Meyering  <meyering@lucent.com>
25477
25478         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
25479
25480 2000-11-30  Jim Meyering  <meyering@lucent.com>
25481
25482         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
25483
25484 2000-11-29  Paul Eggert  <eggert@twinsun.com>
25485
25486         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
25487
25488 2000-11-26  Jim Meyering  <meyering@lucent.com>
25489
25490         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
25491
25492 2000-11-22  Paul Eggert  <eggert@twinsun.com>
25493
25494         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
25495         size of (size_t) -1; it's not portable.
25496
25497 2000-11-17  Jim Meyering  <meyering@lucent.com>
25498
25499         * lib/strstr.c: Update from GNU libc.
25500
25501 2000-11-17  Akim Demaille  <akim@epita.fr>
25502
25503         * lib/obstack.h: Formatting changes.
25504         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
25505         prevent type checking.
25506         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
25507         cast the value to (void *): assigning a `foo *' to a `void *'
25508         variable is valid.
25509         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
25510
25511 2000-11-16  Jim Meyering  <meyering@lucent.com>
25512
25513         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
25514
25515 2000-11-11  Jim Meyering  <meyering@lucent.com>
25516
25517         * lib/error.c: Add a couple #includes, merging from GNU libc version.
25518
25519 2000-11-10  Jim Meyering  <meyering@lucent.com>
25520
25521         * lib/obstack.h: Update from GNU libc.
25522         * lib/obstack.c: Likewise.
25523
25524 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
25525
25526         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
25527
25528 2000-11-06  Paul Eggert  <eggert@twinsun.com>
25529
25530         * lib/getusershell.c (setusershell): Use rewind rather than
25531         fseek/fseeko, to avoid configuration hassles with fseeko.
25532         Don't bother opening SHELLS_FILE if shellstream is NULL;
25533         it's not necessary.
25534
25535 2000-11-05  Jim Meyering  <meyering@lucent.com>
25536
25537         * lib/makepath.h (make_dir): Declare.
25538         * lib/makepath.c (make_dir): Remove `static' attribute.
25539         Tweak a comment.
25540
25541 2000-11-04  Jim Meyering  <meyering@lucent.com>
25542
25543         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
25544
25545 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
25546
25547         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
25548         last one in a bucket, advance to the next bucket.
25549
25550 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
25551
25552         * lib/fnmatch.c: Do not comment out all the code if we are using
25553         the GNU C library, because in some cases we are replacing buggy
25554         code in the GNU C library itself.
25555
25556 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
25557
25558         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
25559         (regex_compile): Catch bogus \(\1\).
25560
25561 2000-10-30  Paul Eggert  <eggert@twinsun.com>
25562
25563         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
25564         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
25565         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
25566
25567 2000-10-30  Paul Eggert  <eggert@twinsun.com>
25568
25569         * lib/error.h, getline.h, modechange.h:
25570         Remove "2000" from Copyright line, as the file hasn't been
25571         changed this year other than in the copyright notice.
25572
25573         * lib/xalloc.h: Add "2000" to Copyright line, as this file
25574         was changed this year.
25575
25576 2000-10-29  Jim Meyering  <meyering@lucent.com>
25577
25578         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
25579         renaming.
25580         * m4/ls-mntd-fs.m4: Likewise
25581
25582 2000-10-29  Jim Meyering  <meyering@lucent.com>
25583
25584         * lib/xstat.in: Fix grammar in comment.
25585
25586 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
25587
25588         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
25589         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
25590         doesn't define __restrict_arr.
25591
25592 2000-10-28  Jim Meyering  <meyering@lucent.com>
25593
25594         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
25595         (jm_PREREQ_MEMCHR): New function.
25596
25597 2000-10-28  Jim Meyering  <meyering@lucent.com>
25598
25599         * lib/memchr.c: Update from libc.
25600         Adjust for portability:
25601         [HAVE_STDLIB_H]: Include stdlib.h.
25602         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
25603         Undef __memchr, too.
25604         [!weak_alias]: Define __memchr to memchr.
25605
25606         * lib/regex.c: Update from libc.
25607         * lib/regex.h: Likewise.
25608         * lib/getopt1.c: Likewise.
25609         * lib/memcmp.c: Likewise.
25610
25611         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
25612         Avoid using fseek, when possible -- it's broken by design.
25613         Patch by Ulrich Drepper.
25614
25615 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
25616
25617         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
25618         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
25619         Giving in to popular pressure to shut up the compiler with casts.
25620
25621 2000-10-26  Jim Meyering  <meyering@lucent.com>
25622
25623         * lib/strftime.c: Update from libc.
25624
25625 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
25626
25627         * regex.c: More `unsigned char' -> `re_char' changes.
25628         Also change several `int' into `re_wchar_t'.
25629         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
25630         (PUSH_FAILURE_POINTER): Don't cast any more.
25631         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
25632         We want GCC to complain, since this piece of code makes
25633         re_match non-reentrant, which *should* be fixed.
25634         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
25635         (EXTEND_BUFFER): Use RETALLOC.
25636         (SET_LIST_BIT): Don't cast.
25637         (re_wchar_t): New type.
25638         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
25639         that those two functions will always properly return.
25640         (IMMEDIATE_QUIT_CHECK): Cast to void.
25641         (analyse_first): Use recursion rather than an explicit stack.
25642         (re_compile_fastmap): Can't fail anymore.
25643         (re_search_2): Don't check re_compile_fastmap for failure.
25644         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
25645         Now also sets the new value (passed in a new argument).
25646         (re_match_2_internal): Use it.
25647         Also, use a new var `reg' of type size_t when looping through regs
25648         rather than reuse the inappropriate `mcnt'.
25649
25650 2000-10-25  Jim Meyering  <meyering@lucent.com>
25651
25652         * lib/obstack.c: Update from libc.
25653
25654 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
25655
25656         * regex.c (regex_compile): Change the way of handling a range from
25657         a char less than 256 to a char not less than 256.
25658
25659 2000-10-24  Andrew Innes  <andrewi@gnu.org>
25660
25661         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
25662         NT-Emacs only.
25663         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
25664         so that re_search functions only quit when callers expect them to.
25665
25666 2000-10-23  Jim Meyering  <meyering@lucent.com>
25667
25668         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
25669         wrong.  That set_locale call must not have any side effects.
25670         From Paul Eggert.
25671
25672 2000-10-22  Jim Meyering  <meyering@lucent.com>
25673
25674         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
25675         [CYCLIC]: Remove now-unused definition.
25676
25677         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
25678         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
25679         Suggestion from Ulrich Drepper.
25680
25681 2000-10-21  Jim Meyering  <meyering@lucent.com>
25682
25683         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
25684         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
25685         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
25686
25687 2000-10-21  Jim Meyering  <meyering@lucent.com>
25688
25689         * lib/dirname.c (memrchr): Declare if necessary.
25690         (dir_name): Remove the restriction that there be no
25691         trailing slashes.  Now, this code skips past them, effectively
25692         ignoring them.
25693         [TEST_DIRNAME] (main): New unit tests.
25694
25695         * lib/memrchr.c: New file from GNU libc.
25696         Undef __memrchr, too.
25697         [!weak_alias]: Define __memrchr to memrchr.
25698         Guard weak_alias use with `#ifdef weak_alias'.
25699
25700 2000-10-21  Jim Meyering  <meyering@lucent.com>
25701
25702         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
25703         (dir_name): Use dir_name_r.
25704         * lib/dirname.h (dir_name_r): Declare it.
25705
25706 2000-10-17  Jim Meyering  <meyering@lucent.com>
25707
25708         * lib/quote.h (PARAMS): Define and use.
25709         Reported by Akim Demaille.
25710
25711         * lib/getopt.c: Update from libc.
25712
25713 2000-10-16  Jim Meyering  <meyering@lucent.com>
25714
25715         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
25716         setlocale.
25717         From Jan Fedak.
25718
25719 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
25720
25721         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
25722
25723 2000-09-25  Jim Meyering  <meyering@lucent.com>
25724
25725         * lib/md5.h (rol): Define (from GnuPG).
25726
25727         * lib/sha.c: Give credit (GnuPG) where due.
25728         (M): Use rol rather than open-coding it.
25729         Add a FIXME comment.
25730
25731 2000-09-21  Jim Meyering  <meyering@lucent.com>
25732
25733         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
25734         Reported by Michael Stone.
25735
25736 2000-09-20  Jim Meyering  <meyering@lucent.com>
25737
25738         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
25739         (noinst_HEADERS): Add sha.h.
25740         Based on code from Scott G. Miller and from GnuPG.
25741
25742 2000-09-18  Jim Meyering  <meyering@lucent.com>
25743
25744         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
25745         LIBS. Otherwise, everyone ends up linking with -lelf for some
25746         configurations.
25747         Reported by Mike Stone.
25748
25749 2000-09-15  Jim Meyering  <meyering@lucent.com>
25750
25751         * lib/regex.c: Update from libc.
25752
25753 2000-09-10  Jim Meyering  <meyering@lucent.com>
25754
25755         * lib/getopt.c (_getopt_internal): Update from glibc.
25756
25757 2000-09-09  Jim Meyering  <meyering@lucent.com>
25758
25759         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
25760         think it should be used as a general replacement for isascii.
25761         * lib/fnmatch.c: Likewise.
25762         * lib/mbswidth.c: Likewise
25763         * lib/regex.c: Likewise.
25764
25765         Don't use atoi.
25766         * lib/userspec.c: Include sys/param.h and limits.h.
25767         Include xstrtol.h.
25768         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
25769         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
25770         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
25771         UID, GID.  Check range.
25772
25773 2000-09-06  Jim Meyering  <meyering@lucent.com>
25774
25775         * lib/getopt.c (_getopt_internal): Update from glibc.
25776
25777 2000-08-30  Jim Meyering  <meyering@lucent.com>
25778
25779         * lib/strftime.c: Merge in changes from GNU libc.
25780
25781 2000-08-26  Jim Meyering  <meyering@lucent.com>
25782
25783         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
25784         * m4/fpending.m4: New file.
25785
25786 2000-08-26  Jim Meyering  <meyering@lucent.com>
25787
25788         * lib/closeout.c: Include "__fpending.h".
25789         (close_stdout_status): Return right away if there's nothing to flush.
25790
25791         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
25792         * lib/__fpending.c: New file.
25793         * lib/__fpending.h: New file.
25794
25795 2000-08-20  Jim Meyering  <meyering@lucent.com>
25796
25797         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
25798         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
25799         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
25800
25801 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
25802
25803         Improve fileutils installation on systems where running
25804         programs (like install) can't be unlinked.
25805         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
25806         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
25807
25808 2000-08-07  Paul Eggert  <eggert@twinsun.com>
25809
25810         Standardize on "memory exhausted" instead of "Memory exhausted"
25811         or "virtual memory exhausted".
25812         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
25813         "virtual memory exhausted".
25814         * lib/same.c (same_name): Invoke xalloc_die instead of printing
25815         our own message.
25816         * lib/userspec.c (parse_user_spec): Likewise.
25817         * lib/bumpalloc.h: comment fix
25818         * lib/same.c, userspec.c: Include xalloc.h.
25819
25820         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
25821         not char *const and pointing to a constant array.
25822         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
25823         (xrealloc): Comment fix.
25824
25825         * lib/userspec.c (parse_user_spec):
25826         Don't translate a message until just before returning,
25827         to avoid unnecessary translation.
25828
25829 2000-08-07  Jim Meyering  <meyering@lucent.com>
25830
25831         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
25832         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
25833         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
25834         getgroups.c, gethostname.c, getopt.h, group-member.c,
25835         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
25836         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
25837         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
25838         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
25839         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
25840         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
25841         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
25842         yesno.c: Back out Copyright date changes for each file with no change
25843         this year.  This eases coordination with other programs using the same
25844         source code modules.  From Paul Eggert.
25845
25846 2000-08-06  Paul Eggert  <eggert@twinsun.com>
25847
25848         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
25849         not char, for compatibility with glibc 2.1.3 strftime.c.
25850
25851 2000-08-03  Greg McGary  <greg@mcgary.org>
25852
25853         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
25854         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
25855         (EXTEND_BUFFER): Use them.
25856
25857 2000-08-01  Jim Meyering  <meyering@lucent.com>
25858
25859         * lib/dirname.c (ISSLASH): Define.
25860         (BACKSLASH_IS_PATH_SEPARATOR): Define.
25861         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
25862         both `\' and `/' may be use as path separators.
25863         Based on a patch from Prashant TR.
25864
25865 2000-07-31  Paul Eggert  <eggert@twinsun.com>
25866
25867         * lib/quotearg.c (quotearg_n_options): Don't make the initial
25868         slot vector a constant, since it might get modified.
25869
25870 2000-07-31  Jim Meyering  <meyering@lucent.com>
25871
25872         * lib/xmalloc.c: Use `virtual memory exhausted', not
25873         `Memory exhausted'.
25874         * lib/obstack.c (print_and_abort): Likewise.
25875
25876 2000-07-30  Paul Eggert  <eggert@twinsun.com>
25877
25878         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
25879         buffer, so that the caller can always quote one small
25880         component of a "memory exhausted" message in slot 0.
25881         From a suggestion by Jim Meyering.
25882
25883 2000-07-30  Jim Meyering  <meyering@lucent.com>
25884
25885         * lib/makepath.c (make_path): Quote the other instance, too.
25886
25887         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
25888         (STATIC_BUF_SIZE): Define.
25889         (quotearg_n_options): Use only statically allocated storage when
25890         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
25891         than STATIC_BUF_SIZE.
25892
25893 2000-07-29  Jim Meyering  <meyering@lucent.com>
25894
25895         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
25896         * lib/dirname.c (dir_name): Likewise.
25897
25898         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
25899         `/'.
25900
25901         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
25902         (dir_name): Assert that there are no trailing slashes.
25903
25904 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
25905
25906         * lib/mbswidth.h (mbswidth): Add a flags argument.
25907         (mbswidth): New declaration.
25908         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
25909         * lib/mbswidth.c (mbswidth): Add a flags argument.
25910         (mbsnwidth): New function.
25911
25912 2000-07-24  Jim Meyering  <meyering@lucent.com>
25913
25914         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
25915
25916 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25917
25918         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
25919
25920 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25921
25922         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
25923         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
25924         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
25925         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
25926         invoke multibyte primitives.
25927
25928 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25929
25930         * lib/quotearg.c:
25931         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
25932         so that mbstate_t is always defined.
25933
25934         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
25935         be 1 in at least one GCC installation, and this configuration
25936         error is likely to be common.  Ignoring MB_LEN_MAX hurts
25937         performance on hosts that have mbrtowc but have only unibyte
25938         locales, but I assume these hosts are rare.
25939
25940 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25941
25942         * lib/mbswidth.c (_XOPEN_SOURCE):
25943         Don't define; this causes problems on Solaris 7.
25944         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
25945
25946 2000-07-23  Jim Meyering  <meyering@lucent.com>
25947
25948         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
25949         too: getgrgid, getpwuid, getuid.
25950
25951 2000-07-23  Jim Meyering  <meyering@lucent.com>
25952
25953         * lib/basename.c (base_name): Add an assertion.
25954
25955 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
25956
25957         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
25958         shadow its mbsinit function.
25959
25960 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
25961
25962         * lib/mbswidth.h: New file.
25963         * lib/mbswidth.c: New file.
25964         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
25965         (noinst_HEADERS): Add mbswidth.h.
25966
25967 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
25968
25969         * lib/config.charset: Add support for FreeBSD. Improve support for
25970         HP-UX and IRIX 6.
25971
25972 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
25973
25974         * m4/mbswidth.m4: New file.
25975         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
25976
25977 2000-07-15  Jim Meyering  <meyering@lucent.com>
25978
25979         * lib/makepath.c: Include quote.h.
25980         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
25981         corresponding argument in a `quote (...)' call.
25982         Give better diagnostics.
25983
25984         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
25985         (noinst_HEADERS): Add quote.h.
25986
25987         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
25988         from tar's src/misc.c.
25989         * lib/quote.h: New file.  Prototypes for same.
25990
25991 2000-07-14  Paul Eggert  <eggert@twinsun.com>
25992
25993         From a suggestion by Bruno Haible.
25994         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
25995         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
25996         to decide whether to define the BeOS workaround macro;
25997         this adjusts to the change to AC_MBSTATE_T.
25998
25999 2000-07-14  Jim Meyering  <meyering@lucent.com>
26000
26001         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
26002         jm_AC_TYPE_UINTMAX_T.
26003
26004 2000-07-13  Paul Eggert  <eggert@twinsun.com>
26005
26006         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
26007
26008         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
26009         quotearg_buffer_restyled): Add support for
26010         clocale_quoting_style.  Undo previous change to
26011         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
26012         and "{RIGHT QUOTATION MARK}" msgids.
26013
26014 2000-07-10  Paul Eggert  <eggert@twinsun.com>
26015
26016         From a suggestion by Bruno Haible.
26017         * m4/mbstate_t.m4 (AC_MBSTATE_T):
26018         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
26019         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
26020         and mbstate_t, to a single-part test that simply defines mbstate_t.
26021         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
26022         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
26023
26024 2000-07-10  Jim Meyering  <meyering@lucent.com>
26025
26026         * m4/strerror_r.m4: Mirror the correction made in autoconf.
26027
26028         * m4/gnu-source.m4: Output to confdefs.h directly.
26029         Suggestion from Akim Demaille.
26030
26031 2000-07-09  Paul Eggert  <eggert@twinsun.com>
26032
26033         The old behavior of quoting `like this' doesn't look good with
26034         newer, ISO-style fonts.  See:
26035         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
26036
26037         Instead, quote "like this" by default.  Let the translator
26038         tailor the locale-specific quoting behavior by providing
26039         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
26040
26041         * lib/quotearg.c (N_): New macro.
26042         (gettext_default): New function.
26043         (quotearg_buffer_restyled): Use
26044         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
26045         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
26046
26047 2000-07-09  Jim Meyering  <meyering@lucent.com>
26048
26049         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
26050         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
26051
26052         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
26053         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
26054
26055 2000-07-09  Jim Meyering  <meyering@lucent.com>
26056
26057         * lib/Most files: Update copyright dates to include 2000.
26058
26059 2000-07-08  Jim Meyering  <meyering@lucent.com>
26060
26061         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
26062         if not defined.
26063         (xgethostname): Remove now-unnecessary #ifdef.
26064         Move declaration of `err' into loop where it's used.
26065
26066 2000-07-05  Paul Eggert  <eggert@twinsun.com>
26067         and Bruno Haible  <haible@clisp.cons.org>
26068
26069         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
26070         only if the test for an object-type mbstate_t fails.  This
26071         prevents us from mistakenly reporting that mbstate_t is a
26072         system object type after we "#define mbstate_t int" to work
26073         around its lack.
26074
26075 2000-07-05  Paul Eggert  <eggert@twinsun.com>
26076         and Bruno Haible  <haible@clisp.cons.org>
26077
26078         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
26079
26080 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
26081
26082         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
26083         to strerror_r.
26084         Include <ctype.h> for use of isalpha.
26085
26086 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
26087
26088         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
26089         by allocating a larger buffer. Test the gethostname return value for
26090         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
26091         returns an error and ENAMETOOLONG isn't defined.
26092
26093 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
26094
26095         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
26096         dimension.
26097
26098 2000-07-04  Jim Meyering  <meyering@lucent.com>
26099
26100         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
26101         of the deprecated AC_CHECKING.
26102
26103 2000-07-04  Jim Meyering  <meyering@lucent.com>
26104
26105         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
26106         Reported by Bruno Haible.
26107
26108 2000-07-04  Jim Meyering  <meyering@lucent.com>
26109
26110         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
26111         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
26112         lacks mbrtowc.
26113
26114 2000-07-03  Paul Eggert  <eggert@twinsun.com>
26115
26116         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
26117         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
26118
26119 2000-07-03  Paul Eggert  <eggert@twinsun.com>
26120         and Bruno Haible  <haible@clisp.cons.org>
26121
26122         * lib/quotearg.c (mbrtowc):
26123         Assign to *pwc, and return 1 only if result is nonzero.
26124         (iswprint): Use ISPRINT when substituting our own mbrtowc.
26125
26126 2000-07-03  Jim Meyering  <meyering@lucent.com>
26127
26128         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
26129
26130 2000-07-03  Jim Meyering  <meyering@lucent.com>
26131
26132         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
26133         This is necessary to get a definition of e.g., UTMP_FILE on
26134         HP-UX 10.20.
26135         From Bob Proulx.
26136
26137 2000-07-02  Jim Meyering  <meyering@lucent.com>
26138
26139         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
26140
26141         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
26142         AC_LIBOBJ(function_name).
26143         * m4/chown.m4: Likewise.
26144         * m4/fnmatch.m4: Likewise.
26145         * m4/ftruncate.m4: Likewise.
26146         * m4/getgroups.m4: Likewise.
26147         * m4/getline.m4: Likewise.
26148         * m4/group-member.m4: Likewise.
26149         * m4/jm-macros.m4: Likewise.
26150         * m4/lstat.m4: Likewise.
26151         * m4/malloc.m4: Likewise.
26152         * m4/memcmp.m4: Likewise.
26153         * m4/nanosleep.m4: Likewise.
26154         * m4/putenv.m4: Likewise.
26155         * m4/realloc.m4: Likewise.
26156         * m4/regex.m4: Likewise.
26157         * m4/stat.m4: Likewise.
26158         * m4/strftime.m4: Likewise.
26159
26160 2000-07-02  Jim Meyering  <meyering@lucent.com>
26161
26162         * lib/quotearg.c (mbstate_t): Don't define here.
26163
26164 2000-07-02  Jim Meyering  <meyering@lucent.com>
26165
26166         * lib/nanosleep.c (SIGCONT): Define if not already defined.
26167
26168 2000-07-01  Jim Meyering  <meyering@lucent.com>
26169
26170         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
26171
26172 2000-07-01  Jim Meyering  <meyering@lucent.com>
26173
26174         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
26175         problem.
26176
26177 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
26178
26179         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
26180         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
26181
26182 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
26183
26184         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
26185         per change in ../m4/ls-mntd-fs.m4.
26186         (read_filesystem_list): Ignore symbolic links.
26187
26188 2000-06-29  Jim Meyering  <meyering@lucent.com>
26189
26190         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
26191         for declaration of strcmp.
26192
26193         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
26194
26195         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
26196         Avoid warning by casting result to `char *' to remove `const'.
26197
26198 2000-06-28  Jim Meyering  <meyering@lucent.com>
26199
26200         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
26201         included by quotearg.c, for which we perform this test.  From
26202         Bruno Haible.
26203
26204 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
26205
26206         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
26207         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
26208         <utmpx.h> exists, put readutmp.o into LIBOBJS.
26209
26210 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
26211
26212         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
26213
26214 2000-06-26  Paul Eggert  <eggert@twinsun.com>
26215
26216         savedir now sets errno on failure and invokes xmalloc to get memory.
26217         Fix a couple of other minor bugs while we're at it.
26218
26219         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
26220         (NAMLEN): Remove macro.
26221         (malloc, realloc): Remove decls.
26222         (stpcpy): Likewise.
26223         ("xalloc.h"): Include.
26224         (NAME_SIZE_DEFAULT): New macro.
26225         (savedir): Use xmalloc / xrealloc to allocate memory.
26226         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
26227         Skip "" directory entries.
26228         Use strlen to calculate directory entry length, since the old method
26229         is rarely used these days and isn't worth supporting.
26230         Don't use a pointer after freeing it.
26231         Check for integer overflow when calculating allocation size.
26232         Use memcpy to copy entries, instead of stpcpy.
26233         Set errno properly when returning NULL.
26234         Check for readdir error.
26235
26236 2000-06-26  Jim Meyering  <meyering@lucent.com>
26237
26238         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
26239
26240 2000-06-25  Jim Meyering  <meyering@lucent.com>
26241
26242         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
26243         Linux header bug when _XOPEN_SOURCE is defined to 500.
26244
26245 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
26246
26247         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
26248         deficiency.
26249
26250 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
26251
26252         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
26253         Include xalloc.h.
26254         Don't include <stdlib.h>.  Don't declare malloc, realloc.
26255
26256 2000-06-24  Jim Meyering  <meyering@lucent.com>
26257
26258         * m4/strerror_r.m4: Revive this file -- to try out an experimental
26259         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
26260         for which strerror does return char*, but which lacks a conveniently
26261         accessible declaration of the function.  If the compile-test says
26262         strerror_r doesn't work, then resort to a `run'-test that works on
26263         BeOS and segfaults on DEC Unix.
26264
26265 2000-06-24  Jim Meyering  <meyering@lucent.com>
26266
26267         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
26268
26269 2000-06-23  Paul Eggert  <eggert@twinsun.com>
26270
26271         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
26272         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
26273
26274 2000-06-23  Paul Eggert  <eggert@twinsun.com>
26275
26276         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
26277         (mbrtowc, mbstate_t): Define substitutes if
26278         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
26279         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
26280         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
26281
26282 2000-06-23  Jim Meyering  <meyering@lucent.com>
26283
26284         * m4/afs.m4: Add missing AC_MSG_RESULT.
26285         Reported by Bruno Haible.
26286
26287         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
26288         Suggestion from Bruno Haible.
26289
26290 2000-06-23  Jim Meyering  <meyering@lucent.com>
26291
26292         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
26293
26294 2000-06-21  Jim Meyering  <meyering@lucent.com>
26295
26296         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
26297
26298 2000-06-21  Jim Meyering  <meyering@lucent.com>
26299
26300         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
26301         (noinst_HEADERS): Add getstr.h.
26302
26303         * lib/getline.c (getstr): Move into a separate file.
26304         * lib/getstr.c (getstr): New file, extracted from getline.c, with
26305         the following changes: new parameter, delim2; both delim[12]
26306         parameters have type `int', not `char'.  The latter would lose
26307         with 8-bit delimiters.
26308         * lib/getstr.h: New file.
26309
26310 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
26311
26312         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
26313         than 1024, return a memory chunk of least possible size, instead
26314         of size PATH_MAX + 2. In the loop, increment the size proportionally.
26315         Use free/xmalloc instead of xrealloc to avoid copying for very long
26316         paths.
26317
26318 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
26319
26320         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
26321         the empty string.
26322
26323 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
26324
26325         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
26326         address, not strdup.  Include <stdlib.h> and don't declare free().
26327
26328 2000-06-19  Jim Meyering  <meyering@lucent.com>
26329
26330         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
26331
26332 2000-06-18  Jim Meyering  <meyering@lucent.com>
26333
26334         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
26335
26336         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
26337         `checking whether...' message to be consistent with that of the
26338         lstat test.
26339
26340 2000-06-18  Jim Meyering  <meyering@lucent.com>
26341
26342         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
26343         Besides, these days every porting target provides a mkdir function.
26344
26345         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
26346         needed. (this snippet comes from src/system.h).
26347
26348 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
26349
26350         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
26351
26352 2000-06-15  Paul Eggert  <eggert@twinsun.com>
26353
26354         * lib/human.c (adjust_value): New function.
26355         (human_readable_inexact): Apply rounding style even when
26356         printing approximate values.
26357
26358 2000-06-14  Paul Eggert  <eggert@twinsun.com>
26359
26360         * lib/human.c (human_readable_inexact): Allow an input block
26361         size that is not a multiple of the output block size, and vice versa.
26362         Reported by Piergiorgio Sartor.
26363
26364 2000-06-14  Paul Eggert  <eggert@twinsun.com>
26365
26366         * lib/getdate.y (get_date): Apply relative times after time
26367         zone indicator, not before.  Reported by Todd A. Jacobs.
26368
26369 2000-06-13  Jim Meyering  <meyering@lucent.com>
26370
26371         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
26372
26373         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
26374
26375 2000-06-12  Paul Eggert  <eggert@twinsun.com>
26376
26377         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
26378
26379 2000-06-12  Jim Meyering  <meyering@lucent.com>
26380
26381         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
26382         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
26383         optional argument.
26384         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
26385         the optional argument, `lib'.
26386
26387 2000-06-08  Jim Meyering  <meyering@lucent.com>
26388
26389         * m4/largefile.m4: Remove file (now that it's part of autoconf).
26390
26391 2000-06-04  Paul Eggert  <eggert@twinsun.com>